Share

ACRX_CONS_DEFINE_MEMBERS

C++

#define ACRX_CONS_DEFINE_MEMBERS(CLASS_NAME,PARENT_CLASS,VERNO) \
ACRX_CONS_DEFINE_MEMBERS_WORKER(ACRX_AUTO_INIT_DEFAULT, CLASS_NAME, PARENT_CLASS, VERNO)

File

rxboiler.h

Description

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 of the ClassName base class that is in the ObjectARX run-time tree.

None 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(), isA(), and gpDesc. In addition it also defines:

static AcRxObject * make()CLASS_NAME::rxInit()

Note When used, this macro does not need to be terminated by a comma (';'), but it may be used without any problems:

ACRX_CONS_DEFINE_MEMBERS(ClassName, ParentClassName)

or

ACRX_CONS_DEFINE_MEMBERS(ClassName, ParentClassName);

CLASS_NAME : Input name of the class being declared PARENT_CLASS : Input name of the ObjectARX tree-resident base class VERNO : Input version number for this class (not currently used by ObjectARX)

Was this information helpful?