A strongly-typed identifier for a 7-bit request ID with a nullable state. More...
Public Member Functions | |
std::byte | asByte () const |
Returns the byte corresponding to this ID. | |
uint8_t | asInt () const |
Returns the int value of this ID. | |
bool | operator== (RequestID other) const |
Equality operator. | |
bool | operator!= (RequestID other) const |
Inequality operator. | |
Static Public Member Functions | |
static std::optional< RequestID > | create (uint8_t v) |
Constructs a RequestID if the provided value is valid, i.e. | |
static std::optional< RequestID > | create (std::byte value) |
Constructs a RequestID if the provided value is valid, i.e. | |
A strongly-typed identifier for a 7-bit request ID with a nullable state.
|
static |
|
static |
std::byte midi_ci::RequestID::asByte | ( | ) | const |
Returns the byte corresponding to this ID.
uint8_t midi_ci::RequestID::asInt | ( | ) | const |
Returns the int value of this ID.
bool midi_ci::RequestID::operator== | ( | RequestID | other | ) | const |
Equality operator.
Referenced by operator!=().
bool midi_ci::RequestID::operator!= | ( | RequestID | other | ) | const |
Inequality operator.
References operator==().