53 std::string
pop(
int levelMask = ALL_LEVELS);
67 bool empty(
int levelMask = ALL_LEVELS)
const;
73 void clear(
int levelMask = ALL_LEVELS);
87 typedef std::pair<int, agx::String>
Message;
124 typedef std::deque<Message> MessageQueue;
125 MessageQueue m_messageQueue;
#define AGXPHYSICS_EXPORT
void message(const agx::String &msg, int notifyLevel) override
Virtual method called whenever there is a message ready.
LogCallback(LoggerSubscriber *subscriber)
LoggerSubscriber * m_subscriber
Class for polling messages from the LOGGER system in a Subscriber pattern.
void setEnable(bool flag)
Enable/disable the capturing of messages.
LoggerSubscriber(int levelMask=agx::Notify::NOTIFY_INFO|agx::Notify::NOTIFY_WARNING|agx::Notify::NOTIFY_ERROR)
Constructor for a logger mailbox.
std::pair< int, agx::String > Message
void clear(int levelMask=ALL_LEVELS)
Remove all messages.
bool getMessages(MessageVector &messages, bool clearMessages, int levelMask=ALL_LEVELS)
Get a copy of all messages matching the specified notify level levelMask in the message queue.
agx::Vector< Message > MessageVector
void message(const agx::String &msg, int notifyLevel)
Callback that will be called when a new message is present.
std::string pop(int levelMask=ALL_LEVELS)
Get all available messages and then remove them.
bool empty(int levelMask=ALL_LEVELS) const
virtual ~LoggerSubscriber()
Destructor.
size_t pop(agx::StringVector &outMessages, int levelMask=ALL_LEVELS)
Get all available messages and then remove them.
Callback class, derive from this and Register to the notify singleton to get callbacks.
@ NOTIFY_WARNING
WARNING level.
@ NOTIFY_ERROR
ERROR (highest) level.
Base class providing referencing counted objects.
Smart pointer for handling referenced counted objects.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
std::recursive_mutex ReentrantMutex