Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

ph::common::cloneable_object_base Class Reference

#include <cloneable_object.hpp>

Detailed Description

Abstract class representing the interface for an object to be cloned.

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_baseclone (const std::string &name, cloneable_object_context *context) const =0
virtual object_basesubclass (const std::string &name, cloneable_object_context *context) const =0

Constructor & Destructor Documentation

virtual ph::common::cloneable_object_base::~cloneable_object_base  )  [inline, virtual]

Definition at line 30 of file cloneable_object.hpp.

Member Function Documentation

virtual bool ph::common::cloneable_object_base::construct cloneable_object_context context  )  [pure virtual]

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).

virtual object_base* ph::common::cloneable_object_base::clone const std::string &  name,
cloneable_object_context context
const [pure virtual]

Clone this object.

virtual object_base* ph::common::cloneable_object_base::subclass const std::string &  name,
cloneable_object_context context
const [pure virtual]

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.

The documentation for this class was generated from the following file:
Generated on Wed Apr 5 22:03:33 2006 for cppxmlobj by  doxygen 1.4.3