#include <mrpt/utils/CMessageQueue.h>
Public Member Functions | |
CMessageQueue () | |
virtual | ~CMessageQueue () |
void | clear () |
Clear the queue of messages, freeing memory as required. | |
void | push (CMRPTMessage *msg) |
Insert a new message in the queue - The object must be created with "new", and do not delete is after calling this, it must be deleted later. | |
CMRPTMessage * | get () |
Retrieve the next message in the queue, or NULL if there is no message. | |
bool | empty () const |
Return true if there are no messages. | |
Protected Attributes | |
std::queue< CMRPTMessage * > | m_msgs |
The queue of messages. Memory is freed at destructor or by clients gathering messages. | |
synch::CCriticalSection | m_csQueue |
The critical section. |
Definition at line 41 of file CMessageQueue.h.
mrpt::utils::CMessageQueue::CMessageQueue | ( | ) |
virtual mrpt::utils::CMessageQueue::~CMessageQueue | ( | ) | [virtual] |
void mrpt::utils::CMessageQueue::clear | ( | ) |
Clear the queue of messages, freeing memory as required.
bool mrpt::utils::CMessageQueue::empty | ( | ) | const |
Return true if there are no messages.
CMRPTMessage* mrpt::utils::CMessageQueue::get | ( | ) |
Retrieve the next message in the queue, or NULL if there is no message.
The user MUST call "delete" with the returned object after use.
void mrpt::utils::CMessageQueue::push | ( | CMRPTMessage * | msg | ) |
Insert a new message in the queue - The object must be created with "new", and do not delete is after calling this, it must be deleted later.
std::queue< CMRPTMessage* > mrpt::utils::CMessageQueue::m_msgs [protected] |
The queue of messages. Memory is freed at destructor or by clients gathering messages.
Definition at line 44 of file CMessageQueue.h.
Page generated by Doxygen 1.5.8 for MRPT 0.6.5 SVN: at Thu Feb 26 02:18:33 EST 2009 |