Thea
Public Member Functions | List of all members
SerializableFactory Class Referenceabstract

The interface for a factory for creating serializable objects. More...

#include <Serializable.hpp>

Public Member Functions

virtual SerializablecreateSerializable (char const *name) const =0
 Create an instance of the serializable class with a given name. More...
 
virtual void destroySerializable (Serializable *serializable)=0
 Destroy a serializable object created with createSerializable(). More...
 
virtual ~SerializableFactory ()
 Destructor. More...
 

Detailed Description

The interface for a factory for creating serializable objects.

Classes which provide factories should define a getFactory function. Factories are useful for loading generic objects from a database, where the only parameters that need to be passed to the database are the name of the object and a factory (accessed through a pointer of this base class type) for the particular type of object to be loaded. This way, the database can load virtually any serializable object without needing specialization for each class of object.

Definition at line 98 of file Serializable.hpp.

Constructor & Destructor Documentation

virtual ~SerializableFactory ( )
virtual

Destructor.

Definition at line 104 of file Serializable.hpp.

Member Function Documentation

virtual Serializable* createSerializable ( char const *  name) const
pure virtual

Create an instance of the serializable class with a given name.

virtual void destroySerializable ( Serializable serializable)
pure virtual

Destroy a serializable object created with createSerializable().


The documentation for this class was generated from the following file: