Files
bacnet_stack/ports/bdk-atxx4-mstp/external/avrosp/Utility.hpp
T
Kari Argillander 599033b7b0 Move some external files to external/ folder (#744)
It is lot easier to work with automatic formatters if we have external
files in different folder. For some tools we can example just exclude
external all together.

Co-authored-by: Kari Argillander <kari.argillander@fidelix.com>
2024-08-28 16:24:48 -05:00

71 lines
1.5 KiB
C++

/*****************************************************************************
*
* Atmel Corporation
*
* File : Utility.hpp
* Compiler : Dev-C++ 4.9.8.0 - http://bloodshed.net/dev/
* Revision : $Revision: 1163 $
* Date : $Date: 2006-08-02 15:38:16 +0200 (on, 02 aug 2006) $
* Updated by : $Author: ohlia $
*
* Support mail : avr@atmel.com
*
* Target platform : Win32
*
* AppNote : AVR911 - AVR Open-source Programmer
*
* Description : A class holding misc. utility methods used in AVROSP.
*
*
****************************************************************************/
#ifndef UTILITY_HPP
#define UTILITY_HPP
using namespace std;
#ifndef NOREGISTRY
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
#include <vector>
#include <string>
#include "ErrorMsg.hpp"
class Utility
{
protected:
bool noLog;
bool noProgress;
public:
/* Constructor */
Utility();
/* Destructor */
~Utility();
/* Methods */
void muteLog() { noLog = true; }
void muteProgress() { noProgress = true; }
void log( const string & txt );
void progress( const string & txt );
long convertHex( const string & txt );
string convertLong( long num, long radix = 10 );
void parsePath( vector<string> & list );
bool fileExists( string filename );
void saveString( string txt, string filename );
#ifndef NOREGISTRY
string getRegistryValue( const string & path, const string & value );
#endif
};
extern Utility Util;
#endif