Aseba::MessageTypesInitializer Class Reference

Static class that fills a table of known messages types in its constructor. More...

List of all members.

Public Member Functions

MessagecreateMessage (uint16 type)
 Create an instance of a registered message type.
void dumpKnownMessagesTypes (ostream &stream) const
 Print the list of registered messages types to stream.
 MessageTypesInitializer ()
 Constructor, register all known messages types.
template<typename Sub >
void registerMessageType (uint16 type)
 Register a message type by storing a pointer to its constructor.

Protected Types

typedef Message *(* CreatorFunc )()
 Pointer to constructor of class Message.

Static Protected Member Functions

template<typename Sub >
static MessageCreator ()
 Create a new message of type Sub.

Protected Attributes

map< uint16, CreatorFuncmessagesTypes
 table of known messages types

Detailed Description

Static class that fills a table of known messages types in its constructor.

Definition at line 39 of file msg.cpp.


Member Typedef Documentation

Pointer to constructor of class Message.

Definition at line 115 of file msg.cpp.


Constructor & Destructor Documentation

Aseba::MessageTypesInitializer::MessageTypesInitializer (  )  [inline]

Constructor, register all known messages types.

Definition at line 43 of file msg.cpp.


Member Function Documentation

Message* Aseba::MessageTypesInitializer::createMessage ( uint16  type  )  [inline]

Create an instance of a registered message type.

Definition at line 96 of file msg.cpp.

template<typename Sub >
static Message* Aseba::MessageTypesInitializer::Creator (  )  [inline, static, protected]

Create a new message of type Sub.

Definition at line 120 of file msg.cpp.

void Aseba::MessageTypesInitializer::dumpKnownMessagesTypes ( ostream &  stream  )  const [inline]

Print the list of registered messages types to stream.

Definition at line 105 of file msg.cpp.

template<typename Sub >
void Aseba::MessageTypesInitializer::registerMessageType ( uint16  type  )  [inline]

Register a message type by storing a pointer to its constructor.

Definition at line 90 of file msg.cpp.


Member Data Documentation

table of known messages types

Definition at line 116 of file msg.cpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


asebaros
Author(s): $author
autogenerated on Mon Sep 5 08:42:14 2011