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 T* T::clone() virtual default constructor virtual bool is_initialized() true if instance is fully initialized. More...
#include <factory.h>
Public Member Functions | |
factory () | |
Default constructor. More... | |
virtual | ~factory () |
Destructor. More... | |
T * | new_instance (const std::string &xclient_class_name) |
Creates an instance of type xclient_class_name. More... | |
template<typename S > | |
T * | new_instance (const std::string &xclient_class_name, S &xarg) |
Creates an instance of type xclient_class_name and initializes it with xname_space. More... | |
void | insert_prototype (T *xprototype) |
Sets xprototype as the prototype for its client class. More... | |
void | delete_prototype (const std::string &xclass_name) |
Removes the prototype for handles of type xclass_name. More... | |
bool | contains_prototype (const std::string &xclass_name) const |
True if the set of prototypes contains a prototype for handles of type xclass_name. More... | |
Friends | |
std::ostream & | operator (std::ostream &xos, const factory< T > &xf) |
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 T* T::clone() virtual default constructor virtual bool is_initialized() true if instance is fully initialized.
Definition at line 49 of file eval_family.h.
sheaf::factory< T >::factory | ( | ) |
Default constructor.
Definition at line 48 of file factory.impl.h.
References sheaf::factory< T >::~factory().
Referenced by sheaf::factory< T >::contains_prototype().
|
virtual |
Destructor.
Definition at line 61 of file factory.impl.h.
References sheaf::factory< T >::new_instance().
Referenced by sheaf::factory< T >::factory().
bool sheaf::factory< T >::contains_prototype | ( | const std::string & | xclass_name | ) | const |
True if the set of prototypes contains a prototype for handles of type xclass_name.
Definition at line 212 of file factory.impl.h.
References sheaf::factory< T >::factory().
Referenced by sheaf::factory< T >::delete_prototype().
void sheaf::factory< T >::delete_prototype | ( | const std::string & | xclass_name | ) |
Removes the prototype for handles of type xclass_name.
Definition at line 182 of file factory.impl.h.
References sheaf::factory< T >::contains_prototype().
Referenced by sheaf::factory< T >::insert_prototype().
void sheaf::factory< T >::insert_prototype | ( | T * | xprototype | ) |
Sets xprototype as the prototype for its client class.
Definition at line 144 of file factory.impl.h.
References sheaf::factory< T >::delete_prototype().
Referenced by fiber_bundle::eval_family::initialize_members(), fiber_bundle::sec_rep_descriptor_poset::make_prototype(), sheaf::factory< T >::new_instance(), sheaf::primitives_poset::primitive_members_attached(), sheaf::primitives_poset_schema::standard_name(), fiber_bundle::base_space_poset::~base_space_poset(), and sheaf::refinable_poset::~refinable_poset().
T * sheaf::factory< T >::new_instance | ( | const std::string & | xclient_class_name | ) |
Creates an instance of type xclient_class_name.
Definition at line 91 of file factory.impl.h.
Referenced by sheaf::factory< T >::~factory().
T * sheaf::factory< T >::new_instance | ( | const std::string & | xclient_class_name, |
S & | xarg | ||
) |
Creates an instance of type xclient_class_name and initializes it with xname_space.
Definition at line 117 of file factory.impl.h.
References sheaf::factory< T >::insert_prototype().