AAX SDK  2.4.1
Avid Audio Extensions Development Kit
AAX_IParameter.h
Go to the documentation of this file.
1 /*================================================================================================*/
2 /*
3  *
4  * Copyright 2013-2017 by Avid Technology, Inc.
5  * All rights reserved.
6  *
7  * CONFIDENTIAL: This document contains confidential information. Do not
8  * read or examine this document unless you are an Avid Technology employee
9  * or have signed a non-disclosure agreement with Avid Technology which protects
10  * the confidentiality of this document. DO NOT DISCLOSE ANY INFORMATION
11  * CONTAINED IN THIS DOCUMENT TO ANY THIRD-PARTY WITHOUT THE PRIOR WRITTEN CONSENT
12  * OF Avid Technology, INC.
13  *
14  */
15 
22 /*================================================================================================*/
23 
24 
25 #ifndef AAX_IPARAMETER_H
26 #define AAX_IPARAMETER_H
27 
28 #include "AAX.h" //for types
29 
30 //Forward Declarations
31 class AAX_CString;
35 class AAX_IString;
36 
45 {
46 public:
51  virtual ~AAX_IParameterValue() { }
52 
58  virtual AAX_IParameterValue* Clone() const = 0;
59 
66  virtual AAX_CParamID Identifier() const = 0;
67 
80  virtual bool GetValueAsBool(bool* value) const = 0;
81 
90  virtual bool GetValueAsInt32(int32_t* value) const = 0;
91 
100  virtual bool GetValueAsFloat(float* value) const = 0;
101 
110  virtual bool GetValueAsDouble(double* value) const = 0;
111 
120  virtual bool GetValueAsString(AAX_IString* value) const = 0;
122 };
123 
140 {
141 public:
146  virtual ~AAX_IParameter() { }
147 
154  virtual AAX_IParameterValue* CloneValue() const = 0;
155 
166  virtual AAX_CParamID Identifier() const = 0;
167 
177  virtual void SetName(const AAX_CString& name) = 0;
178 
184  virtual const AAX_CString& Name() const = 0;
185 
195  virtual void AddShortenedName(const AAX_CString& name) = 0;
196 
202  virtual const AAX_CString& ShortenedName(int32_t iNumCharacters) const = 0;
203 
207  virtual void ClearShortenedNames() = 0;
209 
210 
219  virtual bool Automatable() const = 0;
220 
226  virtual void SetAutomationDelegate( AAX_IAutomationDelegate * iAutomationDelegate ) = 0;
227 
235  virtual void Touch() = 0;
236 
243  virtual void Release() = 0;
245 
258  virtual void SetNormalizedValue(double newNormalizedValue) = 0;
259 
263  virtual double GetNormalizedValue() const = 0;
264 
268  virtual void SetNormalizedDefaultValue(double normalizedDefault) = 0;
269 
273  virtual double GetNormalizedDefaultValue() const = 0;
274 
278  virtual void SetToDefaultValue() = 0;
279 
292  virtual void SetNumberOfSteps(uint32_t numSteps) = 0;
293 
298  virtual uint32_t GetNumberOfSteps() const = 0;
299 
304  virtual uint32_t GetStepValue() const = 0;
305 
310  virtual double GetNormalizedValueFromStep(uint32_t iStep) const = 0;
311 
316  virtual uint32_t GetStepValueFromNormalizedValue(double normalizedValue) const = 0;
317 
322  virtual void SetStepValue(uint32_t iStep) = 0;
323 
325 
326 
341  virtual bool GetValueString(AAX_CString* valueString) const = 0;
342 
353  virtual bool GetValueString(int32_t iMaxNumChars, AAX_CString* valueString) const = 0;
354 
365  virtual bool GetNormalizedValueFromBool(bool value, double *normalizedValue) const = 0;
366 
377  virtual bool GetNormalizedValueFromInt32(int32_t value, double *normalizedValue) const = 0;
378 
389  virtual bool GetNormalizedValueFromFloat(float value, double *normalizedValue) const = 0;
390 
401  virtual bool GetNormalizedValueFromDouble(double value, double *normalizedValue) const = 0;
402 
413  virtual bool GetNormalizedValueFromString(const AAX_CString& valueString, double *normalizedValue) const = 0;
414 
426  virtual bool GetBoolFromNormalizedValue(double normalizedValue, bool* value) const = 0;
427 
439  virtual bool GetInt32FromNormalizedValue(double normalizedValue, int32_t* value) const = 0;
440 
452  virtual bool GetFloatFromNormalizedValue(double normalizedValue, float* value) const = 0;
453 
465  virtual bool GetDoubleFromNormalizedValue(double normalizedValue, double* value) const = 0;
466 
478  virtual bool GetStringFromNormalizedValue(double normalizedValue, AAX_CString& valueString) const = 0;
479 
493  virtual bool GetStringFromNormalizedValue(double normalizedValue, int32_t iMaxNumChars, AAX_CString& valueString) const = 0;
494 
503  virtual bool SetValueFromString(const AAX_CString& newValueString) = 0;
505 
518  virtual bool GetValueAsBool(bool* value) const = 0;
519 
528  virtual bool GetValueAsInt32(int32_t* value) const = 0;
529 
538  virtual bool GetValueAsFloat(float* value) const = 0;
539 
548  virtual bool GetValueAsDouble(double* value) const = 0;
549 
558  virtual bool GetValueAsString(AAX_IString* value) const = 0;
559 
568  virtual bool SetValueWithBool(bool value) = 0;
569 
578  virtual bool SetValueWithInt32(int32_t value) = 0;
579 
588  virtual bool SetValueWithFloat(float value) = 0;
589 
598  virtual bool SetValueWithDouble(double value) = 0;
599 
608  virtual bool SetValueWithString(const AAX_IString& value) = 0;
610 
611 
619  virtual void SetType( AAX_EParameterType iControlType ) = 0;
620 
625  virtual AAX_EParameterType GetType() const = 0;
626 
627 
633  virtual void SetOrientation( AAX_EParameterOrientation iOrientation ) = 0;
634 
639 
648  virtual void SetTaperDelegate ( AAX_ITaperDelegateBase & inTaperDelegate, bool inPreserveValue ) = 0;
649 
656  virtual void SetDisplayDelegate ( AAX_IDisplayDelegateBase & inDisplayDelegate ) = 0;
657 
658 public:
673  virtual void UpdateNormalizedValue(double newNormalizedValue) = 0;
675 
676 };
677 
678 #endif //AAX_IPARAMETER_H
679 
680 
681 
682 
Various utility definitions for AAX.
const char * AAX_CParamID
Parameter identifier.
Definition: AAX.h:352
AAX_EParameterType
FIC stuff that I can't include without DAE library dependence.
Definition: AAX_Enums.h:833
int32_t AAX_EParameterOrientation
Typedef for a bitfield of AAX_EParameterOrientationBits values.
Definition: AAX_Enums.h:866
A generic AAX string class with similar functionality to std::string
Definition: AAX_CString.h:46
Interface allowing an AAX plug-in to interact with the host's event system.
Definition: AAX_IAutomationDelegate.h:47
Defines the display behavior for a parameter.
Definition: AAX_IDisplayDelegate.h:53
An abstract interface representing a parameter value of arbitrary type.
Definition: AAX_IParameter.h:45
virtual ~AAX_IParameterValue()
Virtual destructor.
Definition: AAX_IParameter.h:51
virtual AAX_IParameterValue * Clone() const =0
Clones the parameter object.
virtual bool GetValueAsFloat(float *value) const =0
Retrieves the parameter's value as a float.
virtual bool GetValueAsBool(bool *value) const =0
Retrieves the parameter's value as a bool.
virtual AAX_CParamID Identifier() const =0
Returns the parameter's unique identifier.
virtual bool GetValueAsInt32(int32_t *value) const =0
Retrieves the parameter's value as an int32_t.
virtual bool GetValueAsDouble(double *value) const =0
Retrieves the parameter's value as a double.
virtual bool GetValueAsString(AAX_IString *value) const =0
Retrieves the parameter's value as a string.
The base interface for all normalizable plug-in parameters.
Definition: AAX_IParameter.h:140
virtual bool GetStringFromNormalizedValue(double normalizedValue, AAX_CString &valueString) const =0
Converts a normalized parameter value to a string representing the corresponding real value.
virtual bool GetValueString(AAX_CString *valueString) const =0
Serializes the parameter value into a string.
virtual AAX_EParameterType GetType() const =0
Returns the type of this parameter as an AAX_EParameterType.
virtual bool SetValueWithString(const AAX_IString &value)=0
Sets the parameter's value as a string.
virtual bool GetNormalizedValueFromBool(bool value, double *normalizedValue) const =0
Converts a bool to a normalized parameter value.
virtual void SetDisplayDelegate(AAX_IDisplayDelegateBase &inDisplayDelegate)=0
Sets the parameter's display delegate.
virtual bool GetInt32FromNormalizedValue(double normalizedValue, int32_t *value) const =0
Converts a normalized parameter value to an integer representing the corresponding real value.
virtual bool SetValueWithFloat(float value)=0
Sets the parameter's value as a float.
virtual AAX_EParameterOrientation GetOrientation() const =0
Returns the orientation of this parameter.
virtual bool Automatable() const =0
Returns true if the parameter is automatable, false if it is not.
virtual AAX_CParamID Identifier() const =0
Returns the parameter's unique identifier.
virtual void SetToDefaultValue()=0
Restores the state of this parameter to its default value.
virtual bool GetValueAsInt32(int32_t *value) const =0
Retrieves the parameter's value as an int32_t.
virtual void SetAutomationDelegate(AAX_IAutomationDelegate *iAutomationDelegate)=0
Sets the automation delegate (if one is required)
virtual double GetNormalizedValue() const =0
Returns the normalized representation of the parameter's current real value.
virtual void Release()=0
Signals the automation system that a control has been released.
virtual void UpdateNormalizedValue(double newNormalizedValue)=0
Sets the parameter's state given a normalized value.
virtual void SetNormalizedDefaultValue(double normalizedDefault)=0
Sets the parameter's default value using its normalized representation.
virtual void SetName(const AAX_CString &name)=0
Sets the parameter's display name.
virtual bool GetValueString(int32_t iMaxNumChars, AAX_CString *valueString) const =0
Serializes the parameter value into a string, size hint included.
virtual bool GetBoolFromNormalizedValue(double normalizedValue, bool *value) const =0
Converts a normalized parameter value to a bool representing the corresponding real value.
virtual uint32_t GetStepValueFromNormalizedValue(double normalizedValue) const =0
Returns the step value for a normalized value of the parameter.
virtual void AddShortenedName(const AAX_CString &name)=0
Sets the parameter's shortened display name.
virtual ~AAX_IParameter()
Virtual destructor.
Definition: AAX_IParameter.h:146
virtual double GetNormalizedDefaultValue() const =0
Returns the normalized representation of the parameter's real default value.
virtual const AAX_CString & ShortenedName(int32_t iNumCharacters) const =0
Returns the parameter's shortened display name.
virtual void Touch()=0
Signals the automation system that a control has been touched.
virtual double GetNormalizedValueFromStep(uint32_t iStep) const =0
Returns the normalized value for a given step.
virtual bool GetValueAsFloat(float *value) const =0
Retrieves the parameter's value as a float.
virtual void SetTaperDelegate(AAX_ITaperDelegateBase &inTaperDelegate, bool inPreserveValue)=0
Sets the parameter's taper delegate.
virtual AAX_IParameterValue * CloneValue() const =0
Clone the parameter's value to a new AAX_IParameterValue object.
virtual bool GetNormalizedValueFromDouble(double value, double *normalizedValue) const =0
Converts a double to a normalized parameter value.
virtual bool GetStringFromNormalizedValue(double normalizedValue, int32_t iMaxNumChars, AAX_CString &valueString) const =0
Converts a normalized parameter value to a string representing the corresponding real,...
virtual bool SetValueWithDouble(double value)=0
Sets the parameter's value as a double.
virtual bool GetValueAsBool(bool *value) const =0
Retrieves the parameter's value as a bool.
virtual void SetStepValue(uint32_t iStep)=0
Returns the current step for the current value of the parameter.
virtual bool SetValueWithInt32(int32_t value)=0
Sets the parameter's value as an int32_t.
virtual bool GetNormalizedValueFromInt32(int32_t value, double *normalizedValue) const =0
Converts an integer to a normalized parameter value.
virtual bool GetValueAsString(AAX_IString *value) const =0
Retrieves the parameter's value as a string.
virtual bool GetFloatFromNormalizedValue(double normalizedValue, float *value) const =0
Converts a normalized parameter value to a float representing the corresponding real value.
virtual bool GetDoubleFromNormalizedValue(double normalizedValue, double *value) const =0
Converts a normalized parameter value to a double representing the corresponding real value.
virtual void SetType(AAX_EParameterType iControlType)=0
Sets the type of this parameter.
virtual void SetNumberOfSteps(uint32_t numSteps)=0
Sets the number of discrete steps for this parameter.
virtual void SetOrientation(AAX_EParameterOrientation iOrientation)=0
Sets the orientation of this parameter.
virtual void SetNormalizedValue(double newNormalizedValue)=0
Sets a parameter value using it's normalized representation.
virtual uint32_t GetStepValue() const =0
Returns the current step for the current value of the parameter.
virtual bool GetValueAsDouble(double *value) const =0
Retrieves the parameter's value as a double.
virtual const AAX_CString & Name() const =0
Returns the parameter's display name.
virtual bool GetNormalizedValueFromString(const AAX_CString &valueString, double *normalizedValue) const =0
Converts a given string to a normalized parameter value.
virtual bool SetValueFromString(const AAX_CString &newValueString)=0
Converts a string to a real parameter value and sets the parameter to this value.
virtual void ClearShortenedNames()=0
Clears the internal list of shortened display names.
virtual bool SetValueWithBool(bool value)=0
Sets the parameter's value as a bool.
virtual uint32_t GetNumberOfSteps() const =0
Returns the number of discrete steps used by the parameter.
virtual bool GetNormalizedValueFromFloat(float value, double *normalizedValue) const =0
Converts a float to a normalized parameter value.
A simple string container that can be passed across a binary boundary. This class,...
Definition: AAX_IString.h:41
Defines the taper conversion behavior for a parameter.
Definition: AAX_ITaperDelegate.h:73