AAX SDK  2.1.1
Avid Audio Extensions Development Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AAX_CParameter.h
Go to the documentation of this file.
1 /*================================================================================================*/
2 /*
3  *
4  * Copyright 2013 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 Technolgy, INC.
13  *
14  */
15 
22 /*================================================================================================*/
23 
24 
25 #ifndef AAX_CPARAMETER_H
26 #define AAX_CPARAMETER_H
27 
28 #include "AAX_Assert.h"
29 #include "AAX_IParameter.h"
30 #include "AAX_ITaperDelegate.h"
31 #include "AAX_IDisplayDelegate.h"
33 #include "AAX_CString.h" //concrete class required for name.
34 
35 #include <list>
36 #include <map>
37 
58 template <typename T>
60 {
61 public:
62 
63  enum Type {
69  };
70 
71  enum Defaults {
76  };
77 
108  AAX_CParameter(AAX_CParamID identifier, const AAX_CString& name, T defaultValue, const AAX_ITaperDelegate<T>& taperDelegate, const AAX_IDisplayDelegate<T>& displayDelegate, bool automatable=false);
109 
114  virtual ~AAX_CParameter();
115 
120  AAX_CParamID Identifier() const; //AAX_IParameter
121  void SetName(const AAX_CString& name); //AAX_IParameter
122  const AAX_CString& Name() const; //AAX_IParameter
123  void AddShortenedName(const AAX_CString& name); //AAX_IParameter
124  const AAX_CString& ShortenedName(int32_t iNumCharacters) const; //AAX_IParameter
125  void ClearShortenedNames(); //AAX_IParameter
127 
132  void SetNormalizedDefaultValue(double normalizedDefault); //AAX_IParameter
133  double GetNormalizedDefaultValue() const; //AAX_IParameter
134  void SetToDefaultValue(); //AAX_IParameter
135  void SetNormalizedValue(double normalizedNewValue); //AAX_IParameter
136  double GetNormalizedValue() const; //AAX_IParameter
137  void SetNumberOfSteps(uint32_t numSteps); //AAX_IParameter
138  uint32_t GetNumberOfSteps() const; //AAX_IParameter
139  uint32_t GetStepValue() const; //AAX_IParameter
140  void SetStepValue(uint32_t iStep); //AAX_IParameter
141  void SetType(AAX_EParameterType iControlType); //AAX_IParameter
142  AAX_EParameterType GetType() const; //AAX_IParameter
143  void SetOrientation( AAX_EParameterOrientation iOrientation );
146 
151  bool GetValueString( AAX_CString* valueString) const; //AAX_IParameter
152  bool GetValueString(int32_t iMaxNumChars, AAX_CString* valueString) const; //AAX_IParameter
153  bool GetNormalizedValueFromString(const AAX_CString& valueString, double *normalizedValue) const; //AAX_IParameter
154  bool GetStringFromNormalizedValue(double normalizedValue, AAX_CString& valueString) const; //AAX_IParameter
155  bool GetStringFromNormalizedValue(double normalizedValue, int32_t iMaxNumChars, AAX_CString& valueString) const; //AAX_IParameter
156  bool SetValueFromString(const AAX_CString& newValueString); //AAX_IParameter
158 
163  void SetAutomationDelegate ( AAX_IAutomationDelegate * iAutomationDelegate ); //AAX_IParameter
164  bool Automatable() const; //AAX_IParameter
165  void Touch(); //AAX_IParameter
166  void Release(); //AAX_IParameter
168 
173  bool GetValueAsBool(bool* value) const; //AAX_IParameter
174  bool GetValueAsInt32(int32_t* value) const; //AAX_IParameter
175  bool GetValueAsFloat(float* value) const; //AAX_IParameter
176  bool GetValueAsDouble(double* value) const; //AAX_IParameter
177  bool GetValueAsString(AAX_IString* value) const; //AAX_IParameter
178  bool SetValueWithBool(bool value); //AAX_IParameter
179  bool SetValueWithInt32(int32_t value); //AAX_IParameter
180  bool SetValueWithFloat(float value); //AAX_IParameter
181  bool SetValueWithDouble(double value); //AAX_IParameter
182  bool SetValueWithString(const AAX_IString& value); //AAX_IParameter
184 
202  void SetValue(T newValue );
209  T GetValue() const;
218  void SetDefaultValue(T newDefaultValue);
225  T GetDefaultValue() const;
234  void SetTaperDelegate(AAX_ITaperDelegateBase& taperDelegate,bool iPreserveValue=true);
241  void SetDisplayDelegate(AAX_IDisplayDelegateBase& displayDelegate);
246  const AAX_ITaperDelegate<T>* TaperDelegate() const;
253 
254 public:
255 
260  void UpdateNormalizedValue(double newNormalizedValue); //AAX_IParameter
262 
263 
264 protected:
267  std::map<uint32_t, AAX_CString> mShortenedNames;
269  uint32_t mNumSteps;
276 
279 
280 private:
282  AAX_CParameter();
283  AAX_CParameter(const AAX_CParameter& other);
284  AAX_CParameter& operator= (const AAX_CParameter& other);
285 };
286 
287 
289 
290 template <typename T>
291 AAX_CParameter<T>::AAX_CParameter(AAX_CParamID identifier, const AAX_CString& name, T defaultValue, const AAX_ITaperDelegate<T>& taperDelegate, const AAX_IDisplayDelegate<T>& displayDelegate, bool automatable) :
292  mName(name),
293  mAutomatable(automatable),
294  mNumSteps(0), // Default set below for discrete/continuous
295  mControlType( AAX_eParameterType_Continuous ),
297  mTaperDelegate(taperDelegate.Clone()),
298  mDisplayDelegate(displayDelegate.Clone()),
299  mAutomationDelegate(0),
300  mNeedNotify(true),
301  mDefaultValue(defaultValue)
302 {
303  size_t len = strlen(identifier);
306  {
307  std::strncpy(mIdentifier, identifier, 1+len);
308  mIdentifier[len] = 0;
309  }
310  else
311  {
312  std::strncpy(mIdentifier, identifier, eParameterDefaultMaxIdentifierLength);
314  }
315 
316  if (mNumSteps == 0) // If no explicit number of steps has been set...
317  {
318  switch (mControlType)
319  {
321  {
322  // Discrete parameters default to binary unless
323  // otherwise specified
325  break;
326  }
328  {
329  // Defaulting to 128 steps to match one full rotation of
330  // Command|8 and similar surfaces, which query the num
331  // steps to determine tick values for rotary encoders
333  break;
334  }
335  default:
336  {
337  AAX_ASSERT (0); // Invalid type
338  break;
339  }
340  }
341  }
342 
344 }
345 
346 template <typename T>
348 {
349  //Make sure to remove any registration with the token system.
350  SetAutomationDelegate(0);
351 
352  delete mTaperDelegate;
353  mTaperDelegate = 0;
354  delete mDisplayDelegate;
355  mDisplayDelegate = 0;
356 }
357 
358 template <typename T>
360 {
361  return mIdentifier;
362 }
363 
364 template <typename T>
366 {
367  mName = name;
368 }
369 
370 template <typename T>
372 {
373  return mName;
374 }
375 
376 
377 template <typename T>
379 {
380  uint32_t stringLength = name.Length();
381  mShortenedNames[stringLength] = name; //Does a string copy into the map.
382 }
383 
384 template <typename T>
385 const AAX_CString& AAX_CParameter<T>::ShortenedName(int32_t iNumCharacters) const
386 {
387  //More characters than the full name of no specific shortened names.
388  if ((iNumCharacters >= int32_t(mName.Length())) || (mShortenedNames.empty()) || (0 > iNumCharacters))
389  return mName;
390 
391  std::map<uint32_t, AAX_CString>::const_iterator iter = mShortenedNames.upper_bound(static_cast<uint32_t>(iNumCharacters));
392 
393  //If the iterator is already pointing to shortest name, return that.
394  if (iter == mShortenedNames.begin())
395  return iter->second;
396 
397  //lower_bound() will return the iterator that is larger than the desired value, so decrement the iterator.
398  --iter;
399  return iter->second;
400 }
401 
402 template <typename T>
404 {
405  mShortenedNames.clear();
406 }
407 
408 
409 
410 template<typename T>
411 void AAX_CParameter<T>::SetValue( T newValue )
412 {
413  double newNormalizedValue = mTaperDelegate->RealToNormalized(newValue);
414 
415  // <DMT> Always go through the automation delegate even if the control isn't automatable to prevent fighting with other GUIs.
416  // Somewhere back in the automation delegate, or elsewhere in the system, it will determine the differences in behavior surrounding
417  // automation. The only reason that there wouldn't be an automation delegate is if this parameter has yet to be added to a
418  // ParameterManager. Let's put the null value guards in place, just in case, and also for unit tests.
419  if ( mAutomationDelegate )
420  {
421  //TODO: Create RAII utility class for touch/release
422 
423  //Touch the control
424  Touch();
425 
426  //Send that token.
427  mAutomationDelegate->PostSetValueRequest(Identifier(), newNormalizedValue );
428 
429  //Release the control
430  Release();
431  }
432  else
433  {
434  mNeedNotify = true;
435 
436  // In the rare case that an automation delegate doesn't exist, lets still set the value. It's possible that someone is trying to
437  // set the new value before adding the parameter to a parametermanager.
438  UpdateNormalizedValue(newNormalizedValue);
439  }
440 }
441 
442 template <typename T>
443 void AAX_CParameter<T>::UpdateNormalizedValue(double newNormalizedValue)
444 {
445  T newValue = mTaperDelegate->NormalizedToReal(newNormalizedValue);
446  if (mNeedNotify || (mValue != newValue))
447  {
448  //Set the new value
449  mValue = newValue;
450 
451  //<DMT> Always notify that the value has changed through the automation delegate to guarantee that all control surfaces and other
452  // GUIs get their values updated.
453  if (mAutomationDelegate)
454  mAutomationDelegate->PostCurrentValue(Identifier(), newNormalizedValue);
455 
456  // clear flag
457  mNeedNotify = false;
458  }
459 }
460 
461 template<typename T>
463 {
464  return mValue;
465 }
466 
467 
468 template<typename T>
469 bool AAX_CParameter<T>::GetValueAsBool(bool* /*value*/) const
470 {
471  return false;
472 }
473 template <>
474 bool AAX_CParameter<bool>::GetValueAsBool(bool* value) const;
475 
476 
477 template<typename T>
478 bool AAX_CParameter<T>::GetValueAsInt32(int32_t* /*value*/) const
479 {
480  return false;
481 }
482 template<>
483 bool AAX_CParameter<int32_t>::GetValueAsInt32(int32_t* value) const;
484 
485 template<typename T>
486 bool AAX_CParameter<T>::GetValueAsFloat(float* /*value*/) const
487 {
488  return false;
489 }
490 template<>
491 bool AAX_CParameter<float>::GetValueAsFloat(float* value) const;
492 
493 template<typename T>
494 bool AAX_CParameter<T>::GetValueAsDouble(double* /*value*/) const
495 {
496  return false;
497 }
498 template<>
499 bool AAX_CParameter<double>::GetValueAsDouble(double* value) const;
500 
501 template<typename T>
503 {
504  return false;
505 }
506 template<>
508 
509 template<typename T>
511 {
512  return false;
513 }
514 template<>
516 
517 template<typename T>
519 {
520  return false;
521 }
522 template<>
524 
525 template<typename T>
527 {
528  return false;
529 }
530 template<>
532 
533 template<typename T>
535 {
536  return false;
537 }
538 template<>
540 
541 template<typename T>
543 {
544  return false;
545 }
546 template<>
548 
549 template<typename T>
550 void AAX_CParameter<T>::SetNormalizedDefaultValue(double newNormalizedDefault)
551 {
552  T newDefaultValue = mTaperDelegate->NormalizedToReal(newNormalizedDefault);
553  SetDefaultValue(newDefaultValue);
554 }
555 
556 template<typename T>
558 {
559  double normalizedDefault = mTaperDelegate->RealToNormalized(mDefaultValue);
560  return normalizedDefault;
561 }
562 
563 template<typename T>
564 void AAX_CParameter<T>::SetDefaultValue(T newDefaultValue)
565 {
566  newDefaultValue = mTaperDelegate->ConstrainRealValue(newDefaultValue);
567  mDefaultValue = newDefaultValue;
568 }
569 
570 template<typename T>
572 {
573  return mDefaultValue;
574 }
575 
576 template<typename T>
578 {
579  SetValue(mDefaultValue);
580 }
581 
582 template<typename T>
583 void AAX_CParameter<T>::SetNumberOfSteps(uint32_t numSteps)
584 {
585  mNumSteps = numSteps;
586 }
587 
588 template<typename T>
590 {
591  return mNumSteps;
592 }
593 
594 template<typename T>
596 {
597  double numSteps = (double) this->GetNumberOfSteps ();
598  if ( numSteps < 2.0 )
599  return 0;
600 
601  double value = this->GetNormalizedValue ();
602  double valuePerStep = 1.0 / ( numSteps - 1.0 );
603  double curStep = ( value / valuePerStep ) + 0.5;
604  if ( curStep < 0.0 )
605  curStep = 0.0;
606  else if ( curStep > (double) ( numSteps - 1.0 ) )
607  curStep = (double) ( numSteps - 1.0 );
608 
609  return (uint32_t) curStep;
610 }
611 
612 template<typename T>
614 {
615  double numSteps = (double) this->GetNumberOfSteps ();
616  if ( numSteps < 2.0 )
617  return;
618 
619  double valuePerStep = 1.0 / ( numSteps - 1.0 );
620  double value = valuePerStep * (double) iStep;
621  if ( value < 0.0 )
622  value = 0.0;
623  else if ( value > 1.0 )
624  value = 1.0;
625 
626  this->SetNormalizedValue ( value );
627 }
628 
629 template<typename T>
631 {
632  mControlType = iControlType;
633 }
634 
635 template<typename T>
637 {
638  return mControlType;
639 }
640 
641 template<typename T>
643 {
644  mOrientation = iOrientation;
645 }
646 
647 template<typename T>
649 {
650  return mOrientation;
651 }
652 
653 template<typename T>
654 void AAX_CParameter<T>::SetNormalizedValue(double normalizedNewValue)
655 {
656  T newValue = mTaperDelegate->NormalizedToReal(normalizedNewValue);
657  SetValue(newValue);
658 }
659 
660 template<typename T>
662 {
663  T val = GetValue();
664  return mTaperDelegate->RealToNormalized(val);
665 }
666 
667 
668 template<typename T>
670 {
671  return mDisplayDelegate->ValueToString(GetValue(), valueString);
672 }
673 
674 template<typename T>
675 bool AAX_CParameter<T>::GetValueString(int32_t /*iMaxNumChars*/, AAX_CString* valueString) const
676 {
677  return mDisplayDelegate->ValueToString(GetValue(), valueString);
678 }
679 
680 template <typename T>
681 bool AAX_CParameter<T>::GetNormalizedValueFromString(const AAX_CString& valueString, double *normalizedValue) const
682 {
683  //First, convert the string to a value using the wrapped parameter's display delegate.
684  T value;
685  if (!mDisplayDelegate->StringToValue(valueString, &value))
686  return false;
687 
688  //Then use the wrapped parameter's taper delegate to convert to a normalized representation.
689  *normalizedValue = mTaperDelegate->RealToNormalized(value);
690 
691  //If the parameter is out of range, we should probably return false, even though we clamped the normalizedValue already just to be safe.
692  if ((value > mTaperDelegate->GetMaximumValue()) || (value < mTaperDelegate->GetMinimumValue()))
693  return false;
694 
695  return true;
696 }
697 
698 template <typename T>
699 bool AAX_CParameter<T>::GetStringFromNormalizedValue(double normalizedValue, AAX_CString& valueString) const
700 {
701  T value = mTaperDelegate->NormalizedToReal(normalizedValue);
702  if (!mDisplayDelegate->ValueToString(value, &valueString))
703  return false;
704 
705  //If the parameter is out of range, we should probably return false, even though we clamped the normalizedValue already just to be safe.
706  if ((value > mTaperDelegate->GetMaximumValue()) || (value < mTaperDelegate->GetMinimumValue()))
707  return false;
708  return true;
709 }
710 
711 template <typename T>
712 bool AAX_CParameter<T>::GetStringFromNormalizedValue(double normalizedValue, int32_t iMaxNumChars, AAX_CString& valueString) const
713 {
714  T value = mTaperDelegate->NormalizedToReal(normalizedValue);
715  if (!mDisplayDelegate->ValueToString(value, iMaxNumChars, &valueString))
716  return false;
717 
718  //If the parameter is out of range, we should probably return false, even though we clamped the normalizedValue already just to be safe.
719  if ((value > mTaperDelegate->GetMaximumValue()) || (value < mTaperDelegate->GetMinimumValue()))
720  return false;
721  return true;
722 }
723 
724 template<typename T>
726 {
727  T newValue;
728  if (!mDisplayDelegate->StringToValue(newValueString, &newValue))
729  return false;
730  SetValue(newValue);
731  return true;
732 }
733 
734 template<typename T>
735 void AAX_CParameter<T>::SetTaperDelegate(AAX_ITaperDelegateBase& taperDelegate,bool iPreserveValue)
736 {
737  double normalizeValue = this->GetNormalizedValue ();
738 
739  AAX_ITaperDelegate<T>* oldDelegate = mTaperDelegate;
740  mTaperDelegate = ((AAX_ITaperDelegate<T> &) taperDelegate).Clone();
741  delete oldDelegate;
742 
743  mNeedNotify = true;
744  if ( iPreserveValue )
745  this->SetValue ( mValue );
746  else this->UpdateNormalizedValue ( normalizeValue );
747 }
748 
749 template<typename T>
751 {
752  AAX_IDisplayDelegate<T>* oldDelegate = mDisplayDelegate;
753  mDisplayDelegate = ((AAX_IDisplayDelegate<T> &)displayDelegate).Clone();
754  delete oldDelegate;
755 
756  if (mAutomationDelegate != 0)
757  mAutomationDelegate->PostCurrentValue(mIdentifier, this->GetNormalizedValue()); //<DMT> Make sure GUIs are all notified of the change.
758 }
759 
760 template<typename T>
762 {
763  return mTaperDelegate;
764 }
765 
766 template<typename T>
768 {
769  return mDisplayDelegate;
770 }
771 
772 template<typename T>
774 {
775  return mAutomatable;
776 }
777 
778 template<typename T>
780 {
781  //Remove the old automation delegate
782  if ( mAutomationDelegate )
783  {
784  mAutomationDelegate->UnregisterParameter ( mIdentifier );
785  }
786 
787  //Add the new automation delegate, wrapped by the versioning layer.
788  mAutomationDelegate = iAutomationDelegate;
789  if ( mAutomationDelegate )
790  mAutomationDelegate->RegisterParameter ( mIdentifier );
791 }
792 
793 template<typename T>
795 {
796  //<DT> Always send the touch command, even if the control isn't automatable.
797  if (mAutomationDelegate)
798  mAutomationDelegate->PostTouchRequest( Identifier() );
799 }
800 
801 template<typename T>
803 {
804  //<DT> Always send the release command, even if the control isn't automatable.
805  if (mAutomationDelegate)
806  mAutomationDelegate->PostReleaseRequest( Identifier() );
807 }
808 
809 #endif //AAX_CParameter_H
bool GetValueAsFloat(float *value) const
Retrieves the parameter&#39;s value as a float.
Definition: AAX_CParameter.h:486
const AAX_ITaperDelegate< T > * TaperDelegate() const
Returns a reference to the parameter&#39;s taper delegate.
Definition: AAX_CParameter.h:761
std::map< uint32_t, AAX_CString > mShortenedNames
Definition: AAX_CParameter.h:267
void SetOrientation(AAX_EParameterOrientation iOrientation)
Sets the orientation of this parameter.
Definition: AAX_CParameter.h:642
Definition: AAX_Enums.h:489
bool SetValueWithBool(bool value)
Sets the parameter&#39;s value as a bool.
Definition: AAX_CParameter.h:510
AAX_EParameterType
FIC stuff that I can&#39;t include without DAE library dependence.
Definition: AAX_Enums.h:487
Defines the display behavior for a parameter.
Definition: AAX_IDisplayDelegate.h:52
Definition: AAX_CParameter.h:67
T GetValue() const
Returns the parameter&#39;s value.
Definition: AAX_CParameter.h:462
Definition: AAX_CParameter.h:64
void SetNormalizedValue(double normalizedNewValue)
Sets a parameter value using it&#39;s normalized representation.
Definition: AAX_CParameter.h:654
bool SetValueFromString(const AAX_CString &newValueString)
Converts a string to a real parameter value and sets the parameter to this value. ...
Definition: AAX_CParameter.h:725
uint32_t GetNumberOfSteps() const
Returns the number of discrete steps used by the parameter.
Definition: AAX_CParameter.h:589
void UpdateNormalizedValue(double newNormalizedValue)
Sets the parameter&#39;s state given a normalized value.
Definition: AAX_CParameter.h:443
uint32_t mNumSteps
Definition: AAX_CParameter.h:269
T mValue
Definition: AAX_CParameter.h:277
Generic implementation of an AAX_IParameter.
Definition: AAX_CParameter.h:59
virtual AAX_ITaperDelegate * Clone() const =0
Constructs and returns a copy of the taper delegate.
bool GetValueAsInt32(int32_t *value) const
Retrieves the parameter&#39;s value as an int32_t.
Definition: AAX_CParameter.h:478
Defines the taper conversion behavior for a parameter.
#define AAX_ASSERT(condition)
Asserts that a condition is true, and logs an error if the condition is false. Debug builds only...
Definition: AAX_Assert.h:186
bool mNeedNotify
Definition: AAX_CParameter.h:275
void SetAutomationDelegate(AAX_IAutomationDelegate *iAutomationDelegate)
Sets the automation delegate (if one is required)
Definition: AAX_CParameter.h:779
void SetToDefaultValue()
Restores the state of this parameter to its default value.
Definition: AAX_CParameter.h:577
AAX_ITaperDelegate< T > * mTaperDelegate
Definition: AAX_CParameter.h:272
Definition: AAX_CParameter.h:68
int32_t AAX_EParameterOrientation
Typedef for a bitfield of AAX_EParameterOrientationBits values.
Definition: AAX_Enums.h:519
AAX_CParamID Identifier() const
Returns the parameter&#39;s unique identifier.
Definition: AAX_CParameter.h:359
Definition: AAX_CParameter.h:66
Interface allowing an AAX plug-in to interact with the host&#39;s automation system.
Classes for parameter value string conversion.
Definition: AAX_IDisplayDelegate.h:68
void SetTaperDelegate(AAX_ITaperDelegateBase &taperDelegate, bool iPreserveValue=true)
Set the parameter&#39;s taper delegate.
Definition: AAX_CParameter.h:735
Definition: AAX_Enums.h:490
bool Automatable() const
Returns true if the parameter is automatable, false if it is not.
Definition: AAX_CParameter.h:773
Classes for conversion to and from normalized parameter values.
Definition: AAX_ITaperDelegate.h:88
void SetNormalizedDefaultValue(double normalizedDefault)
Sets the parameter&#39;s default value using its normalized representation.
Definition: AAX_CParameter.h:550
double GetNormalizedValue() const
Returns the normalized representation of the parameter&#39;s current real value.
Definition: AAX_CParameter.h:661
AAX_IDisplayDelegate< T > * mDisplayDelegate
Definition: AAX_CParameter.h:273
const AAX_CString & ShortenedName(int32_t iNumCharacters) const
Returns the parameter&#39;s shortened display name.
Definition: AAX_CParameter.h:385
bool GetValueAsDouble(double *value) const
Retrieves the parameter&#39;s value as a double.
Definition: AAX_CParameter.h:494
AAX_EParameterOrientation GetOrientation() const
Returns the orientation of this parameter.
Definition: AAX_CParameter.h:648
Interface allowing an AAX plug-in to interact with the host&#39;s event system.
Definition: AAX_IAutomationDelegate.h:46
char mIdentifier[eParemeterDefaultMaxIdentifierSize]
Definition: AAX_CParameter.h:265
bool SetValueWithString(const AAX_IString &value)
Sets the parameter&#39;s value as a string.
Definition: AAX_CParameter.h:542
Type
Definition: AAX_CParameter.h:63
A simple string container that can be passed across a binary boundary. This class, for simplicity, is not versioned and thus can never change.
Definition: AAX_IString.h:40
Defines the display behavior for a parameter.
uint32_t GetStepValue() const
Returns the current step for the current value of the parameter.
Definition: AAX_CParameter.h:595
bool GetValueAsBool(bool *value) const
Retrieves the parameter&#39;s value as a bool.
Definition: AAX_CParameter.h:469
virtual AAX_IDisplayDelegate * Clone() const =0
Constructs and returns a copy of the display delegate.
T GetDefaultValue() const
Returns the parameter&#39;s default value.
Definition: AAX_CParameter.h:571
void AddShortenedName(const AAX_CString &name)
Sets the parameter&#39;s shortened display name.
Definition: AAX_CParameter.h:378
double GetNormalizedDefaultValue() const
Returns the normalized representation of the parameter&#39;s real default value.
Definition: AAX_CParameter.h:557
AAX_EParameterOrientation mOrientation
Definition: AAX_CParameter.h:271
void SetNumberOfSteps(uint32_t numSteps)
Sets the number of discrete steps for this parameter.
Definition: AAX_CParameter.h:583
A generic AAX string class with similar functionality to std::string.
Definition: AAX_CString.h:35
bool SetValueWithInt32(int32_t value)
Sets the parameter&#39;s value as an int32_t.
Definition: AAX_CParameter.h:518
void SetType(AAX_EParameterType iControlType)
Sets the type of this parameter.
Definition: AAX_CParameter.h:630
Definition: AAX_CParameter.h:65
AAX_CString mName
Definition: AAX_CParameter.h:266
bool mAutomatable
Definition: AAX_CParameter.h:268
bool GetNormalizedValueFromString(const AAX_CString &valueString, double *normalizedValue) const
Converts a given string to a normalized parameter value.
Definition: AAX_CParameter.h:681
bool GetStringFromNormalizedValue(double normalizedValue, AAX_CString &valueString) const
Converts a normalized parameter value to a string representing the corresponding real value...
Definition: AAX_CParameter.h:699
void Release()
Signals the automation system that a control has been released.
Definition: AAX_CParameter.h:802
bool GetValueAsString(AAX_IString *value) const
Retrieves the parameter&#39;s value as a string.
Definition: AAX_CParameter.h:502
void SetDisplayDelegate(AAX_IDisplayDelegateBase &displayDelegate)
Set the parameter&#39;s display delegate.
Definition: AAX_CParameter.h:750
const AAX_CString & Name() const
Returns the parameter&#39;s display name.
Definition: AAX_CParameter.h:371
virtual uint32_t Length() const
void ClearShortenedNames()
Clears the internal list of shortened display names.
Definition: AAX_CParameter.h:403
void SetName(const AAX_CString &name)
Sets the parameter&#39;s display name.
Definition: AAX_CParameter.h:365
void Touch()
Signals the automation system that a control has been touched.
Definition: AAX_CParameter.h:794
virtual AAX_Result RegisterParameter(AAX_CParamID iParameterID)=0
void SetDefaultValue(T newDefaultValue)
Set the parameter&#39;s default value.
Definition: AAX_CParameter.h:564
AAX_EParameterType mControlType
Definition: AAX_CParameter.h:270
virtual ~AAX_CParameter()
Virtual destructor used to delete all locally allocated pointers.
Definition: AAX_CParameter.h:347
bool SetValueWithFloat(float value)
Sets the parameter&#39;s value as a float.
Definition: AAX_CParameter.h:526
T mDefaultValue
Definition: AAX_CParameter.h:278
const char * AAX_CParamID
Parameter identifier.
Definition: AAX.h:128
void SetStepValue(uint32_t iStep)
Returns the current step for the current value of the parameter.
Definition: AAX_CParameter.h:613
The base interface for all normalizable plug-in parameters.
Definition: AAX_IParameter.h:52
A generic AAX string class with similar functionality to std::string.
Declarations for cross-platform AAX_ASSERT, AAX_TRACE and related facilities.
void SetValue(T newValue)
Initiates a host request to set the parameter&#39;s value.
Definition: AAX_CParameter.h:411
The base interface for all normalizable plug-in parameters.
Defines the taper conversion behavior for a parameter.
Definition: AAX_ITaperDelegate.h:72
const AAX_IDisplayDelegate< T > * DisplayDelegate() const
Returns a reference to the parameter&#39;s display delegate.
Definition: AAX_CParameter.h:767
AAX_IAutomationDelegate * mAutomationDelegate
Definition: AAX_CParameter.h:274
AAX_EParameterType GetType() const
Returns the type of this parameter as an AAX_EParameterType.
Definition: AAX_CParameter.h:636
bool GetValueString(AAX_CString *valueString) const
Serializes the parameter value into a string.
Definition: AAX_CParameter.h:669
bool SetValueWithDouble(double value)
Sets the parameter&#39;s value as a double.
Definition: AAX_CParameter.h:534
Defaults
Definition: AAX_CParameter.h:71