Jamba C++ API
5.1.1
|
A converter to deal with an enum (assumes that the enum is contiguous, starts at 0 and that MaxValue is the latest value in the enum). More...
#include <ParamConverters.h>
Inherits IParamConverter< Enum >.
Public Types | |
using | ConstructorType = std::array< VstString16, MaxValue+1 > const & |
Defines the type for the constructor argument. More... | |
using | IntType = std::underlying_type_t< Enum > |
using | ParamType = Enum |
Public Types inherited from IParamConverter< Enum > | |
using | ParamType = Enum |
Public Member Functions | |
ParamType | denormalize (ParamValue iNormalizedValue) const override |
EnumParamConverter (IntType iToStringOffset=0) | |
EnumParamConverter (VstString16 iFormat, IntType iToStringOffset=0) | |
EnumParamConverter (ConstructorType iToStringValues) | |
int32 | getStepCount () const override |
ParamValue | normalize (ParamType const &iDiscreteValue) const override |
void | toString (ParamType const &iValue, String128 oString, int32 iPrecision) const override |
Public Member Functions inherited from IParamConverter< Enum > | |
virtual std::string | toString (ParamType const &iValue, int32 iPrecision) const |
Private Attributes | |
DiscreteValueParamConverter< MaxValue, IntType > | fConverter |
A converter to deal with an enum (assumes that the enum is contiguous, starts at 0 and that MaxValue is the latest value in the enum).
Note that you can also use DiscreteTypeParamConverter<Enum>
instead in case your enum is not contiguous, you want to select only some values of the enum, or you want a simpler way to initialize it.
using ConstructorType = std::array<VstString16, MaxValue + 1> const & |
Defines the type for the constructor argument.
Example: { STR16("abc"), ... }
using IntType = std::underlying_type_t<Enum> |
using ParamType = Enum |
|
inlineexplicit |
|
inlineexplicit |
|
inlineexplicit |
|
inlineoverridevirtual |
Implements IParamConverter< Enum >.
|
inlineoverridevirtual |
Reimplemented from IParamConverter< Enum >.
|
inlineoverridevirtual |
Implements IParamConverter< Enum >.
|
inlineoverridevirtual |
Reimplemented from IParamConverter< Enum >.
|
private |