Jamba C++ API 7.5.0
Loading...
Searching...
No Matches
DiscreteValueParamConverter< StepCount, IntType > Class Template Reference

A converter to deal with a discrete value which has StepCount steps. More...

#include <ParamConverters.h>

Inherits IParamConverter< int32 >.

Public Types

using ConstructorType = std::array<VstString16, StepCount + 1> const &
 Defines the type for the constructor argument.
using ParamType = IntType
Public Types inherited from IParamConverter< int32 >
using ParamType

Public Member Functions

ParamType denormalize (ParamValue iNormalizedValue) const override
 DiscreteValueParamConverter (ConstructorType iToStringValues)
 DiscreteValueParamConverter (IntType iToStringOffset=0)
 DiscreteValueParamConverter (VstString16 iFormat, IntType iToStringOffset=0)
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 IParamConverter< int32 >
virtual ParamValue normalize (ParamType const &iValue) const=0
virtual void toString (ParamType const &iValue, String128 iString, int32 iPrecision) const

Private Attributes

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

Detailed Description

template<int32 StepCount, typename IntType = int32>
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

◆ ConstructorType

template<int32 StepCount, typename IntType = int32>
using ConstructorType = std::array<VstString16, StepCount + 1> const &

Defines the type for the constructor argument.

Example: { STR16("abc"), ... }

◆ ParamType

template<int32 StepCount, typename IntType = int32>
using ParamType = IntType

Constructor & Destructor Documentation

◆ DiscreteValueParamConverter() [1/3]

template<int32 StepCount, typename IntType = int32>
DiscreteValueParamConverter ( IntType iToStringOffset = 0)
inlineexplicit

◆ DiscreteValueParamConverter() [2/3]

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

◆ DiscreteValueParamConverter() [3/3]

template<int32 StepCount, typename IntType = int32>
DiscreteValueParamConverter ( ConstructorType iToStringValues)
inlineexplicit

Member Function Documentation

◆ denormalize()

template<int32 StepCount, typename IntType = int32>
ParamType denormalize ( ParamValue iNormalizedValue) const
inlineoverridevirtual

◆ getStepCount()

template<int32 StepCount, typename IntType = int32>
int32 getStepCount ( ) const
inlineoverridevirtual

Reimplemented from IParamConverter< int32 >.

◆ normalize()

template<int32 StepCount, typename IntType = int32>
ParamValue normalize ( ParamType const & iDiscreteValue) const
inlineoverride

◆ toString()

template<int32 StepCount, typename IntType = int32>
void toString ( ParamType const & iValue,
String128 oString,
int32  ) const
inlineoverride

Member Data Documentation

◆ fFormat

template<int32 StepCount, typename IntType = int32>
VstString16 fFormat {}
private

◆ fToStringOffset

template<int32 StepCount, typename IntType = int32>
IntType fToStringOffset {}
private

◆ fToStringValues

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

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