Basic factory template. More...
#include <factory.h>
Classes | |
| struct | STypeInfo |
| A struct containing the information about the registered types. More... | |
Public Types | |
| typedef TYPE * | TCreator() |
Pointer to the function that creates objects of type TYPE More... | |
| typedef std::map< std::string, STypeInfo * > | TTypeMap |
The map of registered TYPEs. More... | |
Static Public Member Functions | |
| static TTypeMap & | GetTypeMap () |
Creates and returns the TYPE map. More... | |
| static void | Register (const std::string &str_label, const std::string &str_author, const std::string &str_version, const std::string &str_brief_desc, const std::string &str_long_desc, const std::string &str_status, TCreator *pc_creator) |
Registers a new TYPE creator in the factory. More... | |
| static TYPE * | New (const std::string &str_label) |
Creates a new object of type TYPE More... | |
| static bool | Exists (const std::string &str_label) |
Returns true if the given label exists in the TYPE map. More... | |
| static void | Print (std::ostream &c_os) |
| Prints the list of registered labels. More... | |
| static void | Destroy () |
| Frees up all used memory. More... | |
Basic factory template.
| typedef TYPE* argos::CFactory< TYPE >::TCreator() |
| typedef std::map<std::string, STypeInfo*> argos::CFactory< TYPE >::TTypeMap |
|
static |
Frees up all used memory.
Definition at line 85 of file factory_impl.h.
|
static |
Returns true if the given label exists in the TYPE map.
true if the given label exists in the TYPE map Definition at line 62 of file factory_impl.h.
|
static |
Creates a new object of type TYPE
| str_label | The label of the TYPE to create |
TYPE Definition at line 48 of file factory_impl.h.
|
static |
Prints the list of registered labels.
| c_os | The std::ostream to write into |
Definition at line 71 of file factory_impl.h.
|
static |
Registers a new TYPE creator in the factory.
| str_label | The label associated to the TYPE creator |
| str_author | The author of the plugin |
| str_version | The version of the plugin |
| str_brief_desc | The brief description of the plugin |
| str_long_desc | The long description of the plugin |
| str_status | The status of the plugin |
| pc_creator | The TYPE creator of the factory |
Definition at line 27 of file factory_impl.h.