CFx SDK Documentation
2023 SP0
|
#include <DbGraph.h>
Public Types | |
enum | Flags { kNone = 0x00 , kVisited = 0x01 , kOutsideRefed = 0x02 , kSelected = 0x04 , kInList = 0x08 , kListAll = 0x0E , kFirstLevel = 0x10 , kUnresTree = 0x20 , kAll = 0x2F } |
Public Member Functions | |
OdDbGraphNode () | |
ODRX_DECLARE_MEMBERS (OdDbGraphNode) | |
virtual | ~OdDbGraphNode () |
void * | data () const |
void | setData (void *pData) |
int | numOut () const |
int | numIn () const |
OdDbGraphNode * | in (int refIndex) const |
OdDbGraphNode * | out (int refIndex) const |
void | addRefTo (OdDbGraphNode *pTo) |
void | removeRefTo (OdDbGraphNode *pNode) |
void | disconnectAll () |
OdDbGraph * | owner () const |
bool | isMarkedAs (OdUInt8 flags) const |
void | markAs (OdUInt8 flags) |
void | clear (OdUInt8 flags) |
void | markTree (OdUInt8 flags, OdDbGraphNodeArray *pNodeArray=0) |
int | numCycleOut () const |
int | numCycleIn () const |
OdDbGraphNode * | cycleIn (int refIndex) const |
OdDbGraphNode * | cycleOut (int refIndex) const |
OdDbGraphNode * | nextCycleNode () const |
bool | isCycleNode () const |
Public Member Functions inherited from OdRxObject | |
ODRX_HEAP_OPERATORS () | |
OdRxObject () | |
virtual | ~OdRxObject () |
virtual OdRxObject * | queryX (const OdRxClass *pClass) const |
virtual OdRxObject * | x (const OdRxClass *pClass) const |
virtual OdRxClass * | isA () 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 |
Friends | |
class | OdDbGraph |
struct | if_leaf_push_to |
struct | clear_cycles |
void | break_edge (OdDbGraphNode *, OdDbGraphNode *) |
Additional Inherited Members | |
Static Public Member Functions inherited from OdRxObject | |
static OdRxObjectPtr | cast (const OdRxObject *pointer) |
static OdRxClass * | desc () |
This class implements generic node objects for generic graphs.
An edge connected to a node is represented as a pointer or reference to the node at the other end of the edge.
References are classified as either incoming or outgoing. Every incoming reference has a corresponding outgoing reference and vice versa.
Each GraphNode object can have any number of references associated with it, enabling the implementation of any graph structure.
OdDbGraph OdDbGraphStack OdDbXrefGraph OdDbXrefGraphNode
Corresponding C++ library: TD_Db
<group OdDb_Classes>
enum OdDbGraphNode::Flags |
|
virtual |
void OdDbGraphNode::addRefTo | ( | OdDbGraphNode * | pTo | ) |
Creates an outgoing reference, in this GraphNode object, to the specified GraphNode object.
pTo | [in] Pointer to the outgoing GraphNode. |
Throws: OdError(eInvalidOwnerObject) if the specified GraphNode object are not in the same Graph object as this GraphNode object.
Clears the specified set flag bits in this GraphNode object.
flags | [in] Flag bits. |
Value Description kNone 0x00 None. kVisited 0x01 Used internally by OdDbGraph::findCycles() and while traversing a graphs with cycles. kOutsideRefed 0x02 Used internally by Xref detach. kSelected 0x04 User selection. Set by getOutgoing. kInList 0x08 Is in list. Set by getOutgoing. kListAll 0x0E Used to clear kSelected, kInList, kOutsideRefed. kFirstLevel 0x10 The node is connected to the root node. Read Only. kUnresTree 0x20 The tree is unresolved. kAll 0x2F Used to clear all but kFirstLevel.
|
inline |
Returns the specified incoming cyclical reference of this GraphNode object.
refIndex | [in] Reference index. |
|
inline |
Returns the specified outgoing cyclical reference of this GraphNode object.
refIndex | [in] Reference index. |
|
inline |
void OdDbGraphNode::disconnectAll | ( | ) |
Removes all references in and to this GraphNode object.
|
inline |
|
inline |
Returns true if and only if this GraphNode object is part of a cyclical reference.
|
inline |
Returns true if and only if the all the specified set flag bits are set in this GraphNode object.
flags | [in] Flag bits. |
Value Description kNone 0x00 None. kVisited 0x01 Used internally by OdDbGraph::findCycles() and while traversing a graphs with cycles. kOutsideRefed 0x02 Used internally by Xref detach. kSelected 0x04 User selection. Set by getOutgoing. kInList 0x08 Is in list. Set by getOutgoing. kListAll 0x0E Used to clear kSelected, kInList, kOutsideRefed. kFirstLevel 0x10 The node is connected to the root node. Read Only. kUnresTree 0x20 The tree is unresolved. kAll 0x2F Used to clear all but kFirstLevel.
Sets the specified set flag bits in this GraphNode object.
flags | [in] Flag bits. |
Value Description kNone 0x00 None. kVisited 0x01 Used internally by OdDbGraph::findCycles() and while traversing a graphs with cycles. kOutsideRefed 0x02 Used internally by Xref detach. kSelected 0x04 User selection. Set by getOutgoing. kInList 0x08 Is in list. Set by getOutgoing. kListAll 0x0E Used to clear kSelected, kInList, kOutsideRefed. kFirstLevel 0x10 The node is connected to the root node. Read Only. kUnresTree 0x20 The tree is unresolved. kAll 0x2F Used to clear all but kFirstLevel.
void OdDbGraphNode::markTree | ( | OdUInt8 | flags, |
OdDbGraphNodeArray * | pNodeArray = 0 |
||
) |
Marks this GraphNode object and all nested outgoing GraphNode objects with the specified flags.
flags | [in] Flag bits. |
pNodeArray | [in] Pointer to a GraphNode array. |
The user must clear the flags with OdDbGraph::clearAll() or OdDbGraphNode::clear() when done with them.
flags must be a combination of one or more of the following:
Value Description kNone 0x00 None. kVisited 0x01 Used internally by OdDbGraph::findCycles() and while traversing a graphs with cycles. kOutsideRefed 0x02 Used internally by Xref detach. kSelected 0x04 User selection. Set by getOutgoing. kInList 0x08 Is in list. Set by getOutgoing. kListAll 0x0E Used to clear kSelected, kInList, kOutsideRefed. kFirstLevel 0x10 The node is connected to the root node. Read Only. kUnresTree 0x20 The tree is unresolved. kAll 0x2F Used to clear all but kFirstLevel.
|
inline |
Returns the next outgoing cyclical reference of this GraphNode object.
|
inline |
Returns the number of incoming cyclical references associated with this GraphNode object.
|
inline |
Returns the number of outgoing cyclical references associated with this GraphNode object.
|
inline |
|
inline |
OdDbGraphNode::ODRX_DECLARE_MEMBERS | ( | OdDbGraphNode | ) |
|
inline |
|
inline |
void OdDbGraphNode::removeRefTo | ( | OdDbGraphNode * | pNode | ) |
Removes the outgoing reference, in this GraphNode object, to the specified GraphNode object.
pTo | [in] Pointer to the outgoing GraphNode. |
The specified GraphNode object must be part of the same graph as this GraphNode object.
|
friend |