0024624: Lost word in license statement in source files
[occt.git] / src / IntRes2d / IntRes2d_Domain.lxx
CommitLineData
b311480e 1// Created on: 1992-03-31
2// Created by: Laurent BUCHARD
3// Copyright (c) 1992-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 <Standard_DomainError.hxx>
18
19//-------------------------------------------------
20//-- hasfirst <--> status & 1
21//-- haslast <--> status & 2
22//-- closed <--> status & 4
23//-------------------------------------------------
24
25
26inline void IntRes2d_Domain::SetEquivalentParameters
27 (const Standard_Real p_first,
28 const Standard_Real p_last) {
29 if((status&3)!=3) { Standard_DomainError::Raise(); }
30 status|=4;
31 periodfirst=p_first;
32 periodlast=p_last;
33}
34
35inline Standard_Boolean IntRes2d_Domain::HasFirstPoint () const {
36 return (status & 1) ? Standard_True : Standard_False;
37}
38
39inline Standard_Real IntRes2d_Domain::FirstParameter () const {
40 if(!(status&1)) { Standard_DomainError::Raise(); }
41 return(first_param);
42}
43
44inline const gp_Pnt2d& IntRes2d_Domain::FirstPoint () const {
45 if(!(status&1)) { Standard_DomainError::Raise(); }
46 return(first_point);
47}
48
49inline Standard_Real IntRes2d_Domain::FirstTolerance () const {
50 if(!(status&1)) { Standard_DomainError::Raise(); }
51 return(first_tol);
52}
53
54
55
56inline Standard_Boolean IntRes2d_Domain::HasLastPoint () const {
57 return (status & 2) ? Standard_True : Standard_False;
58}
59
60inline Standard_Real IntRes2d_Domain::LastParameter () const {
61 if(!(status&2)) { Standard_DomainError::Raise(); }
62 return(last_param);
63}
64
65inline const gp_Pnt2d& IntRes2d_Domain::LastPoint () const {
66 if(!(status&2)) { Standard_DomainError::Raise(); }
67 return(last_point);
68}
69
70inline Standard_Real IntRes2d_Domain::LastTolerance () const {
71 if(!(status&2)) { Standard_DomainError::Raise(); }
72 return(last_tol);
73}
74
75inline Standard_Boolean IntRes2d_Domain::IsClosed () const {
76 return (status & 4) ? Standard_True : Standard_False;
77}
78
79inline void IntRes2d_Domain::EquivalentParameters(Standard_Real& p_first,
80 Standard_Real& p_last) const
81{
82 p_first=periodfirst;
83 p_last=periodlast;
84}