Class Hierarchy
AcAxObjectRef
C++
class AcAxObjectRef;
File
axobjref.h
Description
This class abstracts a reference to an AcDbObject. An instance of this class can manage either an AcDbObjectId or a pointer to a non-database-resident AcDbObject instance.
Objects are attached to an AcAxObjectRef and can be detached to obtain the reference. The lifetime of a non-resident-database object is bound to the lifetime of the AcAxObjectRef instance to which it is attached. If necessary, detach it from the AcAxObjectRef before the AcAxObjectRef instance goes out of scope and is destroyed. When wrapping a non-resident AcDbObject instance, the AcAxObjectRef owns the object and the pointer. Callers should not cache references to non-resident objects attached to AcAxObjectRef instances. Database-resident objects attached to AcAxObjectRef instances are not bound by these restrictions, and their lifetimes are not bound to the lifetime of the attached AcAxObjectRef.
When this class is used with the AcAxObjectRefPtr smart-pointer class, applications can manage references to both database-resident and non-database-resident objects with minimal considerations for the residency of the underlying object.