T
tommo97
Dear all,
I am a relative novice to C++ and was wondering:
if I have a base class is it possible to recursively create new
derived classes from it "on the fly" at runtime? What I mean is that
each derived class will have it's own static members which can be
calculated from the base class using various functions, but that the
number and variation between the derived class and the base class may
(are) not known at compile time.
For example an octree:
Base class is a node;
1st derived class is a root node, the next is derived from this;
2nd - nth derived classes are nodes at the various levels of the tree
- these are derived from one-another;
(n+1)th derived class is the leaf and is derived from the previous
class.
Sorry if this makes no sense. If you have any idea even of the correct
posing of this question please let me know!
Thanks
tm
I am a relative novice to C++ and was wondering:
if I have a base class is it possible to recursively create new
derived classes from it "on the fly" at runtime? What I mean is that
each derived class will have it's own static members which can be
calculated from the base class using various functions, but that the
number and variation between the derived class and the base class may
(are) not known at compile time.
For example an octree:
Base class is a node;
1st derived class is a root node, the next is derived from this;
2nd - nth derived classes are nodes at the various levels of the tree
- these are derived from one-another;
(n+1)th derived class is the leaf and is derived from the previous
class.
Sorry if this makes no sense. If you have any idea even of the correct
posing of this question please let me know!
Thanks
tm