torc::generic::MessageTable Class Reference

#include <MessageTable.hpp>

List of all members.

Public Types

typedef std::map< MessageId,
Message
MessageContainer

Public Member Functions

std::string getMessage (MessageId inId) const throw ()
void changeMessageString (MessageId inId, const Message &inMessage) throw (Error)
void changeMessageSeverity (MessageId inId, MessageSeverity inSeverity) throw ()

Static Public Member Functions

static MessageTableinstance ()

Private Member Functions

 MessageTable (const MessageTable &source)
MessageTableoperator= (const MessageTable &source) throw ()
void operator delete (void *)

Private Attributes

MessageContainer mMessages


Detailed Description

Table of messages for this library. This is used for retreiving a message for a given MessageId.
Note:
getMessage method is a read only method, and as such it is thread-safe. However, the changeMessageSeverity() and changeMessageSeverity() are not thread-safe. Typically they are not meant to be used in a multi-threaded context. If required however, for some reason, they need to be protected by proper locking contexts

Definition at line 33 of file MessageTable.hpp.


Member Function Documentation

std::string torc::generic::MessageTable::getMessage ( MessageId  inId  )  const throw ()

Get the message string corresponding to the message id. This is constructed using the actual message string and the currently set severity of this message.

Parameters:
[in] inId MessageId object to denote the message.
Returns:
Formatted message string. Empty string is returned if there was some error.
Get the message string corresponding to the message inId. This is constructed using the actual message string and the currently set severity of this message.

Parameters:
[in] inId MessageId object to denote the message.

Definition at line 35 of file MessageTable.cpp.

void torc::generic::MessageTable::changeMessageString ( MessageId  inId,
const Message inMessage 
) throw (Error)

Change the message string for a given Id.

Parameters:
[in] inId MessageId that needs to be changed
[in] inMessage New message that needs to be set.

Definition at line 87 of file MessageTable.cpp.

void torc::generic::MessageTable::changeMessageSeverity ( MessageId  inId,
MessageSeverity  inSeverity 
) throw ()

Change the message severity for a given Id.

Parameters:
[in] inId MessageId that needs to be changed
[in] inSeverity New severity that needs to be set.

Definition at line 99 of file MessageTable.cpp.

MessageTable * torc::generic::MessageTable::instance (  )  [static]

Get a pointer to the singleton MessageTable object.

Definition at line 113 of file MessageTable.cpp.


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

Generated on Thu Oct 13 16:50:42 2011 for TORC by  doxygen 1.5.6