C++
AcAxObjectRefPtr( AcAxObjectRef* const pRef, AcDb::OpenMode mode, bool openErased = false );
Description
This constructor creates an AcAxObjectRefPtr instance for smart-pointer access to an object represented by an AcAxObjectRef instance.
If the underlying object is database-resident, the constructor attempts to open the object using the supplied mode, including erased objects if the openErased parameter is true. If the underlying object is not database resident, it does not attempt to open the object.
The constructor calls AcAxObjectRef::release() on the objRef pointer passed to it. The AcAxObjectRefPtr destructor restores the reference. Callers should not rely on the objRef instance for the lifetime of the AcAxObjectRefPtr. Instead, they should use the AcAxObjectRefPtr instance for access to the underlying object.
Parameters
Parameters | Description |
---|---|
pRef | Abstract object reference that the AcAxObjectRefPtr uses to access the underlying object |
mode | Mode in which to open database-resident objects; one of the AcDb::OpenMode enumerators |
openErased | True if erased database resident objects should be opened; otherwise false |