0023024: Update headers of OCCT files
[occt.git] / src / IntRes2d / IntRes2d_Transition.lxx
1 // Created on: 1992-06-10
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
5 //
6 // The content of this file is subject to the Open CASCADE Technology Public
7 // License Version 6.5 (the "License"). You may not use the content of this file
8 // except in compliance with the License. Please obtain a copy of the License
9 // at http://www.opencascade.org and read it completely before using this file.
10 //
11 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 //
14 // The Original Code and all software distributed under the License is
15 // distributed on an "AS IS" basis, without warranty of any kind, and the
16 // Initial Developer hereby disclaims all such warranties, including without
17 // limitation, any warranties of merchantability, fitness for a particular
18 // purpose or non-infringement. Please see the License for the specific terms
19 // and conditions governing the rights and limitations under the License.
20
21
22 #include <Standard_DomainError.hxx>
23
24 ostream& operator << (ostream&, IntRes2d_Transition&);
25
26 inline IntRes2d_Transition::IntRes2d_Transition (const Standard_Boolean Tangent, 
27                                           const IntRes2d_Position Pos,
28                                           const IntRes2d_TypeTrans Type ):
29
30     tangent(Tangent),posit(Pos),typetra(Type),situat(IntRes2d_Unknown),oppos(Standard_False)
31
32 {
33 }
34
35 inline IntRes2d_Transition::IntRes2d_Transition (const Standard_Boolean Tangent, 
36                                           const IntRes2d_Position Pos,
37                                           const IntRes2d_Situation Situ,
38                                           const Standard_Boolean Oppos):
39     tangent(Tangent),posit(Pos),typetra(IntRes2d_Touch),
40     situat(Situ),oppos(Oppos)
41 {
42 }
43
44 inline IntRes2d_Transition::IntRes2d_Transition (const IntRes2d_Position Pos):
45
46     tangent(Standard_True),posit(Pos),typetra(IntRes2d_Undecided),situat(IntRes2d_Unknown),oppos(Standard_False)
47 {
48 }
49
50 inline void IntRes2d_Transition::SetValue (const Standard_Boolean Tangent, 
51                                     const IntRes2d_Position Pos,
52                                     const IntRes2d_TypeTrans Type ) {
53
54   tangent=Tangent;
55   posit=Pos;
56   typetra=Type;
57 }
58
59 inline void IntRes2d_Transition::SetValue (const Standard_Boolean Tangent, 
60                                     const IntRes2d_Position Pos,
61                                     const IntRes2d_Situation Situ,
62                                     const Standard_Boolean Oppos) {
63
64   tangent=Tangent;
65   posit=Pos;
66   typetra=IntRes2d_Touch;
67   situat=Situ;
68   oppos=Oppos;
69   
70 }
71
72 inline void IntRes2d_Transition::SetValue (const IntRes2d_Position Pos ) {
73
74   posit=Pos;
75   typetra=IntRes2d_Undecided;
76 }
77
78 inline void IntRes2d_Transition::SetPosition (const IntRes2d_Position Pos ) {
79
80   posit=Pos;
81 }
82
83 inline IntRes2d_Position IntRes2d_Transition::PositionOnCurve () const {
84
85   return posit;
86 }
87
88 inline IntRes2d_TypeTrans IntRes2d_Transition::TransitionType () const {
89
90   return typetra;
91 }
92
93 inline Standard_Boolean IntRes2d_Transition::IsTangent () const {
94
95   if (typetra==IntRes2d_Undecided) {
96     Standard_DomainError::Raise();
97   }
98   return tangent;
99 }
100
101 inline IntRes2d_Situation IntRes2d_Transition::Situation () const {
102
103   if (typetra!=IntRes2d_Touch) {
104     Standard_DomainError::Raise();
105   }
106   return situat;
107 }
108
109 inline Standard_Boolean IntRes2d_Transition::IsOpposite () const {
110
111   if (typetra!=IntRes2d_Touch) {
112     Standard_DomainError::Raise();
113   }
114   return oppos;
115 }
116