#include <CLog.h>
Public Member Functions | |
CLog () | |
virtual | ~CLog () |
bool | Open (const char *pFilename) |
Open the log. | |
bool | Close () |
Close the log. | |
void | LogLastError () |
Log the last occured error! | |
long | Write (const char *pMessage,...) |
long | WriteLine (const char *pMessage,...) |
Write a line to the log. | |
bool | IsOpen () |
Return whether the log is open or not. | |
Static Public Member Functions | |
static CLog & | GetLog () |
Get an instance of CLog (singleton). | |
Private Attributes | |
ofstream | m_theLog |
bool | m_bOpen |
CLog::CLog | ( | ) |
CLog::~CLog | ( | ) | [virtual] |
bool CLog::Open | ( | const char * | pFilename | ) |
Open the log.
bool CLog::Close | ( | void | ) |
Close the log.
void CLog::LogLastError | ( | ) |
Log the last occured error!
Log the last error, which can be found by calling the WINAPI function GetLastError().
long CLog::Write | ( | const char * | pMessage, | |
... | ||||
) |
long CLog::WriteLine | ( | const char * | pMessage, | |
... | ||||
) |
Write a line to the log.
bool CLog::IsOpen | ( | void | ) | [inline] |
Return whether the log is open or not.
ofstream CLog::m_theLog [private] |
bool CLog::m_bOpen [private] |