Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

ObjectCreator Class Reference

ObjectCreator class. More...

#include <objectCreator.h>

Inheritance diagram for ObjectCreator:

MoleculeObjectCreator List of all members.

Public Member Functions

Constructors
 ObjectCreator () throw ()
 Default Constructor.
Destructors
virtual ~ObjectCreator () throw ()
 Destructor.
virtual void clear () throw ()
 Explicit default initialization.
Accessors: inspectors and mutators
virtual void initPersistenceManager (TextPersistenceManager &pm) throw ()
 Initialize the persistence manager.
virtual CompositeconvertObject (PersistentObject &po) throw ()
 Convert persistent objects.
Operators
Compositeoperator() (IOStreamSocket &iostream_socket) throw ()
 Read from a socket stream.

Detailed Description

ObjectCreator class.

The class ObjectCreator is a base class for converting PersistentObject objects into Composite objects. It defines methods for initialization and conversion that must be overriden by the derived class. This class is used by the class Server to convert incoming PersistentObject objects to Composite objects.


Constructor & Destructor Documentation

ObjectCreator::ObjectCreator  )  throw ()
 

Default Constructor.

Construct new objectCreator. The state of this server is: TextPersistenceManager not initialized.

Returns:
ObjectCreator new constructed objectCreator
See also:
TextPersistenceManager

virtual ObjectCreator::~ObjectCreator  )  throw () [virtual]
 

Destructor.


Member Function Documentation

virtual void ObjectCreator::clear  )  throw () [virtual]
 

Explicit default initialization.

Empty for further purpose.

Reimplemented in MoleculeObjectCreator.

virtual Composite* ObjectCreator::convertObject PersistentObject po  )  throw () [virtual]
 

Convert persistent objects.

Override this method to convert PersistentObject objects to Composite objects. See TextPersistenceManager for information on how to convert PersistentObject objects into other objects.

Parameters:
po a reference to a PersistentObject to be converted
Returns:
Composite* a converted Composite object if po could successfully be converted into a Composite object

Reimplemented in MoleculeObjectCreator.

virtual void ObjectCreator::initPersistenceManager TextPersistenceManager pm  )  throw () [virtual]
 

Initialize the persistence manager.

Initialize the TextPersistenceManager of this objectCreator. Override this method to initialize the persistence manager for specified objects. See TextPersistenceManager for information on how and why to register PersistentObject classes.

Parameters:
pm the TextPersistenceManager to be initialized
See also:
TextPersistenceManager

Reimplemented in MoleculeObjectCreator.

Composite* ObjectCreator::operator() IOStreamSocket iostream_socket  )  throw ()
 

Read from a socket stream.

This method will be called by the Server to convert objects that are available at the IOSocketStream using the convertObject method. It initializes the TextPersistenceManager by calling the method initPersistenceManager if it is not already initialized. Calls initPersistenceManager. Calls convertObject.

Parameters:
iostream_socket a reference to a IOSocketStream object
Returns:
Composite* a pointer to a received Composite object ( 0 if no composite object was received)