/******************************************************************************* * * * Société de Transports de Montréal. * * 2013 * * * * Projet Zones Tests * * * * * * * *******************************************************************************/ /* Description: Description du fichier si nécessaire. */ /* ************************************************************************** */ /* Revision: ### 20130201 JFM Verision d'origine. ### YYYYMMDD Description du besoin ou du bug Description du changement. */ /* ************************************************************************** */ #include "GlobalDefine.h" #ifndef ZTLOG_H #define ZTLOG_H #include #include "Zonetest.h" class CZTLog { public: //CEngLog is a singleton class static CZTLog* instance(){return &mSingleton;} static CZTLog mSingleton; CZTLog(); ~CZTLog(); void AddLogString(QString string,bool AddToEngLog = false); void AddBufferString(QString string, bool AddToEngLog = false, bool ForceWrite = false); void ClearBufferString(); void WriteBufferToLog(); void Init(); bool IsWriteForced(){return mForceWriteBuffer;} unsigned int CopyLogFile(QString Dest,bool DeleteIfPresent = false); unsigned int DeleteLogFile(); QString GetEntireLogFile(); CZoneTest *mProgramHandle; private: QFile *mZTLogFile; QString mLogBuffer; bool mLogBufferToEngLog; bool mForceWriteBuffer; }; #endif // ZTLOG_H