BlocksProtocol::IntegerWithBitSize< numBits > Struct Template Reference

Public Types

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

Public Member Functions

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

Member Enumeration Documentation

◆ anonymous enum

template<int numBits>
anonymous enum
Enumerator
bits 
maxValue 

Constructor & Destructor Documentation

◆ IntegerWithBitSize() [1/3]

◆ IntegerWithBitSize() [2/3]

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

◆ 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 > &  )
defaultnoexcept

◆ operator uint32()

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

◆ get()

◆ 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


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