Jamba C++ API  5.1.1
ParamDisplay Class Reference

This helper class is used to display the parameters (vst/jmb) WARNING: this class is allocating memory and as a result should be used in RT only during development! More...

#include <ParamDisplay.h>

Public Types

enum  Key {
  kID, kType, kTitle, kOwner,
  kTransient, kNormalizedDefault, kDefault, kNormalizedValue,
  kValue, kSteps, kFlags, kShortTitle,
  kPrecision, kUnitID, kUnits, kShared
}
 
using ParamMap = std::map< ParamID, ValueMap >
 
using Value = std::string
 
using ValueMap = std::map< Key, Value >
 

Public Member Functions

ParamMap getParamMap (std::vector< ParamID > const &iParamIDs={}) const
 
ParamMap getParamMap (NormalizedState const &iNormalizedState) const
 
Value getValue (Key iKey) const
 
Value getValue (ParamID iParamID, Key iKey) const
 
ValueMap getValues (ParamID iParamID, std::vector< Key > const &iKeys={}) const
 
ParamDisplayid (ParamID iParamID)
 
ParamDisplayids (std::vector< ParamID > const &iParamIDs)
 
std::vector< ParamID > const & ids () const
 
ParamDisplaykey (Key iKey)
 
ParamDisplaykeys (std::vector< Key > const &iKeys)
 
std::vector< Key > const & keys () const
 
 ParamDisplay (Parameters const &iParams)
 
 ParamDisplay (RT::RTState const *iState)
 
 ParamDisplay (GUI::GUIState const *iState)
 
ParamDisplayprecision (int32 iPrecision)
 

Static Public Member Functions

static ParamDisplay from (Parameters const &iParams)
 Shortcut to create a table for all registered parameter (definition not current value). More...
 
static ParamDisplay from (RT::RTState const *iState, bool iSaveStateOnly=false)
 Shortcut to create a table for the RTState (current values). More...
 
static ParamDisplay from (GUI::GUIState const *iState, bool iSaveStateOnly=false)
 Shortcut to create a table for the GUIState (current values). More...
 

Protected Member Functions

std::shared_ptr< RawVstParamDef > getRawVstParamDef (ParamID iParamID) const
 
Value getValue (RawVstParamDef const *iParamDef, Key iKey) const
 
Value getValue (IJmbParamDef const *iParamDef, Key iKey) const
 
Value getValue (std::unique_ptr< RT::RTRawVstParameter > const &iParam, Key iKey) const
 
Value getValue (std::unique_ptr< RT::IRTJmbInParameter > const &iParam, Key iKey) const
 
Value getValue (std::unique_ptr< RT::IRTJmbOutParameter > const &iParam, Key iKey) const
 
Value getValue (std::shared_ptr< GUI::GUIRawVstParameter > const &iParam, Key iKey, Parameters const *iParameters) const
 
Value getValue (GUI::IGUIJmbParameter const &iParam, Key iKey) const
 
Value getValue (Parameters const *iParams, ParamID iParamID, Key iKey) const
 
Value getValue (RT::RTState const *iState, ParamID iParamID, Key iKey) const
 
Value getValue (GUI::GUIState const *iState, ParamID iParamID, Key iKey) const
 
Value getValue (ParamValue iValue) const
 

Private Attributes

GUI::GUIState const * fGUIState {}
 
std::vector< KeyfKeys {}
 
Parameters const * fParameters {}
 
std::vector< ParamID > fParamIDs {}
 
int32 fPrecision {3}
 
RT::RTState const * fRTState {}
 

Detailed Description

This helper class is used to display the parameters (vst/jmb) WARNING: this class is allocating memory and as a result should be used in RT only during development!

Member Typedef Documentation

◆ ParamMap

using ParamMap = std::map<ParamID, ValueMap>

◆ Value

using Value = std::string

◆ ValueMap

using ValueMap = std::map<Key, Value>

Member Enumeration Documentation

◆ Key

enum Key
strong
Enumerator
kID 
kType 
kTitle 
kOwner 
kTransient 
kNormalizedDefault 
kDefault 
kNormalizedValue 
kValue 
kSteps 
kFlags 
kShortTitle 
kPrecision 
kUnitID 
kUnits 
kShared 

Constructor & Destructor Documentation

◆ ParamDisplay() [1/3]

ParamDisplay ( Parameters const &  iParams)
inlineexplicit

◆ ParamDisplay() [2/3]

ParamDisplay ( RT::RTState const *  iState)
inlineexplicit

◆ ParamDisplay() [3/3]

ParamDisplay ( GUI::GUIState const *  iState)
inlineexplicit

Member Function Documentation

◆ from() [1/3]

ParamDisplay from ( Parameters const &  iParams)
static

Shortcut to create a table for all registered parameter (definition not current value).

Use all registered parameters

◆ from() [2/3]

ParamDisplay from ( RT::RTState const *  iState,
bool  iSaveStateOnly = false 
)
static

Shortcut to create a table for the RTState (current values).

Use all registered parameters or the one used in save state only.

◆ from() [3/3]

ParamDisplay from ( GUI::GUIState const *  iState,
bool  iSaveStateOnly = false 
)
static

Shortcut to create a table for the GUIState (current values).

Use all registered parameters or the one used in save state only.

◆ getParamMap() [1/2]

ParamDisplay::ParamMap getParamMap ( std::vector< ParamID > const &  iParamIDs = {}) const

◆ getParamMap() [2/2]

ParamDisplay::ParamMap getParamMap ( NormalizedState const &  iNormalizedState) const

◆ getRawVstParamDef()

std::shared_ptr< RawVstParamDef > getRawVstParamDef ( ParamID  iParamID) const
protected

◆ getValue() [1/13]

std::string getValue ( Key  iKey) const

◆ getValue() [2/13]

ParamDisplay::Value getValue ( ParamID  iParamID,
Key  iKey 
) const

◆ getValue() [3/13]

std::string getValue ( RawVstParamDef const *  iParamDef,
Key  iKey 
) const
protected

◆ getValue() [4/13]

std::string getValue ( IJmbParamDef const *  iParamDef,
Key  iKey 
) const
protected

◆ getValue() [5/13]

std::string getValue ( std::unique_ptr< RT::RTRawVstParameter > const &  iParam,
Key  iKey 
) const
protected

◆ getValue() [6/13]

std::string getValue ( std::unique_ptr< RT::IRTJmbInParameter > const &  iParam,
Key  iKey 
) const
protected

◆ getValue() [7/13]

std::string getValue ( std::unique_ptr< RT::IRTJmbOutParameter > const &  iParam,
Key  iKey 
) const
protected

◆ getValue() [8/13]

std::string getValue ( std::shared_ptr< GUI::GUIRawVstParameter > const &  iParam,
Key  iKey,
Parameters const *  iParameters 
) const
protected

◆ getValue() [9/13]

std::string getValue ( GUI::IGUIJmbParameter const &  iParam,
Key  iKey 
) const
protected

◆ getValue() [10/13]

ParamDisplay::Value getValue ( Parameters const *  iParams,
ParamID  iParamID,
Key  iKey 
) const
protected

◆ getValue() [11/13]

ParamDisplay::Value getValue ( RT::RTState const *  iState,
ParamID  iParamID,
Key  iKey 
) const
protected

◆ getValue() [12/13]

ParamDisplay::Value getValue ( GUI::GUIState const *  iState,
ParamID  iParamID,
Key  iKey 
) const
protected

◆ getValue() [13/13]

ParamDisplay::Value getValue ( ParamValue  iValue) const
protected

◆ getValues()

ParamDisplay::ValueMap getValues ( ParamID  iParamID,
std::vector< Key > const &  iKeys = {} 
) const

◆ id()

ParamDisplay& id ( ParamID  iParamID)
inline

◆ ids() [1/2]

ParamDisplay& ids ( std::vector< ParamID > const &  iParamIDs)
inline

◆ ids() [2/2]

std::vector<ParamID> const& ids ( ) const
inline

◆ key()

ParamDisplay& key ( Key  iKey)
inline

◆ keys() [1/2]

ParamDisplay& keys ( std::vector< Key > const &  iKeys)
inline

◆ keys() [2/2]

std::vector<Key> const& keys ( ) const
inline

◆ precision()

ParamDisplay& precision ( int32  iPrecision)
inline

Member Data Documentation

◆ fGUIState

GUI::GUIState const* fGUIState {}
private

◆ fKeys

std::vector<Key> fKeys {}
private

◆ fParameters

Parameters const* fParameters {}
private

◆ fParamIDs

std::vector<ParamID> fParamIDs {}
private

◆ fPrecision

int32 fPrecision {3}
private

◆ fRTState

RT::RTState const* fRTState {}
private

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