Orxonox  0.0.5 Codename: Arcturus
Public Types | Public Member Functions | Public Attributes | List of all members
orxonox::tribool Class Reference

A 3-state boolean type. More...

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/util/tribool.h>

Public Types

enum  value_t { false_value, true_value, dontcare_value }
 The actual stored value in this 3-state boolean, which may be false, true, or dontcare. More...
 

Public Member Functions

constexpr tribool ()
 Construct a new 3-state boolean value with the value 'false'. More...
 
constexpr tribool (bool value)
 Construct a new 3-state boolean value with the given boolean value, which may be true or false. More...
 
constexpr tribool (dontcare_keyword_t)
 Construct a new 3-state boolean value with an dontcare value. More...
 
constexpr bool operator!= (tribool y) const
 Compare tribools for inequality. More...
 
constexpr bool operator!= (bool y) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
constexpr bool operator!= (dontcare_keyword_t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
constexpr bool operator== (tribool y) const
 Compare tribools for equality. More...
 
constexpr bool operator== (bool y) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
constexpr bool operator== (dontcare_keyword_t) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 

Public Attributes

enum orxonox::tribool::value_t value
 

Detailed Description

A 3-state boolean type.

3-state boolean values are either true, false, or dontcare.

Member Enumeration Documentation

The actual stored value in this 3-state boolean, which may be false, true, or dontcare.

Enumerator
false_value 
true_value 
dontcare_value 

Constructor & Destructor Documentation

constexpr orxonox::tribool::tribool ( )
inline

Construct a new 3-state boolean value with the value 'false'.

Exceptions
nothrow
constexpr orxonox::tribool::tribool ( bool  value)
inline

Construct a new 3-state boolean value with the given boolean value, which may be true or false.

Exceptions
nothrow
constexpr orxonox::tribool::tribool ( dontcare_keyword_t  )
inline

Construct a new 3-state boolean value with an dontcare value.

Exceptions
nothrow

Member Function Documentation

constexpr bool orxonox::tribool::operator!= ( tribool  y) const
inline

Compare tribools for inequality.

Returns
the result of comparing two tribool values for inequality.
Exceptions
nothrow
constexpr bool orxonox::tribool::operator!= ( bool  y) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

constexpr bool orxonox::tribool::operator!= ( dontcare_keyword_t  ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

constexpr bool orxonox::tribool::operator== ( tribool  y) const
inline

Compare tribools for equality.

Returns
the result of comparing two tribool values.
Exceptions
nothrow
constexpr bool orxonox::tribool::operator== ( bool  y) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

constexpr bool orxonox::tribool::operator== ( dontcare_keyword_t  ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Member Data Documentation

enum orxonox::tribool::value_t orxonox::tribool::value

The documentation for this class was generated from the following file: