OSB_LIB::MsgCat Class Reference

Collaboration diagram for OSB_LIB::MsgCat:

Collaboration graph
[legend]
List of all members.

Detailed Description

Singleton class to provide access to OSB message texts.

Definition at line 63 of file osbmsgcat.h.

Public Member Functions

Static Public Member Functions

Private Types

Private Member Functions

Private Attributes

Static Private Attributes

Friends

Classes


Member Typedef Documentation

typedef std::map<std::string, ErrList*> OSB_LIB::MsgCat::ErrLists [private]

Container to store list of error texts by filename.

Definition at line 130 of file osbmsgcat.h.


Constructor & Destructor Documentation

OSB_LIB::MsgCat::MsgCat (  )  [private]

Constructor.

It sets useLocks_ to false.
Multi-threaded applications must call useLocks() to protect the acess to the message catalogue.

OSB_LIB::MsgCat::~MsgCat (  )  [private]

Destructor: delete entries in errLists_.

OSB_LIB::MsgCat::MsgCat ( const MsgCat  )  [private]

Prevent copying: not implemented.


Member Function Documentation

ErrList& OSB_LIB::MsgCat::errList ( const BaseError e  )  [private]

Get the texts applicable for an error category.

static MsgCat& OSB_LIB::MsgCat::instance (  )  [static]

Get the only instance of the class.

Guard OSB_LIB::MsgCat::lock (  )  [private]

Lock mutex_.

void OSB_LIB::MsgCat::mkMsg ( const BaseError e,
std::string &  dest 
)

Create the message text for an OSB error.

static void OSB_LIB::MsgCat::msg ( const BaseError e,
std::string &  dest 
) [static]

Create the message text for an OSB error.

static void OSB_LIB::MsgCat::useLocks (  )  [static]

Tell the message catalogue to use locks.


Friends And Related Function Documentation

friend struct Destroy [friend]

Allow to delete instance_.

Definition at line 157 of file osbmsgcat.h.

friend struct Init [friend]

Provide access to useLocks_ of instance().

Definition at line 82 of file osbmsgcat.h.


Member Data Documentation

Destroy OSB_LIB::MsgCat::destroy_ [static, private]

Control destruction of instance_.

Definition at line 161 of file osbmsgcat.h.

ErrLists OSB_LIB::MsgCat::errLists_ [private]

List of error texts by filename.

Definition at line 145 of file osbmsgcat.h.

MsgCat* OSB_LIB::MsgCat::instance_ [static, private]

The only instance of the message catalogue.

Definition at line 163 of file osbmsgcat.h.

Mutex OSB_LIB::MsgCat::mutex_ [private]

Protect the access to the error text lists.

Definition at line 141 of file osbmsgcat.h.

MutexUnlock OSB_LIB::MsgCat::unlock_ [private]

Unlock the mutex.

Definition at line 143 of file osbmsgcat.h.

bool OSB_LIB::MsgCat::useLocks_ [private]

Flag to use locks.

Unless the application creates an Init object with useLocks = true, the flag is false and access to the message catalogue is unprotected.

Definition at line 139 of file osbmsgcat.h.


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:12:17 2006 for OSB Library by  doxygen 1.4.7