JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::midi_ci::MUID Class Reference

A 28-bit ID that uniquely identifies a device taking part in a series of MIDI-CI transactions. More...

#include <juce_CIMuid.h>

Collaboration diagram for juce::midi_ci::MUID:

Public Member Functions

constexpr uint32_t get () const
 Returns the ID as a plain integer.
 
bool operator!= (const MUID other) const
 
bool operator< (const MUID other) const
 
bool operator== (const MUID other) const
 

Static Public Member Functions

static constexpr MUID getBroadcast ()
 Returns the special MUID representing the broadcast address.
 
static std::optional< MUIDmake (uint32_t v)
 Returns a MUID if the provided value is within the valid range for MUID values; otherwise returns nullopt.
 
static MUID makeRandom (Random &r)
 Makes a random MUID using the provided random engine.
 
static MUID makeUnchecked (uint32_t v)
 Converts the provided integer to a MUID without validation that it is within the allowed range.
 

Private Member Functions

constexpr MUID (uint32_t v)
 

Private Attributes

uint32_t value {}
 

Static Private Attributes

static constexpr uint32_t mask = 0x0fffffff
 
static constexpr uint32_t userMuidEnd = 0x0fffff00
 

Detailed Description

A 28-bit ID that uniquely identifies a device taking part in a series of MIDI-CI transactions.

@tags{Audio}

Constructor & Destructor Documentation

◆ MUID()

constexpr juce::midi_ci::MUID::MUID ( uint32_t  v)
inlineexplicitconstexprprivate

Member Function Documentation

◆ get()

constexpr uint32_t juce::midi_ci::MUID::get ( ) const
inlineconstexpr

Returns the ID as a plain integer.

References value.

◆ getBroadcast()

static constexpr MUID juce::midi_ci::MUID::getBroadcast ( )
inlinestaticconstexpr

Returns the special MUID representing the broadcast address.

References mask.

◆ make()

static std::optional< MUID > juce::midi_ci::MUID::make ( uint32_t  v)
inlinestatic

Returns a MUID if the provided value is within the valid range for MUID values; otherwise returns nullopt.

References makeUnchecked(), and mask.

◆ makeRandom()

static MUID juce::midi_ci::MUID::makeRandom ( Random r)
inlinestatic

Makes a random MUID using the provided random engine.

References makeUnchecked(), and userMuidEnd.

◆ makeUnchecked()

static MUID juce::midi_ci::MUID::makeUnchecked ( uint32_t  v)
inlinestatic

Converts the provided integer to a MUID without validation that it is within the allowed range.

References jassert, and mask.

Referenced by make(), and makeRandom().

◆ operator!=()

bool juce::midi_ci::MUID::operator!= ( const MUID  other) const
inline

References value.

◆ operator<()

bool juce::midi_ci::MUID::operator< ( const MUID  other) const
inline

References value.

◆ operator==()

bool juce::midi_ci::MUID::operator== ( const MUID  other) const
inline

References value.

Member Data Documentation

◆ mask

constexpr uint32_t juce::midi_ci::MUID::mask = 0x0fffffff
staticconstexprprivate

Referenced by getBroadcast(), make(), and makeUnchecked().

◆ userMuidEnd

constexpr uint32_t juce::midi_ci::MUID::userMuidEnd = 0x0fffff00
staticconstexprprivate

Referenced by makeRandom().

◆ value

uint32_t juce::midi_ci::MUID::value {}
private

Referenced by get(), operator!=(), operator<(), and operator==().


The documentation for this class was generated from the following file: