1 #ifndef Protium_Constructable_h_
2 #define Protium_Constructable_h_
17 typedef std::map< std::string, ConstructablePrototype*(*)() >
map_type;
21 map_type::iterator it =
getMap()->find(s);
34 template<
class T,
class Group>
45 #define REGISTER_DEC_TYPE(NAME) \
46 static Protium::Design::DerivedRegister<NAME> reg;
48 #define REGISTER_DEF_TYPE(NAME) \
49 Protium::Design::DerivedRegister<NAME> NAME::reg(#NAME);
51 #endif //File Guardian
static ConstructablePrototype * create()
DerivedRegister(const std::string &s)
static ConstructablePrototype * createInstance(const std::string &s, ConstructablePrototype *(*creator)()=0)
std::map< std::string, ConstructablePrototype *(*)() > map_type
static map_type * getMap()
virtual ~ConstructablePrototype()