Assignments
Assignments
|
#include <factory.h>
Public Member Functions | |
virtual | ~BaseFactory (void) |
BaseType * | create (void) |
template<typename DerivedType > | |
BaseType * | create (void) |
Private Member Functions | |
virtual BaseType * | _create (void)=0 |
Private Attributes | |
std::vector< BaseType * > | _baseTypes |
This templated class represents a factory for generating objects of type BaseType. It tracks the objects created and deletes them in the destructor.
|
inlinevirtual |
The destructor is responsible for deallocating all the BaseType created
|
privatepure virtual |
The virtual method creating an object of type BaseType on the heap
Implemented in Util::DerivedFactory< BaseType, DerivedType >.
|
inline |
The (publicly accessible) method for creating a new object
|
inline |
The method for creating a new derived object
|
private |
The list of BaseType created by the factory