0027772: Foundation Classes - define Standard_Boolean using C++ type "bool" instead...
[occt.git] / src / HLRAlgo / HLRAlgo_EdgeStatus.lxx
1 // Created on: 1992-02-18
2 // Created by: Christophe MARION
3 // Copyright (c) 1992-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #define EMaskAllHidden  ((Standard_Boolean)1)
18 #define EMaskAllVisible ((Standard_Boolean)2)
19
20 //=======================================================================
21 //function : Bounds
22 //purpose  : 
23 //=======================================================================
24
25 inline void HLRAlgo_EdgeStatus::Bounds 
26 ( Standard_Real& Start, Standard_ShortReal& TolStart,
27   Standard_Real& End  , Standard_ShortReal& TolEnd  ) const
28 {
29   Start    = myStart;
30   TolStart = myTolStart;
31   End      = myEnd;
32   TolEnd   = myTolEnd;
33 }
34
35 //=======================================================================
36 //function : HideAll
37 //purpose  : 
38 //=======================================================================
39
40 inline void HLRAlgo_EdgeStatus::HideAll()
41 {
42   AllVisible(Standard_False);
43   AllHidden (Standard_True);
44 }
45
46 //=======================================================================
47 //function : ShowAll
48 //purpose  : 
49 //=======================================================================
50
51 inline void HLRAlgo_EdgeStatus::ShowAll()
52 {
53   AllVisible(Standard_True);
54   AllHidden (Standard_False);
55 }
56
57 //=======================================================================
58 //function : AllHidden
59 //purpose  : 
60 //=======================================================================
61
62 inline Standard_Boolean HLRAlgo_EdgeStatus::AllHidden () const
63 { return (myFlags & EMaskAllHidden) != 0; }
64
65 //=======================================================================
66 //function : AllHidden
67 //purpose  : 
68 //=======================================================================
69
70 inline void HLRAlgo_EdgeStatus::AllHidden (const Standard_Boolean B)
71 {
72   if (B) myFlags |=  EMaskAllHidden;
73   else   myFlags &= ~EMaskAllHidden;
74 }
75
76 //=======================================================================
77 //function : AllVisible
78 //purpose  : 
79 //=======================================================================
80
81 inline Standard_Boolean HLRAlgo_EdgeStatus::AllVisible () const
82 { return (myFlags & EMaskAllVisible) != 0; }
83
84 //=======================================================================
85 //function : AllVisible
86 //purpose  : 
87 //=======================================================================
88
89 inline void HLRAlgo_EdgeStatus::AllVisible (const Standard_Boolean B)
90 {
91   if (B) myFlags |=  EMaskAllVisible;
92   else   myFlags &= ~EMaskAllVisible;
93 }