API Reference > Classes > Base Classes > OdBmObjectId Class > OdBmObjectId Methods > OdBmObjectId::safeOpenObject Method
OdBmObjectId::safeOpenObject Method
Syntax
C++
OdBmObjectPtr safeOpenObject() const;

Opens the *database* object associated with this ObjectId object, in the specified mode, or throws and exception if unsucessful.

Returns a SmartPointer to the opened object. 

openMode must be one of the following: 

table Name Value Description OdBm::kForRead 0 Object is open for reading. OdBm::kForWrite 1 Object is open for reading and/or writing. OdBm::kForNotify 2 Object is open for notify.

Copyright (c) 2002-2021. Open Design Alliance. All rights reserved.