|
Jamba C++ API 7.5.0
|
Base class for all non vst parameters (need to provide serialization/deserialization). More...
#include <ParamDef.h>
Inherits IJmbParamDef, and IParamSerializer< T >.
Public Types | |
| using | ParamType = T |
| Public Types inherited from IParamDef | |
| enum class | Owner { kRT , kGUI } |
| Who owns the parameter (mostly for state saving purposes). More... | |
Public Member Functions | |
| std::string | computeMessageAttrID () const |
| std::shared_ptr< IDiscreteConverter< T > > | getDiscreteConverter () const |
| bool | isSerializable () const override |
| JmbParamDef (ParamID const iParamID, VstString16 iTitle, Owner const iOwner, bool const iTransient, int16 const iDeprecatedSince, bool const iShared, ParamType const &iDefaultValue, std::shared_ptr< IParamSerializer< ParamType > > iSerializer) | |
| std::shared_ptr< GUI::Params::IGUIJmbParameter > | newGUIParam () override |
| Create a new IGUIJmbParameter of the proper subtype. | |
| tresult | readFromMessage (Message const &iMessage, ParamType &oValue) const |
| ParamType | readFromStream (IBStreamer &iStreamer) const |
| tresult | readFromStream (IBStreamer &iStreamer, ParamType &oValue) const override |
| This method should read from the stream and populate oValue accordingly (aka deserialization). | |
| std::string | toUTF8String (ParamType const &iValue, int32 iPrecision) const |
| Return the value as a utf-8 string. | |
| void | writeDefaultValue (std::ostream &oStreamer) const override |
| tresult | writeToMessage (ParamType const &iValue, Message &oMessage) const |
| tresult | writeToStream (ParamType const &iValue, IBStreamer &oStreamer) const override |
| This method should write iValue to the stream (aka serialization). | |
| void | writeToStream (ParamType const &iValue, std::ostream &oStreamer) const override |
| By default, this implementation simply writes the value to the stream IF it is possible (determined at compilation time). | |
| Public Member Functions inherited from IJmbParamDef | |
| IJmbParamDef (const ParamID iParamID, VstString16 iTitle, Owner const iOwner, bool const iTransient, int16 const iDeprecatedSince, bool const iShared) | |
| ~IJmbParamDef () override=default | |
| Public Member Functions inherited from IParamDef | |
| IParamDef (ParamID const iParamID, VstString16 iTitle, Owner const iOwner, bool const iTransient, int16 const iDeprecatedSince) | |
| bool | isDeprecated () const |
| Returns true if the parameter is deprecated (meaning it can only be used to upgrade to latest version). | |
| virtual | ~IParamDef ()=default |
Public Attributes | |
| const ParamType | fDefaultValue |
| const std::shared_ptr< IParamSerializer< ParamType > > | fSerializer |
| Public Attributes inherited from IJmbParamDef | |
| bool const | fShared |
| Public Attributes inherited from IParamDef | |
| const int16 | fDeprecatedSince |
| const Owner | fOwner |
| const ParamID | fParamID |
| const VstString16 | fTitle |
| const bool | fTransient |
Additional Inherited Members | |
| Static Public Attributes inherited from IParamDef | |
| static constexpr int16 | kVersionNotDeprecated = -1 |
| Special version indicating the parameter is not deprecated. | |
| Private Types inherited from IParamSerializer< T > | |
| using | ParamType = T |
| Private Member Functions inherited from IParamSerializer< T > | |
| virtual std::string | toString (ParamType const &iValue, int32 iPrecision) const |
Base class for all non vst parameters (need to provide serialization/deserialization).
| T | the underlying type of the param |
| using ParamType = T |
|
inline |
|
inline |
|
inline |
|
inlineoverridevirtual |
Implements IJmbParamDef.
|
overridevirtual |
Create a new IGUIJmbParameter of the proper subtype.
Implementation note: because IGUIJmbParameter depends on ParamDef the implementation of this templated method is defined in GUIState.h.
Implements IJmbParamDef.
| T readFromStream | ( | IBStreamer & | iStreamer | ) | const |
|
overridevirtual |
This method should read from the stream and populate oValue accordingly (aka deserialization).
Reimplemented from IParamSerializer< T >.
|
inline |
Return the value as a utf-8 string.
| iValue | the value to process |
| iPrecision | if < 0 uses fPrecision otherwise use the one provided |
|
overridevirtual |
Implements IJmbParamDef.
|
overridevirtual |
This method should write iValue to the stream (aka serialization).
Reimplemented from IParamSerializer< T >.
|
overridevirtual |
By default, this implementation simply writes the value to the stream IF it is possible (determined at compilation time).
Doesn't do anything if not. Subclasses can redefine this behavior.
Reimplemented from IParamSerializer< T >.
| const ParamType fDefaultValue |
| const std::shared_ptr<IParamSerializer<ParamType> > fSerializer |