0024509: Suspect unused variable in TPrsStd_ConstraintTools.cxx
[occt.git] / src / GraphTools / GraphTools_SortedStrgCmptsFromIterator.cdl
CommitLineData
b311480e 1-- Created on: 1991-10-23
2-- Created by: Denis PASCAL
3-- Copyright (c) 1991-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 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
973c2be1 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17generic class SortedStrgCmptsFromIterator from GraphTools
18 (Graph as any;
19 Vertex as any;
20 VHasher as any;
21 VIterator as any)
22
23 ---Purposes: This generic class implements the Strong Components
24 -- Research algorithm from a set of vertices. An
25 -- iterator on adjacent vertices of a given one, are
26 -- requested. Each Strong Component encapsulates
27 -- vertices which are part of a cycle, in the underlying
28 -- graph. The interface of this algorithm is made as an
29 -- iterator. A each step it is possible to know the
30 -- number of vertices, which are members of the current
31 -- Strong Components, and to visit each one. Strong
32 -- Components are visited in such an order than noone is
33 -- returned before an other which point to it.
34
35
6af4fe1c 36uses ListOfInteger from TColStd,
7fd59977 37 ListOfSequenceOfInteger from GraphTools,
38 ListIteratorOfListOfSequenceOfInteger from GraphTools
39
40raises NoMoreObject from Standard,
41 NoSuchObject from Standard,
42 DomainError from Standard
43
44
45 private class SCMap instantiates IndexedDataMap from TCollection
46 (Vertex,Integer,VHasher);
47
48is
49
50 Create
51 ---Purpose: Create an empty algorithm.
52 returns SortedStrgCmptsFromIterator from GraphTools;
53
54 FromVertex (me : in out; V : Vertex)
55 ---Purpose: Add <V> as initial condition. This method is
56 -- cumulative. Use Perform method before visting the
57 -- result of the algorithm.
58 ---Level: Public
59 raises DomainError from Standard;
60
61 Reset (me : in out);
62 ---Purpose: Reset the algorithm. It may be reused with new
63 -- conditions.
64 ---Level: Public
65
66 Perform (me : in out; G : Graph);
67 ---Purpose: Peform the algorithm in <G> from initial setted
68 -- conditions.
69 ---Level: Public
70
71 More(me)
72 returns Boolean from Standard;
73 ---Purpose: returns True if there are others strong
74 -- components.
75 ---Level: Public
76
77 Next(me : in out)
78 ---Purpose: Set the iterator to the next strong component.
79 ---Level: Public
80 raises NoMoreObject from Standard;
81
82 NbVertices (me)
83 returns Integer from Standard
84 ---Purpose: Returns number of vertices of the current Strong
85 -- Components.
86 ---Level: Public
87 raises NoSuchObject from Standard;
88
89 Value(me; index : Integer from Standard)
90 returns any Vertex
91 ---Purpose: returns the vertex of index <I> of the current
92 -- Strong Component.
93 ---Level: Public
94 ---C++: return const &
95 raises NoSuchObject from Standard;
96
97 Visit (me : in out; k : Integer from Standard;
98 G : Graph)
99 ---Level: Internal
100 returns Integer from Standard;
101
102fields
103
104-- conditions
105 myVertices : SCMap from GraphTools;
106-- algorithm
107 myNowIndex : Integer from Standard;
6af4fe1c 108 myStack : ListOfInteger from TColStd;
7fd59977 109-- result
110 mySort : ListOfSequenceOfInteger from GraphTools;
111 myIterator : ListIteratorOfListOfSequenceOfInteger from GraphTools;
112
113end SortedStrgCmptsFromIterator;
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129