Share

AcRx Macros

Description

Describes macros specific to AcRx classes.

Macros

Macro Description
ACRX_CONS_DEFINE_MEMBERS ACRX_CONS_DEFINE_MEMBERS(CLASS_NAME, PARENT_CLASS, VERNO)This macro is used to define the required ObjectARX overhead functions for a class that will be a concrete classes with a meaningful default constructor ("CONS" is short for "constructor"). This macro is similar to the ACRX_DEFINE_MEMBERS() macro, except it also provides an implementation for the static rxInit() function. This macro also causes ClassName::desc()->create() to return an instance of the object created with its default constructor, and causes ClassName::desc()->dxfName() to return NULL.The ClassName argument must be the name of the class in whose declaration the macro is included. The ParentClassName argument must be the name... more
ACRX_DECLARE_MEMBERSACRX_DECLARE_MEMBERS(CLASS_NAME)CLASS_NAME Input name of the class being declaredThis macro is used in the declaration of classes that are to be a part of the ObjectARX run-time tree. The ClassName argument must be the name of the class in whose declaration the macro is included. The macro declares the member functions isA(), desc() and cast() for the class CLASS_NAME which is derived (at some level) from AcRxObject. Declaring these functions is required for the class to participate in the AcRxObject runtime type identification mechanism.
ACRX_DEFINE_MEMBERS This macro is primarily used inside of the other "body" macros to define most of the required ObjectARX overhead functions. This macro defines all required functions except for the rxInit() function. This macro may be used instead of the ACRX_NO_CONS_DEFINE_MEMBERS or ACRX_CONS_DEFINE_MEMBERS macros in order to create a class definition that is complete enough to be used as an "API" library for others to create their own applications using the class, but because the rxInit() function is not defined, there is no way for such applications to add the class to the run-time tree. So, the main application is necessary... more
ACRX_DXF_DEFINE_MEMBERS This macro (or code equivalent to what it expands to) must be used by all classes whose objects will be stored in an AcDbDatabase.The CLASS_NAME argument must be the name of the class in whose declaration the macro is included. The PARENT_CLASS argument must be the name of the CLASS_NAME base class that is in the ObjectARX run-time tree.When registering classes using these macros, you need to provide dwg and maintenance release version numbers. The DWG_VERSION and MAINTENANCE_VERSION arguments are mandatory, and there is no default. These data members are not persistent; in other words, they are... more
ACRX_NO_CONS_DEFINE_MEMBERS This macro is used to define the required ObjectARX overhead functions for a class that will be an abstract base class ("NO_CONS" is short for "no constructor").The ClassName argument must be the name of the class in whose declaration the macro is included. The ParentClassName argument must be the name of the ClassName base class that is in the ObjectARX run-time tree.Neither of the arguments should be in quotes. If quotes are used, they will be treated as part of the actual string. Also, the arguments are case-sensitive.The macro uses the ACRX_DEFINE_MEMBERS macro to define desc(),... more
ACRX_PROTOCOL_REACTOR_LIST_AT This macro uses the ACRX_PROTOCOL_REACTOR_MANAGER_AT macro to query the reactor manager for the specified AcRx class. Returns a pointer to its list of reactors for the specified reactor class. acrxClass : Input class name for which to retrieve the reactor list reactorClass : Input the reactor class name to retrieve
ACRX_PROTOCOL_REACTOR_MANAGER_AT This macro calls the acrxProtocolReactor macro to get a pointer to the AcRxProtocolReactorManager object for the specified AcRx class. acrxClass : Input name of class for which to get the protocol reactor manager
ACRX_X_CALL 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... more
acrxClassDictionary The acrxClassDictionary macro provides a pointer to the ObjectARX system dictionary of AcRxClass objects. This dictionary contains all of the AcRxClass objects that make up the ObjectARX run-time tree. This dictionary uses the C++ class names that the AcRxClass objects represent as the keys for the entries.The actual definition of the macro is as follows.
acrxDynamicLinker The acrxDynamicLinker macro provides a pointer to the ObjectARX system dynamic linker object. The dynamic linker object is responsible for loading/unloading and locking/unlocking ObjectARX applications, for adding/removing linker reactors, and for providing access for ObjectARX applications to exported symbols in other ObjectARX applications.The actual definition of the macro is as follows.
acrxKernel The acrxKernel macro provides a pointer to the ObjectARX system kernel object. Normally this macro is not used by ObjectARX applications.The actual definition of the macro is as follows.
acrxProtocolReactors This macro returns a pointer to the singleton AcRxProtocolReactorManagerFactory object.
acrxServiceDictionary The acrxServiceDictionary macro provides a pointer to the ObjectARX system dictionary of service objects. This dictionary contains service objects for all registered services in the ObjectARX system. The registered service names are used as the keys for the entries.The actual definition of the macro is as follows.

Topics

Topic Description
MAKE_ACDBOPENOBJECT_FUNCTION MAKE_ACDBOPENOBJECT_FUNCTION(CLASSNAME)Note: The acdbOpenObject() function is a template function defined in dbmain.h where the first parameter is of type (CLASSNAME... more

Was this information helpful?