MessageHandler Class Reference
[ConfigHandler - Runtime configuration from command line or config files]

Global class which accepts messages from different threads and sends them to different receivers. More...

#include <MessageHandler.hh>

List of all members.

Classes

class  Messenger
struct  MsgData
class  PrintToStream
 A useful message function for cout, fstream. More...
class  VMessenger

Public Member Functions

void End ()
 Finish with messages, so you can print help dialogues to cout.
void Post (std::ostringstream *mgs, MESSAGE_LEVEL level)
 This handles incoming Messages.
template<class MsgAction >
void * AddMessenger (MESSAGE_LEVEL thresh, MsgAction act)
 Allow the user to change message delivery; returns id of new Messenger.
void RemoveMessenger (void *m)
 Remove an already registered messenger.
void SetThreshold (MESSAGE_LEVEL thresh, void *messenger=0)
 Set the severity threshold for which messages to print.
void UpdateThreshold ()
 Update the severity threshold if changed in config file.
MESSAGE_LEVEL GetDefaultMessageThreshold ()
 Get the default message threshold.
void operator() ()
 should only be called by a boost thread

Static Public Member Functions

static MessageHandlerGetInstance ()
 Singleton access.

Private Member Functions

 MessageHandler (const MessageHandler &)
MessageHandleroperator= (const MessageHandler &)
void Deliver (std::ostringstream *msg, MESSAGE_LEVEL level, time_t t=time(0))

Private Attributes

std::set< VMessenger * > _messengers
MESSAGE_LEVEL _default_threshold
std::queue< MsgData_inbox
bool _kill_thread
boost::mutex * _inbox_mutex
boost::condition_variable * _message_waiting
boost::thread * _delivery_thread

Static Private Attributes

static MessageHandler _instance

Detailed Description

Global class which accepts messages from different threads and sends them to different receivers.

Definition at line 53 of file MessageHandler.hh.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on 20 Jun 2014 for daqman by  doxygen 1.6.1