0024509: Suspect unused variable in TPrsStd_ConstraintTools.cxx
[occt.git] / src / GraphTools / GraphTools_TopologicalSortIterator.gxx
1 // Created on: 1991-05-29
2 // Created by: Denis PASCAL
3 // Copyright (c) 1991-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 //              <dp>
18
19
20 //=======================================================================
21 //function : GraphTools_TopologicalSortIterator
22 //purpose  : 
23 //=======================================================================
24
25 GraphTools_TopologicalSortIterator::GraphTools_TopologicalSortIterator ()
26 {}
27
28
29 //=======================================================================
30 //function : GraphTools_TopologicalSortIterator
31 //purpose  : 
32 //=======================================================================
33
34 GraphTools_TopologicalSortIterator::GraphTools_TopologicalSortIterator 
35   (const Graph& G)
36 {
37   FromGraph (G);
38 }
39
40
41 //=======================================================================
42 //function : FromVertex
43 //purpose  : 
44 //=======================================================================
45
46 void GraphTools_TopologicalSortIterator::FromVertex
47   (const Vertex& V)
48 {
49   myIterator.FromVertex(V);
50 }
51
52
53 //=======================================================================
54 //function : FromGraph
55 //purpose  : 
56 //=======================================================================
57
58 void GraphTools_TopologicalSortIterator::FromGraph
59   (const Graph& G)
60 {
61   for ( GIterator it (G); it.More(); it.Next() ) {
62     myIterator.FromVertex(it.Value());
63   }
64 }
65
66
67 //=======================================================================
68 //function : Perform
69 //purpose  : 
70 //=======================================================================
71
72 void GraphTools_TopologicalSortIterator::Perform
73   (const Graph& G,
74    const Standard_Boolean ignoreSelfLoops,
75    const Standard_Boolean processCycle) 
76 {
77   myIterator.Perform(G,ignoreSelfLoops,processCycle);
78 }
79
80
81 //=======================================================================
82 //function : Reset
83 //purpose  : 
84 //=======================================================================
85
86 void GraphTools_TopologicalSortIterator::Reset ()
87 {
88   myIterator.Reset();
89 }
90
91
92 //=======================================================================
93 //function : More
94 //purpose  : 
95 //=======================================================================
96
97 Standard_Boolean GraphTools_TopologicalSortIterator::More () const 
98 {
99   return myIterator.More();
100 }
101
102
103 //=======================================================================
104 //function : Next
105 //purpose  : 
106 //=======================================================================
107
108 void GraphTools_TopologicalSortIterator::Next () 
109 {
110   myIterator.Next();
111 }
112
113
114 //=======================================================================
115 //function : Value
116 //purpose  : 
117 //=======================================================================
118
119 const Vertex& GraphTools_TopologicalSortIterator::Value () const 
120 {
121   return myIterator.Value();
122 }
123
124
125 //=======================================================================
126 //function : IsInCycle
127 //purpose  : 
128 //=======================================================================
129
130 Standard_Boolean GraphTools_TopologicalSortIterator::IsInCycle () const 
131 {
132   return myIterator.IsInCycle();
133 }
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154