A namespace is used rather than a class so that it will be open, i.e. so that other files may add functions and handlers with the same interface.
Compounds | |
class | LevelHandler |
[NOHEADER] | |
typedef void(* | fnPtr )(const string &s, const bool terminate) |
[NOHEADER] | |
void | ipc_verbose (const string &s, const bool terminate) |
void | ipc_notify (const string &s, const bool terminate) |
void | ipc_requested (const string &s, const bool terminate) |
void | ipc_error (const string &s, const bool terminate) |
void | ipc_warning (const string &s, const bool terminate) |
Enumerations | |
enum | MessageLevel { Verbose = 0, Notify = 1, Requested = 2, Warning = 3, Error = 4 } |
Named message level, for the LevelHandler. More... | |
Variables | |
const int | NumMessageLevels = 5 |
|
The ones defined in msg.h are just the most basic ones; others can provide error counting, manage multiprocessor output, pop up dialog boxes, log output, etc. If a function or class accepts a template or other argument of type Msg::fnPtr; the appropriate handler can be passed in to obtain the appropriate behavior. These are grouped into a class to avoid having to put them into a .c file. |
|
Named message level, for the LevelHandler. Defined in this namespace instead of within the LevelHandler to save typing when using these literals. |
|
These can be passed in to functions or templates with the same parameter list but which are not based on ipc_ calls, in order to give users a choice between ipc_ and non-ipc_ implementations of messaging. |