00001 00012 #ifndef LOG_H 00013 #define LOG_H 00014 00030 class Log { 00031 public: 00032 Log(string& r_fname); 00033 Log(const char * fname); 00034 ~Log(); 00035 void Write(const string& r_msg); 00036 void Write(const char *fmt, ...); 00037 void SetActive(bool b); 00038 bool IsActive(); 00039 private: 00040 Log(Log&); 00041 Log& operator=(Log&); 00042 void SetTime(); 00043 00044 string mFileName; 00045 ofstream * mpFile; 00046 bool mActive; 00047 char mTimeStamp[40]; 00048 CRITICAL_SECTION mMutex; 00049 }; 00050 00051 #endif // LOG_H 00052
1.2.17