Share

ACRX_X_CALL

C++

#define ACRX_X_CALL(RxObj,PEClass) PEClass::cast(RxObj->x(PEClass::desc()))

File

rxobject.h

Description

ACRX_X_CALL(a, b)

When accessing protocol extension methods, you must use the x() or queryX() methods. The value returned back is a pointer to an AcRxObject, which must then be cast down to the appropriate protocol extension class. This may be written out in every use location, but in many cases the calling syntax can also be compressed into a macro. An example of the most common calling syntax in macro form is provided in the rxobject.h header file:

#define ACRX_X_CALL(a,b) b::cast(a->x(b::desc()))

This macro demonstrates the use of the x() method to access a protocol extension object.

An example of this macro's use might be:

double val = ACRX_X_CALL(pEnt, ProtExtClass)->func1(pEnt);

a : Object pointer b : Protocol extension class

Was this information helpful?