|
MULTIBODY SIMULATION SOFTWARE - API documentation |
#include <CHlog.h>


Public Types | |
| enum | eChLogLevel { CHERROR = 0, CHWARNING, CHMESSAGE, CHSTATUS, CHQUIET } |
Public Member Functions | |
| ChLog () | |
| virtual void | Flush () |
| void | SetDefaultLevel (eChLogLevel mlev) |
| void | SetCurrentLevel (eChLogLevel mlev) |
| eChLogLevel | GetCurrentLevel () |
| void | RestoreDefaultLevel () |
| ChLog & | operator- (eChLogLevel mnewlev) |
Protected Attributes | |
| eChLogLevel | current_level |
| eChLogLevel | default_level |
There are different levels of log messages. This is indifferent for the base class, but more sophisticated specializations of the ChLog class may handle message output in different ways (for example a ChLogForGUIapplication may print logs in STATUS level only to the bottom of the window, etc.)
| chrono::ChLog::ChLog | ( | ) |
Creates the ChLog, and sets the level at MESSAGE.
| virtual void chrono::ChLog::Flush | ( | ) | [virtual] |
Forces output of message buffers, if any. Also, should restore the default eChLogLevel This base class does pretty nothing, but inherited classes should override this method with more specific implementations.
| void chrono::ChLog::SetDefaultLevel | ( | eChLogLevel | mlev | ) |
Sets the default level, to be used from now on.
| void chrono::ChLog::SetCurrentLevel | ( | eChLogLevel | mlev | ) |
Sets the current level, to be used until new flushing.
| eChLogLevel chrono::ChLog::GetCurrentLevel | ( | ) |
Gets the current level.
| void chrono::ChLog::RestoreDefaultLevel | ( | ) |
Restore the default level.
| ChLog & chrono::ChLog::operator- | ( | eChLogLevel | mnewlev | ) |
Using the - operator is easy to set the status of the log, so in you code you can write, for example: GetLog() - ChLog::CHERROR << "a big error in " << mynumber << " items \n" ;
CHRONO::ENGINE