BasicClassGroupFactory Class Reference

#include <BasicClassGroupFactory.h>

Inheritance diagram for BasicClassGroupFactory:

Inheritance graph
[legend]
Collaboration diagram for BasicClassGroupFactory:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~BasicClassGroupFactory ()
void registerClass (BasicClassAccessorBase *accessor)
virtual BasicClassGroupcreate ()
virtual void destroy (BasicClassGroup *group)

Private Attributes

BasicArray
< BasicClassFactoryBase< void > * > 
classFactories
BasicArray
< BasicClassAccessorBase * > 
classAccessors


Detailed Description

Manages (de)allocation of groups of classes in a type safe manner.

Pros:

Cons:

See also BasicDynamicClassFactory.

Definition at line 57 of file BasicClassGroupFactory.h.


Constructor & Destructor Documentation

BasicClassGroupFactory::~BasicClassGroupFactory (  )  [virtual]

Definition at line 35 of file BasicClassGroupFactory.cpp.

References classFactories, and BasicArray< T >::getSize().


Member Function Documentation

void BasicClassGroupFactory::registerClass ( BasicClassAccessorBase accessor  ) 

BasicClassGroup * BasicClassGroupFactory::create (  )  [virtual]

The constructors of each of the classes in the group will be called in the order they where registered with the factory.

Returns:
A new instance of the class group.

Implements BasicClassFactoryBase< BasicClassGroup >.

Definition at line 46 of file BasicClassGroupFactory.cpp.

References classFactories, and BasicArray< T >::getSize().

Referenced by BasicClassGroupArray::create(), and CompuCell3D::Potts3D::createCellG().

void BasicClassGroupFactory::destroy ( BasicClassGroup group  )  [virtual]

The destructors of each of the classes in the group will be called in the order they were registered with the factory.

Parameters:
group The class group to be deallocated.

Implements BasicClassFactoryBase< BasicClassGroup >.

Definition at line 55 of file BasicClassGroupFactory.cpp.

References ASSERT_OR_THROW, classAccessors, BasicClassGroup::classes, and BasicClassGroup::size.

Referenced by BasicClassGroupArray::destroy(), and CompuCell3D::Potts3D::destroyCellG().


Member Data Documentation

Definition at line 58 of file BasicClassGroupFactory.h.

Referenced by create(), registerClass(), and ~BasicClassGroupFactory().

Definition at line 59 of file BasicClassGroupFactory.h.

Referenced by destroy(), and registerClass().


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

Generated on Thu Dec 4 11:41:19 2008 for CompuCell3D by  doxygen 1.5.6