#ifndef _LOGFILE_LOGFILE_HPP_ #define _LOGFILE_LOGFILE_HPP_ #ifndef _COMMON_PUREVIEWOFFILE_HPP_ #include #endif #ifndef _COMMON_FILEMAP_HPP_ #include #endif #ifndef _THREAD_EVENT_HPP_ #include #endif #ifndef _THREAD_MUTEX_HPP_ #include #endif #ifndef _FILEIO_FILEIO_HPP_ #include #endif class LogFile { public: LogFile(const String &strLogName=String("LOGFILE")); virtual ~LogFile(); BOOL writeLine(const String &strLine); BOOL write(const String &strLine); BOOL write(Block &strLines); BOOL read(String &strLine); BOOL read(Block &strLines); void synchronize(void); private: void log(const String &msg); FileMap mFileMap; PureViewOfFile mFileView; Event mIOEvent; Event mIOAckEvent; Mutex mMutex; BOOL mIsAckPending; FileIO mLogFile; }; inline BOOL LogFile::writeLine(const String &strLine) { return write(strLine); } #endif