Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
Frm_Tbuff.h
Go to the documentation of this file.
1 // Frm_Tbuff.h
3 //
4 //
6 
7 #ifndef FRM_TBUFF_H
8 #define FRM_TBUFF_H
9 
10 
11 #ifndef _MSC_VER
12 #include <mem.h>
13 #endif
14 
15 #include <string.h>
16 
17 class TBuff {
18  public:
19  static TBuff* GetInstance(void){if (_Instance == 0) _Instance = new TBuff; return _Instance;};
20  void Set(const char* pText){memcpy(_Info, pText, strlen(pText));};
21  const char* Get(void){return _Info;};
22  void Reset(void){memset(_Info, '\0', 512);};
23  char _TraceName[512];
24  private:
25  static TBuff* _Instance;
26  char _Info[512];
27  TBuff(void){Reset();memset(_TraceName, '\0', 512);};
28 };
29 
30 
31 #endif
Definition: Frm_Tbuff.h:13
void Reset(void)
Definition: Frm_Tbuff.h:22
static TBuff * GetInstance(void)
Definition: Frm_Tbuff.h:19
const char * Get(void)
Definition: Frm_Tbuff.h:21
char _TraceName[512]
Definition: Frm_Tbuff.h:18
void Set(const char *pText)
Definition: Frm_Tbuff.h:20