Files
GDevelop/IDE/LogFileManager.h
T
Florian 8672f179e9 Exchanged all french messages with their English counterparts.
Gui elements in SceneCanvas are now independant from the zoom factor.
Work in progress: NewProjectDialog.

git-svn-id: svn://localhost@837 8062f311-0dae-4547-b526-b8ab9ac864a5
2012-09-20 19:53:26 +00:00

65 lines
1.4 KiB
C++

/** \file
* Game Develop
* 2008-2012 Florian Rival (Florian.Rival@gmail.com)
*/
#ifndef LOGFILEMANAGER_H
#define LOGFILEMANAGER_H
/**
* \brief Offer a simple way to write to a log file.
*
* \note The log file is only used for logging some specific tasks and is not exhaustive. Developers should refer to the console output.
*/
class LogFileManager
{
public:
/**
* Write the string into the log file if the log file is activated.
*/
void WriteToLogFile(const std::string & log);
/**
* Check if the log file is activated and get the log filename from wxConfigBase. Clear the log file if needed.
*/
void InitalizeFromConfig();
/**
* Return true if the log file is activated
*/
bool IsLogActivated() { return logActivated; }
static LogFileManager *GetInstance()
{
if ( NULL == _singleton )
{
_singleton = new LogFileManager;
}
return ( static_cast<LogFileManager*>( _singleton ) );
}
static void DestroySingleton()
{
if ( NULL != _singleton )
{
delete _singleton;
_singleton = NULL;
}
}
private:
std::string logFile;
bool logActivated;
LogFileManager() {};
virtual ~LogFileManager() {};
static LogFileManager *_singleton;
};
#endif // LOGFILEMANAGER_H