class X: public A, public virtual B {
C c; // C is a class
D d; // D is a class
//...
};
Set the symbol BASE_CLASSES to a list of the addresses of the class descriptors for the base classes of the class you are defining. These must be in the same order as they appear in the class declaration:
#define BASE_CLASSES A::desc(), B::desc()
Set the symbol MEMBER_CLASSES to a list of the addresses of the class descriptors for any member variables of the class that are NIH Library classes. These must be in the same order as they appear in the class declaration:
#define MEMBER_CLASSES C::desc(), D::desc()
If a class has no class members, define MEMBER_CLASSES, but give it no value.
Set the symbol VIRTUAL_BASE_CLASSES to a list of the addresses of the class descriptors for the virtual base classes of the class you are defining. These must be in the same order as they appear in the class declaration:
#define VIRTUAL_BASE_CLASSES B::desc()
If a class has no virtual base classes, define VIRTUAL_BASE_CLASSES, but give it no value.
Now you are ready to call the DEFINE_CLASS macro:
DEFINE_CLASS(classname,version,identificatio n,initor1,initor2)
Classname is the name of the class you are defining.
Version is the version number of the class you are defining. It should be changed whenever the format of the information written by the storer() function changes such that older versions of readFrom() can no longer interpret it correctly.
Identification is a character string that identifies the revision
level of the implementation of the class. It is simply stored in the class
descriptor where you can retrieve it by calling the function
Class::ident(). The identification parameter is intended for use with
a revision control system such as RCS or SCCS. NIH Library classes specify it
as the string "
Initor1 and initor2 are pointers to functions you may supply
to perform initialization for the class, for example, initializing
static data that the class uses.