mirror of
https://github.com/Heretek-AI/GDevelop.git
synced 2026-07-22 01:55:25 -04:00
54d7eb0662
Tried to correct the fact that SFML does not intercept events when used on a wxSFMLCanvas on linux by emulating these events. TODO: Test it Adapted to changes in GDCore. git-svn-id: svn://localhost@701 8062f311-0dae-4547-b526-b8ab9ac864a5
64 lines
1.4 KiB
C++
64 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
|