2 #define LOGICFACTORY_H 1
19 template <
class Ilogic,
typename Identifier,
typename LogicCreator = Ilogic * (*)()>
23 bool Register(
const Identifier &
id, LogicCreator creator)
30 typename std::map<Identifier, LogicCreator>::const_iterator itr;
33 delete ( itr->second )() ;
40 typename std::map<Identifier, LogicCreator>::const_iterator itr;
44 return ( itr->second )();
55 #endif // LOGICFACTORY_H
Ilogic * CreateObject(const Identifier &id)
std::map< Identifier, LogicCreator > m_associations
bool Register(const Identifier &id, LogicCreator creator)
bool Unregister(const Identifier &id)
Container::value_type value_type