Jamba  3.2.0
pongasoft::VST::DiscreteValueParamConverter< StepCount, IntType > Class Template Reference

#include <ParamConverters.h>

Inherits pongasoft::VST::IParamConverter< IntType >.

Public Types

using ParamType = IntType
 
- Public Types inherited from pongasoft::VST::IParamConverter< IntType >
using ParamType = IntType
 

Public Member Functions

ParamType denormalize (ParamValue iNormalizedValue) const override
 
 DiscreteValueParamConverter (IntType iToStringOffset=0)
 
 DiscreteValueParamConverter (VstString16 iFormat, IntType iToStringOffset=0)
 
 DiscreteValueParamConverter (std::array< VstString16, StepCount+1 > const &iToStringValues)
 
int32 getStepCount () const override
 
ParamValue normalize (ParamType const &iDiscreteValue) const override
 
void toString (ParamType const &iValue, String128 oString, int32) const override
 
- Public Member Functions inherited from pongasoft::VST::IParamConverter< IntType >
virtual std::string toString (ParamType const &iValue, int32 iPrecision) const
 

Private Attributes

VstString16 fFormat {}
 
IntType fToStringOffset {}
 
std::vector< VstString16fToStringValues {}
 

Detailed Description

template<int32 StepCount, typename IntType = int>
class pongasoft::VST::DiscreteValueParamConverter< StepCount, IntType >

A converter to deal with a discrete value which has StepCount steps. It follows the formulas given in the SDK documentation. Note that the number of steps is always -1 from the number of values. For example for 3 values (0, 1, 2) the number of steps is 2.

Member Typedef Documentation

◆ ParamType

template<int32 StepCount, typename IntType = int>
using pongasoft::VST::DiscreteValueParamConverter< StepCount, IntType >::ParamType = IntType

Constructor & Destructor Documentation

◆ DiscreteValueParamConverter() [1/3]

template<int32 StepCount, typename IntType = int>
pongasoft::VST::DiscreteValueParamConverter< StepCount, IntType >::DiscreteValueParamConverter ( IntType  iToStringOffset = 0)
inlineexplicit

◆ DiscreteValueParamConverter() [2/3]

template<int32 StepCount, typename IntType = int>
pongasoft::VST::DiscreteValueParamConverter< StepCount, IntType >::DiscreteValueParamConverter ( VstString16  iFormat,
IntType  iToStringOffset = 0 
)
inlineexplicit

◆ DiscreteValueParamConverter() [3/3]

template<int32 StepCount, typename IntType = int>
pongasoft::VST::DiscreteValueParamConverter< StepCount, IntType >::DiscreteValueParamConverter ( std::array< VstString16, StepCount+1 > const &  iToStringValues)
inlineexplicit

Member Function Documentation

◆ denormalize()

template<int32 StepCount, typename IntType = int>
ParamType pongasoft::VST::DiscreteValueParamConverter< StepCount, IntType >::denormalize ( ParamValue  iNormalizedValue) const
inlineoverridevirtual

◆ getStepCount()

template<int32 StepCount, typename IntType = int>
int32 pongasoft::VST::DiscreteValueParamConverter< StepCount, IntType >::getStepCount ( ) const
inlineoverridevirtual

◆ normalize()

template<int32 StepCount, typename IntType = int>
ParamValue pongasoft::VST::DiscreteValueParamConverter< StepCount, IntType >::normalize ( ParamType const &  iDiscreteValue) const
inlineoverridevirtual

◆ toString()

template<int32 StepCount, typename IntType = int>
void pongasoft::VST::DiscreteValueParamConverter< StepCount, IntType >::toString ( ParamType const &  iValue,
String128  oString,
int32   
) const
inlineoverridevirtual

Member Data Documentation

◆ fFormat

template<int32 StepCount, typename IntType = int>
VstString16 pongasoft::VST::DiscreteValueParamConverter< StepCount, IntType >::fFormat {}
private

◆ fToStringOffset

template<int32 StepCount, typename IntType = int>
IntType pongasoft::VST::DiscreteValueParamConverter< StepCount, IntType >::fToStringOffset {}
private

◆ fToStringValues

template<int32 StepCount, typename IntType = int>
std::vector<VstString16> pongasoft::VST::DiscreteValueParamConverter< StepCount, IntType >::fToStringValues {}
private

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