#include <BasicDynamicClassFactory.h>

Public Member Functions | |
| BasicDynamicClassFactory () | |
| void * | create () |
| void | destroy (void *x) |
| unsigned int | getClassSize () |
| |
| unsigned int | getNumNodes () |
| |
| unsigned int | getNumClasses () |
| |
Protected Member Functions | |
| void | registerNode (BasicDynamicClassNodeBase *node) |
Private Attributes | |
| unsigned int | classSize |
| unsigned int | numClasses |
| BasicArray < BasicDynamicClassNodeBase * > | nodes |
Friends | |
| class | BasicDynamicClassNodeBase |
Pros:
Cons:
Don't use this class unless you know why and how to use it.
See also this similar class BasicClassGroupFactory.
Definition at line 63 of file BasicDynamicClassFactory.h.
| BasicDynamicClassFactory::BasicDynamicClassFactory | ( | ) |
Definition at line 31 of file BasicDynamicClassFactory.cpp.
| void * BasicDynamicClassFactory::create | ( | ) |
This function will allocate one contiguous block of memory the size of the sum of the sizes of the registered class nodes. If the registered class nodes have overridden the BasicDynamicClassNode::init() function it will be called first. WARNING the constructors of the dynamic class nodes are NOT called.
Definition at line 35 of file BasicDynamicClassFactory.cpp.
References classSize, BasicArray< T >::getSize(), nodes, and numClasses.

| void BasicDynamicClassFactory::destroy | ( | void * | x | ) |
Deallocate a dynamic class. WARNING the destructors are NOT called.
| x | A pointer the the dynamic class do be destroyed. |
Definition at line 47 of file BasicDynamicClassFactory.cpp.
References numClasses.
| unsigned int BasicDynamicClassFactory::getClassSize | ( | ) | [inline] |
Definition at line 91 of file BasicDynamicClassFactory.h.
References classSize.
| unsigned int BasicDynamicClassFactory::getNumNodes | ( | ) | [inline] |
Definition at line 94 of file BasicDynamicClassFactory.h.
References BasicArray< T >::getSize(), and nodes.

| unsigned int BasicDynamicClassFactory::getNumClasses | ( | ) | [inline] |
Definition at line 97 of file BasicDynamicClassFactory.h.
References numClasses.
| void BasicDynamicClassFactory::registerNode | ( | BasicDynamicClassNodeBase * | node | ) | [protected] |
This function is only callable by BasicDynamicClassNodeBase. See BasicDynamicClassNodeBase::registerNode().
Definition at line 52 of file BasicDynamicClassFactory.cpp.
References classSize, BasicDynamicClassNodeBase::getSize(), nodes, BasicArray< T >::put(), and BasicDynamicClassNodeBase::setOffset().
Referenced by BasicDynamicClassNodeBase::registerNode().

friend class BasicDynamicClassNodeBase [friend] |
Definition at line 106 of file BasicDynamicClassFactory.h.
unsigned int BasicDynamicClassFactory::classSize [private] |
Definition at line 64 of file BasicDynamicClassFactory.h.
Referenced by create(), getClassSize(), and registerNode().
unsigned int BasicDynamicClassFactory::numClasses [private] |
Definition at line 65 of file BasicDynamicClassFactory.h.
Referenced by create(), destroy(), and getNumClasses().
Definition at line 67 of file BasicDynamicClassFactory.h.
Referenced by create(), getNumNodes(), and registerNode().
1.5.3