VST 3 SDK VST 3.8
SDK for developing VST plug-in
Loading...
Searching...
No Matches
ParameterContainer Class Reference

Collection of parameters. More...

#include <vstparameters.h>

Public Member Functions

 ParameterContainer ()
 
 ~ParameterContainer ()
 
void init (int32 initialSize=10, int32 resizeDelta=100)
 Init param array.
 
Parameter * addParameter (const ParameterInfo &info)
 Creates and adds a new parameter from a ParameterInfo.
 
Parameter * addParameter (const TChar *title, const TChar *units=nullptr, int32 stepCount=kStepCountContinuous, ParamValue defaultValueNormalized=0., int32 flags=ParameterInfo::kCanAutomate, int32 tag=-1, UnitID unitID=kRootUnitId, const TChar *shortTitle=nullptr)
 Creates and adds a new parameter with given properties.
 
Parameter * addParameter (Parameter *p)
 Adds a given parameter.
 
int32 getParameterCount () const
 Returns the count of parameters.
 
Parameter * getParameterByIndex (int32 index) const
 Gets parameter by index.
 
void removeAll ()
 Removes all parameters.
 
Parameter * getParameter (ParamID tag) const
 Gets parameter by ID.
 
bool removeParameter (ParamID tag)
 Remove a specific parameter by ID.
 

Protected Types

using ParameterPtrVector = std::vector<IPtr<Parameter>>
 
using IndexMap = std::map<ParamID, ParameterPtrVector::size_type>
 

Protected Attributes

ParameterPtrVector * params {nullptr}
 
IndexMap id2index
 

Detailed Description

Collection of parameters.

Member Typedef Documentation

◆ ParameterPtrVector

using ParameterPtrVector = std::vector<IPtr<Parameter>>
protected

◆ IndexMap

using IndexMap = std::map<ParamID, ParameterPtrVector::size_type>
protected

Constructor & Destructor Documentation

◆ ParameterContainer()

◆ ~ParameterContainer()

Member Function Documentation

◆ init()

void init ( int32 initialSize = 10,
int32 resizeDelta = 100 )

Init param array.

◆ addParameter() [1/3]

Parameter * addParameter ( const ParameterInfo & info)

Creates and adds a new parameter from a ParameterInfo.

◆ addParameter() [2/3]

Parameter * addParameter ( const TChar * title,
const TChar * units = nullptr,
int32 stepCount = kStepCountContinuous,
ParamValue defaultValueNormalized = 0.,
int32 flags = ParameterInfo::kCanAutomate,
int32 tag = -1,
UnitID unitID = kRootUnitId,
const TChar * shortTitle = nullptr )

Creates and adds a new parameter with given properties.

◆ addParameter() [3/3]

Parameter * addParameter ( Parameter * p)

Adds a given parameter.

◆ getParameterCount()

int32 getParameterCount ( ) const
inline

Returns the count of parameters.

◆ getParameterByIndex()

Parameter * getParameterByIndex ( int32 index) const

Gets parameter by index.

◆ removeAll()

void removeAll ( )
inline

Removes all parameters.

◆ getParameter()

Parameter * getParameter ( ParamID tag) const

Gets parameter by ID.

◆ removeParameter()

bool removeParameter ( ParamID tag)

Remove a specific parameter by ID.

Member Data Documentation

◆ params

ParameterPtrVector* params {nullptr}
protected

◆ id2index

IndexMap id2index
protected
Empty

Copyright © Steinberg Media Technologies GmbH. All Rights Reserved. This documentation is under this license.