JUCE
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
BlocksProtocol::IntegerWithBitSize< numBits > Struct Template Reference

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

Public Types

enum  { bits = numBits, maxValue = static_cast<uint32> ((1ULL << numBits) - 1ULL) }
 

Public Member Functions

 IntegerWithBitSize ()=default
 
 IntegerWithBitSize (const IntegerWithBitSize &)=default
 
IntegerWithBitSizeoperator= (const IntegerWithBitSize &)=default
 
 IntegerWithBitSize (uint32 v) noexcept
 
 operator uint32 () const noexcept
 
uint32 get () const noexcept
 
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

uint32 value = 0
 

Detailed Description

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

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

Member Enumeration Documentation

◆ anonymous enum

template<int numBits>
anonymous enum
Enumerator
bits 
maxValue 

Constructor & Destructor Documentation

◆ IntegerWithBitSize() [1/3]

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

◆ IntegerWithBitSize() [2/3]

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

◆ IntegerWithBitSize() [3/3]

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

Member Function Documentation

◆ operator=()

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

◆ operator uint32()

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

◆ get()

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

◆ getScaledToByte()

template<int numBits>
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()

template<int numBits>
static IntegerWithBitSize BlocksProtocol::IntegerWithBitSize< numBits >::fromUnipolarFloat ( float  value)
staticnoexcept

◆ fromBipolarFloat()

template<int numBits>
static IntegerWithBitSize BlocksProtocol::IntegerWithBitSize< numBits >::fromBipolarFloat ( float  value)
staticnoexcept

Member Data Documentation

◆ value

template<int numBits>
uint32 BlocksProtocol::IntegerWithBitSize< numBits >::value = 0

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