CFx SDK Documentation  2022 SP0
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
OdDbObject Class Reference

#include <DbObject.h>

Inheritance diagram for OdDbObject:
OdGiDrawable OdRxObject CAseDLPNTableRecord CFxBIMDatabase CFxBIMDatabaseReference CFxBIMEntity CFxBIMStorage OdDbAssocPersSubentManager OdDbBackground OdDbBlockRepresentationData OdDbBreakData OdDbBreakPointRef OdDbColor OdDbDataLink OdDbDataTable OdDbDatabase OdDbDictionary OdDbDictionaryVar OdDbDimAssoc OdDbEntity OdDbEvalExpr OdDbEvalGraph OdDbField OdDbFilter OdDbGeoData OdDbGroup OdDbIdBuffer OdDbIndex OdDbLSObject OdDbLinkedData OdDbLongTransaction OdDbMLeaderStyle OdDbMaterial OdDbMlineStyle OdDbModelDocViewStyle OdDbMotionPath OdDbNamedPath OdDbNavisworksDefinition OdDbObjectContextData OdDbPersSubentManager OdDbPlaceHolder OdDbPlotSettings OdDbPointCloudColorMap OdDbPointCloudDef OdDbPointCloudDefEx OdDbPointCloudDefReactor OdDbPointCloudDefReactorEx OdDbProxyObject OdDbRasterImageDef OdDbRasterImageDefReactor OdDbRasterVariables OdDbRenderEntry OdDbRenderEnvironment OdDbRenderGlobal OdDbRenderSettings OdDbScale OdDbSectionManager OdDbSectionSettings OdDbShHistory OdDbSortentsTable OdDbSun OdDbSymbolTable OdDbSymbolTableRecord OdDbSynergyMappings OdDbTableStyle OdDbUnderlayDefinition OdDbVbaProject OdDbViewRep OdDbViewRepCutDefinition OdDbViewRepModelPlaneDef OdDbViewRepModelSpaceViewSelSet OdDbViewRepOrientation OdDbViewRepOrientationDef OdDbViewRepProjectionDef OdDbViewRepSource OdDbViewRepSourceMgr OdDbViewRepStandard OdDbVisualStyle OdDbWipeoutVariables OdDbXrecord OdVLObject

Public Member Functions

 ODDB_DECLARE_MEMBERS (OdDbObject)
 
 ~OdDbObject ()
 
void addRef ()
 
void release ()
 
long numRefs () const
 
OdDbObjectId objectId () const
 
OdDbHandle getDbHandle () const
 
OdDbHandle handle () const
 
OdDbObjectId ownerId () const
 
virtual void setOwnerId (OdDbObjectId ownerId)
 
OdDbDatabasedatabase () const
 
void createExtensionDictionary ()
 
OdDbObjectId extensionDictionary () const
 
bool releaseExtensionDictionary ()
 
OdDbXrecordPtr createXrecord (const OdString &xrecordName, OdDb::DuplicateRecordCloning style=OdDb::kDrcIgnore)
 
void upgradeOpen ()
 
void downgradeOpen ()
 
void cancel ()
 
virtual OdResult subOpen (OdDb::OpenMode mode)
 
virtual void subClose ()
 
OdResult erase (bool eraseIt=true)
 
virtual OdResult subErase (bool erasing)
 
void handOverTo (OdDbObject *pNewObject, bool keepXData=true, bool keepExtDict=true)
 
virtual void subHandOverTo (OdDbObject *pNewObject)
 
void swapIdWith (OdDbObjectId otherId, bool swapXdata=false, bool swapExtDict=false)
 
virtual void subSwapIdWith (const OdDbObjectId &otherId, bool swapXdata=false, bool swapExtDict=false)
 
virtual void audit (OdDbAuditInfo *pAuditInfo)
 
void dwgIn (OdDbDwgFiler *pFiler)
 
void dwgOut (OdDbDwgFiler *pFiler) const
 
virtual OdResult dxfIn (OdDbDxfFiler *pFiler)
 
virtual void dxfOut (OdDbDxfFiler *pFiler) const
 
virtual OdResult dwgInFields (OdDbDwgFiler *pFiler)
 
virtual void dwgOutFields (OdDbDwgFiler *pFiler) const
 
virtual OdResult dxfInFields (OdDbDxfFiler *pFiler)
 
virtual void dxfOutFields (OdDbDxfFiler *pFiler) const
 
virtual OdResult dxfInFields_R12 (OdDbDxfFiler *pFiler)
 
virtual void dxfOutFields_R12 (OdDbDxfFiler *pFiler) const
 
virtual OdDb::DuplicateRecordCloning mergeStyle () const
 
virtual OdResBufPtr xData (const OdString &regappName=OdString::kEmpty) const
 
virtual void setXData (const OdResBuf *pRb)
 
bool isEraseStatusToggled () const
 
bool isErased () const
 
bool isReadEnabled () const
 
bool isWriteEnabled () const
 
bool isNotifyEnabled () const
 
bool isModified () const
 
bool isModifiedXData () const
 
bool isModifiedGraphics () const
 
bool isNewObject () const
 
bool isNotifying () const
 
bool isUndoing () const
 
bool isReallyClosing () const
 
bool isDBRO () const
 
void assertReadEnabled () const
 
void assertWriteEnabled (bool autoUndo=true, bool recordModified=true)
 
void assertNotifyEnabled () const
 
void disableUndoRecording (bool disable)
 
bool isUndoRecordingDisabled () const
 
OdDbDwgFilerundoFiler ()
 
virtual void applyPartialUndo (OdDbDwgFiler *pUndoFiler, OdRxClass *pClassObj)
 
void addReactor (OdDbObjectReactor *pReactor) const
 
void removeReactor (OdDbObjectReactor *pReactor) const
 
virtual void addPersistentReactor (const OdDbObjectId &objId)
 
virtual void removePersistentReactor (const OdDbObjectId &objId)
 
bool hasPersistentReactor (const OdDbObjectId &objId) const
 
OdDbObjectIdArray getPersistentReactors () const
 
OdDbObjectReactorArray getTransientReactors () const
 
virtual void recvPropagateModify (const OdDbObject *pSubObj)
 
virtual void xmitPropagateModify () const
 
ODRX_SEALED_VIRTUAL OdDbObjectPtr deepClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary=true) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdDbObjectPtr wblockClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary=true) const ODRX_SEALED
 
virtual void appendToOwner (OdDbIdPair &idPair, OdDbObject *pOwnerObject, OdDbIdMapping &ownerIdMap)
 
void setOdDbObjectIdsInFlux ()
 
bool isOdDbObjectIdsInFlux () const
 
virtual void copied (const OdDbObject *pObject, const OdDbObject *pNewObject)
 
virtual void erased (const OdDbObject *pObject, bool erasing=true)
 
virtual void goodbye (const OdDbObject *pObject)
 
virtual void openedForModify (const OdDbObject *pObject)
 
virtual void modified (const OdDbObject *pObject)
 
virtual void subObjModified (const OdDbObject *pObject, const OdDbObject *pSubObj)
 
virtual void modifyUndone (const OdDbObject *pObject)
 
virtual void modifiedXData (const OdDbObject *pObject)
 
virtual void unappended (const OdDbObject *pObject)
 
virtual void reappended (const OdDbObject *pObject)
 
bool isAProxy () const
 
virtual void objectClosed (const OdDbObjectId &objectId)
 
virtual void modifiedGraphics (const OdDbObject *pObject)
 
virtual void copyFrom (const OdRxObject *pSource)
 
bool hasSaveVersionOverride () const
 
void setHasSaveVersionOverride (bool hasSaveVersionOverride)
 
virtual OdDb::DwgVersion getObjectSaveVersion (const OdDbFiler *pFiler, OdDb::MaintReleaseVer *pMaintVer=0) const
 
virtual OdDbObjectPtr decomposeForSave (OdDb::DwgVersion ver, OdDbObjectId &replaceId, bool &exchangeXData)
 
virtual OdDbObjectPtr decomposeForSave (OdDb::SaveType format, OdDb::DwgVersion ver, OdDbObjectId &replaceId, bool &exchangeXData)
 
void convertForSave (OdDb::DwgVersion ver)
 
virtual void composeForLoad (OdDb::SaveType format, OdDb::DwgVersion version, OdDbAuditInfo *pAuditInfo)
 
virtual OdGiDrawabledrawable ()
 
virtual OdUInt32 subSetAttributes (OdGiDrawableTraits *pTraits) const
 
virtual bool subWorldDraw (OdGiWorldDraw *pWd) const
 
virtual void subViewportDraw (OdGiViewportDraw *pVd) const
 
virtual bool isPersistent () const
 
virtual OdDbStub * id () const
 
ODRX_SEALED_VIRTUAL OdResult getClassID (void *pClsid) const ODRX_SEALED
 
void setGsNode (OdGsCache *pNode)
 
OdGsCachegsNode () const
 
void xDataTransformBy (const OdGeMatrix3d &xfm)
 
bool hasFields () const
 
OdDbObjectId getField (const OdString &fieldName) const
 
OdDbObjectPtr getField (const OdString &fieldName, OdDb::OpenMode mode) const
 
virtual OdDbObjectId setField (const OdString &fieldName, OdDbField *pField)
 
virtual OdResult removeField (OdDbObjectId fieldId)
 
virtual OdDbObjectId removeField (const OdString &fieldName)
 
OdDbObjectId getFieldDictionary () const
 
OdDbObjectPtr getFieldDictionary (OdDb::OpenMode mode) const
 
virtual OdRxClasssaveAsClass (OdRxClass *pClass) const
 
- Public Member Functions inherited from OdGiDrawable
 ODRX_DECLARE_MEMBERS (OdGiDrawable)
 
virtual DrawableType drawableType () const
 
ODRX_SEALED_VIRTUAL OdUInt32 setAttributes (OdGiDrawableTraits *pTraits) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL bool worldDraw (OdGiWorldDraw *pWd) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL void viewportDraw (OdGiViewportDraw *pVd) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdUInt32 viewportDrawLogicalFlags (OdGiViewportDraw *pVd) const ODRX_SEALED
 
virtual OdResult getGeomExtents (OdGeExtents3d &extents) const
 
ODRX_SEALED_VIRTUAL OdUInt32 regenSupportFlags () const ODRX_SEALED
 
- Public Member Functions inherited from OdRxObject
 ODRX_HEAP_OPERATORS ()
 
 OdRxObject ()
 
virtual ~OdRxObject ()
 
virtual OdRxObjectqueryX (const OdRxClass *pClass) const
 
virtual OdRxObjectx (const OdRxClass *pClass) const
 
virtual OdRxClassisA () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Protected Member Functions

 OdDbObject ()
 
virtual OdResult subGetClassID (void *pClsid) const
 
virtual OdDbObjectPtr subDeepClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary) const
 
virtual OdDbObjectPtr subWblockClone (OdDbIdMapping &ownerIdMap, OdDbObject *pOwner, bool bPrimary) const
 
- Protected Member Functions inherited from OdGiDrawable
 OdGiDrawable ()
 
virtual OdUInt32 subViewportDrawLogicalFlags (OdGiViewportDraw *vd) const
 
virtual OdUInt32 subRegenSupportFlags () const
 

Protected Attributes

OdDbObjectImplm_pImpl
 

Friends

class OdDbSystemInternals
 
class OdDbObjectOverrule
 
class OdDbPropertiesOverrule
 
class OdDbObjectImpl
 

Additional Inherited Members

- Public Types inherited from OdGiDrawable
enum  SetAttributesFlags {
  kDrawableNone = 0 , kDrawableIsAnEntity = 1 , kDrawableUsesNesting = 2 , kDrawableIsCompoundObject = 4 ,
  kDrawableViewIndependentViewportDraw = 8 , kDrawableIsInvisible = 16 , kDrawableHasAttributes = 32 , kDrawableRegenTypeDependantGeometry = 64 ,
  kDrawableIsDimension = (kDrawableIsAnEntity + kDrawableIsCompoundObject + 128) , kDrawableRegenDraw = 256 , kDrawableStandardDisplaySingleLOD = 512 , kDrawableShadedDisplaySingleLOD = 1024 ,
  kDrawableViewDependentViewportDraw = 2048 , kDrawableBlockDependentViewportDraw = 4096 , kDrawableIsExternalReference = 8192 , kDrawableNotPlottable = 16384 ,
  kLastFlag = kDrawableNotPlottable
}
 
enum  DrawableType {
  kGeometry = 0 , kDistantLight = 1 , kPointLight = 2 , kSpotLight = 3 ,
  kAmbientLight , kSolidBackground , kGradientBackground , kImageBackground ,
  kGroundPlaneBackground , kViewport , kWebLight , kSkyBackground ,
  kImageBasedLightingBackground
}
 
- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Detailed Description

This class is the base class for all objects contained in an OdDbDatabase instance (OdDb objects).

Remarks

Creating and Deleting Database Objects

Database objects are normally created by calling OdDbXXXXX::createObject(). When an object is created, it will be in kOpenForWrite mode. The delete operator should never be called on database objects. Instead, erase() should be called, which marks the object as erased. OdDbObject instances should be created by calling the createObject() method. OdDbObject instances are created in kOpenForWrite mode.
Depending on other OdDbObject instances while constructing or deleting instances is prohibited. OdDbObject instances should be deleted from an OdDbDatabase with erase(). Never access a pointer to a closed object. The delete operator must never be called on OdDbObject instances. Instead, the erase() method should be called, which marks this object as erased.

Accessing Database Objects

Database objects must be opened before they can be accessed.
Given a valid OdDbObjectId, a database object is opened by calling OdDbObjectId::safeOpenObject().
Database objects should be opened in the most restrictive mode possible, and should be released immediately when access is no longer needed.

Object may be opened in any one of the following modes:

Description OdDb::kForRead Allows operations that do not modify this object.
A database object can be opened in this mode any number of times (simultaneously), if has not open in OdDb::kForWrite or OdDb::kForNotify mode.
An exception will be thrown if any type of write operation is attempted on an object open in this mode. OdDb::kForWrite Allows read and write operations to be performed on this object.
An database object can be opened in this mode only if it is not already open in any mode. OdDb::kForNotify This object is opened for notification purposes.
A database object can be opened in this mode so long as it is not already open in kNotify mode.

See also
OdDbObjectId OdDbDatabase

Corresponding C++ library: TD_Db

<group OdDb_Classes>

Definition at line 210 of file DbObject.h.

Constructor & Destructor Documentation

◆ OdDbObject()

OdDbObject::OdDbObject ( )
protected

◆ ~OdDbObject()

OdDbObject::~OdDbObject ( )

Member Function Documentation

◆ addPersistentReactor()

virtual void OdDbObject::addPersistentReactor ( const OdDbObjectId objId)
virtual

Adds the specified persistent reactor to this object's reactor list.

Parameters
objId[in] Object ID of the persistent reactor.
Remarks
An object must be open OdDb::kForWrite in order to add a persistent reactor.

If the persistent reactor does not have an owner, it isn't saved with the drawing. Non-graphical objects used as persistent reactors are typically stored in a dictionary in the Named Objects Dictionary or in an extension dictionary associated with some object.

◆ addReactor()

void OdDbObject::addReactor ( OdDbObjectReactor pReactor) const

Adds the specified transient reactor to this object's reactor list.

Parameters
pReactor[in] Pointer to the transient reactor object.
Remarks
An object must be open either OdDb::kForRead or OdDb::kForWrite in order to add a transient reactor.

◆ addRef()

void OdDbObject::addRef ( )
virtual

Increments the reference count of this object.

Implements OdRxObject.

◆ appendToOwner()

virtual void OdDbObject::appendToOwner ( OdDbIdPair idPair,
OdDbObject pOwnerObject,
OdDbIdMapping ownerIdMap 
)
virtual

This function appends this object to the specified owner object.

Parameters
idPair[in] ID pair to append.
pOwnerObject[in] Pointer to the owner object.
ownerIdMap[in/out] Owner's ID map.
Remarks
Adds a record to the specified ID map.

This function is used internally to subDeepClone() and subWblockClone().

Throws:

Cause eInvalidOwnerObject !pOwnerObject->get()

Reimplemented in OdDbScale, OdDbDimension, OdDbTable, OdDbSymbolTableRecord, OdDbMlineStyle, OdDbLayout, OdDbHatch, OdDbGroup, OdDbEntity, and OdDbAttributeDefinition.

◆ applyPartialUndo()

virtual void OdDbObject::applyPartialUndo ( OdDbDwgFiler pUndoFiler,
OdRxClass pClassObj 
)
virtual

Notification function called each time an Undo operation is performed this object is using partial Undo.

Parameters
pUndoFiler[in] A pointer to the undo filer with the partial undo information.
pClassObj[in] A pointer to the OdRxClass object for the class that will handle the Undo.
Remarks
An object indicates it's using the partial undo mechanism, if and only if it has set autoUndo false in all calls to assertWriteEnabled().

This member function must know which types of fields to scan, and must stop after reading what it it needs.

If the class type specified by pClassObj does not matches the class of this object, this member function must call the parent class's applyPartialUndo() and return whatever it returns.

If it does match the class of this object, this member function must use pUndoFiler to read the undo data, then typically use this object's set() method.

Throws:

Cause eNotThatKindOfClass pClassObj != OdDbObject::desc()

Reimplemented in OdDbLongTransaction, OdDbEntity, OdDbDatabase, OdDbEvalGraph, CFxBIMDatabaseReference, OdDbScale, OdDbDictionary, OdDbBlockTableRecord, and OdDbBlockTable.

◆ assertNotifyEnabled()

void OdDbObject::assertNotifyEnabled ( ) const

Throws an exception if this object is not open OdDb::kForNotify.

Remarks
This function should be used only inside member functions that are used only when this object is open OdDb::kForNotify. It should be the first function called by these functions.

Throws:

Cause eInvalidOpenState !isNotifyEnabled()

◆ assertReadEnabled()

void OdDbObject::assertReadEnabled ( ) const

Throws an exception if this object is not open OdDb::kForRead.

Remarks
This function should be used only inside member functions that do not modify this object. It should be the first function called by these functions.

Throws:

Cause eNotOpenForRead !isReadEnabled()

◆ assertWriteEnabled()

void OdDbObject::assertWriteEnabled ( bool  autoUndo = true,
bool  recordModified = true 
)

Throws an exception if this object is not open OdDb::kForWrite, and controls automatic undo and notification of modifications.

Parameters
autoUndo[in] Specifies if automatic undo should be done.
recordModified[in] Specifies if graphics are to be updated, and "openedForModify", "modified" and "modifiedGraphics" notifications are to be sent.
Remarks
This function should be used only inside member functions that modify this object. It should be the first function called by these functions.

Throws:

Cause eNotOpenForWrite !isWriteEnabled()

◆ audit()

virtual void OdDbObject::audit ( OdDbAuditInfo pAuditInfo)
virtual

Perform an audit operation on this object.

Parameters
pAuditInfo[in] Pointer to an OdDbAuditInfo object.
Remarks
The specified OdDbAuditInfo object controls the audit, and receives the audit status.

When overriding this function for a custom class, first call OdDbObject::audit(pAuditInfo) to validate the audit operation.

Reimplemented in OdDbDatabase.

◆ cancel()

void OdDbObject::cancel ( )

Discard changes since the object was opened for modify

◆ composeForLoad()

virtual void OdDbObject::composeForLoad ( OdDb::SaveType  format,
OdDb::DwgVersion  version,
OdDbAuditInfo pAuditInfo 
)
virtual

After loading from file, performs necessary actions which require accessing other Database objects. For example, processing round-trip data.

Parameters
format[in] File type.
version[in] Drawing version of file loaded.
pAuditInfo[in] Pointer to an OdDbAuditInfo object. Can be Null. Not Null if drawing is being loaded in Recover mode. If so, audit() will be called later.
Remarks
If an object in its dwgInFields() method accesses other database objects, it's non-thread-safe. Such objects can't be loaded in MT mode. To enable MT loading of custom objects, its dwgInFields() should not access other database objects. Such actions should be performed in composeForLoad(). composeForLoad() is called in single-thread mode after all thread-safe objects are loaded (their dwgInFields() were called in MT mode).

Being overridden in custom classes, the function first should call the parent class method. Parent class implementation takes care of parent class round-trip data and other actions which require access to other objects.

◆ convertForSave()

void OdDbObject::convertForSave ( OdDb::DwgVersion  ver)

The method should be called from decomposeForSave() of custom container objects for owned child objects. It calls child's decomposeForSave() method plus performs other required actions (handOverTo, exchanging XData, etc.)

Parameters
ver[in] Drawing version to save as.
Remarks

◆ copied()

virtual void OdDbObject::copied ( const OdDbObject pObject,
const OdDbObject pNewObject 
)
virtual

Notification function called whenever the notifying object has had its clone() member function called.

Parameters
pObject[in] Pointer to the notifying object.
pNewObject[in] Pointer to the object resulting from the copy.
Remarks
The default implementation of this function does nothing. This function can be overridden in custom classes.

Reimplemented in OdDbGroup, and OdDbDimAssoc.

◆ copyFrom()

virtual void OdDbObject::copyFrom ( const OdRxObject pSource)
virtual

◆ createExtensionDictionary()

void OdDbObject::createExtensionDictionary ( )

Creates an OdDbDictionary extension dictionary of this object.

Remarks
If this object's extension dictionary has been erased, it will be unerased.

An object owns its extension dictionary.

◆ createXrecord()

OdDbXrecordPtr OdDbObject::createXrecord ( const OdString xrecordName,
OdDb::DuplicateRecordCloning  style = OdDb::kDrcIgnore 
)

Creates or retrieves the specified Xrecord in this object's extension dictionary.

Parameters
xrecordName[in] Xrecord name.
style[in] Merge style.
Returns
Returns a SmartPointer to the specified Xrecord.

If the extension dictionary has been erased, it is unerased. If the extension dictionary does not exist, it is created. If the specified Xrecord does not exist, it is created.

◆ database()

OdDbDatabase* OdDbObject::database ( ) const

Returns the OdDbDatabase that contains this object.

◆ decomposeForSave() [1/2]

virtual OdDbObjectPtr OdDbObject::decomposeForSave ( OdDb::DwgVersion  ver,
OdDbObjectId replaceId,
bool &  exchangeXData 
)
virtual

Determines the behavior for custom objects when saving to .dwg or .dxf file.

Parameters
ver[in] Drawing version to save as.
replaceId[out] Object ID of the object replacing this object.
exchangeXData[out] Set to true if and only if this function did not add XData to the replacement object.
Remarks
This function either

Returns an OdDbObjectPtr for a non- database -resident (NDBRO) replacement object, setting replaceId to OdDbObjectId::kNull. Returns NULL, setting replaceId for a database -resident (DBRO) replacement object.

Custom objects can decompose themselves into other objects, adding additional XData as required. Teigha transfers XData from this object to the replacement object if and only if exchangeXData is true.

The default implementation returns NULL and sets replaceId to OdDbObjectId::kNull. This function can be overridden in custom classes.

The method is not intended to be called by client code. For processing owned objects use convertForSave() method.

Reimplemented in OdDbFcf, OdDbSurface, OdDbSubDMesh, OdDbSpline, OdDbRegion, OdDbHatch, OdDbBody, and OdDb3dSolid.

◆ decomposeForSave() [2/2]

virtual OdDbObjectPtr OdDbObject::decomposeForSave ( OdDb::SaveType  format,
OdDb::DwgVersion  ver,
OdDbObjectId replaceId,
bool &  exchangeXData 
)
virtual

Determines the behavior for custom objects when saving to .dwg or .dxf file.

Parameters
format[in] File type.
ver[in] Drawing version to save as.
replaceId[out] Object ID of the object replacing this object.
exchangeXData[out] Set to true if and only if this function did not add XData to the replacement object.
Remarks
This function either

Returns an OdDbObjectPtr for a non- database -resident (NDBRO) replacement object, setting replaceId to OdDbObjectId::kNull. Returns NULL, setting replaceId for a database -resident (DBRO) replacement object.

Custom objects can decompose themselves into other objects, adding additional XData as required. Teigha transfers XData from this object to the replacement object if and only if exchangeXData is true.

The default implementation returns NULL and sets replaceId to OdDbObjectId::kNull. This function can be overridden in custom classes.

The method is not intended to be called by client code. For processing owned objects use convertForSave() method.

◆ deepClone()

ODRX_SEALED_VIRTUAL OdDbObjectPtr OdDbObject::deepClone ( OdDbIdMapping ownerIdMap,
OdDbObject pOwner,
bool  bPrimary = true 
) const

Performs a deep clone of this object.

Parameters
ownerIdMap[in] Owner's ID map.
Remarks
Returns a SmartPointer to the newly created clone, and adds a record to the specified ID map.

If the cloning operation fails, a null SmartPointer is returned.

A deep clone is a clone of this object and everything it owns.

This function should not be called by client code; use OdDbDatabase::deepCloneObjects() instead.

This function can be overridden in custom classes.

The default implementation of this function appends the cloned object to the specified owner object.

◆ disableUndoRecording()

void OdDbObject::disableUndoRecording ( bool  disable)

Controls the undo recording of this object in OdDbDatabase.

Parameters
disable[in] Boolean to control undo recording.
Remarks
Disabling undo recording does not erase the undo recording; it merely suspends it. Undo recording is initially off for newly created OdDbDatabase objects.

◆ downgradeOpen()

void OdDbObject::downgradeOpen ( )

Downgrades this object from OdDb::kForWrite to OdDb::kForRead

Remarks
Any pending changes to this object are committed to the database.

◆ drawable()

virtual OdGiDrawable* OdDbObject::drawable ( )
virtual

Returns a pointer to the OdGiDrawable for the object. If the object doesn't have an associated OdGiDrawable object, this function returns NULL.

Reimplemented in OdDbVisualStyle, OdDbViewportTableRecord, OdDbSun, OdDbRenderEnvironment, OdDbRenderSettings, OdDbMaterial, OdDbLinetypeTableRecord, OdDbLayerTableRecord, OdDbEntity, OdDbBlockTableRecord, OdDbBackground, and OdDbAbstractViewTableRecord.

◆ dwgIn()

void OdDbObject::dwgIn ( OdDbDwgFiler pFiler)

Reads the .dwg file format data of this object from the specified file.

Parameters
pFiler[in] Pointer to the filer from which the data are to be read.
Remarks
This function calls dwgInFields(pFiler), then loads any Xdata associated with this object.

◆ dwgInFields()

virtual OdResult OdDbObject::dwgInFields ( OdDbDwgFiler pFiler)
virtual

Reads the .dwg file data of this object.

Parameters
pFiler[in] Filer object from which data are read.
Returns
Returns the filer status.

This function is called by dwgIn() to allow the object to read its data.

When overriding this function:

1) Call assertWriteEnabled(). 2) Call the parent class's dwgInFields(pFiler). 3) If it returns eOK, continue; otherwise return whatever the parent's dwgInFields(pFiler) returned. 4) Call the OdDbDwgFiler(pFiler) methods to read each of the object's data items in the order they were written. 5) Return pFiler->filerStatus().

Reimplemented in CFxBIMStorage, CFxBIMSectionView, CFxBIMSectionEntity, CFxBIMSection, CFxBIMMaterial, CFxBIMEntityReference, CFxBIMEntity, CFxBIMDatabaseReference, CFxBIMDatabase, OdDbViewRepBlockReference, OdDbWipeout, OdDbScale, OdDbRasterImage, OdDbPolyline, OdDbFcf, OdDbEvalGraph, OdDbDimAssoc, OdDbBlockTableRecord, OdVLObject, OdDbShWedge, OdDbShTorus, OdDbShSweep, OdDbShSubentMaterial, OdDbShSubentColor, OdDbShSphere, OdDbShRevolve, OdDbShPyramid, OdDbShPrimitive, OdDbShLoft, OdDbShHistoryNode, OdDbShHistory, OdDbShFillet, OdDbShExtrusion, OdDbShCone, OdDbShCylinder, OdDbShChamfer, OdDbShBrep, OdDbShBox, OdDbShBoolean, OdDbAssocPersSubentManager, RText, OdDbViewSymbol, OdDbViewRepStandard, OdDbViewRepSourceMgr, OdDbViewRepFusionSource, OdDbViewRepSource, OdDbViewRepSectionDefinition, OdDbViewRepProjectionDef, OdDbViewRepOrientationDef, OdDbViewRepOrientation, OdDbViewRepModelSpaceViewSelSet, OdDbViewRepModelSpaceSource, OdDbViewRepModelPlaneDef, OdDbViewRepInventorSource, OdDbViewRepImage, OdDbViewRepDetailDefinition, OdDbViewRepCutDefinition, OdDbViewRep, OdDbViewBorder, OdDbSynergyMappings, OdDbSectionSymbol, OdDbDetailSymbol, OdDbAssocProjectedEntityPersSubentIdHolder, OdDbDynamicBlockPurgePreventer, OdDbBlockRepresentationData, OdDbLSObject, OdDbXrecord, OdDbXline, OdDbWipeoutVariables, OdDbVisualStyle, OdDbViewTableRecord, OdDbViewportTableRecord, OdDbViewport, OdDbVbaProject, OdDbNavisworksReference, OdDbPdfReference, OdDbUnderlayReference, OdDbNavisworksDefinition, OdDbUnderlayDefinition, OdDbUCSTableRecord, OdDbTrace, OdDbTextStyleTableRecord, OdDbText, OdDbTableTemplate, OdDbTableStyle, OdDbTableContent, OdDbTable, OdDbSymbolTableRecord, OdDbSymbolTable, OdDbSweptSurface, OdDbSurface, OdDbSun, OdDbSubDMesh, OdDbSpline, OdDbSpatialIndex, OdDbSpatialFilter, OdDbSortentsTable, OdDbSolid, OdDbShape, OdDbSectionViewStyle, OdDbSectionManager, OdDbSectionSettings, OdDbSection, OdDbRotatedDimension, OdDbRevolvedSurface, OdDbRenderEntry, OdDbRenderGlobal, OdDbRenderEnvironment, OdDbRapidRTRenderSettings, OdDbMentalRayRenderSettings, OdDbRenderSettings, OdDbRegion, OdDbRegAppTableRecord, OdDbRay, OdDbRasterVariables, OdDbRasterImageDefReactor, OdDbRasterImageDef, OdDbRadialDimensionLarge, OdDbRadialDimension, OdDbProxyObject, OdDbProxyEntity, OdDbPolygonMeshVertex, OdDbPolygonMesh, OdDbPolyFaceMeshVertex, OdDbPolyFaceMesh, OdDbPointCloudColorMap, OdDbPoint, OdDbPlotSettings, OdDbPlaneSurface, OdDbPersSubentManager, OdDbOrdinateDimension, OdDbOle2Frame, OdDbObjectContextData, OdDbNurbSurface, OdDbPointPath, OdDbCurvePath, OdDbMText, OdDbMPolygon, OdDbMotionPath, OdDbModelDocViewStyle, OdDbMlineStyle, OdDbMline, OdDbMLeaderStyle, OdDbMInsertBlock, OdDbMaterial, OdDbLongTransaction, OdDbLoftedSurface, OdDbLinkedTableData, OdDbLinkedData, OdDbLinetypeTableRecord, OdDbLinetypeTable, OdDbLine, OdDbLight, OdDbLeader, OdDbLayout, OdDbLayerTableRecord, OdDbLayerIndex, OdDbLayerFilter, OdDbIndex, OdDbIdBuffer, OdDbHelix, OdDbHatch, OdDbGroup, OdDbGeoPositionMarker, OdDbGeoData, OdDbFormattedTableData, OdDbField, OdDbFaceRecord, OdDbFace, OdDbExtrudedSurface, OdDbEvalExpr, OdDbEntity, OdDbEllipse, OdDbDimStyleTableRecord, OdDbDimStyleTable, OdDbDimension, OdDbDictionaryWithDefault, OdDbDictionaryVar, OdDbDictionary, OdDbDiametricDimension, OdDbDetailViewStyle, OdDbDataTable, OdDbDataLink, OdDbDatabase, OdDbColor, OdDbCircle, OdDbCamera, OdDbBody, OdDbBlockTable, OdDbBlockReference, OdDbBlockBegin, OdDbIBLBackground, OdDbSkyBackground, OdDbGroundPlaneBackground, OdDbImageBackground, OdDbGradientBackground, OdDbSolidBackground, OdDbAttributeDefinition, OdDbAttribute, OdDbArcDimension, OdDbArcAlignedText, OdDbArc, OdDbAlignedDimension, OdDbAbstractViewTableRecord, OdDb3PointAngularDimension, OdDb3dSolid, OdDb3dPolylineVertex, OdDb3dPolyline, OdDb2LineAngularDimension, OdDb2dVertex, OdDb2dPolyline, OdDbMLeader, OdDbPointCloudEx, OdDbPointCloudDefReactorEx, OdDbPointCloudDefEx, OdDbPointCloudDefReactor, OdDbPointCloudDef, OdDbPointCloud, OdDbBreakPointRef, and OdDbBreakData.

◆ dwgOut()

void OdDbObject::dwgOut ( OdDbDwgFiler pFiler) const

Writes the .dwg file format data of this object to the specified filer.

Parameters
pFiler[in] Pointer to the filer to which the data are to be written.
Remarks
This function calls this object's dwgOutFields() function, writes loads any Xdata associated with this object.

◆ dwgOutFields()

virtual void OdDbObject::dwgOutFields ( OdDbDwgFiler pFiler) const
virtual

Writes the .dwg file data of this object.

Parameters
pFiler[in] Pointer to the filer to which data are written.
Remarks

This function is called by dwgIn() to allow the object to write its data.

When overriding this function:

1) Call assertReadEnabled(). 2) Call the parent class's dwgOutFields(pFiler). 3) Call the OdDbDwgFiler(pFiler) methods to write each of the object's data items in the order they were written.

Reimplemented in CFxBIMStorage, CFxBIMSectionView, CFxBIMSectionEntity, CFxBIMSection, CFxBIMMaterial, CFxBIMEntityReference, CFxBIMEntity, CFxBIMDatabaseReference, CFxBIMDatabase, OdDbViewRepBlockReference, OdDbWipeout, OdDbScale, OdDbRasterImage, OdDbPolyline, OdDbFcf, OdDbEvalGraph, OdDbDimAssoc, OdDbBlockTableRecord, OdVLObject, OdDbShWedge, OdDbShTorus, OdDbShSweep, OdDbShSubentMaterial, OdDbShSubentColor, OdDbShSphere, OdDbShRevolve, OdDbShPyramid, OdDbShPrimitive, OdDbShLoft, OdDbShHistoryNode, OdDbShHistory, OdDbShFillet, OdDbShExtrusion, OdDbShCone, OdDbShCylinder, OdDbShChamfer, OdDbShBrep, OdDbShBox, OdDbShBoolean, OdDbAssocPersSubentManager, RText, OdDbViewSymbol, OdDbViewRepStandard, OdDbViewRepSourceMgr, OdDbViewRepFusionSource, OdDbViewRepSource, OdDbViewRepSectionDefinition, OdDbViewRepProjectionDef, OdDbViewRepOrientationDef, OdDbViewRepOrientation, OdDbViewRepModelSpaceViewSelSet, OdDbViewRepModelSpaceSource, OdDbViewRepModelPlaneDef, OdDbViewRepInventorSource, OdDbViewRepImage, OdDbViewRepDetailDefinition, OdDbViewRepCutDefinition, OdDbViewRep, OdDbViewBorder, OdDbSynergyMappings, OdDbSectionSymbol, OdDbDetailSymbol, OdDbAssocProjectedEntityPersSubentIdHolder, OdDbDynamicBlockPurgePreventer, OdDbBlockRepresentationData, OdDbLSObject, OdDbXrecord, OdDbXline, OdDbWipeoutVariables, OdDbVisualStyle, OdDbViewTableRecord, OdDbViewportTableRecord, OdDbViewport, OdDbVbaProject, OdDbNavisworksReference, OdDbUnderlayReference, OdDbNavisworksDefinition, OdDbUnderlayDefinition, OdDbUCSTableRecord, OdDbTrace, OdDbTextStyleTableRecord, OdDbText, OdDbTableTemplate, OdDbTableStyle, OdDbTableContent, OdDbTable, OdDbSymbolTableRecord, OdDbSymbolTable, OdDbSweptSurface, OdDbSurface, OdDbSun, OdDbSubDMesh, OdDbSpline, OdDbSpatialIndex, OdDbSpatialFilter, OdDbSortentsTable, OdDbSolid, OdDbShape, OdDbSectionViewStyle, OdDbSectionManager, OdDbSectionSettings, OdDbSection, OdDbRotatedDimension, OdDbRevolvedSurface, OdDbRenderEntry, OdDbRenderGlobal, OdDbRenderEnvironment, OdDbRapidRTRenderSettings, OdDbMentalRayRenderSettings, OdDbRenderSettings, OdDbRegion, OdDbRegAppTableRecord, OdDbRay, OdDbRasterVariables, OdDbRasterImageDefReactor, OdDbRasterImageDef, OdDbRadialDimensionLarge, OdDbRadialDimension, OdDbProxyObject, OdDbProxyEntity, OdDbPolygonMeshVertex, OdDbPolygonMesh, OdDbPolyFaceMeshVertex, OdDbPolyFaceMesh, OdDbPointCloudColorMap, OdDbPoint, OdDbPlotSettings, OdDbPlaneSurface, OdDbPersSubentManager, OdDbOrdinateDimension, OdDbOle2Frame, OdDbObjectContextData, OdDbNurbSurface, OdDbPointPath, OdDbCurvePath, OdDbMText, OdDbMPolygon, OdDbMotionPath, OdDbModelDocViewStyle, OdDbMlineStyle, OdDbMline, OdDbMLeaderStyle, OdDbMInsertBlock, OdDbMaterial, OdDbLongTransaction, OdDbLoftedSurface, OdDbLinkedTableData, OdDbLinkedData, OdDbLinetypeTableRecord, OdDbLinetypeTable, OdDbLine, OdDbLight, OdDbLeader, OdDbLayout, OdDbLayerTableRecord, OdDbLayerIndex, OdDbLayerFilter, OdDbIndex, OdDbIdBuffer, OdDbHelix, OdDbHatch, OdDbGroup, OdDbGeoPositionMarker, OdDbGeoData, OdDbFormattedTableData, OdDbField, OdDbFaceRecord, OdDbFace, OdDbExtrudedSurface, OdDbEvalExpr, OdDbEntity, OdDbEllipse, OdDbDimStyleTableRecord, OdDbDimStyleTable, OdDbDimension, OdDbDictionaryWithDefault, OdDbDictionaryVar, OdDbDictionary, OdDbDiametricDimension, OdDbDetailViewStyle, OdDbDataTable, OdDbDataLink, OdDbDatabase, OdDbColor, OdDbCircle, OdDbCamera, OdDbBody, OdDbBlockTable, OdDbBlockReference, OdDbBlockBegin, OdDbIBLBackground, OdDbSkyBackground, OdDbGroundPlaneBackground, OdDbImageBackground, OdDbGradientBackground, OdDbSolidBackground, OdDbAttributeDefinition, OdDbAttribute, OdDbArcDimension, OdDbArcAlignedText, OdDbArc, OdDbAlignedDimension, OdDbAbstractViewTableRecord, OdDb3PointAngularDimension, OdDb3dSolid, OdDb3dPolylineVertex, OdDb3dPolyline, OdDb2LineAngularDimension, OdDb2dVertex, OdDb2dPolyline, OdDbMLeader, OdDbPointCloudEx, OdDbPointCloudDefReactorEx, OdDbPointCloudDefEx, OdDbPointCloudDefReactor, OdDbPointCloudDef, OdDbPointCloud, OdDbBreakPointRef, and OdDbBreakData.

◆ dxfIn()

virtual OdResult OdDbObject::dxfIn ( OdDbDxfFiler pFiler)
virtual

Reads the DXF format data of this object from the specified filer.

Parameters
pFiler[in] Pointer to the filer from which the data are to be read.
Returns
Returns the filer status.

This function calls this object's dxfInFields(pFiler), then loads any Xdata associated with this object.

Reimplemented in OdDbViewportTable, OdDbTextStyleTableRecord, OdDbSymbolTable, OdDbSequenceEnd, OdDbProxyEntity, OdDbPolygonMesh, OdDbPolyFaceMesh, OdDbEntity, OdDbDictionaryVar, OdDbBlockTable, OdDbBlockReference, OdDbBlockBegin, OdDb3dPolyline, OdDb2dPolyline, and OdDbProxyObject.

◆ dxfInFields()

virtual OdResult OdDbObject::dxfInFields ( OdDbDxfFiler pFiler)
virtual

Reads the DXF data of this object.

Parameters
pFiler[in] Pointer to the filer from which data are read.
Returns
Returns the filer status.

This function is called by dxfIn() to allow the object to read its data.

When overriding this function:

1) Call assertWriteEnabled(). 2) Call the parent class's dwgInFields(pFiler). 3) If it returns eOK, continue; otherwise return whatever the parent's dxfInFields(pFiler) returned. 4) Call the OdDbDxfFiler(pFiler) methods to read each of the object's data items in the order they were written. 5) Return pFiler->filerStatus().

Reimplemented in CFxBIMStorage, CFxBIMSectionView, CFxBIMSectionEntity, CFxBIMSection, CFxBIMMaterial, CFxBIMEntityReference, CFxBIMEntity, CFxBIMDatabaseReference, CFxBIMDatabase, OdDbViewRepBlockReference, OdDbWipeout, OdDbScale, OdDbRasterImage, OdDbPolyline, OdDbFcf, OdDbEvalGraph, OdDbDimAssoc, OdDbBlockTableRecord, OdVLObject, OdDbShWedge, OdDbShTorus, OdDbShSweep, OdDbShSubentMaterial, OdDbShSubentColor, OdDbShSphere, OdDbShRevolve, OdDbShPyramid, OdDbShPrimitive, OdDbShLoft, OdDbShHistoryNode, OdDbShHistory, OdDbShFillet, OdDbShExtrusion, OdDbShCone, OdDbShCylinder, OdDbShChamfer, OdDbShBrep, OdDbShBox, OdDbShBoolean, OdDbAssocPersSubentManager, RText, OdDbViewSymbol, OdDbViewRepStandard, OdDbViewRepSourceMgr, OdDbViewRepFusionSource, OdDbViewRepSource, OdDbViewRepSectionDefinition, OdDbViewRepProjectionDef, OdDbViewRepOrientationDef, OdDbViewRepOrientation, OdDbViewRepModelSpaceViewSelSet, OdDbViewRepModelSpaceSource, OdDbViewRepModelPlaneDef, OdDbViewRepInventorSource, OdDbViewRepImage, OdDbViewRepDetailDefinition, OdDbViewRepCutDefinition, OdDbViewRep, OdDbViewBorder, OdDbSynergyMappings, OdDbSectionSymbol, OdDbDetailSymbol, OdDbAssocProjectedEntityPersSubentIdHolder, OdDbDynamicBlockPurgePreventer, OdDbBlockRepresentationData, OdDbBlockVisibilityGrip, OdDbBlockLookupGrip, OdDbBlockRotationGrip, OdDbBlockPolarGrip, OdDbBlockXYGrip, OdDbLSObject, OdDbXrecord, OdDbXline, OdDbWipeoutVariables, OdDbVisualStyle, OdDbViewTableRecord, OdDbViewportTableRecord, OdDbViewport, OdDbVertex, OdDbVbaProject, OdDbNavisworksReference, OdDbPdfReference, OdDbUnderlayReference, OdDbNavisworksDefinition, OdDbUnderlayDefinition, OdDbUCSTableRecord, OdDbTrace, OdDbTextStyleTableRecord, OdDbText, OdDbTableTemplate, OdDbTableStyle, OdDbTableContent, OdDbTable, OdDbSymbolTableRecord, OdDbSymbolTable, OdDbSweptSurface, OdDbSurface, OdDbSun, OdDbSubDMesh, OdDbSpline, OdDbSpatialIndex, OdDbSpatialFilter, OdDbSortentsTable, OdDbSolid, OdDbShape, OdDbSectionViewStyle, OdDbSectionManager, OdDbSectionSettings, OdDbSection, OdDbRotatedDimension, OdDbRevolvedSurface, OdDbRenderEntry, OdDbRenderGlobal, OdDbRenderEnvironment, OdDbRapidRTRenderSettings, OdDbMentalRayRenderSettings, OdDbRenderSettings, OdDbRegion, OdDbRegAppTableRecord, OdDbRay, OdDbRasterVariables, OdDbRasterImageDefReactor, OdDbRasterImageDef, OdDbRadialDimensionLarge, OdDbRadialDimension, OdDbProxyObject, OdDbProxyEntity, OdDbPolygonMesh, OdDbPolyFaceMesh, OdDbPointCloudColorMap, OdDbPoint, OdDbPlotSettings, OdDbPlaneSurface, OdDbPlaceHolder, OdDbPersSubentManager, OdDbOrdinateDimension, OdDbOle2Frame, OdDbMLeaderObjectContextData, OdDbLeaderObjectContextData, OdDbHatchViewContextData, OdDbHatchScaleContextData, OdDbFcfObjectContextData, OdDbRadialDimensionLargeObjectContextData, OdDbRadialDimensionObjectContextData, OdDbOrdinateDimensionObjectContextData, OdDbDiametricDimensionObjectContextData, OdDbAngularDimensionObjectContextData, OdDbAlignedDimensionObjectContextData, OdDbDimensionObjectContextData, OdDbBlkRefObjectContextData, OdDbMTextAttributeObjectContextData, OdDbTextObjectContextData, OdDbMTextObjectContextData, OdDbAnnotScaleObjectContextData, OdDbObjectContextData, OdDbNurbSurface, OdDbPointPath, OdDbCurvePath, OdDbMText, OdDbMPolygon, OdDbMotionPath, OdDbModelDocViewStyle, OdDbMlineStyle, OdDbMline, OdDbMLeaderStyle, OdDbMInsertBlock, OdDbMaterial, OdDbLoftedSurface, OdDbLinkedTableData, OdDbLinkedData, OdDbLinetypeTableRecord, OdDbLine, OdDbLight, OdDbLeader, OdDbLayout, OdDbLayerTableRecord, OdDbLayerIndex, OdDbLayerFilter, OdDbIndex, OdDbIdBuffer, OdDbHelix, OdDbHatch, OdDbGroup, OdDbGeoPositionMarker, OdDbGeoData, OdDbFormattedTableData, OdDbFilter, OdDbField, OdDbFaceRecord, OdDbFace, OdDbExtrudedSurface, OdDbEvalExpr, OdDbEntity, OdDbEllipse, OdDbDimStyleTableRecord, OdDbDimStyleTable, OdDbDimension, OdDbDictionaryWithDefault, OdDbDictionaryVar, OdDbDictionary, OdDbDiametricDimension, OdDbDetailViewStyle, OdDbDataTable, OdDbDataLink, OdDbColor, OdDbCircle, OdDbCamera, OdDbBody, OdDbBlockReference, OdDbBlockEnd, OdDbBlockBegin, OdDbIBLBackground, OdDbSkyBackground, OdDbGroundPlaneBackground, OdDbImageBackground, OdDbGradientBackground, OdDbSolidBackground, OdDbAttributeDefinition, OdDbAttribute, OdDbArcDimension, OdDbArcAlignedText, OdDbArc, OdDbAlignedDimension, OdDb3PointAngularDimension, OdDb3dSolid, OdDb3dPolyline, OdDb2LineAngularDimension, OdDb2dPolyline, OdDbMLeader, OdDbPointCloudEx, OdDbPointCloudDefReactorEx, OdDbPointCloudDefEx, OdDbPointCloudDefReactor, OdDbPointCloudDef, OdDbPointCloud, OdDbBreakPointRef, and OdDbBreakData.

◆ dxfInFields_R12()

virtual OdResult OdDbObject::dxfInFields_R12 ( OdDbDxfFiler pFiler)
virtual

Reads the DXF R12 format data of this object.

Parameters
pFiler[in] Pointer to the filer from which data are to be read.
Returns
Returns the filer status.

This function is called by dxfIn() to allow the object to read its data.

When overriding this function:

1) Call assertWriteEnabled(). 2) Call the parent class's dxfInFields_R12(pFiler). 3) If it returns eOK, continue; otherwise return whatever the parent's dxfOutFields_R12(pFiler) returned. 4) Call the OdDbDxfFiler(pFiler) methods to read each of the object's data items in the order they were written. 5) Return pFiler->filerStatus().

Reimplemented in OdDbPolyline, OdDbViewTableRecord, OdDbViewportTableRecord, OdDbViewport, OdDbUCSTableRecord, OdDbTrace, OdDbTextStyleTableRecord, OdDbText, OdDbSymbolTable, OdDbSolid, OdDbShape, OdDbRotatedDimension, OdDbRegAppTableRecord, OdDbRadialDimension, OdDbPolygonMeshVertex, OdDbPolygonMesh, OdDbPolyFaceMeshVertex, OdDbPolyFaceMesh, OdDbPoint, OdDbOrdinateDimension, OdDbLinetypeTableRecord, OdDbLine, OdDbLayerTableRecord, OdDbFaceRecord, OdDbFace, OdDbEntity, OdDbDimStyleTableRecord, OdDbDimension, OdDbDiametricDimension, OdDbCircle, OdDbBlockReference, OdDbBlockEnd, OdDbBlockBegin, OdDbAttributeDefinition, OdDbAttribute, OdDbArc, OdDbAlignedDimension, OdDb3PointAngularDimension, OdDb3dPolylineVertex, OdDb3dPolyline, OdDb2LineAngularDimension, OdDb2dVertex, and OdDb2dPolyline.

◆ dxfOut()

virtual void OdDbObject::dxfOut ( OdDbDxfFiler pFiler) const
virtual

Writes the DXF format data of this object to the specified filer.

Parameters
pFiler[in] Pointer to the filer to which the data are to be written.
Remarks
This function calls this object's dxfOutFields(pFiler) function, writes any Xdata associated with this object.

Reimplemented in OdDbSymbolTable, OdDbShape, OdDbPolygonMesh, OdDbPolyFaceMesh, OdDbLinetypeTable, OdDbEntity, OdDbBlockReference, OdDb3dPolyline, and OdDb2dPolyline.

◆ dxfOutFields()

virtual void OdDbObject::dxfOutFields ( OdDbDxfFiler pFiler) const
virtual

Writes the DXF data of this object.

Parameters
pFiler[in] Pointer to the filer to which data are to be written.
Remarks

This function is called by dxfOut() to allow the object to write its data.

When overriding this function:

1) Call assertReadEnabled(). 2) Call the parent class's dxfOutFields(pFiler). 4) Use pFiler to call the OdDbDxfFiler methods to write each of the object's data items in the order they were written.

Reimplemented in CFxBIMStorage, CFxBIMSectionView, CFxBIMSectionEntity, CFxBIMSection, CFxBIMMaterial, CFxBIMEntityReference, CFxBIMEntity, CFxBIMDatabaseReference, CFxBIMDatabase, OdDbViewRepBlockReference, OdDbWipeout, OdDbScale, OdDbRasterImage, OdDbPolyline, OdDbFcf, OdDbEvalGraph, OdDbDimAssoc, OdDbBlockTableRecord, OdVLObject, OdDbShWedge, OdDbShTorus, OdDbShSweep, OdDbShSubentMaterial, OdDbShSubentColor, OdDbShSphere, OdDbShRevolve, OdDbShPyramid, OdDbShPrimitive, OdDbShLoft, OdDbShHistoryNode, OdDbShHistory, OdDbShFillet, OdDbShExtrusion, OdDbShCone, OdDbShCylinder, OdDbShChamfer, OdDbShBrep, OdDbShBox, OdDbShBoolean, OdDbAssocPersSubentManager, RText, OdDbViewSymbol, OdDbViewRepStandard, OdDbViewRepSourceMgr, OdDbViewRepFusionSource, OdDbViewRepSource, OdDbViewRepSectionDefinition, OdDbViewRepProjectionDef, OdDbViewRepOrientationDef, OdDbViewRepOrientation, OdDbViewRepModelSpaceViewSelSet, OdDbViewRepModelSpaceSource, OdDbViewRepModelPlaneDef, OdDbViewRepInventorSource, OdDbViewRepImage, OdDbViewRepDetailDefinition, OdDbViewRepCutDefinition, OdDbViewRep, OdDbViewBorder, OdDbSynergyMappings, OdDbSectionSymbol, OdDbDetailSymbol, OdDbAssocProjectedEntityPersSubentIdHolder, OdDbDynamicBlockPurgePreventer, OdDbBlockRepresentationData, OdDbBlockVisibilityGrip, OdDbBlockLookupGrip, OdDbBlockRotationGrip, OdDbBlockPolarGrip, OdDbBlockXYGrip, OdDbLSObject, OdDbXrecord, OdDbXline, OdDbWipeoutVariables, OdDbVisualStyle, OdDbViewTableRecord, OdDbViewportTableRecord, OdDbViewport, OdDbVertex, OdDbVbaProject, OdDbNavisworksReference, OdDbUnderlayReference, OdDbNavisworksDefinition, OdDbUnderlayDefinition, OdDbUCSTableRecord, OdDbTrace, OdDbTextStyleTableRecord, OdDbText, OdDbTableTemplate, OdDbTableStyle, OdDbTableContent, OdDbTable, OdDbSymbolTableRecord, OdDbSymbolTable, OdDbSweptSurface, OdDbSurface, OdDbSun, OdDbSubDMesh, OdDbSpline, OdDbSpatialIndex, OdDbSpatialFilter, OdDbSortentsTable, OdDbSolid, OdDbShape, OdDbSequenceEnd, OdDbSectionViewStyle, OdDbSectionManager, OdDbSectionSettings, OdDbSection, OdDbRotatedDimension, OdDbRevolvedSurface, OdDbRenderEntry, OdDbRenderGlobal, OdDbRenderEnvironment, OdDbRapidRTRenderSettings, OdDbMentalRayRenderSettings, OdDbRenderSettings, OdDbRegion, OdDbRegAppTableRecord, OdDbRay, OdDbRasterVariables, OdDbRasterImageDefReactor, OdDbRasterImageDef, OdDbRadialDimensionLarge, OdDbRadialDimension, OdDbProxyObject, OdDbProxyEntity, OdDbPolygonMesh, OdDbPolyFaceMesh, OdDbPointCloudColorMap, OdDbPoint, OdDbPlotSettings, OdDbPlaneSurface, OdDbPlaceHolder, OdDbPersSubentManager, OdDbOrdinateDimension, OdDbOle2Frame, OdDbMLeaderObjectContextData, OdDbLeaderObjectContextData, OdDbHatchViewContextData, OdDbHatchScaleContextData, OdDbFcfObjectContextData, OdDbRadialDimensionLargeObjectContextData, OdDbRadialDimensionObjectContextData, OdDbOrdinateDimensionObjectContextData, OdDbDiametricDimensionObjectContextData, OdDbAngularDimensionObjectContextData, OdDbAlignedDimensionObjectContextData, OdDbDimensionObjectContextData, OdDbBlkRefObjectContextData, OdDbMTextAttributeObjectContextData, OdDbTextObjectContextData, OdDbMTextObjectContextData, OdDbAnnotScaleObjectContextData, OdDbObjectContextData, OdDbNurbSurface, OdDbPointPath, OdDbCurvePath, OdDbMText, OdDbMPolygon, OdDbMotionPath, OdDbModelDocViewStyle, OdDbMlineStyle, OdDbMline, OdDbMLeaderStyle, OdDbMInsertBlock, OdDbMaterial, OdDbLoftedSurface, OdDbLinkedTableData, OdDbLinkedData, OdDbLinetypeTableRecord, OdDbLine, OdDbLight, OdDbLeader, OdDbLayout, OdDbLayerTableRecord, OdDbLayerIndex, OdDbLayerFilter, OdDbIndex, OdDbIdBuffer, OdDbHelix, OdDbHatch, OdDbGroup, OdDbGeoPositionMarker, OdDbGeoData, OdDbFormattedTableData, OdDbFilter, OdDbField, OdDbFaceRecord, OdDbFace, OdDbExtrudedSurface, OdDbEvalExpr, OdDbEntity, OdDbEllipse, OdDbDimStyleTableRecord, OdDbDimStyleTable, OdDbDimension, OdDbDictionaryWithDefault, OdDbDictionaryVar, OdDbDictionary, OdDbDiametricDimension, OdDbDetailViewStyle, OdDbDataTable, OdDbDataLink, OdDbColor, OdDbCircle, OdDbCamera, OdDbBody, OdDbBlockReference, OdDbBlockEnd, OdDbBlockBegin, OdDbIBLBackground, OdDbSkyBackground, OdDbGroundPlaneBackground, OdDbImageBackground, OdDbGradientBackground, OdDbSolidBackground, OdDbAttributeDefinition, OdDbAttribute, OdDbArcDimension, OdDbArcAlignedText, OdDbArc, OdDbAlignedDimension, OdDb3PointAngularDimension, OdDb3dSolid, OdDb3dPolyline, OdDb2LineAngularDimension, OdDb2dPolyline, OdDbMLeader, OdDbPointCloudEx, OdDbPointCloudDefReactorEx, OdDbPointCloudDefEx, OdDbPointCloudDefReactor, OdDbPointCloudDef, OdDbPointCloud, OdDbBreakPointRef, and OdDbBreakData.

◆ dxfOutFields_R12()

virtual void OdDbObject::dxfOutFields_R12 ( OdDbDxfFiler pFiler) const
virtual

Writes the DXF data of this object.

Parameters
pFiler[in] Pointer to the filer to which data are to be written.
Returns
Returns the filer status.

This function is called by dxfOut() to allow the object to write its data.

When overriding this function:

1) Call assertReadEnabled(). 2) Call the parent class's dxfOutFields(pFiler). 3) Use pFiler to call the OdDbDxfFiler methods to write each of the object's data items in the order they were written.

Reimplemented in OdDbViewTableRecord, OdDbViewportTableRecord, OdDbViewport, OdDbUCSTableRecord, OdDbTrace, OdDbTextStyleTableRecord, OdDbText, OdDbSymbolTableRecord, OdDbSymbolTable, OdDbSolid, OdDbShape, OdDbRotatedDimension, OdDbRegAppTableRecord, OdDbRadialDimension, OdDbPolygonMeshVertex, OdDbPolygonMesh, OdDbPolyFaceMeshVertex, OdDbPolyFaceMesh, OdDbPoint, OdDbOrdinateDimension, OdDbLinetypeTableRecord, OdDbLine, OdDbLayerTableRecord, OdDbFaceRecord, OdDbFace, OdDbEntity, OdDbDimStyleTableRecord, OdDbDimension, OdDbDiametricDimension, OdDbCircle, OdDbBlockReference, OdDbBlockEnd, OdDbBlockBegin, OdDbAttributeDefinition, OdDbAttribute, OdDbArc, OdDbAlignedDimension, OdDb3PointAngularDimension, OdDb3dPolylineVertex, OdDb3dPolyline, OdDb2LineAngularDimension, OdDb2dVertex, and OdDb2dPolyline.

◆ erase()

OdResult OdDbObject::erase ( bool  eraseIt = true)

Sets the erased mode of this object.

Parameters
eraseIt[in] Boolean to specify if object is to be erased or unerased.
Remarks
Erased objects are not deleted from the database or from memory.

Erased objects are not filed when the database is saved or sent to a DXF file.

◆ erased()

virtual void OdDbObject::erased ( const OdDbObject pObject,
bool  erasing = true 
)
virtual

Notification function called whenever an object has been erased or unerased.

Parameters
pObject[in] Pointer to the object that was erased/unerased.
erasing[in] True if and only if this object is being erased.
Remarks
The default implementation of this function does nothing. This function can be overridden in custom classes.

Reimplemented in OdDbPointCloudDefReactorEx, OdDbPointCloudDefReactor, OdDbRasterImageDefReactor, OdDbLeader, OdDbDictionary, OdDbArcAlignedText, OdDbViewport, OdDbDimAssoc, and OdDbBreakData.

◆ extensionDictionary()

OdDbObjectId OdDbObject::extensionDictionary ( ) const

Returns the Object ID of this object's extension dictionary.

Remarks
Returns a null ID if this object does not have an extension dictionary, or if its extension dictionary has been erased.

◆ getClassID()

ODRX_SEALED_VIRTUAL OdResult OdDbObject::getClassID ( void pClsid) const

Returns the CLSID value associated with this object.

Parameters
pClsid[out] Pointer to the CLSID value.
Remarks
Valid only on Windows with Teigha built as a DLL.

◆ getDbHandle()

OdDbHandle OdDbObject::getDbHandle ( ) const

Returns the persistent handle of this database object.

◆ getField() [1/2]

OdDbObjectId OdDbObject::getField ( const OdString fieldName) const

Returns, and optionally opens, the specified field object from the field dictionary of this object.

Parameters
fieldName[in] Name (key) for the new entry.

◆ getField() [2/2]

OdDbObjectPtr OdDbObject::getField ( const OdString fieldName,
OdDb::OpenMode  mode 
) const

Returns, and optionally opens, the specified field object from the field dictionary of this object.

Parameters
fieldName[in] Name (key) for the new entry.
mode[in] Open mode.

◆ getFieldDictionary() [1/2]

OdDbObjectId OdDbObject::getFieldDictionary ( ) const

Returns the field dictionary of this Object.

◆ getFieldDictionary() [2/2]

OdDbObjectPtr OdDbObject::getFieldDictionary ( OdDb::OpenMode  mode) const

Returns, and optionally opens, the field dictionary of this Object.

Parameters
mode[in] Open mode.

◆ getObjectSaveVersion()

virtual OdDb::DwgVersion OdDbObject::getObjectSaveVersion ( const OdDbFiler pFiler,
OdDb::MaintReleaseVer pMaintVer = 0 
) const
virtual

Returns the drawing and maintenance release version into which this object must be stored.

Parameters
pFiler[in] Pointer to the DWG/DXF filer to be used.
pMaintVer[out] Receives the maintenance version.
Remarks
The default implementation of this function returns filer->dwgVersion(). This function can be overridden in custom classes.

Do not use filer->dwgVersion() with dwg/dxf(in/out)Fields(); use self()->getObjectSaveVersion() instead.

◆ getPersistentReactors()

OdDbObjectIdArray OdDbObject::getPersistentReactors ( ) const

Returns Object IDs of this object's persistent reactors.

◆ getTransientReactors()

OdDbObjectReactorArray OdDbObject::getTransientReactors ( ) const

Returns this object's transient reactors.

◆ goodbye()

virtual void OdDbObject::goodbye ( const OdDbObject pObject)
virtual

Notification function called just before an object is deleted from memory.

Parameters
pObject[in] Pointer to the object that is being deleted.
Remarks
An object is deleted when its reference count reaches 0.

The default implementation of this function does nothing. This function can be overridden in custom classes.

Reimplemented in OdDbDictionary.

◆ gsNode()

OdGsCache* OdDbObject::gsNode ( ) const
virtual

Returns the OdGsCache of an OdGiDrawable object.

Implements OdGiDrawable.

◆ handle()

OdDbHandle OdDbObject::handle ( ) const
inline

Returns the persistent handle of this database object.

Definition at line 253 of file DbObject.h.

◆ handOverTo()

void OdDbObject::handOverTo ( OdDbObject pNewObject,
bool  keepXData = true,
bool  keepExtDict = true 
)

Replaces this database -resident (DBRO) object with the specified non- database -resident (NDBRO) object, while retaining this object's objectId, handle, owner, and reactor list.

Parameters
pNewObject[in] Pointer to the object with which to replace this object in the database.
keepXData[in] This object's XData will be retained if and only if keepXData is true.
keepExtDict[in] This object's extension dictionary will be retained if and only if keepExtDict is true.
Remarks
This object must be open OdDb::kForWrite.

The replacement object will opened OdDb::kForWrite, and must be closed.

It is up to the caller to delete the replaced (this) object.

Throws:

Cause eIllegalReplacement This object is NDBRO or NewObject is DBRO.

◆ hasFields()

bool OdDbObject::hasFields ( ) const

Returns true if and only if this object has fields.

◆ hasPersistentReactor()

bool OdDbObject::hasPersistentReactor ( const OdDbObjectId objId) const

This method returns true if objId is the Object ID of a reactor attached to this object. Otherwise, it returns false.

Parameters
objId[in] Object ID of the persistent reactor.

◆ hasSaveVersionOverride()

bool OdDbObject::hasSaveVersionOverride ( ) const

Returns true if and only if this object has its bit set to override the filer version.

◆ id()

virtual OdDbStub* OdDbObject::id ( ) const
virtual

Returns the database ID corresponding to this object.

Implements OdGiDrawable.

◆ isAProxy()

bool OdDbObject::isAProxy ( ) const

Returns true if and only if this object is a proxy object or entity.

◆ isDBRO()

bool OdDbObject::isDBRO ( ) const

Returns true if and only this object is a database -resident object.

◆ isErased()

bool OdDbObject::isErased ( ) const

Returns true if and only if this object is marked as erased.

◆ isEraseStatusToggled()

bool OdDbObject::isEraseStatusToggled ( ) const

Returns true if and only if this object's erased status has been toggled since it was opened.

◆ isModified()

bool OdDbObject::isModified ( ) const

Returns true if and only if this object's assertWriteEnabled() has been called since it was opened.

◆ isModifiedGraphics()

bool OdDbObject::isModifiedGraphics ( ) const

Returns true if and only if an object derived from OdDbEntity has been modified.

Remarks

This function returns true if and only if an object derived from OdDbEntity either

1) Calls assertWriteEnabled()

2) Calls recordGraphicsModified(true).

◆ isModifiedXData()

bool OdDbObject::isModifiedXData ( ) const

Returns true if and only this object's assertWriteEnabled() and setXData() have been called since it was opened.

◆ isNewObject()

bool OdDbObject::isNewObject ( ) const

Returns true if and only if this object has not been closed since it was created.

◆ isNotifyEnabled()

bool OdDbObject::isNotifyEnabled ( ) const

Returns true if and only if this object is open OdDb::kForNotify.

◆ isNotifying()

bool OdDbObject::isNotifying ( ) const

Returns true if and only if this object is sending notification.

◆ isOdDbObjectIdsInFlux()

bool OdDbObject::isOdDbObjectIdsInFlux ( ) const

Returns true if and only if this object's Object ID is not valid because the OdDbObject::subDeepClone or OdDbObject::subWblockClone() have yet to be completed.

◆ isPersistent()

virtual bool OdDbObject::isPersistent ( ) const
virtual

Return true if and only if this object is database -resident (DBRO).

Remarks
Persistent objects belong to an object that must be opened and closed.

Non-persistent objects can be accessed through their pointers.

Implements OdGiDrawable.

◆ isReadEnabled()

bool OdDbObject::isReadEnabled ( ) const

Returns true if and only if this object is open OdDb::kForRead.

◆ isReallyClosing()

bool OdDbObject::isReallyClosing ( ) const

Returns true if and only if a call to close would completely close this object at this time.

Remarks
Returns true if and only if a this object is open OdDb::kForRead with only one reader, and is not in a transaction.

◆ isUndoing()

bool OdDbObject::isUndoing ( ) const

Returns true if and only if this object is taking part in an Undo operation.

◆ isUndoRecordingDisabled()

bool OdDbObject::isUndoRecordingDisabled ( ) const

◆ isWriteEnabled()

bool OdDbObject::isWriteEnabled ( ) const

Returns true if and only if this object is open OdDb::kForWrite.

◆ mergeStyle()

virtual OdDb::DuplicateRecordCloning OdDbObject::mergeStyle ( ) const
virtual

Returns the merge style of this object.

Reimplemented in OdDbXrecord, OdDbProxyObject, and OdDbDictionary.

◆ modified()

virtual void OdDbObject::modified ( const OdDbObject pObject)
virtual

Notification function called whenever an object is opened OdDb::kForWrite, a function has been called that could modify the contents of this object, and this object is now being closed.

Parameters
pObject[in] Pointer to the object that is being closed after being modified.
Remarks
The default implementation of this function does nothing. This function can be overridden in custom classes.

Reimplemented in OdDbPointCloudDefReactorEx, OdDbPointCloudDefReactor, OdDbFcf, OdDbRasterImageDefReactor, OdDbDimension, OdDbArcAlignedText, OdDbMLeader, OdDbViewport, OdDbTable, and OdDbBreakData.

◆ modifiedGraphics()

virtual void OdDbObject::modifiedGraphics ( const OdDbObject pObject)
virtual

Notification function called whenever an object derived from OdDbEntity is modified.

Parameters
pObject[in] Pointer to the modified object.
Remarks
The default implementation of this function does nothing. This function can be overridden in custom classes.

This function is called whenever the following has occurred.

1) The calling object is opened OdDb::kForWrite.

2) One of its member functions either

a Calls its assertWriteEnabled with recordModified == true.

b Calls its recordGraphicsModified(true).

3) The calling object is being closed.

This function is called whenever the object as been modified. It therefore indicates only that the graphics for it may have changed.

Reimplemented in OdDbLeader, OdDbHatch, OdDbDimAssoc, and OdDbBreakData.

◆ modifiedXData()

virtual void OdDbObject::modifiedXData ( const OdDbObject pObject)
virtual

Notification function called whenever the XData has been written to the notifying object.

Parameters
pObject[in] Pointer to the notifying object.
Remarks
Notification is made upon pObject->close() or pObject->cancel().

The notifying object is open OdDb::kForRead.

The default implementation of this function does nothing. This function can be overridden in custom classes.

◆ modifyUndone()

virtual void OdDbObject::modifyUndone ( const OdDbObject pObject)
virtual

Notification function called whenever the notifying object is in the midst an Undo operation that is undoing modifications.

Parameters
pObject[in] Pointer to the notifying object.
Remarks
The notifying object is open OdDb::kForRead.

The default implementation of this function does nothing. This function can be overridden in custom classes.

◆ numRefs()

long OdDbObject::numRefs ( ) const
virtual

Returns the reference count of this object.

Reimplemented from OdRxObject.

◆ objectClosed()

virtual void OdDbObject::objectClosed ( const OdDbObjectId objectId)
virtual

Notification function called immediately before an object is closed.

Parameters
objectId[in] Object ID of the object that is being closed.
Remarks
The default implementation of this function does nothing. This function can be overridden in custom classes.

◆ objectId()

OdDbObjectId OdDbObject::objectId ( ) const

Returns the Object ID of this object.

Remarks
Returns a null ID if this object has not been added to a database.

◆ ODDB_DECLARE_MEMBERS()

OdDbObject::ODDB_DECLARE_MEMBERS ( OdDbObject  )

◆ openedForModify()

virtual void OdDbObject::openedForModify ( const OdDbObject pObject)
virtual

Notification function called whenever an object is opened for modify OdDb::kForWrite.

Parameters
pObject[in] Pointer to the object that is being opened.
Remarks
The default implementation of this function does nothing. This function can be overridden in custom classes.

Reimplemented in OdDbDimAssoc.

◆ ownerId()

OdDbObjectId OdDbObject::ownerId ( ) const

Returns the Object ID of this object's owner.

Remarks
Returns a null ID if this object has not been added to a database, or if OdDbObject::setOwnerId has not been called.

Throws:

Cause eNotInDatabase objectId().isNull()

◆ reappended()

virtual void OdDbObject::reappended ( const OdDbObject pObject)
virtual

Notification function called whenever a Redo process processes the reappending of the notifying object to the database.

Parameters
pObject[in] Pointer to the notifying object.
Remarks

The default implementation of this function does nothing. This function can be overridden in custom classes.

◆ recvPropagateModify()

virtual void OdDbObject::recvPropagateModify ( const OdDbObject pSubObj)
virtual

Allows a subobject of a complex object to notify its root object that it has been changed.

Parameters
pSubObj[in] Pointer to the modifiedsubobject.
Remarks
Here's how it's supposed to work:

1) The subobject class's close() calls its triggers a "modified" notification which calls its xmitPropagateModify(). 2) The subobject class calls the its parent's recvPropagateModify() its object's pointer. 3) The owner's class's recvPropagateModify() sends a "modified" notification to the top of its class.

The default implementation of this function does nothing. This function can be overridden in custom classes.

◆ release()

void OdDbObject::release ( )
virtual

Decrements the reference count of this object.

Remarks
This object is deleted when the reference count reaches zero.

Implements OdRxObject.

◆ releaseExtensionDictionary()

bool OdDbObject::releaseExtensionDictionary ( )

Releases and erases this object's extension dictionary if it exists and is empty.

Remarks
Returns true if and only if either the dictionary did not exist or was released.

◆ removeField() [1/2]

virtual OdDbObjectId OdDbObject::removeField ( const OdString fieldName)
virtual

Removes the specified field from the field dictionary of this object.

Parameters
fieldName[in] Name (key) for the entry.
Remarks
Returns the Object ID of the removed field if successful, or a null Object ID if not.

Reimplemented in OdDbText, and OdDbMText.

◆ removeField() [2/2]

virtual OdResult OdDbObject::removeField ( OdDbObjectId  fieldId)
virtual

Removes the specified field from the field dictionary of this object.

Parameters
fieldId[in] Object ID for the field.
Remarks
Returns eOk if successful, or an appropriate error code if not.

Reimplemented in OdDbText, and OdDbMText.

◆ removePersistentReactor()

virtual void OdDbObject::removePersistentReactor ( const OdDbObjectId objId)
virtual

Removes the specified persistent reactor from this object's reactor list.

Parameters
objId[in] Object ID of the persistent reactor.
Remarks
An object must be open OdDb::kForWrite in order to remove one of its persistent reactors.

◆ removeReactor()

void OdDbObject::removeReactor ( OdDbObjectReactor pReactor) const

Removes the specified transient reactor from this object's reactor list.

Parameters
pReactor[in] Pointer to the transient reactor object.
Remarks
An object must be open either OdDb::kForRead or OdDb::kForWrite in order to remove a transient reactor.

◆ saveAsClass()

virtual OdRxClass* OdDbObject::saveAsClass ( OdRxClass pClass) const
virtual

For Teigha internal use only

DOM

◆ setField()

virtual OdDbObjectId OdDbObject::setField ( const OdString fieldName,
OdDbField pField 
)
virtual

Adds the specified field to the field dictionary of this object.

Parameters
fieldName[in] Name (key) for the new entry.
pField[in] Pointer to the field object.
Returns
Returns the Object ID of the new entry.

Reimplemented in OdDbText, and OdDbMText.

◆ setGsNode()

void OdDbObject::setGsNode ( OdGsCache pNode)
virtual

Assigns the specified OdGsCache to the calling object.

Parameters
pNode[in] Pointer to the OdGsCache object.

Implements OdGiDrawable.

◆ setHasSaveVersionOverride()

void OdDbObject::setHasSaveVersionOverride ( bool  hasSaveVersionOverride)

Controls the flag specifying that this object overrides the save filer version.

Parameters
hasSaveVersionOverride[in] Has save version override.
Remarks
By default, objects are saved in the highest of the your object's birth version and the filer version.

◆ setOdDbObjectIdsInFlux()

void OdDbObject::setOdDbObjectIdsInFlux ( )

Called on a new created cloned object to indicate that its Object ID is not valid.

Remarks
The flags are cleared when the OdDbObject::subDeepClone or OdDbObject::subWblockClone() operation has been completed.

◆ setOwnerId()

virtual void OdDbObject::setOwnerId ( OdDbObjectId  ownerId)
virtual

Sets this object's ownerId data member.

Parameters
ownerId[in] Owner's objectId.
Remarks
This function lets this object know its owner; it does not notify the owner.

Throws:

Cause eNotInDatabase Owner is not in the database.

◆ setXData()

virtual void OdDbObject::setXData ( const OdResBuf pRb)
virtual

Sets the XData of this object.

Parameters
pRb[in] A pointer to the ResBuf list containing the XData.
Remarks
The sublist for each RegApp, and the ResBuf list itself, must begin with a ResBuf with resbuf.restype == kDxfRegAppName and resbuf.rstring == a valid regAppName string.

Any existing XData for the specified regAppName will be replaced.

To remove the regAppName and its XData, just provide the regAppName with no data.

If you override this method, you should supermessage this classes parent class to add add the XData to the object.

◆ subClose()

virtual void OdDbObject::subClose ( )
virtual

Called as the first operation as this object is being closed, for database -resident objects only.

Remarks
This function is notified just before the current open operation is to be closed, giving this function the ability to perform necessary operatons.

When overriding this function:

1) If the OdDbObject's state is incorrect, throw exception.

2) Call parent class's subClose().

3) If other actions are required before close, do them.

The default implementation of this function does nothing. This function can be overridden in custom classes.

Reimplemented in CFxBIMDatabaseReference, OdDbRasterImage, OdDbPointCloudDef, OdDbMLeader, OdDbLeader, OdDbGroup, OdDbFcf, OdDbBlockTableRecord, OdDbAttributeDefinition, OdDbAttribute, OdDbArcAlignedText, RText, OdDbViewTableRecord, OdDbViewportTableRecord, OdDbViewportTable, OdDbViewport, OdDbTextStyleTableRecord, OdDbText, OdDbTable, OdDbSection, OdDbRasterImageDef, OdDbPolygonMesh, OdDbPolyFaceMesh, OdDbPlotSettings, OdDbOle2Frame, OdDbMText, OdDbMline, OdDbMLeaderStyle, OdDbLayout, OdDbHatch, OdDbGeoPositionMarker, OdDbField, OdDbDimension, OdDbDictionary, OdDbCamera, OdDbBlockReference, OdDb3dSolid, OdDb3dPolyline, and OdDb2dPolyline.

◆ subDeepClone()

virtual OdDbObjectPtr OdDbObject::subDeepClone ( OdDbIdMapping ownerIdMap,
OdDbObject pOwner,
bool  bPrimary 
) const
protectedvirtual

◆ subErase()

virtual OdResult OdDbObject::subErase ( bool  erasing)
virtual

Called as the first operation as this object is being erased or unerased.

Parameters
erasing[in] A copy of the erasing argument passed to erase().
Remarks
This function is notified just before the current object is to be erased, giving this function the ability to cancel the erase.

Returns eOk if and only if erase() is to continue.

When overriding this function:

1) If the OdDbObject's state is incorrect, return something other than eOk.

2) If the parent class's subErase() returns anything other than eOk, immediately return it.

3) If other actions are required before erase, do them.

4) Return eOk.

If you must make changes to this object's state, either make them after step 2, or roll them back if step 2 returns other than eOk.

The default implementation of this function does nothing but return eOk. This function can be overridden in custom classes.

Reimplemented in CFxBIMSectionView, CFxBIMSectionEntity, CFxBIMSection, CFxBIMEntityReference, OdDbScale, OdDbPointCloudDef, OdDbEntity, OdDbBlockTableRecord, OdDbViewport, OdDbTextStyleTableRecord, OdDbSymbolTableRecord, OdDbSequenceEnd, OdDbRegAppTableRecord, OdDbRasterImageDef, OdDbProxyObject, OdDbProxyEntity, OdDbPolygonMeshVertex, OdDbPolyFaceMeshVertex, OdDbPlotSettings, OdDbMaterial, OdDbLongTransaction, OdDbLinetypeTableRecord, OdDbLight, OdDbLayerTableRecord, OdDbFaceRecord, OdDbDimStyleTableRecord, and OdDbCamera.

◆ subGetClassID()

virtual OdResult OdDbObject::subGetClassID ( void pClsid) const
protectedvirtual

◆ subHandOverTo()

virtual void OdDbObject::subHandOverTo ( OdDbObject pNewObject)
virtual

Called as the first operation of the handOverTo function.

Parameters
pNewObject[in] Pointer to the object with which to replace this object in the database.
Remarks
This function allows custom classes to populate the new object.
Overriding this function in a child class allows a child instance to be notified each time an object is handed over.

This function is notified just before an object is to be handed over; giving this function the ability to cancel the handover.

When overriding this function:

1) If the OdDbObject's state is incorrect, throw exception.

2) Call parent class's subHandover().

3) If other actions are required before handover, do them.

The default implementation of this function does nothing. This function can be overridden in custom classes.

Reimplemented in CFxBIMDatabaseReference, OdDbEvalGraph, OdDbBlockTableRecord, OdDbTextStyleTableRecord, OdDbRasterImageDef, OdDbPlotSettings, OdDbEntity, OdDbBlockReference, and OdDbPointCloudDef.

◆ subObjModified()

virtual void OdDbObject::subObjModified ( const OdDbObject pObject,
const OdDbObject pSubObj 
)
virtual

Notification function called whenever a method of the specified subobject has called assertWriteEnabled()

Parameters
pObject[in] Pointer to the notifying object.
pSubObj[in] A pointer to the subobject owned by pObject.
Remarks
Notification is made upon pObject->close() or pObject->cancel().
This function is called only for the modification of the following:

Vertices of OdDb2dPolylines, OdDb3dPolylines, OdDbPolygonMeshs, and OdDbPolyFaceMeshes OdDbFaceRecords of OdDbPolyFaceMeshs OdDbAttributes owned by OdDbBlockReferences, classes derived from OdDbBlockReference, and OdDbMInsertBlocks

◆ subOpen()

virtual OdResult OdDbObject::subOpen ( OdDb::OpenMode  mode)
virtual

Notification function called by the Teigha framework immediately before an object is opened.

Parameters
mode[in] Mode in which the object is being opened.
Remarks
This function is notified just before an object is to be opened; giving this function the ability to cancel the object being opened.

Returns eOk if and only if open() is to continue.

Overriding this function in a child class allows a child instance to be notified each time an object is opened.

When overriding this function:

1) If the OdDbObject's state is incorrect, return something other than eOk.

2) If the parent class's subOpen() returns anything other than eOk, immediately return it.

3) If other actions are required before open, do them.

4) Return eOk.

The default implementation of this function does nothing but return eOk. This function can be overridden in custom classes.

◆ subSetAttributes()

virtual OdUInt32 OdDbObject::subSetAttributes ( OdGiDrawableTraits pTraits) const
virtual

Sets the values of this object's subentity traits, and returns with the calling object's subentity traits.

Parameters
pTraits[in] Pointer to the OdGiDrawableTraits object to be set.
Remarks
When overriding subSetAttributes(), you must OR (|) the return value of <base class>::subSetAttributes(pTraits) with any flags you add.

A derived class may not remove flags for any reason.

The default implementation does nothing but returns kDrawableNone. This function can be overridden in custom classes.

Implements OdGiDrawable.

Reimplemented in CFxBIMSectionView, CFxBIMSectionEntity, CFxBIMSection, CFxBIMEntityReference, OdDbNavisworksReference, OdDbPdfReference, OdDbUnderlayReference, OdDbMLeader, OdDbLeader, OdDbBlockTableRecord, OdDbVisualStyle, OdDbViewport, OdDbTextStyleTableRecord, OdDbSurface, OdDbSun, OdDbSubDMesh, OdDbRenderEnvironment, OdDbRapidRTRenderSettings, OdDbMentalRayRenderSettings, OdDbRenderSettings, OdDbRegion, OdDbPoint, OdDbMaterial, OdDbLinetypeTableRecord, OdDbLight, OdDbLayout, OdDbLayerTableRecord, OdDbEntity, OdDbDimension, OdDbCamera, OdDbBody, OdDbBlockReference, OdDbIBLBackground, OdDbSkyBackground, OdDbGroundPlaneBackground, OdDbImageBackground, OdDbGradientBackground, OdDbSolidBackground, OdDbAttributeDefinition, OdDbAbstractViewTableRecord, and OdDb3dSolid.

◆ subSwapIdWith()

virtual void OdDbObject::subSwapIdWith ( const OdDbObjectId otherId,
bool  swapXdata = false,
bool  swapExtDict = false 
)
virtual

Called as the first operation of swapIdWith

Parameters
otherId[in] Object ID to be swapped with this object's Object ID.
swapXdata[in] If and only if true, extended data are swapped.
swapExtDict[in] If and only if true, extension dictionaries are swapped.
Remarks
This function is notified just before an object is to be opened; giving this function the ability to cancel the object being swapped or perform necessary actions.

When overriding this function:

1) If the OdDbObject's state is incorrect, throw exception.

2) Call parent class's subSwapIdWith().

3) If other actions are required before swapping IDs, do them.

The default implementation of this function does nothing. This function can be overridden in custom classes.

Reimplemented in OdDbViewTableRecord, OdDbSymbolTableRecord, and OdDbEntity.

◆ subViewportDraw()

virtual void OdDbObject::subViewportDraw ( OdGiViewportDraw pVd) const
virtual

◆ subWblockClone()

virtual OdDbObjectPtr OdDbObject::subWblockClone ( OdDbIdMapping ownerIdMap,
OdDbObject pOwner,
bool  bPrimary 
) const
protectedvirtual

◆ subWorldDraw()

virtual bool OdDbObject::subWorldDraw ( OdGiWorldDraw pWd) const
virtual

◆ swapIdWith()

void OdDbObject::swapIdWith ( OdDbObjectId  otherId,
bool  swapXdata = false,
bool  swapExtDict = false 
)

Swaps the objectIDs, handles, XData,and extension dictionary between this object and another object.

Parameters
otherId[in] Object ID of object with which to swap.
swapXdata[in] XData will be swapped if and only if swapXData is true.
swapExtDict[in] Extension dictionaries will be swapped if and only if swapExtDict is true.

Throws:

Cause eIllegalReplacement Either object is NDBRO.

◆ unappended()

virtual void OdDbObject::unappended ( const OdDbObject pObject)
virtual

Notification function called whenever the Undo process processes the appending of the notifying object to the database.

Parameters
pObject[in] Pointer to the notifying object.
Remarks
The notifying object is marked as erased. It is not removed the database, and can be unerased, even 'before' it was created.

The default implementation of this function does nothing. This function can be overridden in custom classes.

◆ undoFiler()

OdDbDwgFiler* OdDbObject::undoFiler ( )

Description: Returns the undo filer associated with this object.

Remarks
This function is typically used by custom classes using partial Undo to add Undo information to the filer that would be used by this object applyPartialUndo().

Throws:

Cause eNotOpenForWrite !isWriteEnabled()

◆ upgradeOpen()

void OdDbObject::upgradeOpen ( )

Upgrades this object from OdDb::kForRead to OdDb::kForWrite.

◆ wblockClone()

ODRX_SEALED_VIRTUAL OdDbObjectPtr OdDbObject::wblockClone ( OdDbIdMapping ownerIdMap,
OdDbObject pOwner,
bool  bPrimary = true 
) const

Performs a shallow clone of this object.

Parameters
ownerIdMap[in/out] Owner's ID map.
Remarks
Returns a SmartPointer to the newly created clone, and adds a record to the specified ID map. If the cloning operation fails, a null SmartPointer is returned.

A shallow clone is a clone of only this object.

This function should not be called by client code; use OdDbDatabase::wblockCloneObjects() instead.

The default implementation of this function calls subWblockClone() for all objects hard-referenced by this object. This function can be overridden in custom classes.

See also
subDeepClone()

◆ xData()

virtual OdResBufPtr OdDbObject::xData ( const OdString regappName = OdString::kEmpty) const
virtual

Returns a linked list of ResBufs containing a copy of the XData of this object.

Parameters
regappName[in] Registered application for which to return XData.
Remarks
If regappName is empty, all XData of this object will be returned.

If regappName is not empty, XData for only that application will be returned.

Returns a null SmartPointer if there are no XData.

◆ xDataTransformBy()

void OdDbObject::xDataTransformBy ( const OdGeMatrix3d xfm)

Applies the 3D transformation matrix to the XData of this object.

Parameters
xfm[in] 3D transformation matrix.
Remarks
Applies the transformation matrix to only the following XData data types:

Value kDxfXdWorldXCoord 1011
kDxfXdWorldYCoord 1021
kDxfXdWorldZCoord 1031
kDxfXdWorldXDisp 1012
kDxfXdWorldYDisp 1022
kDxfXdWorldZDisp 1032
kDxfXdWorldXDir 1013
kDxfXdWorldYDir 1023
kDxfXdWorldZDir 1033
kDxfXdDist 1041
kDxfXdScale 1042

◆ xmitPropagateModify()

virtual void OdDbObject::xmitPropagateModify ( ) const
virtual

Allows a subobject of a complex object to notify its root object that it has been changed.

Remarks
This function must be called within an subobject's close() method.

The owner can then propagate the notification that it has been been modified.

The default implementation of this function inform the database in which the owner resides has been modified; triggering any OdDbDatabaseReactors attached to it. This function can be overridden in custom classes.

When overriding this function, it should:

Remarks
Here's how it's supposed to work:

1) The subobject class's close() calls its triggers a "modified" notification which calls its xmitPropagateModify(). 2) The subobject class calls the its owner's recvPropagateModify() its object's pointer. 3) This owner's class's recvPropagateModify() sends a "modified" notification to the top of its class.

Friends And Related Function Documentation

◆ OdDbObjectImpl

friend class OdDbObjectImpl
friend

Definition at line 1721 of file DbObject.h.

◆ OdDbObjectOverrule

friend class OdDbObjectOverrule
friend

Definition at line 1719 of file DbObject.h.

◆ OdDbPropertiesOverrule

friend class OdDbPropertiesOverrule
friend

Definition at line 1720 of file DbObject.h.

◆ OdDbSystemInternals

friend class OdDbSystemInternals
friend

Definition at line 1718 of file DbObject.h.

Member Data Documentation

◆ m_pImpl

OdDbObjectImpl* OdDbObject::m_pImpl
protected

Definition at line 1722 of file DbObject.h.


The documentation for this class was generated from the following file: