Virtual Function isA()
The virtual function isA() returns a class identifier: a unique number that identifies an object's class. It can be used to determine the class to which an object belongs. Here's the function declaration provided by macro RW_DECLARE_COLLECTABLE_CLASS:
 
virtual RWClassID isA() const;
RWClassID is actually a typedef to an unsigned short. Numbers from 0x8000 (hex) and up are reserved for use by Rogue Wave. You may choose a numeric class ID from 0x0001 to 0x7fff. There is a set of class symbols defined in <rw/tooldefs.h> for the Essential Tools Module. Generally, these follow the pattern of a double underscore followed by the class name with all letters in upper case. For example:
 
RWCollectableString yogi;
yogi.isA() == __RWCOLLECTABLESTRING; // Evaluates true
The macro RW_DECLARE_COLLECTABLE_CLASS(USER_MODULE, className) will automatically provide a declaration for isA(). Either RWDEFINITION_MACRO will supply the definition.