STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
Concurrency::message_processor< _Type > Class Template Referenceabstract

The message_processor class is the abstract base class for processing of message objects. There is no guarantee on the ordering of the messages. More...

#include <agents.h>

Inheritance diagram for Concurrency::message_processor< _Type >:
Concurrency::ordered_message_processor< _Type >

Public Types

typedef _Type type
 A type alias for _Type . More...
 

Public Member Functions

virtual void async_send (_Inout_opt_ message< _Type > *_Msg)=0
 When overridden in a derived class, places messages into the block asynchronously. More...
 
virtual void sync_send (_Inout_opt_ message< _Type > *_Msg)=0
 When overridden in a derived class, places messages into the block synchronously. More...
 
virtual void wait ()=0
 When overridden in a derived class, waits for all asynchronous operations to complete. More...
 

Protected Member Functions

virtual void process_incoming_message ()=0
 When overridden in a derived class, performs the forward processing of messages into the block. Called once every time a new message is added and the queue is found to be empty. More...
 

Static Protected Member Functions

static void __cdecl _Process_incoming_message_wrapper (void *_Data)
 Wrapper for process_incoming_message suitable for use as a argument to CreateThread and other similar methods. More...
 

Detailed Description

template<class _Type>
class Concurrency::message_processor< _Type >

The message_processor class is the abstract base class for processing of message objects. There is no guarantee on the ordering of the messages.

Template Parameters
_TypeThe data type of the payload within messages handled by this message_processor object.
See also
ordered_message_processor Class

Member Typedef Documentation

template<class _Type>
typedef _Type Concurrency::message_processor< _Type >::type

A type alias for _Type .

Member Function Documentation

template<class _Type>
static void __cdecl Concurrency::message_processor< _Type >::_Process_incoming_message_wrapper ( void _Data)
inlinestaticprotected

Wrapper for process_incoming_message suitable for use as a argument to CreateThread and other similar methods.

Parameters
_DataA pointer to a message processor passed as a void pointer.
1993  {
1994  message_processor<_Type> * _PMessageProcessor = (message_processor<_Type> *) _Data;
1995  _PMessageProcessor->process_incoming_message();
1996  }
template<class _Type>
virtual void Concurrency::message_processor< _Type >::async_send ( _Inout_opt_ message< _Type > *  _Msg)
pure virtual

When overridden in a derived class, places messages into the block asynchronously.

Parameters
_MsgA message object to send asynchronously.

Processor implementations should override this method.

Implemented in Concurrency::ordered_message_processor< _Type >.

template<class _Type>
virtual void Concurrency::message_processor< _Type >::process_incoming_message ( )
protectedpure virtual

When overridden in a derived class, performs the forward processing of messages into the block. Called once every time a new message is added and the queue is found to be empty.

Message block implementations should override this method.

Implemented in Concurrency::ordered_message_processor< _Type >.

template<class _Type>
virtual void Concurrency::message_processor< _Type >::sync_send ( _Inout_opt_ message< _Type > *  _Msg)
pure virtual

When overridden in a derived class, places messages into the block synchronously.

Parameters
_MsgA message object to send synchronously.

Processor implementations should override this method.

Implemented in Concurrency::ordered_message_processor< _Type >.

template<class _Type>
virtual void Concurrency::message_processor< _Type >::wait ( )
pure virtual

When overridden in a derived class, waits for all asynchronous operations to complete.

Processor implementations should override this method.

Implemented in Concurrency::ordered_message_processor< _Type >.


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