#include <ostream>
Go to the source code of this file.
- Date
- 2024
- Author
- Simon Rohou
- Copyright
- Copyright 2024 Codac Team
- License: GNU Lesser General Public License (LGPL)
◆ BoolInterval
Enumeration representing a boolean interval.
The logical operators &
and |
can be used to combine BoolInterval
values.
Enumerator |
---|
EMPTY | EMPTY is equivalent to the operation TRUE & FALSE .
|
UNKNOWN | UNKNOWN is equivalent to the operation TRUE | FALSE .
|
23 {
24 FALSE = 0x01,
25 TRUE = 0x02,
30 };
@ UNKNOWN
Definition codac2_BoolInterval.h:29
@ EMPTY
Definition codac2_BoolInterval.h:27
◆ operator~()
Returns the complementary of a BoolInterval.
- Parameters
-
- Returns
- the complementary
45 {
46 switch(x)
47 {
48 case BoolInterval::FALSE:
49 return BoolInterval::TRUE;
50 case BoolInterval::TRUE:
51 return BoolInterval::FALSE;
52 default:
54 }
55 }
◆ operator<<()
std::ostream & codac2::operator<< |
( |
std::ostream & | os, |
|
|
const BoolInterval & | x ) |
|
inline |
Streams out a BoolInterval.
- Parameters
-
os | the stream to be updated |
x | the boolean interval to stream out |
- Returns
- a reference to the updated stream
65 {
66 switch(x)
67 {
69 os << "[ empty ]";
70 break;
71 case BoolInterval::FALSE:
72 os << "[ false ]";
73 break;
74 case BoolInterval::TRUE:
75 os << "[ true ]";
76 break;
78 os << "[ true, false ]";
79 break;
80 }
81 return os;
82 }