#include <Def/Cable.hpp>
A type-safe class for MIDI USB Cable numbers.
Public Member Functions | |
constexpr | Cable (uint8_t zeroBasedCable) |
Create a MIDI Cable object. | |
constexpr uint8_t | getRaw () const |
Get the cable as an integer. | |
constexpr uint8_t | getOneBased () const |
Get the cable as an integer. | |
constexpr bool | operator== (const Cable &rhs) const |
Check if two cables are the same. | |
constexpr bool | operator!= (const Cable &rhs) const |
Check if two cables are the different. | |
Cable & | operator+= (uint8_t rhs) |
Add an offset. | |
Cable | operator+ (uint8_t rhs) const |
Add an offset to a cable. | |
Cable & | operator-= (uint8_t rhs) |
Subtract an offset. | |
Cable | operator- (uint8_t rhs) const |
Subtract an offset from a cable. | |
Static Public Member Functions | |
static constexpr Cable | createCable (uint8_t oneBasedCable) |
Create a cable. | |
Private Attributes | |
uint8_t | zeroBasedCable: 4 |
Get the cable as an integer.