30 #ifndef __CLAW_FACTORY_HPP__
31 #define __CLAW_FACTORY_HPP__
33 #ifdef CLAW_FACTORY_IS_SINGLETON
56 :
exception("No type has this identifier.")
72 template<
typename BaseClass,
typename IdentifierType>
73 #ifdef CLAW_FACTORY_IS_SINGLETON
75 public basic_singleton< factory<BaseClass, IdentifierType> >
85 class class_creator_base
88 virtual ~class_creator_base();
89 virtual BaseClass*
create()
const = 0;
102 template<
typename Derived>
104 public class_creator_base
107 virtual Derived*
create()
const;
112 typedef IdentifierType identifier_type;
115 typedef BaseClass base_class;
118 typedef std::map<identifier_type, class_creator_base*> class_map;
126 base_class*
create(
const identifier_type&
id )
const;
141 #endif // __CLAW_FACTORY_HPP__