Simpact Cyan
Population based event driven simulation using mNRM
|
Helper class to write to a log file. More...
#include <logfile.h>
Public Member Functions | |
bool | open (const std::string &fileName) |
Opens the specified file for writing. More... | |
std::string | getFileName () const |
Returns the filename from the 'open' call. More... | |
void | print (const char *format,...) |
Writes the specified parameters (similar to printf) to the logfile, automatically appending a newline character (\n). More... | |
void | printNoNewLine (const char *format,...) |
Writes the specified parameters (similar to printf) to the logfile. More... | |
void | close () |
Finalizes and closes the log file. More... | |
Public Member Functions inherited from errut::ErrorBase | |
ErrorBase () | |
Creates an instance without an explicit object name. More... | |
ErrorBase (const std::string &objName) | |
Creates an instance with the object name set to objName . More... | |
std::string | getObjectName () const |
Returns the stored object name. More... | |
std::string | getErrorString () const |
Returns the currently stored error message. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from errut::ErrorBase | |
void | setErrorString (const std::string &str) const |
Derived classes can use this member function to store an error message. More... | |
Helper class to write to a log file.
void LogFile::close | ( | ) |
Finalizes and closes the log file.
|
inline |
Returns the filename from the 'open' call.
bool LogFile::open | ( | const std::string & | fileName | ) |
Opens the specified file for writing.
void LogFile::print | ( | const char * | format, |
... | |||
) |
Writes the specified parameters (similar to printf) to the logfile, automatically appending a newline character (\n).
void LogFile::printNoNewLine | ( | const char * | format, |
... | |||
) |
Writes the specified parameters (similar to printf) to the logfile.