\hypertarget{a01849}{}\doxysection{AAX\+\_\+\+CLinear\+Taper\+Delegate\texorpdfstring{$<$}{<} T, Real\+Precision \texorpdfstring{$>$}{>} Class Template Reference}
\label{a01849}\index{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$}}


{\ttfamily \#include $<$AAX\+\_\+\+CLinear\+Taper\+Delegate.\+h$>$}



Inheritance diagram for AAX\+\_\+\+CLinear\+Taper\+Delegate\texorpdfstring{$<$}{<} T, Real\+Precision \texorpdfstring{$>$}{>}\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=219pt]{a01848}
\end{center}
\end{figure}


Collaboration diagram for AAX\+\_\+\+CLinear\+Taper\+Delegate\texorpdfstring{$<$}{<} T, Real\+Precision \texorpdfstring{$>$}{>}\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=219pt]{a01847}
\end{center}
\end{figure}


\doxysubsection{Description}
\subsubsection*{template$<$typename T, int32\+\_\+t Real\+Precision = 0$>$\newline
class AAX\+\_\+\+CLinear\+Taper\+Delegate$<$ T, Real\+Precision $>$}
A linear taper conforming to \mbox{\hyperlink{a02313}{AAX\+\_\+\+ITaper\+Delegate}}. 

This taper spaces a parameter\textquotesingle{}s real values evenly between its minimum and maximum, with a linear mapping between the parameter\textquotesingle{}s real and normalized values.

\begin{DoxyParagraph}{Real\+Precision}
In addition to its type templatization, this taper includes a precision template parameter. Real\+Precision is a multiplier that works in conjunction with the round() function to limit the precision of the real values provided by this taper. For example, if Real\+Precision is 1000, it will round to the closest 0.\+001 when doing any sort of value conversion. If Real\+Precision is 1, it will round to the nearest integer. If Real\+Precision is 1000000, it will round to the nearest 0.\+000001. This is particularly useful for preventing things like 1.\+9999999 truncating down to 1 instead of rounding up to 2.
\end{DoxyParagraph}
To accomplish this behavior, the taper multiplies its unrounded parameter values by Real\+Precision, rounds the result to the nearest valid value, then divides Real\+Precision back out.

Rounding will be disabled if Real\+Precision is set to a value less than 1. This is the default. \doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{a01849_a790c48a2dd573b3304cf4cc117d97a95}{AAX\+\_\+\+CLinear\+Taper\+Delegate}} (T min\+Value=0, T max\+Value=1)
\begin{DoxyCompactList}\small\item\em Constructs a Linear Taper with specified minimum and maximum values. \end{DoxyCompactList}\item 
\mbox{\hyperlink{a01849}{AAX\+\_\+\+CLinear\+Taper\+Delegate}}$<$ T, Real\+Precision $>$ $\ast$ \mbox{\hyperlink{a01849_a022c70f963f1fb15238d21199d2d0ed9}{Clone}} () const \mbox{\hyperlink{a00533_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Constructs and returns a copy of the taper delegate. \end{DoxyCompactList}\item 
T \mbox{\hyperlink{a01849_aa8874bf8cb7b62ae363cb3d9587efb12}{Get\+Minimum\+Value}} () const \mbox{\hyperlink{a00533_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Returns the taper\textquotesingle{}s minimum real value. \end{DoxyCompactList}\item 
T \mbox{\hyperlink{a01849_a52dccdec4565f1057a4a5b304fc51161}{Get\+Maximum\+Value}} () const \mbox{\hyperlink{a00533_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Returns the taper\textquotesingle{}s maximum real value. \end{DoxyCompactList}\item 
T \mbox{\hyperlink{a01849_aad9ea52c4f3c4cae45b6d5309c2833de}{Constrain\+Real\+Value}} (T value) const \mbox{\hyperlink{a00533_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Applies a contraint to the value and returns the constrained value. \end{DoxyCompactList}\item 
T \mbox{\hyperlink{a01849_a2e38e1451e418425aceae090f2420e3e}{Normalized\+To\+Real}} (double normalized\+Value) const \mbox{\hyperlink{a00533_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Converts a normalized value to a real value. \end{DoxyCompactList}\item 
double \mbox{\hyperlink{a01849_a7949f3c1608fd85848ac4c09c0107690}{Real\+To\+Normalized}} (T real\+Value) const \mbox{\hyperlink{a00533_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Normalizes a real parameter value. \end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{DoxyCompactItemize}
\item 
virtual \mbox{\hyperlink{a02313}{AAX\+\_\+\+ITaper\+Delegate}} $\ast$ \mbox{\hyperlink{a02313_a710ff3aae07de10dfebe7c027e4b33e2}{Clone}} () const =0
\begin{DoxyCompactList}\small\item\em Constructs and returns a copy of the taper delegate. \end{DoxyCompactList}\item 
virtual T \mbox{\hyperlink{a02313_a9b14f7d73d614b6c012ed03fadb9f0eb}{Get\+Maximum\+Value}} () const =0
\begin{DoxyCompactList}\small\item\em Returns the taper\textquotesingle{}s maximum real value. \end{DoxyCompactList}\item 
virtual T \mbox{\hyperlink{a02313_ac51bda25adc6f4ce320c0dd41fa332c7}{Get\+Minimum\+Value}} () const =0
\begin{DoxyCompactList}\small\item\em Returns the taper\textquotesingle{}s minimum real value. \end{DoxyCompactList}\item 
virtual T \mbox{\hyperlink{a02313_a1de7acdc2b3e114b6686bf845c2465f1}{Constrain\+Real\+Value}} (T value) const =0
\begin{DoxyCompactList}\small\item\em Applies a contraint to the value and returns the constrained value. \end{DoxyCompactList}\item 
virtual T \mbox{\hyperlink{a02313_a0aea0765b42855205bfab84673a2de33}{Normalized\+To\+Real}} (double normalized\+Value) const =0
\begin{DoxyCompactList}\small\item\em Converts a normalized value to a real value. \end{DoxyCompactList}\item 
virtual double \mbox{\hyperlink{a02313_ab017fe7e1c1dcf6191f8b4e8b09f8add}{Real\+To\+Normalized}} (T real\+Value) const =0
\begin{DoxyCompactList}\small\item\em Normalizes a real parameter value. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions inherited from \mbox{\hyperlink{a02309}{AAX\+\_\+\+ITaper\+Delegate\+Base}}}
\begin{DoxyCompactItemize}
\item 
virtual \mbox{\hyperlink{a02309_a38bf3326334b9bc248c62faff2492d38}{$\sim$\+AAX\+\_\+\+ITaper\+Delegate\+Base}} ()
\begin{DoxyCompactList}\small\item\em Virtual destructor. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
T \mbox{\hyperlink{a01849_a08b3b4c042385e73ce79e94c0dbf54ce}{Round}} (double i\+Value) const
\end{DoxyCompactItemize}


\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{a01849_a790c48a2dd573b3304cf4cc117d97a95}\label{a01849_a790c48a2dd573b3304cf4cc117d97a95}} 
\index{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$}!AAX\_CLinearTaperDelegate@{AAX\_CLinearTaperDelegate}}
\index{AAX\_CLinearTaperDelegate@{AAX\_CLinearTaperDelegate}!AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$}}
\doxysubsubsection{\texorpdfstring{AAX\_CLinearTaperDelegate()}{AAX\_CLinearTaperDelegate()}}
{\footnotesize\ttfamily template$<$typename T , int32\+\_\+t Real\+Precision$>$ \\
\mbox{\hyperlink{a01849}{AAX\+\_\+\+CLinear\+Taper\+Delegate}}$<$ T, Real\+Precision $>$\mbox{\hyperlink{a01849}{\+::\+AAX\+\_\+\+CLinear\+Taper\+Delegate}} (\begin{DoxyParamCaption}\item[{T}]{min\+Value = {\ttfamily 0},  }\item[{T}]{max\+Value = {\ttfamily 1} }\end{DoxyParamCaption})}



Constructs a Linear Taper with specified minimum and maximum values. 

\begin{DoxyNote}{Note}
The parameter\textquotesingle{}s default value should lie within the min to max range.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em min\+Value} & \\
\hline
\mbox{\texttt{ in}}  & {\em max\+Value} & \\
\hline
\end{DoxyParams}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{a01849_a022c70f963f1fb15238d21199d2d0ed9}\label{a01849_a022c70f963f1fb15238d21199d2d0ed9}} 
\index{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$}!Clone@{Clone}}
\index{Clone@{Clone}!AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$}}
\doxysubsubsection{\texorpdfstring{Clone()}{Clone()}}
{\footnotesize\ttfamily template$<$typename T , int32\+\_\+t Real\+Precision$>$ \\
\mbox{\hyperlink{a01849}{AAX\+\_\+\+CLinear\+Taper\+Delegate}}$<$ T, Real\+Precision $>$ $\ast$ \mbox{\hyperlink{a01849}{AAX\+\_\+\+CLinear\+Taper\+Delegate}}$<$ T, Real\+Precision $>$\+::\+Clone (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}



Constructs and returns a copy of the taper delegate. 

In general, this method\textquotesingle{}s implementation can use a simple copy constructor\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{AAX\_CSubclassTaperDelegate<T>*\ \ AAX\_CSubclassTaperDelegate<T>::Clone()\textcolor{keyword}{\ const}}
\DoxyCodeLine{\textcolor{keyword}{}\{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{new}\ AAX\_CSubclassTaperDelegate(*\textcolor{keyword}{this});}
\DoxyCodeLine{\}}

\end{DoxyCode}
 

Implements \mbox{\hyperlink{a02313_a710ff3aae07de10dfebe7c027e4b33e2}{AAX\+\_\+\+ITaper\+Delegate$<$ T $>$}}.

\mbox{\Hypertarget{a01849_aa8874bf8cb7b62ae363cb3d9587efb12}\label{a01849_aa8874bf8cb7b62ae363cb3d9587efb12}} 
\index{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$}!GetMinimumValue@{GetMinimumValue}}
\index{GetMinimumValue@{GetMinimumValue}!AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$}}
\doxysubsubsection{\texorpdfstring{GetMinimumValue()}{GetMinimumValue()}}
{\footnotesize\ttfamily template$<$typename T , int32\+\_\+t Real\+Precision = 0$>$ \\
T \mbox{\hyperlink{a01849}{AAX\+\_\+\+CLinear\+Taper\+Delegate}}$<$ T, Real\+Precision $>$\+::\+Get\+Minimum\+Value (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Returns the taper\textquotesingle{}s minimum real value. 



Implements \mbox{\hyperlink{a02313_ac51bda25adc6f4ce320c0dd41fa332c7}{AAX\+\_\+\+ITaper\+Delegate$<$ T $>$}}.

\mbox{\Hypertarget{a01849_a52dccdec4565f1057a4a5b304fc51161}\label{a01849_a52dccdec4565f1057a4a5b304fc51161}} 
\index{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$}!GetMaximumValue@{GetMaximumValue}}
\index{GetMaximumValue@{GetMaximumValue}!AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$}}
\doxysubsubsection{\texorpdfstring{GetMaximumValue()}{GetMaximumValue()}}
{\footnotesize\ttfamily template$<$typename T , int32\+\_\+t Real\+Precision = 0$>$ \\
T \mbox{\hyperlink{a01849}{AAX\+\_\+\+CLinear\+Taper\+Delegate}}$<$ T, Real\+Precision $>$\+::\+Get\+Maximum\+Value (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Returns the taper\textquotesingle{}s maximum real value. 



Implements \mbox{\hyperlink{a02313_a9b14f7d73d614b6c012ed03fadb9f0eb}{AAX\+\_\+\+ITaper\+Delegate$<$ T $>$}}.

\mbox{\Hypertarget{a01849_aad9ea52c4f3c4cae45b6d5309c2833de}\label{a01849_aad9ea52c4f3c4cae45b6d5309c2833de}} 
\index{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$}!ConstrainRealValue@{ConstrainRealValue}}
\index{ConstrainRealValue@{ConstrainRealValue}!AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$}}
\doxysubsubsection{\texorpdfstring{ConstrainRealValue()}{ConstrainRealValue()}}
{\footnotesize\ttfamily template$<$typename T , int32\+\_\+t Real\+Precision$>$ \\
T \mbox{\hyperlink{a01849}{AAX\+\_\+\+CLinear\+Taper\+Delegate}}$<$ T, Real\+Precision $>$\+::\+Constrain\+Real\+Value (\begin{DoxyParamCaption}\item[{T}]{value }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}



Applies a contraint to the value and returns the constrained value. 

This method is useful if the taper requires a contraint beyond simple minimum and maximum real value limits.

\begin{DoxyNote}{Note}
This is the function that should actually enforces the constraints in Normalize\+To\+Real() and \mbox{\hyperlink{a01849_a7949f3c1608fd85848ac4c09c0107690}{Real\+To\+Normalized()}}.
\end{DoxyNote}

\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em value} & The unconstrained value \\
\hline
\end{DoxyParams}


Implements \mbox{\hyperlink{a02313_a1de7acdc2b3e114b6686bf845c2465f1}{AAX\+\_\+\+ITaper\+Delegate$<$ T $>$}}.

\mbox{\Hypertarget{a01849_a2e38e1451e418425aceae090f2420e3e}\label{a01849_a2e38e1451e418425aceae090f2420e3e}} 
\index{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$}!NormalizedToReal@{NormalizedToReal}}
\index{NormalizedToReal@{NormalizedToReal}!AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$}}
\doxysubsubsection{\texorpdfstring{NormalizedToReal()}{NormalizedToReal()}}
{\footnotesize\ttfamily template$<$typename T , int32\+\_\+t Real\+Precision$>$ \\
T \mbox{\hyperlink{a01849}{AAX\+\_\+\+CLinear\+Taper\+Delegate}}$<$ T, Real\+Precision $>$\+::\+Normalized\+To\+Real (\begin{DoxyParamCaption}\item[{double}]{normalized\+Value }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}



Converts a normalized value to a real value. 

This is where the actual taper algorithm is implemented.

This function should perform the exact inverse of \mbox{\hyperlink{a01849_a7949f3c1608fd85848ac4c09c0107690}{Real\+To\+Normalized()}}, to within the roundoff precision of the individual taper implementation.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em normalized\+Value} & The normalized value that will be converted \\
\hline
\end{DoxyParams}


Implements \mbox{\hyperlink{a02313_a0aea0765b42855205bfab84673a2de33}{AAX\+\_\+\+ITaper\+Delegate$<$ T $>$}}.

\mbox{\Hypertarget{a01849_a7949f3c1608fd85848ac4c09c0107690}\label{a01849_a7949f3c1608fd85848ac4c09c0107690}} 
\index{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$}!RealToNormalized@{RealToNormalized}}
\index{RealToNormalized@{RealToNormalized}!AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$}}
\doxysubsubsection{\texorpdfstring{RealToNormalized()}{RealToNormalized()}}
{\footnotesize\ttfamily template$<$typename T , int32\+\_\+t Real\+Precision$>$ \\
double \mbox{\hyperlink{a01849}{AAX\+\_\+\+CLinear\+Taper\+Delegate}}$<$ T, Real\+Precision $>$\+::\+Real\+To\+Normalized (\begin{DoxyParamCaption}\item[{T}]{real\+Value }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}



Normalizes a real parameter value. 

This is where the actual taper algorithm is implemented.

This function should perform the exact inverse of \mbox{\hyperlink{a01849_a2e38e1451e418425aceae090f2420e3e}{Normalized\+To\+Real()}}, to within the roundoff precision of the individual taper implementation.


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em real\+Value} & The real parameter value that will be normalized \\
\hline
\end{DoxyParams}


Implements \mbox{\hyperlink{a02313_ab017fe7e1c1dcf6191f8b4e8b09f8add}{AAX\+\_\+\+ITaper\+Delegate$<$ T $>$}}.

\mbox{\Hypertarget{a01849_a08b3b4c042385e73ce79e94c0dbf54ce}\label{a01849_a08b3b4c042385e73ce79e94c0dbf54ce}} 
\index{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$}!Round@{Round}}
\index{Round@{Round}!AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$@{AAX\_CLinearTaperDelegate$<$ T, RealPrecision $>$}}
\doxysubsubsection{\texorpdfstring{Round()}{Round()}}
{\footnotesize\ttfamily template$<$typename T , int32\+\_\+t Real\+Precision$>$ \\
T \mbox{\hyperlink{a01849}{AAX\+\_\+\+CLinear\+Taper\+Delegate}}$<$ T, Real\+Precision $>$\+::\+Round (\begin{DoxyParamCaption}\item[{double}]{i\+Value }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [protected]}}



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{a00782}{AAX\+\_\+\+CLinear\+Taper\+Delegate.\+h}}\end{DoxyCompactItemize}
