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 mnum 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

Meta::MMessageBuffer::MMessageBuffer (  ) 

Constructor.

virtual Meta::MMessageBuffer::~MMessageBuffer (  )  [virtual]

Destructor.


Member Function Documentation

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
Returns:
The current total message count.
virtual mnum 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.

void Meta::MMessageBuffer::submitMessage ( MMessage msg  ) 

Submit a message.


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

Generated on Wed Mar 24 16:22:42 2010 for AndroMeta by  doxygen 1.6.1