SOFA API  1a4bb3e7
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

◆ addHandler()

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

to add a MessageHandler

◆ advice()

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

◆ clearHandlers()

void sofa::helper::logging::MessageDispatcher::clearHandlers ( )
static

to remove every MessageHandlers

◆ deprecated()

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

◆ error()

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

◆ fatal()

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

◆ getHandlers()

std::vector< MessageHandler * > & sofa::helper::logging::MessageDispatcher::getHandlers ( )
static

the list of MessageHandlers

◆ info()

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

◆ log()

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

◆ null()

static const NullLoggerStream& sofa::helper::logging::MessageDispatcher::null ( )
inlinestatic

◆ process()

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

◆ rmHandler()

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

to remove a MessageHandler

◆ warning()

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