A type-safe utility class for saving a MIDI address consisting of a 7-bit address, a 4-bit channel, and a 4-bit cable number. More...
#include <Def/MIDICNChannelAddress.hpp>
Public Member Functions | |
constexpr | MIDICNChannelAddress () |
constexpr | MIDICNChannelAddress (int address, MIDICNChannel channelCN) |
constexpr | MIDICNChannelAddress (int address, Channel channel=CHANNEL_1, int cableNumber=0x0) |
constexpr | MIDICNChannelAddress (Channel channel, int cableNumber=0x0) |
constexpr | MIDICNChannelAddress (const MIDICNChannel &address) |
MIDICNChannelAddress & | operator+= (const RelativeMIDICNChannelAddress &rhs) |
MIDICNChannelAddress & | operator-= (const RelativeMIDICNChannelAddress &rhs) |
MIDICNChannelAddress | operator+ (const RelativeMIDICNChannelAddress &rhs) const |
MIDICNChannelAddress | operator- (const RelativeMIDICNChannelAddress &rhs) const |
constexpr bool | operator== (const MIDICNChannelAddress &rhs) const |
constexpr bool | operator!= (const MIDICNChannelAddress &rhs) const |
constexpr uint8_t | getAddress () const |
Get the address [0, 127]. More... | |
constexpr Channel | getChannel () const |
Get the channel [CHANNEL_1, CHANNEL_16]. More... | |
constexpr uint8_t | getRawChannel () const |
Get the channel [0, 15]. More... | |
constexpr uint8_t | getCableNumber () const |
Get the cable number [0, 15]. More... | |
constexpr bool | isValid () const |
Check if the MIDI address is valid. More... | |
constexpr | operator bool () const |
Check if the MIDI address is valid. More... | |
Static Public Member Functions | |
static bool | matchSingle (const MIDICNChannelAddress &toMatch, const MIDICNChannelAddress &base) |
Check if two addresses match. More... | |
static bool | matchAddressInRange (const MIDICNChannelAddress &toMatch, const MIDICNChannelAddress &base, uint8_t length) |
Check if an address falls within a range of addresses, starting with address base , with a given length. More... | |
constexpr static MIDICNChannelAddress | invalid () |
Private Attributes | |
RawMIDICNChannelAddress | addresses |
A type-safe utility class for saving a MIDI address consisting of a 7-bit address, a 4-bit channel, and a 4-bit cable number.
Definition at line 82 of file MIDICNChannelAddress.hpp.
|
inlineconstexpr |
Definition at line 84 of file MIDICNChannelAddress.hpp.
|
inlineconstexpr |
Definition at line 91 of file MIDICNChannelAddress.hpp.
|
inlineconstexpr |
Definition at line 98 of file MIDICNChannelAddress.hpp.
|
inlineconstexpr |
Definition at line 106 of file MIDICNChannelAddress.hpp.
|
inlineconstexpr |
Definition at line 113 of file MIDICNChannelAddress.hpp.
MIDICNChannelAddress & operator+= | ( | const RelativeMIDICNChannelAddress & | rhs | ) |
Definition at line 6 of file MIDICNChannelAddress.cpp.
MIDICNChannelAddress & operator-= | ( | const RelativeMIDICNChannelAddress & | rhs | ) |
Definition at line 18 of file MIDICNChannelAddress.cpp.
MIDICNChannelAddress operator+ | ( | const RelativeMIDICNChannelAddress & | rhs | ) | const |
Definition at line 30 of file MIDICNChannelAddress.cpp.
MIDICNChannelAddress operator- | ( | const RelativeMIDICNChannelAddress & | rhs | ) | const |
Definition at line 37 of file MIDICNChannelAddress.cpp.
|
inlineconstexpr |
Definition at line 126 of file MIDICNChannelAddress.hpp.
|
inlineconstexpr |
Definition at line 133 of file MIDICNChannelAddress.hpp.
|
inlineconstexpr |
Get the address [0, 127].
Definition at line 141 of file MIDICNChannelAddress.hpp.
|
inlineconstexpr |
Get the channel [CHANNEL_1, CHANNEL_16].
Definition at line 144 of file MIDICNChannelAddress.hpp.
|
inlineconstexpr |
Get the channel [0, 15].
Definition at line 148 of file MIDICNChannelAddress.hpp.
|
inlineconstexpr |
Get the cable number [0, 15].
Definition at line 151 of file MIDICNChannelAddress.hpp.
|
inlineconstexpr |
Check if the MIDI address is valid.
Definition at line 154 of file MIDICNChannelAddress.hpp.
|
inlineexplicitconstexpr |
Check if the MIDI address is valid.
Definition at line 158 of file MIDICNChannelAddress.hpp.
|
static |
Check if two addresses match.
Definition at line 43 of file MIDICNChannelAddress.cpp.
|
static |
Check if an address falls within a range of addresses, starting with address base
, with a given length.
Definition at line 48 of file MIDICNChannelAddress.cpp.
|
inlinestaticconstexpr |
Definition at line 170 of file MIDICNChannelAddress.hpp.
|
private |
Definition at line 173 of file MIDICNChannelAddress.hpp.