Class to output a message log file. Singleton base class manage the creation/deletion of the logger. That the instance function returns a pointer to a static variable and thus is declared static. Only the class function Instance can call the constructor. Public access to the constructor is denied. The constructor, copy constructor and assignment operator are all private to ensure that the programmer using the singleton class can only create a single instance of the class using only the Instance() function. The life of the singleton instantiation is for the duration of the application.
More...
#include <Sfx_Logger.h>
Class to output a message log file. Singleton base class manage the creation/deletion of the logger. That the instance function returns a pointer to a static variable and thus is declared static. Only the class function Instance can call the constructor. Public access to the constructor is denied. The constructor, copy constructor and assignment operator are all private to ensure that the programmer using the singleton class can only create a single instance of the class using only the Instance() function. The life of the singleton instantiation is for the duration of the application.
◆ eOpeningMode
◆ Logger() [1/2]
◆ ~Logger()
◆ Logger() [2/2]
Sfx::Logger::Logger |
( |
const Logger & | aOther | ) |
|
|
protecteddelete |
prevent copy and assignment
- Parameters
-
aOther | object to copy from |
◆ close()
void Sfx::Logger::close |
( |
| ) |
|
|
protected |
◆ closeLogFile()
bool Sfx::Logger::closeLogFile |
( |
| ) |
|
Close file.
- Returns
- true/false
◆ getOpeningMode()
◆ Init()
bool Sfx::Logger::Init |
( |
| ) |
|
Initiates log. Don't call, it is in the constructor.
- Returns
◆ openLogFile()
bool Sfx::Logger::openLogFile |
( |
std::string | logFile | ) |
|
Open file for writing result of the simulation.
- Parameters
-
- Returns
- true/false on success
◆ operator=()
prevent assignment
- Parameters
-
aOther | object to assign from |
- Returns
- this
◆ OutputError()
void Sfx::Logger::OutputError |
( |
char * | text, |
|
|
| ... ) |
outpout error message to log file
- Parameters
-
◆ OutputNewline()
void Sfx::Logger::OutputNewline |
( |
| ) |
|
outpout newline to log file
◆ OutputSuccess()
void Sfx::Logger::OutputSuccess |
( |
char * | text, |
|
|
| ... ) |
outpout success message to log file
- Parameters
-
◆ setOpeningMode()
void Sfx::Logger::setOpeningMode |
( |
const eOpeningMode | aOpenMode | ) |
|
|
inline |
Open file for writing result of the simulation.
- Parameters
-
◆ Shutdown()
bool Sfx::Logger::Shutdown |
( |
| ) |
|
Shuts down log, in the destructor.
- Returns
◆ write2File()
void Sfx::Logger::write2File |
( |
const std::string | aMessage | ) |
|
writing log event to file
- Parameters
-
◆ writeToLogFile()
void Sfx::Logger::writeToLogFile |
( |
const std::string | aStr | ) |
|
Write to log file.
- Parameters
-
◆ Singleton< Logger >
friend class Singleton< Logger > |
|
friend |
make friend to access protected and private
◆ m_fileName
std::string Sfx::Logger::m_fileName |
|
protected |
◆ m_filePath
std::filesystem::path Sfx::Logger::m_filePath |
|
protected |
◆ m_fStream
std::ofstream Sfx::Logger::m_fStream |
|
protected |
◆ m_logfile
FILE* Sfx::Logger::m_logfile |
|
protected |
◆ m_logFileNAME
char Sfx::Logger::m_logFileNAME[256] |
|
protected |
◆ m_opened
bool Sfx::Logger::m_opened |
|
protected |
◆ m_openMode
The documentation for this class was generated from the following files: