Public Types | Public Member Functions | Static Public Member Functions | Public Attributes

MsgClass Class Reference

class to encapsulate a message to the user. More...

Inheritance diagram for MsgClass:
CallBacker ErrMsgClass

List of all members.

Public Types

enum  Type {
  Info, Message, Warning, Error,
  ProgrammerError
}

Public Member Functions

 MsgClass (const char *s, Type t=Info)

Static Public Member Functions

static CallBacktheCB (const CallBack *cb=0)
 pass non-null to set the CB
static const char * nameOf (Type)

Public Attributes

const char * msg
Type type_

Detailed Description

class to encapsulate a message to the user.

Along with the message there's also a type. In any case, there's a handler for when UsrMsg is called: theCB. If it is not set, messages go to cerr.


Member Enumeration Documentation

Enumerator:
Info 
Message 
Warning 
Error 
ProgrammerError 

Constructor & Destructor Documentation

MsgClass::MsgClass ( const char *  s,
Type  t = Info 
) [inline]

Member Function Documentation

static const char* MsgClass::nameOf ( Type   )  [static]
static CallBack& MsgClass::theCB ( const CallBack cb = 0  )  [static]

pass non-null to set the CB


Member Data Documentation

const char* MsgClass::msg