1 // Created on: 1992-03-31
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
24 #include <Standard_DomainError.hxx>
26 //-------------------------------------------------
27 //-- hasfirst <--> status & 1
28 //-- haslast <--> status & 2
29 //-- closed <--> status & 4
30 //-------------------------------------------------
33 inline void IntRes2d_Domain::SetEquivalentParameters
34 (const Standard_Real p_first,
35 const Standard_Real p_last) {
36 if((status&3)!=3) { Standard_DomainError::Raise(); }
42 inline Standard_Boolean IntRes2d_Domain::HasFirstPoint () const {
43 return (status & 1) ? Standard_True : Standard_False;
46 inline Standard_Real IntRes2d_Domain::FirstParameter () const {
47 if(!(status&1)) { Standard_DomainError::Raise(); }
51 inline const gp_Pnt2d& IntRes2d_Domain::FirstPoint () const {
52 if(!(status&1)) { Standard_DomainError::Raise(); }
56 inline Standard_Real IntRes2d_Domain::FirstTolerance () const {
57 if(!(status&1)) { Standard_DomainError::Raise(); }
63 inline Standard_Boolean IntRes2d_Domain::HasLastPoint () const {
64 return (status & 2) ? Standard_True : Standard_False;
67 inline Standard_Real IntRes2d_Domain::LastParameter () const {
68 if(!(status&2)) { Standard_DomainError::Raise(); }
72 inline const gp_Pnt2d& IntRes2d_Domain::LastPoint () const {
73 if(!(status&2)) { Standard_DomainError::Raise(); }
77 inline Standard_Real IntRes2d_Domain::LastTolerance () const {
78 if(!(status&2)) { Standard_DomainError::Raise(); }
82 inline Standard_Boolean IntRes2d_Domain::IsClosed () const {
83 return (status & 4) ? Standard_True : Standard_False;
86 inline void IntRes2d_Domain::EquivalentParameters(Standard_Real& p_first,
87 Standard_Real& p_last) const