Public Member Functions | Protected Types | Static Protected Member Functions | Protected Attributes
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 (wostream &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 37 of file msg.cpp.


Member Typedef Documentation

Pointer to constructor of class Message.

Definition at line 113 of file msg.cpp.


Constructor & Destructor Documentation

Constructor, register all known messages types.

Definition at line 41 of file msg.cpp.


Member Function Documentation

Create an instance of a registered message type.

Definition at line 94 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 118 of file msg.cpp.

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

Print the list of registered messages types to stream.

Definition at line 103 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 88 of file msg.cpp.


Member Data Documentation

table of known messages types

Definition at line 114 of file msg.cpp.


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


aseba
Author(s): Stéphane Magnenat
autogenerated on Thu Jan 2 2014 11:17:17