33#include <NDEVR/BaseValues.h>
34#include <NDEVR/BitFlag.h>
48 lib_assert(bit < 8,
"Bit out of expected range");
51 : m_flag(reference.m_flag)
52 , m_bit(reference.m_bit)
55 [[nodiscard]]
constexpr bool get()
const
59 constexpr void set(
const bool& value)
70 m_flag(m_bit, b.
get());
75 m_flag(m_bit, b ||
get());
80 m_flag(m_bit, b.
get() ||
get());
91 constexpr operator bool()
const
97 return !m_flag[m_bit];
107 return static_cast<t_to
>(value.
get());
#define lib_assert(expression, message)
Definition LibAssert.h:61
A bitset that stores 8 bits (elements with only two possible values: 0 or 1, true or false,...
Definition BitFlag.hpp:55
A convenience class used with Buffers or Vectors of bools for referencing or acting on a single bit.
Definition BitReference.hpp:42
constexpr BitReference & operator=(const bool &b)
Definition BitReference.hpp:63
constexpr BitReference(const BitReference &reference)
Definition BitReference.hpp:50
constexpr BitReference & operator|=(const bool &b)
Definition BitReference.hpp:73
constexpr bool get() const
Definition BitReference.hpp:55
constexpr BitReference & operator|=(const BitReference &b)
Definition BitReference.hpp:78
constexpr BitReference & operator=(const BitReference &b)
Definition BitReference.hpp:68
constexpr bool operator==(const bool &b) const
Definition BitReference.hpp:83
constexpr bool operator!=(const bool &b) const
Definition BitReference.hpp:87
constexpr bool operator!() const
Definition BitReference.hpp:95
constexpr void set(const bool &value)
Definition BitReference.hpp:59
constexpr BitReference(BitFlag &flag, uint01 bit)
Definition BitReference.hpp:44
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:80
constexpr t_to cast(const Angle< t_from > &value)
Definition Angle.h:375