![]() |
SheafSystem
0.0.0.0
|
A factory for instanting descendants of an abstract type T, given the class name of the descendant. Requires: virtual const string& T::class_name() the actual (descendant) class name of the prototype. virtual R T::clone() virtual default constructor virtual R T::clone(S& xarg) virtual constructor. More...
#include <factory_2.h>
Friends | |
| ostream & | operator (ostream &xos, const factory_2< T, R > &xf) |
FACTORY_2 FACET | |
| factory_2 () | |
| Default constructor. More... | |
| virtual | ~factory_2 () |
| Destructor. More... | |
| R | new_instance (const string &xclient_class_name, const arg_list &xargs) |
| Creates an instance of type xclient_class_name with arguments xargs. More... | |
| void | insert_prototype (T *xprototype) |
| Sets xprototype as the prototype for its client class. More... | |
| void | delete_prototype (const string &xclass_name) |
| Removes the prototype for handles of type xclass_name. More... | |
| bool | contains_prototype (const string &xclass_name) const |
| True if the set of prototypes contains a prototype for handles of type xclass_name. More... | |
A factory for instanting descendants of an abstract type T, given the class name of the descendant. Requires: virtual const string& T::class_name() the actual (descendant) class name of the prototype. virtual R T::clone() virtual default constructor virtual R T::clone(S& xarg) virtual constructor.
Definition at line 52 of file factory_2.h.
| sheaf::factory_2< T, R >::factory_2 | ( | ) |
Default constructor.
Definition at line 59 of file factory_2.impl.h.
References sheaf::factory_2< T, R >::~factory_2().
Referenced by sheaf::factory_2< T, R >::contains_prototype().
|
virtual |
Destructor.
Definition at line 72 of file factory_2.impl.h.
References sheaf::factory_2< T, R >::new_instance().
Referenced by sheaf::factory_2< T, R >::factory_2().
| bool sheaf::factory_2< T, R >::contains_prototype | ( | const string & | xclass_name | ) | const |
True if the set of prototypes contains a prototype for handles of type xclass_name.
Definition at line 214 of file factory_2.impl.h.
References sheaf::factory_2< T, R >::factory_2().
Referenced by sheaf::factory_2< T, R >::delete_prototype().
| void sheaf::factory_2< T, R >::delete_prototype | ( | const string & | xclass_name | ) |
Removes the prototype for handles of type xclass_name.
Definition at line 184 of file factory_2.impl.h.
References sheaf::factory_2< T, R >::contains_prototype().
Referenced by sheaf::factory_2< T, R >::insert_prototype().
| void sheaf::factory_2< T, R >::insert_prototype | ( | T * | xprototype | ) |
Sets xprototype as the prototype for its client class.
Definition at line 146 of file factory_2.impl.h.
References sheaf::factory_2< T, R >::delete_prototype().
Referenced by sheaf::factory_2< T, R >::new_instance().
| R sheaf::factory_2< T, R >::new_instance | ( | const string & | xclient_class_name, |
| const arg_list & | xargs | ||
| ) |
Creates an instance of type xclient_class_name with arguments xargs.
Definition at line 123 of file factory_2.impl.h.
References sheaf::factory_2< T, R >::insert_prototype().
Referenced by sheaf::factory_2< T, R >::~factory_2().