SOFA API  014b24ea
Open source framework for multi-physics simuation
sofa::helper::logging::MessageDispatcher Class Reference

#include <MessageDispatcher.h>

Detailed Description

static interface to manage the list of MessageHandlers that process the Messages

Classes

class  LoggerStream
 
class  NullLoggerStream
 

Static Public Member Functions

static int addHandler (MessageHandler *o)
 to add a MessageHandler More...
 
static int rmHandler (MessageHandler *o)
 to remove a MessageHandler More...
 
static void clearHandlers ()
 to remove every MessageHandlers More...
 
static std::vector< MessageHandler * > & getHandlers ()
 the list of MessageHandlers More...
 
static LoggerStream info (Message::Class mclass, const ComponentInfo::SPtr &cinfo, const FileInfo::SPtr &fileInfo=EmptyFileInfo)
 
static LoggerStream deprecated (Message::Class mclass, const ComponentInfo::SPtr &cinfo, const FileInfo::SPtr &fileInfo=EmptyFileInfo)
 
static LoggerStream warning (Message::Class mclass, const ComponentInfo::SPtr &cinfo, const FileInfo::SPtr &fileInfo=EmptyFileInfo)
 
static LoggerStream error (Message::Class mclass, const ComponentInfo::SPtr &cinfo, const FileInfo::SPtr &fileInfo=EmptyFileInfo)
 
static LoggerStream fatal (Message::Class mclass, const ComponentInfo::SPtr &cinfo, const FileInfo::SPtr &fileInfo=EmptyFileInfo)
 
static LoggerStream advice (Message::Class mclass, const ComponentInfo::SPtr &cinfo, const FileInfo::SPtr &fileInfo=EmptyFileInfo)
 
static const NullLoggerStreamnull ()
 
static MessageDispatcher::LoggerStream log (Message::Class mclass, Message::Type type, const ComponentInfo::SPtr &cinfo, const FileInfo::SPtr &fileInfo=EmptyFileInfo)
 
static void process (sofa::helper::logging::Message &m)
 

Function details

int sofa::helper::logging::MessageDispatcher::addHandler ( MessageHandler o)
static

to add a MessageHandler

MessageDispatcher::LoggerStream sofa::helper::logging::MessageDispatcher::advice ( Message::Class  mclass,
const ComponentInfo::SPtr cinfo,
const FileInfo::SPtr fileInfo = EmptyFileInfo 
)
static
void sofa::helper::logging::MessageDispatcher::clearHandlers ( )
static

to remove every MessageHandlers

MessageDispatcher::LoggerStream sofa::helper::logging::MessageDispatcher::deprecated ( Message::Class  mclass,
const ComponentInfo::SPtr cinfo,
const FileInfo::SPtr fileInfo = EmptyFileInfo 
)
static
MessageDispatcher::LoggerStream sofa::helper::logging::MessageDispatcher::error ( Message::Class  mclass,
const ComponentInfo::SPtr cinfo,
const FileInfo::SPtr fileInfo = EmptyFileInfo 
)
static
MessageDispatcher::LoggerStream sofa::helper::logging::MessageDispatcher::fatal ( Message::Class  mclass,
const ComponentInfo::SPtr cinfo,
const FileInfo::SPtr fileInfo = EmptyFileInfo 
)
static
std::vector< MessageHandler * > & sofa::helper::logging::MessageDispatcher::getHandlers ( )
static

the list of MessageHandlers

MessageDispatcher::LoggerStream sofa::helper::logging::MessageDispatcher::info ( Message::Class  mclass,
const ComponentInfo::SPtr cinfo,
const FileInfo::SPtr fileInfo = EmptyFileInfo 
)
static
MessageDispatcher::LoggerStream sofa::helper::logging::MessageDispatcher::log ( Message::Class  mclass,
Message::Type  type,
const ComponentInfo::SPtr cinfo,
const FileInfo::SPtr fileInfo = EmptyFileInfo 
)
static
static const NullLoggerStream& sofa::helper::logging::MessageDispatcher::null ( )
inlinestatic
void sofa::helper::logging::MessageDispatcher::process ( sofa::helper::logging::Message m)
static

Process the Message by all the Message handlers. Called in the destructor of LoggerStream and can be called manually on a hand-made (possibly predefined) Message

int sofa::helper::logging::MessageDispatcher::rmHandler ( MessageHandler o)
static

to remove a MessageHandler

MessageDispatcher::LoggerStream sofa::helper::logging::MessageDispatcher::warning ( Message::Class  mclass,
const ComponentInfo::SPtr cinfo,
const FileInfo::SPtr fileInfo = EmptyFileInfo 
)
static