MPQC
2.3.1
|
The class library provides the DescribedClass base class which provides mechanisms that allows programmers to retrieve information about a DescribedClass descendant's name; parents; and default, StateIn, and KeyVal constructors.
The special nature of described classes requires that the base class, DescribedClass, cannot provide everything needed. To assist the user in setting up described classes a helper class, ClassDesc, is provided. Foreach descendent of DescribedClass an object of type ClassDesc must be created. These objects should be static so they are initialized before main is entered.
The ClassDesc constructor takes the following arguments:
For example, consider the class, D:
class D: public B, public C { public: D(); };
The file implementing D would contain the following line:
static ClassDesc D_cd(typeid(D),"D",1,"public B, public C",create<D>);