23 #ifndef SHEAF_DLL_SPEC_H 24 #include "SheafSystem/sheaf_dll_spec.h" 27 #ifndef STD_IOSTREAM_H 28 #include "SheafSystem/std_iostream.h" 32 #include "SheafSystem/std_map.h" 36 #include "SheafSystem/std_string.h" 42 class namespace_poset;
50 std::ostream& operator << (std::ostream &os, const factory<T>& xf);
67 friend std::ostream& operator << <T> (std::ostream& xos,
const factory<T>& xf);
95 T*
new_instance(
const std::string& xclient_class_name, S& xarg);
124 typedef std::map<std::string, T*> prototypes_map_type;
129 prototypes_map_type _prototypes_map;
139 template <
typename T>
140 std::ostream& operator << (std::ostream& xos, const factory<T>& xf);
144 #endif // ifndef FACTORY_H bool contains_prototype(const std::string &xclass_name) const
True if the set of prototypes contains a prototype for handles of type xclass_name.
T * new_instance(const std::string &xclient_class_name)
Creates an instance of type xclient_class_name.
Namespace for the sheaves component of the sheaf system.
virtual ~factory()
Destructor.
factory()
Default constructor.
void insert_prototype(T *xprototype)
Sets xprototype as the prototype for its client class.
void delete_prototype(const std::string &xclass_name)
Removes the prototype for handles of type xclass_name.