Message buffer that message handlers respond to messages from. More...
#include <MMessageBuffer.h>
Public Member Functions | |
| MMessageBuffer () | |
| virtual | ~MMessageBuffer () |
| void | clearMessages () |
| size_t | messageCount () const |
| void | submitMessage (MMessage *msg) |
| virtual mnum | messageIndex (MMessage *msg) |
| void | clearHandlers () |
Friends | |
| class | MMessageBuffer_ |
Message buffer that message handlers respond to messages from.
This class is a message buffer/store that handlers use to access messages from. Message handlers subscribe to a message buffer. When a message is received, it is buffered until a handler has had a chance to respond to it. Messages are internally disposed of when they have been processed by all message handlers. A subclass of MMessageBuffer may be used to specialize how messages are indexed determining how they are delivered. MMessageBuffer is fully thread-safe.
| Meta::MMessageBuffer::MMessageBuffer | ( | ) |
Constructor.
| virtual Meta::MMessageBuffer::~MMessageBuffer | ( | ) | [virtual] |
Destructor.
| void Meta::MMessageBuffer::clearHandlers | ( | ) |
Remove all message handlers.
| void Meta::MMessageBuffer::clearMessages | ( | ) |
Clear and dispose of all messages buffered.
| size_t Meta::MMessageBuffer::messageCount | ( | ) | const |
Override the default indexing sheme, which indexes messages by the id, which gives the order in which they were received.
| void Meta::MMessageBuffer::submitMessage | ( | MMessage * | msg | ) |
Submit a message.
1.6.1