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 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


Detailed Description

Definition at line 61 of file messaginghub.h.


Member Enumeration Documentation

enum MessagingHubBase::MessageType

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

void MessagingHubBase::setVerbosity ( int  v  )  [inline]

Definition at line 69 of file messaginghub.h.

References verbosity.

int MessagingHubBase::getVerbosity (  )  [inline]

Definition at line 70 of file messaginghub.h.

References verbosity.

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.


Member Data Documentation

int MessagingHubBase::verbosity [protected]

Definition at line 65 of file messaginghub.h.

Referenced by getVerbosity(), and setVerbosity().

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

exits the program

Definition at line 81 of file messaginghub.h.

Referenced by message().

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

displays a warning

Definition at line 87 of file messaginghub.h.

Referenced by message().

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

prints a message to the logging file

Definition at line 99 of file messaginghub.h.

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


The documentation for this class was generated from the following files:
Generated on Mon May 21 01:47:03 2012 for Advanced Strategic Command by  doxygen 1.5.1