Advanced Strategic Command
Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
MessagingHubBase Class Reference

#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 More...
 
void message (MessageType type, const ASCString &msg)
 displays any kind of message, as specified by parameter More...
 
StatusMessageWindowHolder infoMessageWindow (const ASCString &msg)
 Displays a status window. More...
 

Public Attributes

sigc::signal< void, const
ASCString & > 
fatalError
 displays an error message and aborts the game More...
 
sigc::signal< void > exitHandler
 exits the program More...
 
sigc::signal< void, const
ASCString & > 
error
 displays an error message and continues game More...
 
sigc::signal< void, const
ASCString & > 
warning
 displays a warning More...
 
sigc::signal< void, const
ASCString & > 
infoMessage
 displays an informational message More...
 
sigc::signal< void, const
ASCString & > 
statusInformation
 displays a message in the message line More...
 
sigc::signal< void, const
ASCString &, int > 
logMessage
 prints a message to the logging file More...
 
sigc::signal< void, const
ASCString &, const ASCString & > 
logCategorizedMessage
 prints a message to the logging file More...
 
sigc::signal
< StatusMessageWindowHolder,
const ASCString & > 
messageWindowFactory
 prints a message to the logging file More...
 

Protected Attributes

int verbosity
 

Detailed Description

Definition at line 61 of file messaginghub.h.

Member Enumeration Documentation

Enumerator
FatalError 
Error 
Warning 
InfoMessage 
StatusInfo 
LogMessage 

Definition at line 75 of file messaginghub.h.

Constructor & Destructor Documentation

MessagingHubBase::MessagingHubBase ( )
inline

Definition at line 68 of file messaginghub.h.

Member Function Documentation

int MessagingHubBase::getVerbosity ( )
inline

Definition at line 70 of file messaginghub.h.

References verbosity.

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.

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().

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, StatusInfo, statusInformation, Warning, and warning.

void MessagingHubBase::setLoggingCategory ( const ASCString category,
bool  enable 
)

Definition at line 93 of file messaginghub.cpp.

void MessagingHubBase::setVerbosity ( int  v)
inline

Definition at line 69 of file messaginghub.h.

References verbosity.

Member Data Documentation

sigc::signal<void, const ASCString&> MessagingHubBase::error

displays an error message and continues game

Definition at line 84 of file messaginghub.h.

Referenced by message().

sigc::signal<void> MessagingHubBase::exitHandler

exits the program

Definition at line 81 of file messaginghub.h.

Referenced by message().

sigc::signal<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::signal<void, const ASCString&> MessagingHubBase::infoMessage

displays an informational message

Definition at line 90 of file messaginghub.h.

Referenced by message().

sigc::signal<void, const ASCString&,const ASCString&> MessagingHubBase::logCategorizedMessage

prints a message to the logging file

Definition at line 99 of file messaginghub.h.

sigc::signal<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::signal<StatusMessageWindowHolder, const ASCString&> MessagingHubBase::messageWindowFactory

prints a message to the logging file

Definition at line 120 of file messaginghub.h.

Referenced by infoMessageWindow().

sigc::signal<void, const ASCString&> MessagingHubBase::statusInformation

displays a message in the message line

Definition at line 93 of file messaginghub.h.

Referenced by message().

int MessagingHubBase::verbosity
protected

Definition at line 65 of file messaginghub.h.

Referenced by getVerbosity(), and setVerbosity().

sigc::signal<void, const ASCString&> MessagingHubBase::warning

displays a warning

Definition at line 87 of file messaginghub.h.

Referenced by message().


The documentation for this class was generated from the following files: