Jamba C++ API
5.1.1
|
This converters maps a list of values of type T
to discrete values.
More...
#include <ParamConverters.h>
Inherits IParamConverter< T >.
Public Types | |
using | ConstructorType = std::initializer_list< std::pair< const T, VstString16 > > const & |
Defines the type for the constructor argument. More... | |
using | ParamType = T |
using | TList = std::vector< T > |
Defines the mapping: discrete value [0, stepCount] to T. More... | |
using | TMap = std::map< T, std::tuple< VstString16, ParamValue, int32 >, Compare > |
Maintains the map of possible values of T (defined in constructor) More... | |
Public Types inherited from IParamConverter< T > | |
using | ParamType = T |
Public Member Functions | |
ParamType | denormalize (ParamValue iNormalizedValue) const override |
DiscreteTypeParamConverter (ConstructorType iInitList) | |
This constructor will be called this way when initializing a vst or jmb parameter: More... | |
int32 | getStepCount () const override |
ParamValue | normalize (ParamType const &iValue) const override |
void | toString (ParamType const &iValue, String128 oString, int32 iPrecision) const override |
Public Member Functions inherited from IParamConverter< T > | |
virtual std::string | toString (ParamType const &iValue, int32 iPrecision) const |
Private Attributes | |
TList | fList {} |
TMap | fMap {} |
This converters maps a list of values of type T
to discrete values.
It can be used with any T
that is comparable (note that you can optionally provide your own Compare
). For example, T
can be an enum, enum class, struct, class, etc...
Example:
using ConstructorType = std::initializer_list<std::pair<const T, VstString16> > const & |
Defines the type for the constructor argument.
Example: { { t, STR16("abc") }, ... }
using ParamType = T |
using TList = std::vector<T> |
Defines the mapping: discrete value [0, stepCount] to T.
using TMap = std::map<T, std::tuple<VstString16, ParamValue, int32>, Compare> |
Maintains the map of possible values of T (defined in constructor)
|
inline |
This constructor will be called this way when initializing a vst or jmb parameter:
|
inlineoverridevirtual |
Implements IParamConverter< T >.
|
inlineoverridevirtual |
Reimplemented from IParamConverter< T >.
|
inlineoverridevirtual |
Implements IParamConverter< T >.
|
inlineoverridevirtual |
Reimplemented from IParamConverter< T >.
|
private |
|
private |