The header file for a custom class can use the ACRX_DECLARE_MEMBERS(CLASS_NAME) ObjectARX macro to declare the desc(), cast(), and isA() functions.
This macro is used in the public section of the class declaration, as follows:
class myClass : public AcRxObject { public: ACRX_DECLARE_MEMBERS(myClass); ... };
For AsdkPoly, the following line expands to a single long line of code.
ACRX_DECLARE_MEMBERS(AsdkPoly);
When reformatted to multiple lines for clarity, the line looks like this:
virtual AcRxClass* isA() const; static AcRxClass* gpDesc; static AcRxClass* desc(); static AsdkPoly* cast(const AcRxObject* inPtr) { return ((inPtr == 0) || !inPtr->isKindOf(AsdkPoly::desc())) ? 0 : (AsdkPoly*)inPtr; }; static void rxInit();
The static rxInit() function and the static gpDesc pointer declared by this macro are used to implement the isA(), desc(), and cast() functions.