#include <messagereceiver.h>
Public Member Functions | |
| MessageReceiver () | |
| virtual | ~MessageReceiver () |
| Destructor note that the all stored messages that have not been popped yet will be deleted. | |
| void | pushMessage (Message &message) |
| pushes a message to the message queue | |
| Message * | popMessage () |
| pops the first message in the queue | |
| virtual void | receivedMessage () |
| called when a message has arrived | |
Protected Member Functions | |
| MessageReceiver (const MessageReceiver &receiver) | |
Protected Attributes | |
| std::list< Message * > | messages_ |
| messages stored and not popped yet | |
| Mutex | message_list_lock_ |
| lock to make access to messages_ threadsafe | |
|
|
copy constructor hidden |
|
|
Constructor |
|
|
pops the first message in the queue this method will pop the first message in the queue and return a pointer to it. the calling method has to destroy ( delete ) the message itself or memory leaks will occur.
|
|
|
pushes a message to the message queue this will add the given message to the queue. a deep copy is performed and the passed message is untouched.
|
|
|
called when a message has arrived this message is intended to be overwritten if a notification is wanted in case a message arrives. simply overwrite this to process incoming messages |
1.4.5