Warnings on vc14 were eliminated
[occt.git] / src / IntImp / IntImp_Int2S.lxx
1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 //
4 // This file is part of Open CASCADE Technology software library.
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
11 //
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
14
15 #include <StdFail_NotDone.hxx>
16 #include <StdFail_UndefinedDerivative.hxx>
17 #include <Standard_DomainError.hxx>
18
19
20 inline Standard_Boolean IntImp_Int2S::IsDone()const { return done;}
21
22 inline Standard_Boolean IntImp_Int2S::IsEmpty() const
23
24   if (!done) throw StdFail_NotDone(" IntImp_Int2S::IsEmpty() ");
25   return empty;
26 }
27
28 inline const IntSurf_PntOn2S& IntImp_Int2S::Point() const
29
30   if (!done) throw StdFail_NotDone(" IntImp_Int2S::Point() ");
31   if (empty) throw Standard_DomainError(" IntImp_Int2S::Point() ");
32   return pint;
33 }
34
35 inline Standard_Boolean IntImp_Int2S::IsTangent () const {
36
37   if (!done) throw StdFail_NotDone(" IntImp_Int2S::IsTangent () ");
38   if (empty) throw Standard_DomainError(" IntImp_Int2S::IsTangent () ");
39   return tangent;
40 }
41
42 inline const gp_Dir& IntImp_Int2S::Direction () const {
43
44   if (!done) throw StdFail_NotDone(" IntImp_Int2S::Direction () ");
45   if (empty) throw Standard_DomainError(" IntImp_Int2S::Direction () ");
46   if (tangent) throw StdFail_UndefinedDerivative(" IntImp_Int2S::Direction () ");
47   return d3d;
48 }
49
50 inline const gp_Dir2d& IntImp_Int2S::DirectionOnS1 () const {
51
52   if (!done) throw StdFail_NotDone(" IntImp_Int2S::DirectionOnS1 () ");
53   if (empty) throw Standard_DomainError(" IntImp_Int2S::DirectionOnS1 () ");
54   if (tangent) throw StdFail_UndefinedDerivative(" IntImp_Int2S::DirectionOnS1 () ");
55   return d2d1;
56 }
57
58 inline const gp_Dir2d& IntImp_Int2S::DirectionOnS2 () const {
59
60   if (!done) throw StdFail_NotDone(" IntImp_Int2S::DirectionOnS2 () ");
61   if (empty) throw Standard_DomainError(" IntImp_Int2S::DirectionOnS2 () ");
62   if (tangent) throw StdFail_UndefinedDerivative(" IntImp_Int2S::DirectionOnS2 () ");
63   return d2d2;
64 }
65
66
67 inline IntImp_TheFunction& IntImp_Int2S::Function()  {
68   return myZerParFunc;
69
70
71 inline IntSurf_PntOn2S& IntImp_Int2S::ChangePoint()
72 {
73   return pint;
74 }