-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathLog.h
44 lines (40 loc) · 1.11 KB
/
Log.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef _LOG
#define _LOG
class LogRecord
{
private:
LogRecord* next;
LogRecord* prev;
BOOL lastTrick;
BOOL trickRec;
CString rec;
public:
LogRecord(BOOL trick);
~LogRecord();
void addStr( CString& rec );
void addStr( const char* rec );
CString& getStr() { return this->rec; }
LogRecord* getNext() { return this->next; }
LogRecord* getPrev() { return this->prev; }
BOOL isTrickRec() { return this->trickRec; }
BOOL isInLastTrick() { return this->lastTrick; }
void clearLastTrick() { this->lastTrick = FALSE; }
};
class Log {
public:
static void writeLog( CString& line );
static void writeLog(const char* line);
static void writeLog( CString& line, BOOL trick );
static void writeLog(const char* line, BOOL trick );
static void trickEnded();
static void update();
static unsigned char* saveState( unsigned char* p );
static unsigned char* loadState( unsigned char* p );
static LogRecord* getNext( LogRecord* curr );
static LogRecord* getPrev( LogRecord* curr );
static void removeAll();
static void setPref( BOOL newestFirst );
static BOOL getPref();
// static void scroll();
};
#endif