1.10 |
#include <bitfields.h>
Public Member Functions | |
constexpr | BitFields () noexcept=default |
BitFields (BitFields &&) noexcept=default | |
constexpr | BitFields (const BitFields &rhs) noexcept |
Copy constructor. | |
BitFields (const char *str) | |
BitFields (const std::string &str) | |
constexpr | BitFields (const T &field) |
~BitFields () noexcept=default | |
bool | clear () |
Clear all bit-fields. | |
bool | clear (const T &field) |
Clear a single bit-field. | |
bool | empty () const |
void | from_string (const std::string &str) |
Convert from string. | |
EGT_NODISCARD constexpr bool | is_set (const T &field) const noexcept |
bool | operator!= (const BitFields &rhs) const |
BitFields & | operator= (BitFields &&) noexcept=default |
BitFields & | operator= (const BitFields &rhs) |
Assignment operator. | |
bool | operator== (const BitFields &rhs) const |
constexpr BitFields< T > | operator| (const T &field) const noexcept |
Or operator. | |
bool | set (const T &field) |
Set a single bit-field. | |
EGT_NODISCARD std::string | to_string () const |
Convert the bit-fields to strings. | |
Public Attributes | |
Signal | on_change |
Event signal. | |
Static Public Attributes | |
static constexpr const char | BITFIELDS_DELIMITER = '|' |
Delimiter used to separate bit-fields in string representation. | |
Protected Member Functions | |
bool | update (uint32_t new_word) |
Protected Attributes | |
uint32_t | m_word {0} |
|
constexprdefaultnoexcept |
|
inlineexplicit |
[in] | str | String representation of the bit-fields. |
|
inlineexplicit |
[in] | str | String representation of the bit-fields. |
|
inlineconstexpr |
Copy constructor.
|
defaultnoexcept |
|
inline |
Clear all bit-fields.
|
inline |
Clear a single bit-field.
|
inline |
|
inline |
Convert from string.
|
inlineconstexprnoexcept |
|
inline |
|
inline |
|
inlineconstexprnoexcept |
Or operator.
|
inline |
Set a single bit-field.
|
inline |
Convert the bit-fields to strings.
|
inlineprotected |
|
staticconstexpr |
Delimiter used to separate bit-fields in string representation.
|
protected |