AndroMeta  2.0.0
Public Member Functions | Friends
Meta::MMessageBuffer Class Reference

Message buffer that message handlers respond to messages from. More...

#include <MMessageBuffer.h>

List of all members.

Public Member Functions

 MMessageBuffer ()
virtual ~MMessageBuffer ()
void clearMessages ()
size_t messageCount () const
void submitMessage (MMessage *msg)
virtual mvar messageIndex (MMessage *msg)
void clearHandlers ()

Friends

class MMessageBuffer_

Detailed Description

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.


Constructor & Destructor Documentation

Constructor.

Destructor.


Member Function Documentation

Remove all message handlers.

Clear and dispose of all messages buffered.

Returns:
The current total message count.
virtual mvar Meta::MMessageBuffer::messageIndex ( MMessage msg) [virtual]

Override the default indexing sheme, which indexes messages by the id, which gives the order in which they were received.

Submit a message.


The documentation for this class was generated from the following file: