39 #ifndef OME_COMMON_BOOLEAN_H 40 #define OME_COMMON_BOOLEAN_H 49 #pragma push_macro("min") 51 #pragma push_macro("max") 92 value(
std::numeric_limits<uint8_t>::min())
101 value(value ?
std::numeric_limits<uint8_t>::max() :
std::numeric_limits<uint8_t>::min())
118 operator bool()
const 120 return value != std::numeric_limits<uint8_t>::min();
132 this->
value = (rhs ? std::numeric_limits<uint8_t>::max() : std::numeric_limits<uint8_t>::min());
157 return !
static_cast<bool>(*this);
176 return static_cast<bool>(lhs) == rhs;
190 return lhs ==
static_cast<bool>(rhs);
204 return static_cast<bool>(lhs) == static_cast<bool>(rhs);
218 return static_cast<bool>(lhs) != rhs;
232 return lhs !=
static_cast<bool>(rhs);
246 return static_cast<bool>(lhs) != static_cast<bool>(rhs);
256 template<
class charT,
class traits>
257 inline std::basic_ostream<charT,traits>&
258 operator<< (std::basic_ostream<charT,traits>& os,
261 return os << static_cast<bool>(rhs);
271 template<
class charT,
class traits>
272 inline std::basic_istream<charT,traits>&
287 #pragma pop_macro("min") 288 #pragma pop_macro("max") 291 #endif // OME_COMMON_BOOLEAN_H uint8_t value
The boolean value.
Definition: boolean.h:162
boolean(bool value)
Construct with initial value.
Definition: boolean.h:100
bool operator!=(const boolean &lhs, bool rhs)
Compare boolean with bool for inequality.
Definition: boolean.h:215
boolean()
Default construct.
Definition: boolean.h:91
bool operator==(const boolean &lhs, bool rhs)
Compare boolean with bool for equality.
Definition: boolean.h:173
boolean operator!() const
Not operator.
Definition: boolean.h:155
Boolean type with guaranteed size, alignment and storage values.
Definition: boolean.h:80
boolean & operator=(const boolean &rhs)
Assign value.
Definition: boolean.h:143
Open Microscopy Environment C++.
Definition: base64.h:49
boolean(const boolean &value)
Copy construct.
Definition: boolean.h:109
boolean & operator=(bool rhs)
Assign value.
Definition: boolean.h:130
uint8_t value_type
Value type for Boolean values.
Definition: boolean.h:84
std::basic_istream< charT, traits > & operator>>(std::basic_istream< charT, traits > &is, boolean &rhs)
Set boolean from input stream.
Definition: boolean.h:273