summaryrefslogtreecommitdiff
path: root/inc/GraphTools_TopologicalSortIterator.gxx
blob: d1c9237f842844be8b7d470d1bc260ddf44b3eb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
// Copyright: 	Matra-Datavision 1991
// File:	GraphTools_TopologicalSortIterator.gxx
// Created:	Wed May 29 17:42:50 1991
// Author:	Denis PASCAL
//		<dp>


//=======================================================================
//function : GraphTools_TopologicalSortIterator
//purpose  : 
//=======================================================================

GraphTools_TopologicalSortIterator::GraphTools_TopologicalSortIterator ()
{}


//=======================================================================
//function : GraphTools_TopologicalSortIterator
//purpose  : 
//=======================================================================

GraphTools_TopologicalSortIterator::GraphTools_TopologicalSortIterator 
  (const Graph& G)
{
  FromGraph (G);
}


//=======================================================================
//function : FromVertex
//purpose  : 
//=======================================================================

void GraphTools_TopologicalSortIterator::FromVertex
  (const Vertex& V)
{
  myIterator.FromVertex(V);
}


//=======================================================================
//function : FromGraph
//purpose  : 
//=======================================================================

void GraphTools_TopologicalSortIterator::FromGraph
  (const Graph& G)
{
  for ( GIterator it (G); it.More(); it.Next() ) {
    myIterator.FromVertex(it.Value());
  }
}


//=======================================================================
//function : Perform
//purpose  : 
//=======================================================================

void GraphTools_TopologicalSortIterator::Perform
  (const Graph& G,
   const Standard_Boolean ignoreSelfLoops,
   const Standard_Boolean processCycle) 
{
  myIterator.Perform(G,ignoreSelfLoops,processCycle);
}


//=======================================================================
//function : Reset
//purpose  : 
//=======================================================================

void GraphTools_TopologicalSortIterator::Reset ()
{
  myIterator.Reset();
}


//=======================================================================
//function : More
//purpose  : 
//=======================================================================

Standard_Boolean GraphTools_TopologicalSortIterator::More () const 
{
  return myIterator.More();
}


//=======================================================================
//function : Next
//purpose  : 
//=======================================================================

void GraphTools_TopologicalSortIterator::Next () 
{
  myIterator.Next();
}


//=======================================================================
//function : Value
//purpose  : 
//=======================================================================

const Vertex& GraphTools_TopologicalSortIterator::Value () const 
{
  return myIterator.Value();
}


//=======================================================================
//function : IsInCycle
//purpose  : 
//=======================================================================

Standard_Boolean GraphTools_TopologicalSortIterator::IsInCycle () const 
{
  return myIterator.IsInCycle();
}