CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
OdDbEvalGraph Class Reference

#include <DbEvalGraph.h>

Inheritance diagram for OdDbEvalGraph:
OdDbObject OdGiDrawable OdRxObject

Public Types

enum  NodeId { kNullNodeId = 0 }
 
- 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 ,
  kDrawableNotAllowLCS = 32768 , kDrawableMergeControlOff = 65536 , kLastFlag = kDrawableMergeControlOff
}
 
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 (OdDbEvalGraph)
 
 OdDbEvalGraph ()
 
virtual ~OdDbEvalGraph ()
 
virtual OdDbEvalNodeId addNode (OdDbEvalExpr *pNode)
 
virtual bool removeNode (const OdDbEvalNodeId &nodeId)
 
virtual bool removeNode (OdDbEvalExpr *pNode)
 
virtual void getAllNodes (OdDbEvalNodeIdArray &allNodes) const
 
virtual OdDbEvalExprPtr getNode (const OdDbEvalNodeId &nodeId, OdDb::OpenMode openMode=OdDb::kForRead) const
 
virtual bool addEdge (const OdDbEvalNodeId &idFrom, const OdDbEvalNodeId &idTo)
 
virtual bool addEdge (const OdDbEvalNodeId &idFrom, const OdDbEvalNodeId &idTo, bool invertible)
 
virtual bool removeEdge (const OdDbEvalNodeId &idFrom, const OdDbEvalNodeId &idTo)
 
virtual void getIncomingEdges (const OdDbEvalNodeId &nodeId, OdDbEvalEdgeInfoArray &edges) const
 
virtual void getOutgoingEdges (const OdDbEvalNodeId &nodeId, OdDbEvalEdgeInfoArray &edges) const
 
virtual bool getEdgeInfo (const OdDbEvalNodeId &idFrom, const OdDbEvalNodeId &idTo, OdDbEvalEdgeInfo &edgeInfo) const
 
virtual void addGraph (OdDbEvalGraph *pGraphToAdd, OdDbEvalIdMap *&idMap)
 
virtual bool evaluate () const
 
virtual bool evaluate (const OdDbEvalContext *pContext) const
 
virtual bool evaluate (const OdDbEvalContext *pContext, const OdDbEvalNodeIdArray *pActivateNodes) const
 
virtual bool activate (const OdDbEvalNodeIdArray &activatedNodes) const
 
virtual bool activate (const OdDbEvalNodeIdArray &activatedNodes, OdDbEvalNodeIdArray *pActiveSubgraph) const
 
virtual bool activate (const OdDbEvalNodeIdArray &activatedNodes, OdDbEvalNodeIdArray *pActiveSubgraph, OdDbEvalNodeIdArray *pCycleNodes) const
 
virtual bool getIsActive (const OdDbEvalNodeId &nodeId, bool &isActive) const
 
virtual bool equals (const OdDbEvalGraph *pOther) const
 
virtual bool isSubgraphOf (const OdDbEvalGraph *pOther) const
 
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
 
virtual void applyPartialUndo (OdDbDwgFiler *pFiler, OdRxClass *pClassObj) ODRX_OVERRIDE
 
virtual void copyFrom (const OdRxObject *p) ODRX_OVERRIDE
 
virtual OdResult postInDatabase (OdDbDatabase *)
 
virtual void subHandOverTo (OdDbObject *pNewObject) 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 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 &idMap, OdDbObject *pOwner, bool bPrimary=true) const ODRX_SEALED
 
ODRX_SEALED_VIRTUAL OdDbObjectPtr wblockClone (OdDbIdMapping &idMap, OdDbObject *pOwner, bool bPrimary=true) const ODRX_SEALED
 
virtual void appendToOwner (OdDbIdPair &idPair, OdDbObject *pOwnerObject, OdDbIdMapping &idMap)
 
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
 
virtual bool isPersistent () const =0
 
virtual OdDbStub * id () const =0
 
virtual void setGsNode (OdGsCache *pGsNode)=0
 
virtual OdGsCachegsNode () const =0
 
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
 
virtual void addRef ()=0
 
virtual void release ()=0
 
virtual long numRefs () const
 
bool isKindOf (const OdRxClass *pClass) const
 
virtual OdRxObjectPtr clone () const
 
virtual void copyFrom (const OdRxObject *pSource)
 
virtual OdRx::Ordering comparedTo (const OdRxObject *pOther) const
 
virtual bool isEqualTo (const OdRxObject *pOther) const
 

Static Public Member Functions

static bool hasGraph (const OdDbObject *pObj, const OdString &key)
 
static OdDbEvalGraphPtr getGraph (const OdDbObject *pObj, const OdString &pKey, const OdDb::OpenMode openMode=OdDb::kForRead)
 
static bool createGraph (OdDbObject *pObj, const OdString &key)
 
static bool removeGraph (OdDbObject *pObj, const OdString &pKey)
 
static bool hasGraph (OdDbDatabase *pDb, const OdString &key)
 
static OdDbEvalGraphPtr getGraph (OdDbDatabase *pDb, const OdString &key, const OdDb::OpenMode openMode=OdDb::kForRead)
 
static bool createGraph (OdDbDatabase *pDb, const OdString &key)
 
static bool removeGraph (OdDbDatabase *pDb, const OdString &key)
 
- Static Public Member Functions inherited from OdRxObject
static OdRxObjectPtr cast (const OdRxObject *pointer)
 
static OdRxClassdesc ()
 

Additional Inherited Members

- Protected Member Functions inherited from OdDbObject
 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 subSetAttributes (OdGiDrawableTraits *traits) const =0
 
virtual bool subWorldDraw (OdGiWorldDraw *wd) const =0
 
virtual void subViewportDraw (OdGiViewportDraw *vd) const =0
 
virtual OdUInt32 subViewportDrawLogicalFlags (OdGiViewportDraw *vd) const
 
virtual OdUInt32 subRegenSupportFlags () const
 
- Protected Attributes inherited from OdDbObject
OdDbObjectImplm_pImpl
 

Detailed Description

This class implements the behavior of dynamic blocks with a network of interrelated elements.

Remarks
Each element (OdDbEvalExpr object) depends on zero or more other elements. The dependencies are represented as edges to dependent nodes from the nodes on which they depend.

In response to OdDbEvalGraph::evaluate(), this class traverses the graph and invokes OdDbEvalExpr::evaluate() for each of the elements in the graph in the proper order.

Corresponding C++ library: TD_DynBlocks <group OdDb_Classes>

See also
OdDbEvalConnectable OdDbEvalContext OdDbEvalContextIterator OdDbEvalContextPair OdDbEvalEdgeInfo OdDbEvalExpr

Definition at line 149 of file DbEvalGraph.h.

Member Enumeration Documentation

◆ NodeId

Enumerator
kNullNodeId 

Definition at line 153 of file DbEvalGraph.h.

Constructor & Destructor Documentation

◆ OdDbEvalGraph()

OdDbEvalGraph::OdDbEvalGraph ( )

◆ ~OdDbEvalGraph()

virtual OdDbEvalGraph::~OdDbEvalGraph ( )
virtual

Member Function Documentation

◆ activate() [1/3]

virtual bool OdDbEvalGraph::activate ( const OdDbEvalNodeIdArray activatedNodes) const
virtual

Activates the specified nodes in this Graph object.

Parameters
activatedNodes[in] Array of node IDs to activate.
Remarks
Nodes not activated are deactivated.
Returns
Returns true if and only if the graph is non-cyclic.

◆ activate() [2/3]

virtual bool OdDbEvalGraph::activate ( const OdDbEvalNodeIdArray activatedNodes,
OdDbEvalNodeIdArray pActiveSubgraph 
) const
virtual

Activates the specified nodes in this Graph object.

Parameters
activatedNodes[in] Array of node IDs to activate.
pActiveSubgraph[in] Pointer to an array to receive the node IDs that would visited, given the activated nodes.

◆ activate() [3/3]

virtual bool OdDbEvalGraph::activate ( const OdDbEvalNodeIdArray activatedNodes,
OdDbEvalNodeIdArray pActiveSubgraph,
OdDbEvalNodeIdArray pCycleNodes 
) const
virtual

Activates the specified nodes in this Graph object.

Parameters
pCycleNodes[in] Pointer to an array to receive the node IDs that would be cyclic, given the activated nodes.

◆ addEdge() [1/2]

virtual bool OdDbEvalGraph::addEdge ( const OdDbEvalNodeId idFrom,
const OdDbEvalNodeId idTo 
)
virtual

Adds the specified edge to this Graph object.

Parameters
idFrom[in] Node ID of the node at the start of the edge.
idTo[in] Node ID of the node at the end of the edge.
Remarks
Creates an outgoing reference to idTo in idFrom, and an incoming reference to idFrom in idTo.

Throws: OdError(eInvalidOwnerObject) if the specified GraphNode objects are not in the same Graph object.

◆ addEdge() [2/2]

virtual bool OdDbEvalGraph::addEdge ( const OdDbEvalNodeId idFrom,
const OdDbEvalNodeId idTo,
bool  invertible 
)
virtual

Adds the specified edge to this Graph object.

Parameters
idFrom[in] Node ID of the node at the start of the edge.
idTo[in] Node ID of the node at the end of the edge.
invertible[in] True if and only if the edge is invertible.
Remarks
An invertible edge can have its originating and terminating nodes swapped based on which of the nodes is activated.

◆ addGraph()

virtual void OdDbEvalGraph::addGraph ( OdDbEvalGraph pGraphToAdd,
OdDbEvalIdMap *&  idMap 
)
virtual

Moves the nodes and edges from the specified Graph object to this Graph object. The argument graph is emptied as as result of the operation.

Parameters
pGraphToAdd[in] Pointer to the Graph object to add.
idMap[out] Pointer to output map from old node ids within 'pGraphToAdd' to their new ids within this graph.

◆ addNode()

virtual OdDbEvalNodeId OdDbEvalGraph::addNode ( OdDbEvalExpr pNode)
virtual

Adds a node to this Graph object.

Parameters
pNode[in] Pointer to the GsNode object.
Returns
Returns the node ID of the newly added node.
Remarks
For database resident Graphs, the user is expected to close returned nodes when done for them. This includes the pNode argument.

◆ applyPartialUndo()

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

◆ copyFrom()

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

Copies the contents of the specified object into this object when possible.

Parameters
pSource[in] Pointer to the source object.
Remarks
The source object and this object need not be of the same type.
This function is meaningful only when implemented by custom classes.

Throws:

Cause eNullObjectPointer pSource->isNull()

Reimplemented from OdDbObject.

◆ createGraph() [1/2]

static bool OdDbEvalGraph::createGraph ( OdDbDatabase pDb,
const OdString key 
)
static

Creates a graph with the specified key on the specified database.

Parameters
pDb[in] Pointer to the database.
key[in] Graph key.
Returns
Returns true if and only if there was a graph with the specified key.

◆ createGraph() [2/2]

static bool OdDbEvalGraph::createGraph ( OdDbObject pObj,
const OdString key 
)
static

Creates a graph with the specified key on the specified object.

Parameters
pObj[in] Pointer to the object.
key[in] Graph key.
Returns
Returns true if and only if successful.

◆ dwgInFields()

virtual OdResult OdDbEvalGraph::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 OdDbEvalGraph::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 OdDbEvalGraph::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 OdDbEvalGraph::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.

◆ equals()

virtual bool OdDbEvalGraph::equals ( const OdDbEvalGraph pOther) const
virtual

Returns true if and only if the specified Graph object is equal to this one.

Parameters
pOther[in] Pointer to the other Graph object.
Returns
Returns true if and only if
        this->subgraph(pOther) && pOther->subgraph(this)

◆ evaluate() [1/3]

virtual bool OdDbEvalGraph::evaluate ( ) const
virtual

Evaluates this Graph object.

Remarks
Evaluation is accomplished by traversing the activated nodes on the Graph, invoking OdDbEvalExpr::evaluate() on each of the visited nodes.

Nodes may be activated with either the activate() method, or by supplying an activatedNodes argument.

Remarks
Nodes not activated are deactivated.
Returns
Returns true if and only if successful.

◆ evaluate() [2/3]

virtual bool OdDbEvalGraph::evaluate ( const OdDbEvalContext pContext) const
virtual

Evaluates this Graph object.

Parameters
pContext[in] Pointer to the Context object for the evaluation.

◆ evaluate() [3/3]

virtual bool OdDbEvalGraph::evaluate ( const OdDbEvalContext pContext,
const OdDbEvalNodeIdArray pActivateNodes 
) const
virtual

Evaluates this Graph object.

Parameters
pContext[in] Pointer to the Context object for the evaluation.
pActivateNodes[in] Pointer to an array of node IDs to activate.

◆ getAllNodes()

virtual void OdDbEvalGraph::getAllNodes ( OdDbEvalNodeIdArray allNodes) const
virtual

Returns an array of the node IDs of all nodes in this Graph object.

Parameters
allNodes[out] Receives an array of node IDs.

◆ getEdgeInfo()

virtual bool OdDbEvalGraph::getEdgeInfo ( const OdDbEvalNodeId idFrom,
const OdDbEvalNodeId idTo,
OdDbEvalEdgeInfo edgeInfo 
) const
virtual

Returns the edge information for the specified edge of this Graph object.

Parameters
idFrom[in] Node ID of the node at the start of the edge.
idTo[in] Node ID of the node at the end of the edge.
edgeInfo[out] Receives the edge information.
Returns
Returns true if and only if successful.

◆ getGraph() [1/2]

static OdDbEvalGraphPtr OdDbEvalGraph::getGraph ( const OdDbObject pObj,
const OdString pKey,
const OdDb::OpenMode  openMode = OdDb::kForRead 
)
static

Returns the Graph object with the specified key on the specified object.

Parameters
pObj[in] Pointer to the object.
key[in] Graph key.
openMode[in] Mode in which to open the Graph object.

◆ getGraph() [2/2]

static OdDbEvalGraphPtr OdDbEvalGraph::getGraph ( OdDbDatabase pDb,
const OdString key,
const OdDb::OpenMode  openMode = OdDb::kForRead 
)
static

Returns the Graph object with the specified key on the specified database.

Parameters
pDb[in] Pointer to the database.
key[in] Graph key.
openMode[in] Mode in which to open the Graph object.

◆ getIncomingEdges()

virtual void OdDbEvalGraph::getIncomingEdges ( const OdDbEvalNodeId nodeId,
OdDbEvalEdgeInfoArray edges 
) const
virtual

Returns an array of the incoming edges for the specified node of this Graph object.

Parameters
nodeId[in] Node ID.
edges[in] Receives an array of edges.

◆ getIsActive()

virtual bool OdDbEvalGraph::getIsActive ( const OdDbEvalNodeId nodeId,
bool &  isActive 
) const
virtual

Returns true if and only if the specified node in this Graph object is active.

Parameters
nodeId[in] Node ID.
isActive[in] True if and only if node is active.
Remarks
The return value of this function is always true. The active state of the node is returned via isActive.

◆ getNode()

virtual OdDbEvalExprPtr OdDbEvalGraph::getNode ( const OdDbEvalNodeId nodeId,
OdDb::OpenMode  openMode = OdDb::kForRead 
) const
virtual

Opens and returns a SmartPointer to the specified node in this Graph object.

Parameters
nodeId[in] Node ID.
openMode[in] Mode in which to open the Node object.

◆ getOutgoingEdges()

virtual void OdDbEvalGraph::getOutgoingEdges ( const OdDbEvalNodeId nodeId,
OdDbEvalEdgeInfoArray edges 
) const
virtual

Returns an array of the outgoing edges for the specified node of this Graph object.

Parameters
nodeId[in] Node ID.
edges[in] Receives an array of edges.

◆ hasGraph() [1/2]

static bool OdDbEvalGraph::hasGraph ( const OdDbObject pObj,
const OdString key 
)
static

Returns true if and only there is a graph with the specified key on the specified object.

Parameters
pObj[in] Pointer to the object.
key[in] Graph key.

◆ hasGraph() [2/2]

static bool OdDbEvalGraph::hasGraph ( OdDbDatabase pDb,
const OdString key 
)
static

Returns true if and only there is a graph with the specified key on the specified database.

Parameters
pDb[in] Pointer to the database.
key[in] Graph key.

◆ isSubgraphOf()

virtual bool OdDbEvalGraph::isSubgraphOf ( const OdDbEvalGraph pOther) const
virtual

Returns true if and only if the specified Graph object is a subgraph of this one.

Parameters
pOther[in] Pointer to the other Graph object.

◆ ODDB_DECLARE_MEMBERS()

OdDbEvalGraph::ODDB_DECLARE_MEMBERS ( OdDbEvalGraph  )

◆ postInDatabase()

virtual OdResult OdDbEvalGraph::postInDatabase ( OdDbDatabase )
virtual

◆ removeEdge()

virtual bool OdDbEvalGraph::removeEdge ( const OdDbEvalNodeId idFrom,
const OdDbEvalNodeId idTo 
)
virtual

Removes the specified edge from this Graph object.

Parameters
idFrom[in] Node ID of the node at the start of the edge.
idTo[in] Node ID of the node at the end of the edge.
Remarks
Creates an outgoing reference to idTo in idFrom, and an incoming reference to idFrom in idTo.

Throws: OdError(eInvalidOwnerObject) if the specified GraphNode objects are not in the same Graph object.

◆ removeGraph() [1/2]

static bool OdDbEvalGraph::removeGraph ( OdDbDatabase pDb,
const OdString key 
)
static

Removes the graph with the specified key on the specified database.

Parameters
pDb[in] Pointer to the database.
key[in] Graph key.
Returns
Returns true if and only if there was a graph with the specified key.

◆ removeGraph() [2/2]

static bool OdDbEvalGraph::removeGraph ( OdDbObject pObj,
const OdString pKey 
)
static

Removes the graph with the specified key on the specified object.

Parameters
pObj[in] Pointer to the object.
key[in] Graph key.
Returns
Returns true if and only if there was a graph with the specified key.

◆ removeNode() [1/2]

virtual bool OdDbEvalGraph::removeNode ( const OdDbEvalNodeId nodeId)
virtual

Removes a node from this Graph object.

Parameters
nodeId[in] Node ID.
Returns
Returns true if and only if the node existed.

◆ removeNode() [2/2]

virtual bool OdDbEvalGraph::removeNode ( OdDbEvalExpr pNode)
virtual

Removes a node from this Graph object.

Parameters
pNode[in] Pointer to the GsNode object.
Remarks
If pNode is specified, it is assumed the node is open for read or write.

◆ subHandOverTo()

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


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