Jamba C++ API  5.1.1
StaticCastDiscreteConverter< T > Class Template Reference

This implementation simply cast T to an int32 (and vice-versa). More...

#include <ParamSerializers.h>

Inherits IDiscreteConverter< T >.

Public Member Functions

tresult convertFromDiscreteValue (int32 iDiscreteValue, T &oValue) const override
tresult convertToDiscreteValue (T const &iValue, int32 &oDiscreteValue) const override
int32 getStepCount () const override
 StaticCastDiscreteConverter (int32 iStepCount)

Protected Attributes

int32 fStepCount

Detailed Description

template<typename T>
class pongasoft::VST::StaticCastDiscreteConverter< T >

This implementation simply cast T to an int32 (and vice-versa).

For example, it works for any numerical types or enums. And it works for any struct or class that defines:

explicit T(int32 x); // constructor for cast from int32 to T
explicit operator int32() const; // operator int32 for cast from T to int32

Constructor & Destructor Documentation

◆ StaticCastDiscreteConverter()

StaticCastDiscreteConverter ( int32  iStepCount)

Member Function Documentation

◆ convertFromDiscreteValue()

tresult convertFromDiscreteValue ( int32  iDiscreteValue,
T &  oValue 
) const

◆ convertToDiscreteValue()

tresult convertToDiscreteValue ( T const &  iValue,
int32 &  oDiscreteValue 
) const

◆ getStepCount()

int32 getStepCount ( ) const

Member Data Documentation

◆ fStepCount

int32 fStepCount

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