3 #define LOGICFACTORY_H 1
20 template <
class Ilogic,
typename Identifier,
typename LogicCreator = Ilogic * (*)()>
24 bool Register(
const Identifier &
id, LogicCreator creator)
31 typename std::map<Identifier, LogicCreator>::const_iterator itr;
34 delete ( itr->second )() ;
41 typename std::map<Identifier, LogicCreator>::const_iterator itr;
45 return ( itr->second )();
56 #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