Cortex
10.0.0-a4
|
#include <FilteredMessageHandler.h>
Public Member Functions | |
IE_CORE_DECLAREMEMBERPTR (FilteredMessageHandler) | |
FilteredMessageHandler (MessageHandlerPtr handler) | |
![]() | |
IE_CORE_DECLAREMEMBERPTR (MessageHandler) | |
virtual void | handle (Level level, const std::string &context, const std::string &message)=0 |
![]() | |
IE_CORE_DECLAREMEMBERPTR (RefCounted) | |
void | addRef () const |
Add a reference to the current object. | |
void | removeRef () const |
Remove a reference from the current object. | |
RefCount | refCount () const |
Returns the current reference count. | |
Protected Attributes | |
MessageHandlerPtr | m_handler |
Additional Inherited Members | |
![]() | |
enum | Level { Error = 0, Warning = 1, Info = 2, Debug = 3, Invalid = 4 } |
![]() | |
typedef size_t | RefCount |
![]() | |
static MessageHandler * | currentHandler () |
static void | output (Level level, const std::string &context, const std::string &message) |
Output a message to the current handler. | |
static void | output (Level level, const std::string &context, const boost::format &message) |
Output a message to the current handler. | |
static void | setDefaultHandler (const MessageHandlerPtr &handler) |
static MessageHandler * | getDefaultHandler () |
static std::string | levelAsString (Level level) |
Returns a readable string representation of the specified message level. | |
static Level | stringAsLevel (const std::string &level) |
Returns a message level based on the specified string (case is ignored). | |
This abstract base class that implements filtering MessageHandler of any kind.
IECore::FilteredMessageHandler::FilteredMessageHandler | ( | MessageHandlerPtr | handler | ) |
Creates a message handler that filter messages and outputs to another message handler. The handler will hold an intrusive pointer to the given message handler so that the object will not be destroyed before the destruction of this one.