AAX SDK  2.1.1
Avid Audio Extensions Development Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AAX_CBinaryTaperDelegate.h
Go to the documentation of this file.
1 /*================================================================================================*/
2 /*
3  *
4  * Copyright (c) 2011 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_CBINARYTAPERDELEGATE_H
26 #define AAX_CBINARYTAPERDELEGATE_H
27 
28 #include "AAX_ITaperDelegate.h"
29 
30 
43 template <typename T>
45 {
46 public:
47 
52 
53  //Virtual Overrides
55  T GetMaximumValue() const;
56  T GetMinimumValue() const;
57  T ConstrainRealValue(T value) const;
58  T NormalizedToReal(double normalizedValue) const;
59  double RealToNormalized(T realValue) const;
60 };
61 
62 
63 
64 
65 
66 
67 template <typename T>
70 {
71 }
72 
73 template <typename T>
75 {
76  return new AAX_CBinaryTaperDelegate(*this);
77 }
78 
79 template <typename T>
81 {
82  return false;
83 }
84 
85 template <typename T>
87 {
88  return true;
89 }
90 
91 template <typename T>
93 {
94  return value;
95 }
96 
97 template <typename T>
98 T AAX_CBinaryTaperDelegate<T>::NormalizedToReal(double normalizedValue) const
99 {
100  if (normalizedValue > 0.0f)
101  return (T)(1); //should construct true for bool
102  return (T)(0); //should construct false for bool
103 }
104 
105 template <typename T>
107 {
108  if (realValue > (T)(0))
109  return 1.0f;
110  return 0.0f;
111 }
112 
113 
114 
115 
116 #endif //AAX_CBINARYTAPERDELEGATE_H
117 
118 
double RealToNormalized(T realValue) const
Normalizes a real parameter value.
Definition: AAX_CBinaryTaperDelegate.h:106
T GetMaximumValue() const
Returns the taper&#39;s maximum real value.
Definition: AAX_CBinaryTaperDelegate.h:86
Defines the taper conversion behavior for a parameter.
Classes for conversion to and from normalized parameter values.
Definition: AAX_ITaperDelegate.h:88
T NormalizedToReal(double normalizedValue) const
Converts a normalized value to a real value.
Definition: AAX_CBinaryTaperDelegate.h:98
AAX_ITaperDelegate< T > * Clone() const
Constructs and returns a copy of the taper delegate.
Definition: AAX_CBinaryTaperDelegate.h:74
T ConstrainRealValue(T value) const
Applies a contraint to the value and returns the constrained value.
Definition: AAX_CBinaryTaperDelegate.h:92
AAX_CBinaryTaperDelegate()
Constructs a Binary Taper.
Definition: AAX_CBinaryTaperDelegate.h:68
A binary taper conforming to AAX_ITaperDelegate.
Definition: AAX_CBinaryTaperDelegate.h:44
T GetMinimumValue() const
Returns the taper&#39;s minimum real value.
Definition: AAX_CBinaryTaperDelegate.h:80