The BLOCKS SDK
BlocksProtocol::IntegerWithBitSize< numBits > Struct Template Reference

Description

template<int numBits>
struct BlocksProtocol::IntegerWithBitSize< numBits >

Helper class to define an integer with a specific bit size.

Public Member Functions

 IntegerWithBitSize ()=default
 
 IntegerWithBitSize (const IntegerWithBitSize &)=default
 
IntegerWithBitSizeoperator= (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) }
 

Constructor & Destructor Documentation

◆ IntegerWithBitSize() [1/3]

◆ IntegerWithBitSize() [2/3]

template<int numBits>
BlocksProtocol::IntegerWithBitSize< numBits >::IntegerWithBitSize ( const IntegerWithBitSize< numBits > &  )
default

◆ IntegerWithBitSize() [3/3]

template<int numBits>
BlocksProtocol::IntegerWithBitSize< numBits >::IntegerWithBitSize ( juce::uint32  v)
noexcept

Member Function Documentation

◆ operator=()

template<int numBits>
IntegerWithBitSize& BlocksProtocol::IntegerWithBitSize< numBits >::operator= ( const IntegerWithBitSize< numBits > &  )
default

◆ operator juce::uint32()

template<int numBits>
BlocksProtocol::IntegerWithBitSize< numBits >::operator juce::uint32 ( ) const
noexcept

◆ get()

◆ getScaledToByte()

template<int numBits>
juce::uint8 BlocksProtocol::IntegerWithBitSize< numBits >::getScaledToByte ( ) const
noexcept

◆ toUnipolarFloat()

template<int numBits>
float BlocksProtocol::IntegerWithBitSize< numBits >::toUnipolarFloat ( ) const
noexcept

◆ toBipolarFloat()

template<int numBits>
float BlocksProtocol::IntegerWithBitSize< numBits >::toBipolarFloat ( ) const
noexcept

◆ fromUnipolarFloat()

◆ fromBipolarFloat()

Member Enumeration Documentation

◆ anonymous enum

template<int numBits>
anonymous enum
Enumerator
bits 
maxValue 

Member Data Documentation

◆ value


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