SOFA API  ca665544
Open source framework for multi-physics simuation
sofa::helper::logging Namespace Reference

This allow Base object to interact with the messaging system. More...

Namespaces

 countingmessagehandler
 
 loggingmessagehandler
 
 percomponentloggingmessagehandler
 
 routingmessagehandler
 

Classes

class  RichConsoleStyleMessageFormatter
 The RichConsoleStyleMessageFormatter class. More...
 
class  SofaComponentInfo
 
class  ClangMessageHandler
 
class  ClangStyleMessageFormatter
 
struct  ComponentInfo
 
class  ConsoleMessageHandler
 
class  MainConsoleMessageHandler
 The MainConsoleMessageHandler class contains a singleton to ConsoleMessageHandler and offer static version of ConsoleMessageHandler API. More...
 
class  DefaultStyleMessageFormatter
 
class  ExceptionMessageHandler
 
struct  FileInfo
 
struct  FileInfoOwningFilename
 To keep a trace (file,line) from where the message have been created. More...
 
class  FileMessageHandler
 
class  Message
 
class  MessageDispatcherImpl
 
class  MessageDispatcher
 
class  MessageFormatter
 
class  MessageHandler
 
class  SilentMessageHandler
 This class is a MessageHandler that simply do nothing with the message. More...
 
class  TracyMessageHandler
 Send the message to the Tracy profiler. More...
 
class  MainTracyMessageHandler
 The MainTracyMessageHandler class contains a singleton to TracyMessageHandler and offer static version of TracyMessageHandler API. More...
 

Typedefs

typedef boost::tokenizer< boost::char_separator< char > > tokenizer
 

Functions

void simpleFormat (size_t jsize, const std::string &text, size_t line_length, std::ostream &wrapped)
 simpleFormat a text containing our markdown 'tags' More...
 
bool notMuted (const sofa::core::objectmodel::Base *t)
 
bool notMuted (sofa::core::objectmodel::Base *t)
 
ComponentInfo::SPtr getComponentInfo (const sofa::core::objectmodel::Base *t)
 This construct a new ComponentInfo object from a Base object. More...
 
std::ostream & operator<< (std::ostream &out, const ComponentInfo &nfo)
 
std::ostream & operator<< (std::ostream &out, const ComponentInfo *nfo)
 
const ComponentInfo::SPtr getComponentInfo (const std::string &s)
 This function is used in the msg_* macro to handle emitting case based on string. More...
 
const ComponentInfo::SPtr getComponentInfo (const ComponentInfo::SPtr &s)
 This function is used in the msg_* macro to handle emitting case based on string. More...
 
bool notMuted (const ComponentInfo::SPtr &)
 
bool notMuted (const std::string &)
 This function is used in the msg_* macro to handle string based on string. More...
 
const SOFA_HELPER_API std::string toString (const Message::Type type)
 
std::ostream & operator<< (std::ostream &s, const Message &m)
 
std::vector< MessageHandler * > getDefaultMessageHandlers ()
 
MessageDispatcherImplgetMainInstance ()
 
template<class Derived , typename IdType >
bool notMuted (const SelectableItem< Derived, IdType > *)
 
template<class Derived , typename IdType >
ComponentInfo::SPtr getComponentInfo (const SelectableItem< Derived, IdType > *)
 

Detailed Description

This allow Base object to interact with the messaging system.

Typedef Documentation

◆ tokenizer

typedef boost::tokenizer<boost::char_separator<char> > sofa::helper::logging::tokenizer

Function Documentation

◆ getComponentInfo() [1/4]

const ComponentInfo::SPtr sofa::helper::logging::getComponentInfo ( const ComponentInfo::SPtr s)
inline

This function is used in the msg_* macro to handle emitting case based on string.

◆ getComponentInfo() [2/4]

template<class Derived , typename IdType >
ComponentInfo::SPtr sofa::helper::logging::getComponentInfo ( const SelectableItem< Derived, IdType > *  )

◆ getComponentInfo() [3/4]

ComponentInfo::SPtr sofa::helper::logging::getComponentInfo ( const sofa::core::objectmodel::Base t)
inline

This construct a new ComponentInfo object from a Base object.

◆ getComponentInfo() [4/4]

const ComponentInfo::SPtr sofa::helper::logging::getComponentInfo ( const std::string &  s)
inline

This function is used in the msg_* macro to handle emitting case based on string.

◆ getDefaultMessageHandlers()

std::vector<MessageHandler*> sofa::helper::logging::getDefaultMessageHandlers ( )

Threading issues... a mutex is serializing the access to the message API. Memory management: object are passed to the message info. some of them are duplicated other get a weak reference

◆ getMainInstance()

MessageDispatcherImpl* sofa::helper::logging::getMainInstance ( )

◆ notMuted() [1/5]

bool sofa::helper::logging::notMuted ( const ComponentInfo::SPtr )
inline

◆ notMuted() [2/5]

template<class Derived , typename IdType >
bool sofa::helper::logging::notMuted ( const SelectableItem< Derived, IdType > *  )

◆ notMuted() [3/5]

bool sofa::helper::logging::notMuted ( const sofa::core::objectmodel::Base t)
inline

◆ notMuted() [4/5]

bool sofa::helper::logging::notMuted ( const std::string &  )
inline

This function is used in the msg_* macro to handle string based on string.

◆ notMuted() [5/5]

bool sofa::helper::logging::notMuted ( sofa::core::objectmodel::Base t)
inline

◆ operator<<() [1/3]

std::ostream& sofa::helper::logging::operator<< ( std::ostream &  out,
const ComponentInfo nfo 
)

◆ operator<<() [2/3]

std::ostream& sofa::helper::logging::operator<< ( std::ostream &  out,
const ComponentInfo nfo 
)

◆ operator<<() [3/3]

SOFA_HELPER_API std::ostream & sofa::helper::logging::operator<< ( std::ostream &  s,
const Message m 
)

◆ simpleFormat()

void sofa::helper::logging::simpleFormat ( size_t  jsize,
const std::string &  text,
size_t  line_length,
std::ostream &  wrapped 
)

simpleFormat a text containing our markdown 'tags'

Parameters
jsizesize of the line prefix to fill with space (for left side alignment)
textthe text to format
line_lengthnumber of column to render to to
wrappedthe destination stream where to write the formatted text.

◆ toString()

SOFA_HELPER_API const std::string sofa::helper::logging::toString ( const Message::Type  type)