Helper class to define an integer with a specific bit size.
Public Member Functions | |
IntegerWithBitSize ()=default | |
IntegerWithBitSize (const IntegerWithBitSize &)=default | |
IntegerWithBitSize & | operator= (const IntegerWithBitSize &)=default |
IntegerWithBitSize (juce::uint32 v) noexcept | |
operator juce::uint32 () const noexcept | |
juce::uint32 | get () const noexcept |
juce::uint8 | getScaledToByte () const noexcept |
float | toUnipolarFloat () const noexcept |
float | toBipolarFloat () const noexcept |
Static Public Member Functions | |
static IntegerWithBitSize | fromUnipolarFloat (float value) noexcept |
static IntegerWithBitSize | fromBipolarFloat (float value) noexcept |
Public Attributes | |
juce::uint32 | value = 0 |
Public Types | |
enum | { bits = numBits , maxValue = static_cast<juce::uint32> ((1ULL << numBits) - 1ULL) } |
|
default |
|
default |
|
noexcept |
|
default |
|
noexcept |
|
noexcept |
References BlocksProtocol::IntegerWithBitSize< numBits >::value.
Referenced by BlocksProtocol::HostPacketDecoder< Handler >::handleButtonDownOrUp(), BlocksProtocol::HostPacketDecoder< Handler >::handleConfigMessage(), BlocksProtocol::HostPacketDecoder< Handler >::handleCustomMessage(), BlocksProtocol::HostPacketDecoder< Handler >::handleTouch(), and BlocksProtocol::HostPacketDecoder< Handler >::handleTouchWithVelocity().
|
noexcept |
|
noexcept |
|
noexcept |
|
staticnoexcept |
|
staticnoexcept |
juce::uint32 BlocksProtocol::IntegerWithBitSize< numBits >::value = 0 |
Referenced by BlocksProtocol::IntegerWithBitSize< numBits >::fromBipolarFloat(), BlocksProtocol::IntegerWithBitSize< numBits >::fromUnipolarFloat(), BlocksProtocol::IntegerWithBitSize< numBits >::get(), BlocksProtocol::IntegerWithBitSize< numBits >::getScaledToByte(), BlocksProtocol::IntegerWithBitSize< numBits >::operator juce::uint32(), BlocksProtocol::IntegerWithBitSize< numBits >::toBipolarFloat(), and BlocksProtocol::IntegerWithBitSize< numBits >::toUnipolarFloat().