Modernized GAlib
3.0.0 current
|
This defines the identifiers for polymorphic classes. More...
#include <gaid.h>
Public Member Functions | |
bool | sameClass (const GAID &b) const |
virtual const char * | className () const |
virtual int | classID () const |
This defines the identifiers for polymorphic classes.
The IDs are used primarily for checking to be see if the two objects are the same type before doing a copy, for example. The name is often used when printing out error messages so you'll know where things are happening. I hate to derive so many classes from the same base class, especially when the derived classes are completely unrelated. But this is a convenient way to enumerate the built-in classes, and they DO share the polymorphic behaviour (even if they do NOT share any other attributes).