b311480e |
1 | // Created on: 1993-03-23 |
2 | // Created by: Jean Yves LEBEY |
3 | // Copyright (c) 1993-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 | |
42cf5bc1 |
17 | |
18 | #include <TopOpeBRepBuild_Loop.hxx> |
19 | #include <TopOpeBRepBuild_LoopSet.hxx> |
7fd59977 |
20 | |
21 | //======================================================================= |
22 | //function : TopOpeBRepBuild_LoopSet |
23 | //purpose : |
24 | //======================================================================= |
7fd59977 |
25 | TopOpeBRepBuild_LoopSet::TopOpeBRepBuild_LoopSet() : |
26 | myLoopIndex(1), myNbLoop(0) |
27 | { |
28 | } |
29 | |
e6f550da |
30 | TopOpeBRepBuild_LoopSet::~TopOpeBRepBuild_LoopSet() |
7fd59977 |
31 | {} |
32 | |
33 | //======================================================================= |
34 | //function : InitLoop |
35 | //purpose : |
36 | //======================================================================= |
37 | |
38 | void TopOpeBRepBuild_LoopSet::InitLoop() |
39 | { |
40 | myLoopIterator.Initialize(myListOfLoop); |
41 | myLoopIndex = 1; myNbLoop = myListOfLoop.Extent(); |
42 | } |
43 | |
44 | //======================================================================= |
45 | //function : MoreLoop |
46 | //purpose : |
47 | //======================================================================= |
48 | |
49 | Standard_Boolean TopOpeBRepBuild_LoopSet::MoreLoop() const |
50 | { |
51 | Standard_Boolean b = myLoopIterator.More(); |
52 | return b; |
53 | } |
54 | |
55 | //======================================================================= |
56 | //function : NextLoop |
57 | //purpose : |
58 | //======================================================================= |
59 | |
60 | void TopOpeBRepBuild_LoopSet::NextLoop() |
61 | { |
62 | myLoopIndex++; |
63 | myLoopIterator.Next(); |
64 | } |
65 | |
66 | //======================================================================= |
67 | //function : Loop |
68 | //purpose : |
69 | //======================================================================= |
70 | |
71 | const Handle(TopOpeBRepBuild_Loop)& TopOpeBRepBuild_LoopSet::Loop() const |
72 | { |
73 | const Handle(TopOpeBRepBuild_Loop)& L = myLoopIterator.Value(); |
74 | return L; |
75 | } |
76 | |
77 | |
78 | //======================================================================= |
79 | //function : ChangeListOfLoop |
80 | //purpose : |
81 | //======================================================================= |
82 | |
83 | TopOpeBRepBuild_ListOfLoop& TopOpeBRepBuild_LoopSet::ChangeListOfLoop() |
84 | { |
85 | return myListOfLoop; |
86 | } |