0030895: Coding Rules - specify std namespace explicitly for std::cout and streams
[occt.git] / src / ChFiDS / ChFiDS_Spine.lxx
1 // Created on: 1993-11-18
2 // Created by: Isabelle GRIGNON
3 // Copyright (c) 1993-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 #include <TopoDS.hxx>
18
19 //=======================================================================
20 //function : SetFirstStatus
21 //purpose  : 
22 //=======================================================================
23
24 inline void  ChFiDS_Spine::SetFirstStatus(const ChFiDS_State S)
25 {
26   firstState = S;
27 }
28
29
30 //=======================================================================
31 //function : SetLastStatus
32 //purpose  : 
33 //=======================================================================
34
35 inline void  ChFiDS_Spine::SetLastStatus(const ChFiDS_State S)
36 {
37   lastState = S;
38 }
39 //=======================================================================
40 //function : FirstStatus
41 //purpose  : 
42 //=======================================================================
43
44 inline ChFiDS_State  ChFiDS_Spine::FirstStatus()const 
45 {
46   return firstState;
47 }
48
49
50 //=======================================================================
51 //function : LastStatus
52 //purpose  : 
53 //=======================================================================
54
55 inline ChFiDS_State  ChFiDS_Spine::LastStatus()const 
56 {
57   return lastState;
58 }
59
60
61 //=======================================================================
62 //function : SetStatus
63 //purpose  : 
64 //=======================================================================
65
66 inline void  ChFiDS_Spine::SetStatus(const ChFiDS_State S,
67                                      const Standard_Boolean IsFirst)
68 {
69   if(IsFirst) firstState = S;
70   else lastState = S;
71 }
72 //=======================================================================
73 //function : Status
74 //purpose  : 
75 //=======================================================================
76
77 inline ChFiDS_State  ChFiDS_Spine::Status(const Standard_Boolean IsFirst)const 
78 {
79   if (IsFirst) return firstState;
80   else return lastState;
81 }
82
83 //=======================================================================
84 //function : SetTangencyExtremity
85 //purpose  : 
86 //=======================================================================
87
88 inline void  ChFiDS_Spine::SetTangencyExtremity(const Standard_Boolean IsTangency,
89                                                 const Standard_Boolean IsFirst)
90 {
91   if(IsFirst)  firstistgt = IsTangency ;
92   else         lastistgt = IsTangency;
93 }
94 //=======================================================================
95 //function : IsTangencyExtremity
96 //purpose  : 
97 //=======================================================================
98
99 inline Standard_Boolean 
100 ChFiDS_Spine::IsTangencyExtremity(const Standard_Boolean IsFirst)const 
101 {
102   if (IsFirst) return firstistgt;
103   else return lastistgt;
104 }
105
106 //=======================================================================
107 //function : NbEdges
108 //purpose  : 
109 //=======================================================================
110
111 inline Standard_Integer  ChFiDS_Spine::NbEdges() const 
112 {
113   return spine.Length();
114 }
115
116
117 //=======================================================================
118 //function : Edges
119 //purpose  : 
120 //=======================================================================
121
122 inline const TopoDS_Edge&  ChFiDS_Spine::Edges(const Standard_Integer I) const 
123 {
124   return TopoDS::Edge(spine.Value(I));
125 }
126
127 //=======================================================================
128 //function : OffsetEdges
129 //purpose  : 
130 //=======================================================================
131
132 inline const TopoDS_Edge&  ChFiDS_Spine::OffsetEdges(const Standard_Integer I) const 
133 {
134   return TopoDS::Edge(offsetspine.Value(I));
135 }
136
137 //=======================================================================
138 //function : SetEdges
139 //purpose  : 
140 //=======================================================================
141
142 inline void  ChFiDS_Spine::SetEdges(const TopoDS_Edge& E)
143 {
144   spine.Append(E);
145 }
146
147 //=======================================================================
148 //function : SetOffsetEdges
149 //purpose  : 
150 //=======================================================================
151
152 inline void  ChFiDS_Spine::SetOffsetEdges(const TopoDS_Edge& E)
153 {
154   offsetspine.Append(E);
155 }
156
157 //=======================================================================
158 //function : PutInFirst
159 //purpose  : 
160 //=======================================================================
161
162 inline void  ChFiDS_Spine::PutInFirst(const TopoDS_Edge& E)
163 {
164   spine.InsertBefore(1,E);
165 }
166
167 //=======================================================================
168 //function : PutInFirstOffset
169 //purpose  : 
170 //=======================================================================
171
172 inline void  ChFiDS_Spine::PutInFirstOffset(const TopoDS_Edge& E)
173 {
174   offsetspine.InsertBefore(1,E);
175 }
176
177 //=======================================================================
178 //function : CurrentIndexOfElementarySpine
179 //purpose  : 
180 //=======================================================================
181 inline Standard_Integer ChFiDS_Spine::CurrentIndexOfElementarySpine() const 
182 {
183   return indexofcurve;
184 }
185
186 //=======================================================================
187 //function : Mode
188 //purpose  : 
189 //=======================================================================
190
191 inline ChFiDS_ChamfMode  ChFiDS_Spine::Mode() const
192 {
193
194   return myMode;
195 }