CFx SDK Documentation  2023 SP0
Public Types | Public Member Functions | Protected Member Functions | List of all members
OdDbDimAssoc Class Reference

#include <DbDimAssoc.h>

Inheritance diagram for OdDbDimAssoc:
OdDbObject OdGiDrawable OdRxObject

Public Types

enum  { kMaxPointRefs = 4 }
 
enum  PointType {
  kXline1Point = 0 , kXline2Point = 1 , kOriginPoint = 0 , kDefiningPoint = 1 ,
  kXline1Start = 0 , kXline1End = 1 , kXline2Start = 2 , kXline2End = 3 ,
  kVertexPoint = 2 , kChordPoint = 0 , kCenterPoint = 1 , kFarChordPoint = 1 ,
  kOverrideCenterPoint = 2 , kAngLineStart = 2 , kJogPoint = 3 , kAngLineEnd = 3 ,
  kLeaderPoint = 0
}
 
enum  RotatedDimType { kUnknown = 0 , kParallel = 1 , kPerpendicular = 2 }
 
enum  AssocFlags { kFirstPointRef = (1<<0) , kSecondPointRef = (1<<1) , kThirdPointRef = (1<<2) , kFourthPointRef = (1<<3) }
 
- 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
}
 

Public Member Functions

 ODDB_DECLARE_MEMBERS (OdDbDimAssoc)
 
 OdDbDimAssoc ()
 
virtual OdResult dwgInFields (OdDbDwgFiler *pFiler) ODRX_OVERRIDE
 
virtual void dwgOutFields (OdDbDwgFiler *pFiler) const ODRX_OVERRIDE
 
virtual OdResult dxfInFields (OdDbDxfFiler *pFiler) ODRX_OVERRIDE
 
virtual void dxfOutFields (OdDbDxfFiler *pFiler) const ODRX_OVERRIDE
 
OdDbObjectId dimObjId () const
 
void setDimObjId (const OdDbObjectId &dimId)
 
OdInt32 assocFlag () const
 
bool assocFlag (int pointIndex) const
 
void setAssocFlag (int assocFlag)
 
void setAssocFlag (int pointIndex, bool flagValue)
 
OdDbOsnapPointRefPtr pointRef (int pointIndex) const
 
void setPointRef (int pointIndex, OdDbOsnapPointRefPtr pOsnapPointRef)
 
RotatedDimType rotatedDimType () const
 
void setRotatedDimType (RotatedDimType dimType)
 
void addToPointRefReactor ()
 
void addToDimensionReactor (bool isAdd=true)
 
OdResult removePointRef (int ptType)
 
OdResult updateDimension (bool update=true, bool skipReactors=false)
 
void removeAssociativity (bool force=true)
 
bool isTransSpatial () const
 
void setTransSpatial (bool value)
 
OdResult post (OdDbObjectId dimId, OdDbObjectId &dimAssocId, bool isActive=true)
 
OdResult getDimAssocGeomIds (OdDbObjectIdArray &geomIds) const
 
bool isAllGeomErased () const
 
virtual void modifiedGraphics (const OdDbObject *pObj) ODRX_OVERRIDE
 
virtual void copied (const OdDbObject *pObj, const OdDbObject *pNewObj) ODRX_OVERRIDE
 
virtual void erased (const OdDbObject *pObj, bool erasing=true) ODRX_OVERRIDE
 
virtual void openedForModify (const OdDbObject *pObject) ODRX_OVERRIDE
 
virtual OdDbObjectPtr subWblockClone (OdDbIdMapping &idMap, OdDbObject *pOwner, bool bPrimary) const ODRX_OVERRIDE
 
virtual OdDbObjectPtr subDeepClone (OdDbIdMapping &idMap, OdDbObject *pOwner, bool bPrimary) const ODRX_OVERRIDE
 
- Public Member Functions inherited from OdDbObject
 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 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 goodbye (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 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

OdResult setPointRefReactor (int ptType, bool isAdd=true)
 
- Protected Member Functions inherited from OdDbObject
 OdDbObject ()
 
virtual OdResult subGetClassID (void *pClsid) const
 
- Protected Member Functions inherited from OdGiDrawable
 OdGiDrawable ()
 
virtual OdUInt32 subViewportDrawLogicalFlags (OdGiViewportDraw *vd) const
 
virtual OdUInt32 subRegenSupportFlags () const
 

Additional Inherited Members

- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 
- Protected Attributes inherited from OdDbObject
OdDbObjectImplm_pImpl
 

Detailed Description

This class represents Associative Dimension objects in an OdDbDatabase instance.

Corresponding C++ library: TD_Db

<group OdDb_Classes>

Definition at line 304 of file DbDimAssoc.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
kMaxPointRefs 

Definition at line 311 of file DbDimAssoc.h.

◆ AssocFlags

Enumerator
kFirstPointRef 
kSecondPointRef 
kThirdPointRef 
kFourthPointRef 

Definition at line 341 of file DbDimAssoc.h.

◆ PointType

Enumerator
kXline1Point 
kXline2Point 
kOriginPoint 
kDefiningPoint 
kXline1Start 
kXline1End 
kXline2Start 
kXline2End 
kVertexPoint 
kChordPoint 
kCenterPoint 
kFarChordPoint 
kOverrideCenterPoint 
kAngLineStart 
kJogPoint 
kAngLineEnd 
kLeaderPoint 

Definition at line 313 of file DbDimAssoc.h.

◆ RotatedDimType

Enumerator
kUnknown 
kParallel 
kPerpendicular 

Definition at line 334 of file DbDimAssoc.h.

Constructor & Destructor Documentation

◆ OdDbDimAssoc()

OdDbDimAssoc::OdDbDimAssoc ( )

Member Function Documentation

◆ addToDimensionReactor()

void OdDbDimAssoc::addToDimensionReactor ( bool  isAdd = true)

◆ addToPointRefReactor()

void OdDbDimAssoc::addToPointRefReactor ( )

◆ assocFlag() [1/2]

OdInt32 OdDbDimAssoc::assocFlag ( ) const

Returns the associativity flag of this Associative Dimension object (DXF 90).

◆ assocFlag() [2/2]

bool OdDbDimAssoc::assocFlag ( int  pointIndex) const

Returns the associativity flag of the specified Osnap Point Reference for this Associative Dimension object.

◆ copied()

virtual void OdDbDimAssoc::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 from OdDbObject.

◆ dimObjId()

OdDbObjectId OdDbDimAssoc::dimObjId ( ) const

Returns the Object ID of the Dimension entity associated with this Associative Dimension object (DXF 330).

◆ dwgInFields()

virtual OdResult OdDbDimAssoc::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 from OdDbObject.

◆ dwgOutFields()

virtual void OdDbDimAssoc::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 from OdDbObject.

◆ dxfInFields()

virtual OdResult OdDbDimAssoc::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 from OdDbObject.

◆ dxfOutFields()

virtual void OdDbDimAssoc::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 from OdDbObject.

◆ erased()

virtual void OdDbDimAssoc::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 from OdDbObject.

◆ getDimAssocGeomIds()

OdResult OdDbDimAssoc::getDimAssocGeomIds ( OdDbObjectIdArray geomIds) const

◆ isAllGeomErased()

bool OdDbDimAssoc::isAllGeomErased ( ) const

◆ isTransSpatial()

bool OdDbDimAssoc::isTransSpatial ( ) const

Returns the trans-space flag of this Associative Dimension object (DXF 70).

◆ modifiedGraphics()

virtual void OdDbDimAssoc::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 from OdDbObject.

◆ ODDB_DECLARE_MEMBERS()

OdDbDimAssoc::ODDB_DECLARE_MEMBERS ( OdDbDimAssoc  )

◆ openedForModify()

virtual void OdDbDimAssoc::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 from OdDbObject.

◆ pointRef()

OdDbOsnapPointRefPtr OdDbDimAssoc::pointRef ( int  pointIndex) const

Returns the specified Osnap Point Reference for this Associative Dimension object.

Parameters
pointIndex[in] Point index. The value should be 0, 1, 2, 3 or from the PointType enum
Remarks
pointIndex must be one of the following:

◆ post()

OdResult OdDbDimAssoc::post ( OdDbObjectId  dimId,
OdDbObjectId dimAssocId,
bool  isActive = true 
)

◆ removeAssociativity()

void OdDbDimAssoc::removeAssociativity ( bool  force = true)

◆ removePointRef()

OdResult OdDbDimAssoc::removePointRef ( int  ptType)

◆ rotatedDimType()

RotatedDimType OdDbDimAssoc::rotatedDimType ( ) const

Returns the rotated dimension type of this Associative Dimension object (DXF 71).

Remarks
rotatedDimType() returns one of the following:

Value kParallel 1 kPerpendicular 2

◆ setAssocFlag() [1/2]

void OdDbDimAssoc::setAssocFlag ( int  assocFlag)

◆ setAssocFlag() [2/2]

void OdDbDimAssoc::setAssocFlag ( int  pointIndex,
bool  flagValue 
)

◆ setDimObjId()

void OdDbDimAssoc::setDimObjId ( const OdDbObjectId dimId)

Sets the Object ID of the Dimension entity associated with this Associative Dimension object (DXF 330).

Parameters
dimId[in] Dimension Object ID.

◆ setPointRef()

void OdDbDimAssoc::setPointRef ( int  pointIndex,
OdDbOsnapPointRefPtr  pOsnapPointRef 
)

Sets the specified Osnap Point Reference for this Associative Dimension object.

Parameters
pointIndex[in] Point index. The value should be 0, 1, 2, 3 or from the PointType enum
pOsnapPointRef[in] SmartPointer to the Osnap Point Reference.

◆ setPointRefReactor()

OdResult OdDbDimAssoc::setPointRefReactor ( int  ptType,
bool  isAdd = true 
)
protected

◆ setRotatedDimType()

void OdDbDimAssoc::setRotatedDimType ( RotatedDimType  dimType)

Sets the rotated dimension type of this Associative Dimension object (DXF 71).

Remarks
rotatedDimType must be one of the following:

Value kParallel 1 kPerpendicular 2

◆ setTransSpatial()

void OdDbDimAssoc::setTransSpatial ( bool  value)

Sets the trans-space flag of this Associative Dimension object (DXF 70).

Parameters
transSpace[out] Trans-space flag.

◆ subDeepClone()

virtual OdDbObjectPtr OdDbDimAssoc::subDeepClone ( OdDbIdMapping idMap,
OdDbObject pOwner,
bool  bPrimary 
) const
virtual

Reimplemented from OdDbObject.

◆ subWblockClone()

virtual OdDbObjectPtr OdDbDimAssoc::subWblockClone ( OdDbIdMapping idMap,
OdDbObject pOwner,
bool  bPrimary 
) const
virtual

Reimplemented from OdDbObject.

◆ updateDimension()

OdResult OdDbDimAssoc::updateDimension ( bool  update = true,
bool  skipReactors = false 
)

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