Before you can read or modify a database object by working with its methods and
properties, you must explicitly open the object for reading it or writing to it. You
should also release it when the operation is completed.
Opening Objects
Having a proper Object ID, you can open the object in a specific mode using the
safeOpenObject()
method:
After the object is opened, you can access its methods and properties by using the created smart pointer object:
pLevel->setElevation(10.0);
Closing Objects
All objects implement smart pointer technology that is based on the reference
counting mechanism and allows managing object lifecycles including closing and
deleting objects. The close operation is done automatically when the smart
pointers holding references to these objects go out of scope.