#include <ObjectFactory.h>
Public Member Functions | |
| virtual void * | createObject (const std::string &className)=0 |
| virtual void | destroyObject (void *pObject, const std::string &className)=0 |
| virtual void * | createObjectVector (const std::string &className)=0 |
| virtual void | destroyObjectVector (void *pVector, const std::string &className)=0 |
Protected Member Functions | |
| virtual | ~ObjectFactory () |
The ObjectFactory can create and destroy objects of arbitrary classes dynamically at runtime.
Definition at line 24 of file ObjectFactory.h.
| virtual ObjectFactory::~ObjectFactory | ( | ) | [protected, virtual] |
This will be cleaned up during application close.
Plug-ins do not need to destroy it.
Definition at line 166 of file ObjectFactory.h.
| virtual void* ObjectFactory::createObject | ( | const std::string & | className | ) | [pure virtual] |
Instantiate an object whose type is determined at runtime.
| className | A string containing the class name of the object to be instantiated. The valid object types are:
|
| virtual void ObjectFactory::destroyObject | ( | void * | pObject, | |
| const std::string & | className | |||
| ) | [pure virtual] |
Deallocate an object that was previously allocated by the ObjectFactory, including vectors.
| pObject | A pointer to an object previously allocated by the ObjectFactory. | |
| className | A string containing the class name of the object to be deallocated. |
| virtual void* ObjectFactory::createObjectVector | ( | const std::string & | className | ) | [pure virtual] |
Instantiate an empty vector of objects whose type is determined at runtime.
| className | A string containing the name of the class of the object to be instantiated. The valid object types are:
|
| virtual void ObjectFactory::destroyObjectVector | ( | void * | pVector, | |
| const std::string & | className | |||
| ) | [pure virtual] |
Deallocate a vector of objects whose type is determined at runtime.
This method deletes a vector that was previously allocatied by the object factory. If the vector contains pointers, the objects that the pointers point to are not deleted.
| pVector | A pointer to a vector previously allocated by the ObjectFactory. | |
| className | A string containing the name of the class of the object to be instantiated. |