0024947: Redesign OCCT legacy type system -- automatic
[occt.git] / src / ChFiDS / ChFiDS_Spine.lxx
CommitLineData
b311480e 1// Created on: 1993-11-18
2// Created by: Isabelle GRIGNON
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
17#include <TopoDS.hxx>
18
19//=======================================================================
20//function : SetFirstStatus
21//purpose :
22//=======================================================================
23
24inline void ChFiDS_Spine::SetFirstStatus(const ChFiDS_State S)
25{
26 firstState = S;
27}
28
29
30//=======================================================================
31//function : SetLastStatus
32//purpose :
33//=======================================================================
34
35inline void ChFiDS_Spine::SetLastStatus(const ChFiDS_State S)
36{
37 lastState = S;
38}
39//=======================================================================
40//function : FirstStatus
41//purpose :
42//=======================================================================
43
44inline ChFiDS_State ChFiDS_Spine::FirstStatus()const
45{
46 return firstState;
47}
48
49
50//=======================================================================
51//function : LastStatus
52//purpose :
53//=======================================================================
54
55inline ChFiDS_State ChFiDS_Spine::LastStatus()const
56{
57 return lastState;
58}
59
60
61//=======================================================================
62//function : SetStatus
63//purpose :
64//=======================================================================
65
66inline 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
77inline 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
88inline 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
99inline Standard_Boolean
100ChFiDS_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
111inline Standard_Integer ChFiDS_Spine::NbEdges() const
112{
113 return spine.Length();
114}
115
116
117//=======================================================================
118//function : Edges
119//purpose :
120//=======================================================================
121
122inline const TopoDS_Edge& ChFiDS_Spine::Edges(const Standard_Integer I) const
123{
124 return TopoDS::Edge(spine.Value(I));
125}
126
127//=======================================================================
128//function : SetEdges
129//purpose :
130//=======================================================================
131
132inline void ChFiDS_Spine::SetEdges(const TopoDS_Edge& E)
133{
134 spine.Append(E);
135}
136
137//=======================================================================
138//function : PutInFirst
139//purpose :
140//=======================================================================
141
142inline void ChFiDS_Spine::PutInFirst(const TopoDS_Edge& E)
143{
144 spine.InsertBefore(1,E);
145}
146
147//=======================================================================
148//function : CurrentIndexOfElementarySpine
149//purpose :
150//=======================================================================
151inline Standard_Integer ChFiDS_Spine::CurrentIndexOfElementarySpine() const
152{
153 return indexofcurve;
154}