11 #ifndef FACTORY_IMPL_H
12 #define FACTORY_IMPL_H
17 template<
typename TYPE>
26 template<
typename TYPE>
28 const std::string& str_author,
29 const std::string& str_version,
30 const std::string& str_brief_desc,
31 const std::string& str_long_desc,
32 const std::string& str_status,
33 TCreator* pc_creator) {
35 psTypeInfo->
Author = str_author;
36 psTypeInfo->
Version = str_version;
39 psTypeInfo->
Status = str_status;
40 psTypeInfo->
Creator = pc_creator;
41 GetTypeMap()[str_label] = psTypeInfo;
47 template<
typename TYPE>
49 typename TTypeMap::iterator it = GetTypeMap().find(str_label);
50 if(it != GetTypeMap().end()) {
51 return it->second->Creator();
61 template<
typename TYPE>
63 typename TTypeMap::iterator it = GetTypeMap().find(str_label);
64 return(it != GetTypeMap().end());
70 template<
typename TYPE>
72 typename TTypeMap::iterator it;
73 c_os <<
"Symbols:" << std::endl;
74 for(it = GetTypeMap().begin();
75 it != GetTypeMap().end();
77 c_os << it->first <<
" (" << it->second->BriefDescription <<
")" << std::endl;
84 template<
typename TYPE>
86 typename TTypeMap::iterator it;
87 for(it = GetTypeMap().begin();
88 it != GetTypeMap().end();
#define THROW_ARGOSEXCEPTION(message)
This macro throws an ARGoS exception with the passed message.
std::map< std::string, STypeInfo * > TTypeMap
The map of registered TYPEs.
A struct containing the information about the registered types.
std::string BriefDescription
std::string LongDescription