1 // Created on: 1992-03-31
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <Standard_DomainError.hxx>
19 //-------------------------------------------------
20 //-- hasfirst <--> status & 1
21 //-- haslast <--> status & 2
22 //-- closed <--> status & 4
23 //-------------------------------------------------
26 inline void IntRes2d_Domain::SetEquivalentParameters
27 (const Standard_Real p_first,
28 const Standard_Real p_last) {
29 if((status&3)!=3) { Standard_DomainError::Raise(); }
35 inline Standard_Boolean IntRes2d_Domain::HasFirstPoint () const {
36 return (status & 1) ? Standard_True : Standard_False;
39 inline Standard_Real IntRes2d_Domain::FirstParameter () const {
40 if(!(status&1)) { Standard_DomainError::Raise(); }
44 inline const gp_Pnt2d& IntRes2d_Domain::FirstPoint () const {
45 if(!(status&1)) { Standard_DomainError::Raise(); }
49 inline Standard_Real IntRes2d_Domain::FirstTolerance () const {
50 if(!(status&1)) { Standard_DomainError::Raise(); }
56 inline Standard_Boolean IntRes2d_Domain::HasLastPoint () const {
57 return (status & 2) ? Standard_True : Standard_False;
60 inline Standard_Real IntRes2d_Domain::LastParameter () const {
61 if(!(status&2)) { Standard_DomainError::Raise(); }
65 inline const gp_Pnt2d& IntRes2d_Domain::LastPoint () const {
66 if(!(status&2)) { Standard_DomainError::Raise(); }
70 inline Standard_Real IntRes2d_Domain::LastTolerance () const {
71 if(!(status&2)) { Standard_DomainError::Raise(); }
75 inline Standard_Boolean IntRes2d_Domain::IsClosed () const {
76 return (status & 4) ? Standard_True : Standard_False;
79 inline void IntRes2d_Domain::EquivalentParameters(Standard_Real& p_first,
80 Standard_Real& p_last) const