Static class that fills a table of known messages types in its constructor. More...
Public Member Functions | |
| Message * | createMessage (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 Message * | Creator () |
| Create a new message of type Sub. | |
Protected Attributes | |
| map< uint16, CreatorFunc > | messagesTypes |
| table of known messages types | |
Static class that fills a table of known messages types in its constructor.
typedef Message*(* Aseba::MessageTypesInitializer::CreatorFunc)() [protected] |
| Message* Aseba::MessageTypesInitializer::createMessage | ( | uint16 | type | ) | [inline] |
| static Message* Aseba::MessageTypesInitializer::Creator | ( | ) | [inline, static, protected] |
| void Aseba::MessageTypesInitializer::dumpKnownMessagesTypes | ( | wostream & | stream | ) | const [inline] |
| void Aseba::MessageTypesInitializer::registerMessageType | ( | uint16 | type | ) | [inline] |
map<uint16, CreatorFunc> Aseba::MessageTypesInitializer::messagesTypes [protected] |