#include <messaginghub.h>
Public Types | |
| enum | MessageType { FatalError, Error, Warning, InfoMessage, StatusInfo, LogMessage } |
Public Member Functions | |
| MessagingHubBase () | |
| void | setVerbosity (int v) |
| int | getVerbosity () |
| void | setLoggingCategory (const ASCString &category, bool enable) |
| bool | logCategoryEnabled (const ASCString &category) |
| void | message (MessageType type, const char *msg,...) |
| displays any kind of message, as specified by parameter | |
| void | message (MessageType type, const ASCString &msg) |
| displays any kind of message, as specified by parameter | |
| StatusMessageWindowHolder | infoMessageWindow (const ASCString &msg) |
| Displays a status window. | |
Public Attributes | |
| SigC::Signal1< void, const ASCString & > | fatalError |
| displays an error message and aborts the game | |
| SigC::Signal0< void > | exitHandler |
| exits the program | |
| SigC::Signal1< void, const ASCString & > | error |
| displays an error message and continues game | |
| SigC::Signal1< void, const ASCString & > | warning |
| displays a warning | |
| SigC::Signal1< void, const ASCString & > | infoMessage |
| displays an informational message | |
| SigC::Signal1< void, const ASCString & > | statusInformation |
| displays a message in the message line | |
| SigC::Signal2< void, const ASCString &, int > | logMessage |
| prints a message to the logging file | |
| SigC::Signal2< void, const ASCString &, const ASCString & > | logCategorizedMessage |
| prints a message to the logging file | |
| SigC::Signal1< StatusMessageWindowHolder, const ASCString & > | messageWindowFactory |
| prints a message to the logging file | |
Protected Attributes | |
| int | verbosity |
Definition at line 61 of file messaginghub.h.
Definition at line 75 of file messaginghub.h.
| MessagingHubBase::MessagingHubBase | ( | ) | [inline] |
Definition at line 68 of file messaginghub.h.
| void MessagingHubBase::setVerbosity | ( | int | v | ) | [inline] |
| int MessagingHubBase::getVerbosity | ( | ) | [inline] |
| void MessagingHubBase::setLoggingCategory | ( | const ASCString & | category, | |
| bool | enable | |||
| ) |
Definition at line 93 of file messaginghub.cpp.
| bool MessagingHubBase::logCategoryEnabled | ( | const ASCString & | category | ) |
Definition at line 140 of file messaginghub.cpp.
| void MessagingHubBase::message | ( | MessageType | type, | |
| const char * | msg, | |||
| ... | ||||
| ) |
displays any kind of message, as specified by parameter
Definition at line 105 of file messaginghub.cpp.
References ASCString::vaformat().
Referenced by message().
| void MessagingHubBase::message | ( | MessageType | type, | |
| const ASCString & | msg | |||
| ) |
displays any kind of message, as specified by parameter
Definition at line 78 of file messaginghub.cpp.
References error, Error, exitHandler, fatalError, FatalError, infoMessage, InfoMessage, logMessage, LogMessage, message(), StatusInfo, statusInformation, warning, and Warning.
| StatusMessageWindowHolder MessagingHubBase::infoMessageWindow | ( | const ASCString & | msg | ) |
Displays a status window.
As long as a copy of the returned StatusMessageWindowHolder exists, the window is shown. Typical usage:
if ( doSomething ) { MessagingHubBase::StatusMessageWindowHolder smwh = MessagingHub::Instance().infoMessageWindow( "I'm doing something" ); doIt(); } // status window is automatically removed when scope is left
Definition at line 73 of file messaginghub.cpp.
References messageWindowFactory.
int MessagingHubBase::verbosity [protected] |
| SigC::Signal1<void, const ASCString&> MessagingHubBase::fatalError |
displays an error message and aborts the game
Definition at line 78 of file messaginghub.h.
Referenced by message().
| SigC::Signal0<void> MessagingHubBase::exitHandler |
| SigC::Signal1<void, const ASCString&> MessagingHubBase::error |
displays an error message and continues game
Definition at line 84 of file messaginghub.h.
Referenced by message().
| SigC::Signal1<void, const ASCString&> MessagingHubBase::warning |
| SigC::Signal1<void, const ASCString&> MessagingHubBase::infoMessage |
displays an informational message
Definition at line 90 of file messaginghub.h.
Referenced by message().
| SigC::Signal1<void, const ASCString&> MessagingHubBase::statusInformation |
displays a message in the message line
Definition at line 93 of file messaginghub.h.
Referenced by message().
| SigC::Signal2<void, const ASCString&,int> MessagingHubBase::logMessage |
prints a message to the logging file
Definition at line 96 of file messaginghub.h.
Referenced by message().
| SigC::Signal2<void, const ASCString&,const ASCString&> MessagingHubBase::logCategorizedMessage |
| SigC::Signal1<StatusMessageWindowHolder, const ASCString&> MessagingHubBase::messageWindowFactory |
prints a message to the logging file
Definition at line 120 of file messaginghub.h.
Referenced by infoMessageWindow().
1.5.1