CFx SDK Documentation
2020SP3
|
#include <DbObjectId.h>
Static Public Attributes | |
static TOOLKIT_EXPORT_STATIC const OdDbObjectId | kNull |
Protected Attributes | |
OdDbStub * | m_Id |
Friends | |
class | OdDbStub |
This class implements memory-resident ObjectId objects for OdDbDatabase objects.
The user must explicitly open an object before reading or writing to it, and should release it when the operation is completed. This functionality allows Teigha to support partial loading of a database, where ObjectId objects exist for all objects in the database, but the actual database objects need not be loaded until they are accessed.
It also allows database objects that are not in use to be swapped out of memory, and loaded back in when they are accessed. ObjectId objects are not written out to a DWG/DXF file. If a reference must be preserved to a database object that has been serialized, the object's database handle (OdDbHandle) should be used.
Corresponding C++ library: TD_Db
<group OdDb_Classes>
Definition at line 98 of file DbObjectId.h.
|
inline |
Definition at line 105 of file DbObjectId.h.
|
inline |
void OdDbObjectId::bindObject | ( | OdDbObject * | pObj | ) |
Binds the specified object.
pObj | [in] Pointer to the object to bind. |
void OdDbObjectId::convertToRedirectedId | ( | ) |
If this ObjectId object has been redirected from another database (possibly an Xref), this function returns the actual ObjectId object for that database.
OdDbDatabase* OdDbObjectId::database | ( | ) | const |
Returns the database with which this ObjectId object is associated.
const OdDbHandle& OdDbObjectId::getHandle | ( | ) | const |
Returns the database handle of the object referenced by this ObjectId object.
If this ObjectId object has been redirected from another database (possibly an Xref), this function returns the handle for this database.
const OdDbHandle& OdDbObjectId::getNonForwardedHandle | ( | ) | const |
Returns the database handle of the object referenced by this ObjectId object.
If this ObjectId object has been redirected from another database (possibly an Xref), this function returns the handle for the original database.
bool OdDbObjectId::isEffectivelyErased | ( | ) | const |
Returns true if and only if this object associated with this ObjectId object is erased, or any of its ownership hierarchy have been erased.
bool OdDbObjectId::isErased | ( | ) | const |
Returns true if and only if the object associated with this ObjectId object is erased.
|
inline |
Returns true and only if this ObjectId object is null.
Definition at line 123 of file DbObjectId.h.
bool OdDbObjectId::isValid | ( | ) | const |
Returns true and only if this ObjectId object references a valid object.
OdRxClass* OdDbObjectId::objectClass | ( | ) | const |
bool OdDbObjectId::objectLeftOnDisk | ( | ) | const |
For Teigha internal use only.
DOM
OdDbObjectPtr OdDbObjectId::openObject | ( | OdDb::OpenMode | openMode = OdDb::kForRead , |
bool | openErasedOne = false |
||
) | const |
Opens the database object associated with this ObjectId object, in the specified mode.
openMode | [in] Mode in which to open the object. |
openErasedOne | [in] If and only if true, erased objects will be opened. |
Value Description OdDb::kForRead 0 Object is open for reading. OdDb::kForWrite 1 Object is open for reading and/or writing. OdDb::kForNotify 2 Object is open for notify.
OdResult OdDbObjectId::openObject | ( | OdDbObjectPtr & | pObj, |
OdDb::OpenMode | openMode = OdDb::kForRead , |
||
bool | openErasedOne = false |
||
) | const |
Opens the database object associated with this ObjectId object, in the specified mode.
pObj | [out] Smart pointer to opened object |
openMode | [in] Mode in which to open the object. |
openErasedOne | [in] If and only if true, erased objects will be opened. |
openMode must be one of the following:
Value Description OdDb::kForRead 0 Object is open for reading. OdDb::kForWrite 1 Object is open for reading and/or writing. OdDb::kForNotify 2 Object is open for notify.
|
inline |
|
inline |
Definition at line 164 of file DbObjectId.h.
bool OdDbObjectId::operator!= | ( | const OdDbObjectId & | objectId | ) | const |
|
inline |
bool OdDbObjectId::operator< | ( | const OdDbObjectId & | objectId | ) | const |
bool OdDbObjectId::operator<= | ( | const OdDbObjectId & | objectId | ) | const |
|
inline |
DOM
Definition at line 143 of file DbObjectId.h.
bool OdDbObjectId::operator== | ( | const OdDbObjectId & | objectId | ) | const |
bool OdDbObjectId::operator> | ( | const OdDbObjectId & | objectId | ) | const |
bool OdDbObjectId::operator>= | ( | const OdDbObjectId & | objectId | ) | const |
OdDbDatabase* OdDbObjectId::originalDatabase | ( | ) | const |
Returns the original database with which this ObjectId object is associated.
Otherwise, it returns a pointer to the database with which this ObjectId object is associated.
OdDbObjectPtr OdDbObjectId::safeOpenObject | ( | OdDb::OpenMode | openMode = OdDb::kForRead , |
bool | openErasedOne = false |
||
) | const |
Opens the database object associated with this ObjectId object, in the specified mode, or throws and exception if unsucessful.
openMode | [in] Mode in which to open the object. |
openErasedOne | [in] If and only if true, erased objects will be opened. |
Value Description OdDb::kForRead 0 Object is open for reading. OdDb::kForWrite 1 Object is open for reading and/or writing. OdDb::kForNotify 2 Object is open for notify.
Throws:
Cause eNullObjectId This ObjectId object is null. ePermanentlyErased Not opened and openErasedOne == 1 eWasErased Not opened and openErasedOne == 0
|
inline |
Sets this Object ID to null.
Definition at line 128 of file DbObjectId.h.
|
friend |
Definition at line 337 of file DbObjectId.h.
|
static |
The null ObjectId object.
Definition at line 118 of file DbObjectId.h.
|
protected |
Definition at line 338 of file DbObjectId.h.