- Library Clean up: - Removed all unused C/C++ libraries from source - First C/C++ libraries then redA libraries - Library changes: - renamed BufferCore -> CharBufferCore - added ItemBufferCore - CharBufferCore: - Derive RollingBuffer & ShiftBuffer from common class CharBuffer - CharBuffer is mostly a virtual class (interface)
48 lines
1.4 KiB
C++
48 lines
1.4 KiB
C++
/*
|
|
* LogCore.h
|
|
*
|
|
* Created on: 17 May 2016
|
|
* Author: wentzelc
|
|
*/
|
|
|
|
#ifndef REDACORE_LOGCORE_H_
|
|
#define REDACORE_LOGCORE_H_
|
|
|
|
// Standard C/C++ Libraries
|
|
#include <stdio.h>
|
|
|
|
// redA Libraries
|
|
/* none */
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
// Debug options
|
|
const short
|
|
OUT_COUNT = 1, // Show Length of String
|
|
OUT_NORMAL = 2, // Show ASCII output (replace non-printable characters (incl. CR/LF with ".")
|
|
OUT_HEX = 4, // Show HEX output
|
|
OUT_BIN = 8, // Show BINARY output
|
|
OUT_CRLF = 16, // with OUT_NORMAL - do not replace CR/LF with "."
|
|
OUT_ASIS = 32; // with OUT_NORMAL - do not replace any non-printable character with "."
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
typedef enum { dlNone = 0, dlLow = 1, dlMedium = 2, dlHigh = 3 } EDebugLevel;
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
class CLogCore
|
|
{
|
|
private:
|
|
FILE * OutputFile;
|
|
|
|
public:
|
|
CLogCore( FILE * pOutputFile );
|
|
|
|
bool Message( EDebugLevel DebugLevel, EDebugLevel MsgLevel, const char * Format, ... );
|
|
bool Output( EDebugLevel DebugLevel, EDebugLevel MsgLevel, const short Show, const char * Buffer, int Len, const char * Format, ... );
|
|
};
|
|
//---------------------------------------------------------------------------
|
|
|
|
#endif /* REDACORE_OGCORE_H_ */
|