Jamba  3.0.2
pongasoft::VST::DiscreteValueParamConverter< StepCount > Class Template Reference

#include <ParamConverters.h>

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

Public Types

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

Public Member Functions

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

Private Attributes

char16 const * fFormat {}
 
int fToStringOffset {}
 
std::vector< ConstString > fToStringValues {}
 

Detailed Description

template<int StepCount>
class pongasoft::VST::DiscreteValueParamConverter< StepCount >

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<int StepCount>
using pongasoft::VST::DiscreteValueParamConverter< StepCount >::ParamType = int

Constructor & Destructor Documentation

◆ DiscreteValueParamConverter() [1/3]

template<int StepCount>
pongasoft::VST::DiscreteValueParamConverter< StepCount >::DiscreteValueParamConverter ( int  iToStringOffset = 0)
inlineexplicit

◆ DiscreteValueParamConverter() [2/3]

template<int StepCount>
pongasoft::VST::DiscreteValueParamConverter< StepCount >::DiscreteValueParamConverter ( char16 const *  iFormat,
int  iToStringOffset = 0 
)
inlineexplicit

◆ DiscreteValueParamConverter() [3/3]

template<int StepCount>
pongasoft::VST::DiscreteValueParamConverter< StepCount >::DiscreteValueParamConverter ( std::array< ConstString, StepCount+1 > const &  iToStringValues)
inlineexplicit

Member Function Documentation

◆ denormalize()

template<int StepCount>
int pongasoft::VST::DiscreteValueParamConverter< StepCount >::denormalize ( ParamValue  iNormalizedValue) const
inlineoverridevirtual

◆ getStepCount()

template<int StepCount>
int pongasoft::VST::DiscreteValueParamConverter< StepCount >::getStepCount ( ) const
inlineoverridevirtual

◆ normalize()

template<int StepCount>
ParamValue pongasoft::VST::DiscreteValueParamConverter< StepCount >::normalize ( int const &  iDiscreteValue) const
inlineoverridevirtual

◆ toString()

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

Member Data Documentation

◆ fFormat

template<int StepCount>
char16 const* pongasoft::VST::DiscreteValueParamConverter< StepCount >::fFormat {}
private

◆ fToStringOffset

template<int StepCount>
int pongasoft::VST::DiscreteValueParamConverter< StepCount >::fToStringOffset {}
private

◆ fToStringValues

template<int StepCount>
std::vector<ConstString> pongasoft::VST::DiscreteValueParamConverter< StepCount >::fToStringValues {}
private

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