![]() |
AAX SDK
2.4.1
Avid Audio Extensions Development Kit
|
#include <AAX_CParameter.h>
A stateless parameter implementation.
This can be useful for mapping event triggers to control surface buttons or to GUI switches.
Public Member Functions | |
AAX_CStatelessParameter (AAX_CParamID identifier, const AAX_IString &name, const AAX_IString &inValueString) | |
AAX_CStatelessParameter (const AAX_IString &identifier, const AAX_IString &name, const AAX_IString &inValueString) | |
AAX_DEFAULT_DTOR_OVERRIDE (AAX_CStatelessParameter) | |
AAX_IParameterValue * | CloneValue () const AAX_OVERRIDE |
Clone the parameter's value to a new AAX_IParameterValue object. More... | |
Identification methods | |
AAX_CParamID | Identifier () const AAX_OVERRIDE |
Returns the parameter's unique identifier. More... | |
void | SetName (const AAX_CString &name) AAX_OVERRIDE |
Sets the parameter's display name. More... | |
const AAX_CString & | Name () const AAX_OVERRIDE |
Returns the parameter's display name. More... | |
void | AddShortenedName (const AAX_CString &name) AAX_OVERRIDE |
Sets the parameter's shortened display name. More... | |
const AAX_CString & | ShortenedName (int32_t iNumCharacters) const AAX_OVERRIDE |
Returns the parameter's shortened display name. More... | |
void | ClearShortenedNames () AAX_OVERRIDE |
Clears the internal list of shortened display names. More... | |
Automation methods | |
bool | Automatable () const AAX_OVERRIDE |
Returns true if the parameter is automatable, false if it is not. More... | |
void | SetAutomationDelegate (AAX_IAutomationDelegate *iAutomationDelegate) AAX_OVERRIDE |
Sets the automation delegate (if one is required) More... | |
void | Touch () AAX_OVERRIDE |
Signals the automation system that a control has been touched. More... | |
void | Release () AAX_OVERRIDE |
Signals the automation system that a control has been released. More... | |
Taper methods | |
void | SetNormalizedValue (double) AAX_OVERRIDE |
Sets a parameter value using it's normalized representation. More... | |
double | GetNormalizedValue () const AAX_OVERRIDE |
Returns the normalized representation of the parameter's current real value. More... | |
void | SetNormalizedDefaultValue (double) AAX_OVERRIDE |
Sets the parameter's default value using its normalized representation. More... | |
double | GetNormalizedDefaultValue () const AAX_OVERRIDE |
Returns the normalized representation of the parameter's real default value. More... | |
void | SetToDefaultValue () AAX_OVERRIDE |
Restores the state of this parameter to its default value. More... | |
void | SetNumberOfSteps (uint32_t) AAX_OVERRIDE |
Sets the number of discrete steps for this parameter. More... | |
uint32_t | GetNumberOfSteps () const AAX_OVERRIDE |
Returns the number of discrete steps used by the parameter. More... | |
uint32_t | GetStepValue () const AAX_OVERRIDE |
Returns the current step for the current value of the parameter. More... | |
double | GetNormalizedValueFromStep (uint32_t) const AAX_OVERRIDE |
Returns the normalized value for a given step. More... | |
uint32_t | GetStepValueFromNormalizedValue (double) const AAX_OVERRIDE |
Returns the step value for a normalized value of the parameter. More... | |
void | SetStepValue (uint32_t) AAX_OVERRIDE |
Returns the current step for the current value of the parameter. More... | |
Display methods | |
This functionality is most often used by GUIs, but can also be useful for state serialization. | |
bool | GetValueString (AAX_CString *valueString) const AAX_OVERRIDE |
Serializes the parameter value into a string. More... | |
bool | GetValueString (int32_t, AAX_CString *valueString) const AAX_OVERRIDE |
Serializes the parameter value into a string, size hint included. More... | |
bool | GetNormalizedValueFromBool (bool, double *normalizedValue) const AAX_OVERRIDE |
Converts a bool to a normalized parameter value. More... | |
bool | GetNormalizedValueFromInt32 (int32_t, double *normalizedValue) const AAX_OVERRIDE |
Converts an integer to a normalized parameter value. More... | |
bool | GetNormalizedValueFromFloat (float, double *normalizedValue) const AAX_OVERRIDE |
Converts a float to a normalized parameter value. More... | |
bool | GetNormalizedValueFromDouble (double, double *normalizedValue) const AAX_OVERRIDE |
Converts a double to a normalized parameter value. More... | |
bool | GetNormalizedValueFromString (const AAX_CString &, double *normalizedValue) const AAX_OVERRIDE |
Converts a given string to a normalized parameter value. More... | |
bool | GetBoolFromNormalizedValue (double, bool *value) const AAX_OVERRIDE |
Converts a normalized parameter value to a bool representing the corresponding real value. More... | |
bool | GetInt32FromNormalizedValue (double, int32_t *) const AAX_OVERRIDE |
Converts a normalized parameter value to an integer representing the corresponding real value. More... | |
bool | GetFloatFromNormalizedValue (double, float *) const AAX_OVERRIDE |
Converts a normalized parameter value to a float representing the corresponding real value. More... | |
bool | GetDoubleFromNormalizedValue (double, double *) const AAX_OVERRIDE |
Converts a normalized parameter value to a double representing the corresponding real value. More... | |
bool | GetStringFromNormalizedValue (double, AAX_CString &valueString) const AAX_OVERRIDE |
Converts a normalized parameter value to a string representing the corresponding real value. More... | |
bool | GetStringFromNormalizedValue (double normalizedValue, int32_t, AAX_CString &valueString) const AAX_OVERRIDE |
Converts a normalized parameter value to a string representing the corresponding real, size hint included. value. More... | |
bool | SetValueFromString (const AAX_CString &newValueString) AAX_OVERRIDE |
Converts a string to a real parameter value and sets the parameter to this value. More... | |
Typed accessors | |
bool | GetValueAsBool (bool *value) const AAX_OVERRIDE |
Retrieves the parameter's value as a bool. More... | |
bool | GetValueAsInt32 (int32_t *) const AAX_OVERRIDE |
Retrieves the parameter's value as an int32_t. More... | |
bool | GetValueAsFloat (float *) const AAX_OVERRIDE |
Retrieves the parameter's value as a float. More... | |
bool | GetValueAsDouble (double *) const AAX_OVERRIDE |
Retrieves the parameter's value as a double. More... | |
bool | GetValueAsString (AAX_IString *) const AAX_OVERRIDE |
Retrieves the parameter's value as a string. More... | |
bool | SetValueWithBool (bool) AAX_OVERRIDE |
Sets the parameter's value as a bool. More... | |
bool | SetValueWithInt32 (int32_t) AAX_OVERRIDE |
Sets the parameter's value as an int32_t. More... | |
bool | SetValueWithFloat (float) AAX_OVERRIDE |
Sets the parameter's value as a float. More... | |
bool | SetValueWithDouble (double) AAX_OVERRIDE |
Sets the parameter's value as a double. More... | |
bool | SetValueWithString (const AAX_IString &value) AAX_OVERRIDE |
Sets the parameter's value as a string. More... | |
void | SetType (AAX_EParameterType) AAX_OVERRIDE |
Sets the type of this parameter. More... | |
AAX_EParameterType | GetType () const AAX_OVERRIDE |
Returns the type of this parameter as an AAX_EParameterType. More... | |
void | SetOrientation (AAX_EParameterOrientation) AAX_OVERRIDE |
Sets the orientation of this parameter. More... | |
AAX_EParameterOrientation | GetOrientation () const AAX_OVERRIDE |
Returns the orientation of this parameter. More... | |
void | SetTaperDelegate (AAX_ITaperDelegateBase &, bool) AAX_OVERRIDE |
Sets the parameter's taper delegate. More... | |
void | SetDisplayDelegate (AAX_IDisplayDelegateBase &) AAX_OVERRIDE |
Sets the parameter's display delegate. More... | |
![]() | |
virtual | ~AAX_IParameter () |
Virtual destructor. More... | |
Host interface methods | |
AAX_CStringAbbreviations | mNames |
AAX_CString | mID |
AAX_IAutomationDelegate * | mAutomationDelegate |
AAX_CString | mValueString |
void | UpdateNormalizedValue (double) AAX_OVERRIDE |
Sets the parameter's state given a normalized value. More... | |
|
inline |
|
inline |
AAX_CStatelessParameter::AAX_DEFAULT_DTOR_OVERRIDE | ( | AAX_CStatelessParameter | ) |
|
inlinevirtual |
Clone the parameter's value to a new AAX_IParameterValue object.
The returned object is independent from the AAX_IParameter. For example, changing the state of the returned object will not result in a change to the original AAX_IParameter.
Implements AAX_IParameter.
|
inlinevirtual |
Returns the parameter's unique identifier.
This unique ID is used by the Parameter Manager and by outside applications to uniquely identify and target control messages. This value may not be changed after the parameter has been constructed.
Implements AAX_IParameter.
References AAX_CString::CString(), and mID.
Referenced by Release(), SetAutomationDelegate(), and Touch().
|
inlinevirtual |
Sets the parameter's display name.
This name is used for display only, it is not used for indexing or identifying the parameter This name may be changed after the parameter has been created, but display name changes may not be recognized by all AAX hosts.
[in] | name | Display name that will be assigned to the parameter |
Implements AAX_IParameter.
References mNames, and AAX_CStringAbbreviations::SetPrimary().
|
inlinevirtual |
Returns the parameter's display name.
Implements AAX_IParameter.
References mNames, and AAX_CStringAbbreviations::Primary().
|
inlinevirtual |
Sets the parameter's shortened display name.
This name is used for display only, it is not used for indexing or identifying the parameter These names show up when the host asks for shorter length parameter names for display on Control Surfaces or other string length constrained situations.
[in] | name | Shortened display names that will be assigned to the parameter |
Implements AAX_IParameter.
References AAX_CStringAbbreviations::Add(), and mNames.
|
inlinevirtual |
Returns the parameter's shortened display name.
Implements AAX_IParameter.
References AAX_CStringAbbreviations::Get(), and mNames.
|
inlinevirtual |
Clears the internal list of shortened display names.
Implements AAX_IParameter.
References AAX_CStringAbbreviations::Clear(), and mNames.
|
inlinevirtual |
Returns true if the parameter is automatable, false if it is not.
Implements AAX_IParameter.
|
inlinevirtual |
Sets the automation delegate (if one is required)
[in] | iAutomationDelegate | A reference to the parameter manager's automation delegate interface |
Implements AAX_IParameter.
References Identifier(), mAutomationDelegate, AAX_IAutomationDelegate::RegisterParameter(), and AAX_IAutomationDelegate::UnregisterParameter().
|
inlinevirtual |
Signals the automation system that a control has been touched.
Call this method in response to GUI events that begin editing, such as a mouse down. After this method has been called you are free to call SetNormalizedValue() as much as you need, e.g. in order to respond to subsequent mouse moved events. Call Release() to free the parameter for updates from other controls.
Implements AAX_IParameter.
References Identifier(), mAutomationDelegate, and AAX_IAutomationDelegate::PostTouchRequest().
|
inlinevirtual |
Signals the automation system that a control has been released.
Call this method in response to GUI events that complete editing, such as a mouse up. Once this method has been called you should not call SetNormalizedValue() again until after the next call to Touch().
Implements AAX_IParameter.
References Identifier(), mAutomationDelegate, and AAX_IAutomationDelegate::PostReleaseRequest().
|
inlinevirtual |
Sets a parameter value using it's normalized representation.
For more information regarding normalized values, see Parameter Manager
[in] | newNormalizedValue | New value (normalized) to which the parameter will be set |
Implements AAX_IParameter.
|
inlinevirtual |
Returns the normalized representation of the parameter's current real value.
Implements AAX_IParameter.
|
inlinevirtual |
Sets the parameter's default value using its normalized representation.
Implements AAX_IParameter.
|
inlinevirtual |
Returns the normalized representation of the parameter's real default value.
Implements AAX_IParameter.
|
inlinevirtual |
Restores the state of this parameter to its default value.
Implements AAX_IParameter.
|
inlinevirtual |
Sets the number of discrete steps for this parameter.
Stepped parameter values are useful for discrete parameters and for "jumping" events such as mouse wheels, page up/down, etc. The parameter's step size is used to specify the coarseness of those changes.
[in] | numSteps | The number of steps that the parameter will use |
Implements AAX_IParameter.
|
inlinevirtual |
Returns the number of discrete steps used by the parameter.
See SetNumberOfSteps() for more information about parameter steps.
Implements AAX_IParameter.
|
inlinevirtual |
Returns the current step for the current value of the parameter.
See SetNumberOfSteps() for more information about parameter steps.
Implements AAX_IParameter.
|
inlinevirtual |
Returns the normalized value for a given step.
See SetNumberOfSteps() for more information about parameter steps.
Implements AAX_IParameter.
|
inlinevirtual |
Returns the step value for a normalized value of the parameter.
See SetNumberOfSteps() for more information about parameter steps.
Implements AAX_IParameter.
|
inlinevirtual |
Returns the current step for the current value of the parameter.
See SetNumberOfSteps() for more information about parameter steps.
Implements AAX_IParameter.
|
inlinevirtual |
Serializes the parameter value into a string.
[out] | valueString | A string representing the parameter's real value |
true | The string conversion was successful |
false | The string conversion was unsuccessful |
Implements AAX_IParameter.
References mValueString.
|
inlinevirtual |
Serializes the parameter value into a string, size hint included.
[in] | iMaxNumChars | A size hint for the size of the string being requested. Useful for control surfaces and other limited area text fields. (make sure that size of desired string also has room for null termination) |
[out] | valueString | A string representing the parameter's real value |
true | The string conversion was successful |
false | The string conversion was unsuccessful |
Implements AAX_IParameter.
References GetValueString().
Referenced by GetValueString().
|
inlinevirtual |
Converts a bool to a normalized parameter value.
[in] | value | A value for the parameter |
[out] | normalizedValue | The normalized parameter value associated with value |
true | The value conversion was successful |
false | The value conversion was unsuccessful |
Implements AAX_IParameter.
|
inlinevirtual |
Converts an integer to a normalized parameter value.
[in] | value | A value for the parameter |
[out] | normalizedValue | The normalized parameter value associated with value |
true | The value conversion was successful |
false | The value conversion was unsuccessful |
Implements AAX_IParameter.
|
inlinevirtual |
Converts a float to a normalized parameter value.
[in] | value | A value for the parameter |
[out] | normalizedValue | The normalized parameter value associated with value |
true | The value conversion was successful |
false | The value conversion was unsuccessful |
Implements AAX_IParameter.
|
inlinevirtual |
Converts a double to a normalized parameter value.
[in] | value | A value for the parameter |
[out] | normalizedValue | The normalized parameter value associated with value |
true | The value conversion was successful |
false | The value conversion was unsuccessful |
Implements AAX_IParameter.
|
inlinevirtual |
Converts a given string to a normalized parameter value.
[in] | valueString | A string representing a possible real value for the parameter |
[out] | normalizedValue | The normalized parameter value associated with valueString |
true | The string conversion was successful |
false | The string conversion was unsuccessful |
Implements AAX_IParameter.
|
inlinevirtual |
Converts a normalized parameter value to a bool representing the corresponding real value.
[in] | normalizedValue | The normalized value to convert |
[out] | value | The converted value. Set only if conversion is successful. |
true | The conversion to bool was successful |
false | The conversion to bool was unsuccessful |
Implements AAX_IParameter.
|
inlinevirtual |
Converts a normalized parameter value to an integer representing the corresponding real value.
[in] | normalizedValue | The normalized value to convert |
[out] | value | The converted value. Set only if conversion is successful. |
true | The conversion to int32_t was successful |
false | The conversion to int32_t was unsuccessful |
Implements AAX_IParameter.
|
inlinevirtual |
Converts a normalized parameter value to a float representing the corresponding real value.
[in] | normalizedValue | The normalized value to convert |
[out] | value | The converted value. Set only if conversion is successful. |
true | The conversion to float was successful |
false | The conversion to float was unsuccessful |
Implements AAX_IParameter.
|
inlinevirtual |
Converts a normalized parameter value to a double representing the corresponding real value.
[in] | normalizedValue | The normalized value to convert |
[out] | value | The converted value. Set only if conversion is successful. |
true | The conversion to double was successful |
false | The conversion to double was unsuccessful |
Implements AAX_IParameter.
|
inlinevirtual |
Converts a normalized parameter value to a string representing the corresponding real value.
[in] | normalizedValue | A normalized parameter value |
[out] | valueString | A string representing the parameter value associated with normalizedValue |
true | The string conversion was successful |
false | The string conversion was unsuccessful |
Implements AAX_IParameter.
References mValueString.
|
inlinevirtual |
Converts a normalized parameter value to a string representing the corresponding real, size hint included. value.
[in] | normalizedValue | A normalized parameter value |
[in] | iMaxNumChars | A size hint for the size of the string being requested. Useful for control surfaces and other limited area text fields. (make sure that size of desired string also has room for null termination) |
[out] | valueString | A string representing the parameter value associated with normalizedValue |
true | The string conversion was successful |
false | The string conversion was unsuccessful |
Implements AAX_IParameter.
References GetStringFromNormalizedValue().
Referenced by GetStringFromNormalizedValue().
|
inlinevirtual |
Converts a string to a real parameter value and sets the parameter to this value.
[in] | newValueString | A string representing the parameter's new real value |
true | The string conversion was successful |
false | The string conversion was unsuccessful |
Implements AAX_IParameter.
References mValueString.
|
inlinevirtual |
Retrieves the parameter's value as a bool.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion to bool was successful |
false | The conversion to bool was unsuccessful |
Implements AAX_IParameter.
|
inlinevirtual |
Retrieves the parameter's value as an int32_t.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion to int32_t was successful |
false | The conversion to int32_t was unsuccessful |
Implements AAX_IParameter.
|
inlinevirtual |
Retrieves the parameter's value as a float.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion to float was successful |
false | The conversion to float was unsuccessful |
Implements AAX_IParameter.
|
inlinevirtual |
Retrieves the parameter's value as a double.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion to double was successful |
false | The conversion to double was unsuccessful |
Implements AAX_IParameter.
|
inlinevirtual |
Retrieves the parameter's value as a string.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion to string was successful |
false | The conversion to string was unsuccessful |
Implements AAX_IParameter.
|
inlinevirtual |
Sets the parameter's value as a bool.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion from bool was successful |
false | The conversion from bool was unsuccessful |
Implements AAX_IParameter.
|
inlinevirtual |
Sets the parameter's value as an int32_t.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion from int32_t was successful |
false | The conversion from int32_t was unsuccessful |
Implements AAX_IParameter.
|
inlinevirtual |
Sets the parameter's value as a float.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion from float was successful |
false | The conversion from float was unsuccessful |
Implements AAX_IParameter.
|
inlinevirtual |
Sets the parameter's value as a double.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion from double was successful |
false | The conversion from double was unsuccessful |
Implements AAX_IParameter.
|
inlinevirtual |
Sets the parameter's value as a string.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion from string was successful |
false | The conversion from string was unsuccessful |
Implements AAX_IParameter.
References mValueString.
|
inlinevirtual |
Sets the type of this parameter.
See GetType for use cases
[in] | iControlType | The parameter's new type as an AAX_EParameterType |
Implements AAX_IParameter.
|
inlinevirtual |
Returns the type of this parameter as an AAX_EParameterType.
Implements AAX_IParameter.
References AAX_eParameterType_Discrete.
|
inlinevirtual |
Sets the orientation of this parameter.
[in] | iOrientation | The parameter's new orientation |
Implements AAX_IParameter.
|
inlinevirtual |
Returns the orientation of this parameter.
Implements AAX_IParameter.
References AAX_eParameterOrientation_Default.
|
inlinevirtual |
Sets the parameter's taper delegate.
[in] | inTaperDelegate | A reference to the parameter's new taper delegate |
[in] | inPreserveValue |
Implements AAX_IParameter.
|
inlinevirtual |
Sets the parameter's display delegate.
[in] | inDisplayDelegate | A reference to the parameter's new display delegate |
Implements AAX_IParameter.
|
inlinevirtual |
Sets the parameter's state given a normalized value.
This is the second half of the parameter setting operation that is initiated with a call to SetValue(). Parameters should not be set directly using this method; instead, use SetValue().
[in] | newNormalizedValue | Normalized value that will be used to set the parameter's new state |
Implements AAX_IParameter.
|
protected |
Referenced by AddShortenedName(), ClearShortenedNames(), Name(), SetName(), and ShortenedName().
|
protected |
Referenced by Identifier().
|
protected |
Referenced by Release(), SetAutomationDelegate(), and Touch().
|
protected |
Referenced by GetStringFromNormalizedValue(), GetValueString(), SetValueFromString(), and SetValueWithString().