Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MessagingHubBase Class Reference

#include <messaginghub.h>

List of all members.

Public Types

enum  MessageType {
  FatalError, Error, Warning, InfoMessage,
  StatusInfo, LogMessage
}

Public Member Functions

 MessagingHubBase ()
void setVerbosity (int v)
int getVerbosity ()
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::Signal1< StatusMessageWindowHolder,
const ASCString & > 
messageWindowFactory
 prints a message to the logging file

Protected Attributes

int verbosity


Member Enumeration Documentation

enum MessagingHubBase::MessageType
 

Enumeration values:
FatalError 
Error 
Warning 
InfoMessage 
StatusInfo 
LogMessage 

Definition at line 66 of file messaginghub.h.


Constructor & Destructor Documentation

MessagingHubBase::MessagingHubBase  )  [inline]
 

Definition at line 62 of file messaginghub.h.


Member Function Documentation

int MessagingHubBase::getVerbosity  )  [inline]
 

Definition at line 64 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 67 of file messaginghub.cpp.

References messageWindowFactory.

void MessagingHubBase::message MessageType  type,
const ASCString msg
 

displays any kind of message, as specified by parameter

Definition at line 72 of file messaginghub.cpp.

References error, Error, exitHandler, fatalError, FatalError, infoMessage, InfoMessage, logMessage, LogMessage, StatusInfo, statusInformation, warning, and Warning.

void MessagingHubBase::message MessageType  type,
const char *  msg,
  ...
 

displays any kind of message, as specified by parameter

Definition at line 89 of file messaginghub.cpp.

References ASCString::vaformat().

void MessagingHubBase::setVerbosity int  v  )  [inline]
 

Definition at line 63 of file messaginghub.h.

References verbosity.


Member Data Documentation

SigC::Signal1<void, const ASCString&> MessagingHubBase::error
 

displays an error message and continues game

Definition at line 75 of file messaginghub.h.

Referenced by message().

SigC::Signal0<void> MessagingHubBase::exitHandler
 

exits the program

Definition at line 72 of file messaginghub.h.

Referenced by message().

SigC::Signal1<void, const ASCString&> MessagingHubBase::fatalError
 

displays an error message and aborts the game

Definition at line 69 of file messaginghub.h.

Referenced by message().

SigC::Signal1<void, const ASCString&> MessagingHubBase::infoMessage
 

displays an informational message

Definition at line 81 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 87 of file messaginghub.h.

Referenced by message().

SigC::Signal1<StatusMessageWindowHolder, const ASCString&> MessagingHubBase::messageWindowFactory
 

prints a message to the logging file

Definition at line 108 of file messaginghub.h.

Referenced by infoMessageWindow().

SigC::Signal1<void, const ASCString&> MessagingHubBase::statusInformation
 

displays a message in the message line

Definition at line 84 of file messaginghub.h.

Referenced by message().

int MessagingHubBase::verbosity [protected]
 

Definition at line 59 of file messaginghub.h.

Referenced by getVerbosity(), and setVerbosity().

SigC::Signal1<void, const ASCString&> MessagingHubBase::warning
 

displays a warning

Definition at line 78 of file messaginghub.h.

Referenced by message().


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:18:22 2008 for Advanced Strategic Command by  doxygen 1.4.2