codac 1.5.6
Loading...
Searching...
No Matches
codac2_BoolInterval.h File Reference
#include <ostream>
Include dependency graph for codac2_BoolInterval.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum class  codac2::BoolInterval { }
 Enumeration representing a boolean interval. More...
 

Functions

std::ostream & codac2::operator<< (std::ostream &os, const BoolInterval &x)
 Streams out a BoolInterval.
 

Detailed Description

Date
2024
Author
Simon Rohou
License: GNU Lesser General Public License (LGPL)

Enumeration Type Documentation

◆ BoolInterval

enum class codac2::BoolInterval
strong

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,
27 EMPTY = 0x00,
29 UNKNOWN = 0x01 | 0x02
30 };
@ UNKNOWN
Definition codac2_BoolInterval.h:29
@ EMPTY
Definition codac2_BoolInterval.h:27

Function Documentation

◆ operator<<()

std::ostream & codac2::operator<< ( std::ostream & os,
const BoolInterval & x )
inline

Streams out a BoolInterval.

Parameters
osthe stream to be updated
xthe boolean interval to stream out
Returns
a reference to the updated stream
46 {
47 switch(x)
48 {
50 os << "[ empty ]";
51 break;
52 case BoolInterval::FALSE:
53 os << "[ false ]";
54 break;
55 case BoolInterval::TRUE:
56 os << "[ true ]";
57 break;
59 os << "[ true, false ]";
60 break;
61 }
62 return os;
63 }