// DisplayMessage.h: interface for the CDisplayMessage class.
|
//
|
//////////////////////////////////////////////////////////////////////
|
|
#pragma once
|
|
#include "Singleton.h"
|
#include "SISFolderScheduling.h"
|
|
interface IDisplyMessage2Parent
|
{
|
virtual void DisplayMessage(TCHAR* str) = 0;
|
};
|
|
class CDisplayMessage : public Singleton<CDisplayMessage>
|
{
|
public:
|
CDisplayMessage(void);
|
virtual ~CDisplayMessage(void);
|
|
public:
|
void SetDM2P(IDisplyMessage2Parent* pDM2P) { m_pDM2P = pDM2P; }
|
void SetPath(const CString& strPath);
|
BOOL MakeLogFile();
|
BOOL WriteToFile(const CString& strMessage);
|
void DisplayMessage(const CString& strMessage);
|
void DisplayMessage(const TCHAR* lpstrFormat, ...);
|
|
public:
|
CTime m_TimeLogFile;
|
CString m_strLogPath;
|
CString m_strLogFile;
|
IDisplyMessage2Parent* m_pDM2P;
|
CRITICAL_SECTION m_csLog;
|
CSISFolderScheduling m_FSLog;
|
|
|
CStdioFile* m_pFileLog;
|
CFileException m_fileException;
|
};
|
|
#define g_pLog CDisplayMessage::GetSingletonPtr()
|