OSB_LIB::ErrList Class Reference

Collaboration diagram for OSB_LIB::ErrList:

Collaboration graph
[legend]
List of all members.

Detailed Description

ErrList, deal with the error message.

Read error message from txt file to a map, only initialize the map at the first time the class was constructed.
Support multithread.

Definition at line 173 of file osbmsgcat.h.

Public Member Functions

Private Types

Private Member Functions

Private Attributes

Friends


Member Typedef Documentation

typedef std::vector<std::string> OSB_LIB::ErrList::BaseText [private]

Define the scrap error text.

Definition at line 205 of file osbmsgcat.h.

typedef std::map<BaseError::ErrorNo, BaseText> OSB_LIB::ErrList::TextMap [private]

Define the map which stores errors.

Definition at line 207 of file osbmsgcat.h.


Constructor & Destructor Documentation

OSB_LIB::ErrList::ErrList ( const std::string &  filename  )  [private]

Constructor.

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

Prevent copying: Copy constructor not implemented.


Member Function Documentation

void OSB_LIB::ErrList::compose ( std::string &  dest,
const std::string &  errMsg,
const BaseError::Args errArgs 
) const [private]

Compose the internal error message and the error arguments to the error message.

Parameters:
dest Gets the composed error message.
errMsg The internal error message.
errArgs The error arguments.

void OSB_LIB::ErrList::compose ( std::string &  dest,
const BaseText text,
const BaseError::Args errArgs 
) const [private]

Compose the error text and the error arguments to the error message.

Parameters:
dest Gets the composed error message.
text The base error text.
errArgs The error arguments.

const std::string& OSB_LIB::ErrList::errMsg (  )  const [inline]

Access internal error message.

Definition at line 178 of file osbmsgcat.h.

References errMsg_.

const BaseText* OSB_LIB::ErrList::getText ( OsbBaseError::ErrorNo  errNo  )  const [private]

Get error message template.

Parameters:
errNo Error number for which to get the template.
Returns:
Pointer to the matching error message template,
NULL pointer if the template can not be found.

bool OSB_LIB::ErrList::mkErrorMsg ( std::string &  dest,
BaseError::ErrorNo  errNo,
const BaseError::Args errArgs 
) const

Get the error text and compose them with the error arguments to the error message.

In case of an internal error or if the template for the error number can not be found, an appropriate general error message is assigned to `dest'.

Parameters:
dest Gets the composed error message.
errNo The error number.
errArgs The error arguments.
Returns:
True if the template for the error is in the map,
False if not.

ErrList& OSB_LIB::ErrList::operator= ( const ErrList  )  [private]

Prevent copying: Assignment operator not implemented.

void OSB_LIB::ErrList::separate ( BaseText dest,
const std::string &  errStr 
) [private]

Separate the whole line error message to scrap error text.

Parameters:
dest Gets the separated error text.
errStr The error message.


Friends And Related Function Documentation

friend class MsgCat [friend]

Let MsgCat construct ErrList.

Definition at line 175 of file osbmsgcat.h.


Member Data Documentation

std::string OSB_LIB::ErrList::errMsg_ [private]

Internal error message.

Definition at line 268 of file osbmsgcat.h.

Referenced by errMsg().

TextMap OSB_LIB::ErrList::textMap_ [private]

Map to store errors.

Definition at line 266 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