27#ifndef _ODDBGRAPH_H_INCLUDED_
28#define _ODDBGRAPH_H_INCLUDED_
97 void*
data()
const {
return m_pData; }
105 void* pData) { m_pData = pData; }
110 int numOut()
const {
return m_outgoing.size(); }
115 int numIn()
const {
return m_incoming.size(); }
126 int refIndex)
const {
return m_incoming.at(refIndex); }
136 int refIndex)
const {
return m_outgoing.at(refIndex); }
204 OdUInt8 flags)
const {
return ((m_flags & flags)==flags); }
230 if(!
GETBIT(flags, kFirstLevel))
264 if(!
GETBIT(flags, kFirstLevel))
343 int refIndex)
const {
return m_cycleIn[refIndex]; }
358 int refIndex)
const {
return m_cycleOut[refIndex]; }
379 bool isCycleNode()
const {
return (numCycleOut() != 0 || numCycleIn() != 0); }
388 throw OdError(eInvalidOwnerObject);
393 friend struct if_leaf_push_to;
394 friend struct clear_cycles;
429 int initPhysicalLength = 0,
430 int initGrowLength = 8)
431 : m_stack(initPhysicalLength, initGrowLength) {}
514 int nodeIndex)
const {
return m_nodes.at(nodeIndex); }
534 bool isEmpty()
const {
return numNodes() == 0; }
658 void setDirty() { m_bDirty =
true; }
659 bool isDirty()
const {
return m_bDirty; }
OdSmartPtr< OdDbGraphNode > OdDbGraphNodePtr
OdArray< OdDbGraphNode *, OdMemoryAllocator< OdDbGraphNode * > > OdDbGraphNodeArray
#define GETBIT(flags, bit)
void push_back(const T &value)
typename A::size_type size_type
void getOutgoing(OdDbGraphNodeArray &outgoing)
void clearAll(OdUInt8 flags)
OdDbGraphNode * node(int nodeIndex) const
void addNode(OdDbGraphNode *pNode)
void delNode(OdDbGraphNode *pNode)
void breakCycleEdge(OdDbGraphNode *pFrom, OdDbGraphNode *pTo)
void addEdge(OdDbGraphNode *pFrom, OdDbGraphNode *pTo)
virtual bool findCycles(OdDbGraphNode *pStart=0)
OdDbGraphNode * rootNode() const
OdDbGraph * owner() const
bool isMarkedAs(OdUInt8 flags) const
OdDbGraphNode * cycleIn(int refIndex) const
void addRefTo(OdDbGraphNode *pTo)
void markAs(OdUInt8 flags)
OdDbGraphNode * nextCycleNode() const
void clear(OdUInt8 flags)
void setData(void *pData)
OdDbGraphNode * cycleOut(int refIndex) const
void removeRefTo(OdDbGraphNode *pNode)
OdDbGraphNode * out(int refIndex) const
OdDbGraphNode * in(int refIndex) const
void markTree(OdUInt8 flags, OdDbGraphNodeArray *pNodeArray=0)
ODRX_DECLARE_MEMBERS(OdDbGraphNode)
friend void break_edge(OdDbGraphNode *, OdDbGraphNode *)
OdDbGraphStack(int initPhysicalLength=0, int initGrowLength=8)
OdDbGraphNode * top() const
void push(OdDbGraphNode *pNode)