#include <cloneable_object.hpp>
This is an important part of allowing objects to be used in the Abstract Factory pattern, which is used heavily in persistance.
Definition at line 21 of file cloneable_object.hpp.
Public Member Functions | |
virtual | ~cloneable_object_base () |
virtual bool | construct (cloneable_object_context *context)=0 |
virtual object_base * | clone (const std::string &name, cloneable_object_context *context) const =0 |
virtual object_base * | subclass (const std::string &name, cloneable_object_context *context) const =0 |
|
Definition at line 30 of file cloneable_object.hpp. |
|
Allow objects to construct themselves WITH inheritence. it's up to the impementation to call this on the object when it is created (or cloned from another). |
|
Clone this object. |
|
Subclassing copies the object,but makes it's "type" the name of this object, and makes the "name" equal to the name passed in. This allows an object to be a virtual copy of another, except for the type identifier. This feature is used in template systems. |