\hypertarget{a01918}{}\doxysection{AAX\+\_\+\+CPercent\+Display\+Delegate\+Decorator\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>} Class Template Reference}
\label{a01918}\index{AAX\_CPercentDisplayDelegateDecorator$<$ T $>$@{AAX\_CPercentDisplayDelegateDecorator$<$ T $>$}}


{\ttfamily \#include $<$AAX\+\_\+\+CPercent\+Display\+Delegate\+Decorator.\+h$>$}



Inheritance diagram for AAX\+\_\+\+CPercent\+Display\+Delegate\+Decorator\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}\+:
% FIG 0


Collaboration diagram for AAX\+\_\+\+CPercent\+Display\+Delegate\+Decorator\texorpdfstring{$<$}{<} T \texorpdfstring{$>$}{>}\+:
% FIG 1


\doxysubsection{Description}
\subsubsection*{template$<$typename T$>$\newline
class AAX\+\_\+\+CPercent\+Display\+Delegate\+Decorator$<$ T $>$}
A percent decorator conforming to \mbox{\hyperlink{a02246}{AAX\+\_\+\+IDisplay\+Delegate\+Decorator}}. 

This class is an \mbox{\hyperlink{a02246}{AAX\+\_\+\+IDisplay\+Delegate\+Decorator}}, meaning that it acts as a wrapper for other display delegates or concrete display types. For more information about display delegate decorators in \mbox{\hyperlink{a00948}{AAX}}, see \mbox{\hyperlink{a00911_displaydelegates_decorators}{Display delegate decorators}}

The behavior of this class it to provide string conversion to and from percentage (\%) values. When converting a parameter value to a string, it takes the real value and performs a \% conversion before passing the value on to a concrete implementation to get a value string. It then adds on the \char`\"{}\%\char`\"{} string at the end to signify that the value was converted. This allows something like a gain value to remain internally linear at all times even though its display is converted to a percentage.

The inverse operation is also supported; this class can convert a percentage-\/formatted string into its associated real value. The string will first be converted to a number, then that number will have the inverse \% calculation applied to it to retrieve the parameter\textquotesingle{}s actual value. \doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{a01918_ab1a468a7025667b8cecbf2fc6f4f7d21}{AAX\+\_\+\+CPercent\+Display\+Delegate\+Decorator}} (const \mbox{\hyperlink{a02242}{AAX\+\_\+\+IDisplay\+Delegate}}$<$ T $>$ \&display\+Delegate)
\item 
\mbox{\hyperlink{a01918}{AAX\+\_\+\+CPercent\+Display\+Delegate\+Decorator}}$<$ T $>$ $\ast$ \mbox{\hyperlink{a01918_affe52efa34c969895f75b067e875dafb}{Clone}} () const \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Constructs and returns a copy of the display delegate. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{a01918_a06407f0b1287891bf658bc4e4166e2e4}{Value\+To\+String}} (T value, \mbox{\hyperlink{a01946}{AAX\+\_\+\+CString}} $\ast$value\+String) const \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Converts a real parameter value to a string representation. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{a01918_a80f4b7189ac37a15550e9f1846fcbfd7}{Value\+To\+String}} (T value, int32\+\_\+t max\+Num\+Chars, \mbox{\hyperlink{a01946}{AAX\+\_\+\+CString}} $\ast$value\+String) const \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Converts a real parameter value to a string representation using a size hint, useful for control surfaces and other character limited displays. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{a01918_a702a4dea21a72dc8edf6b91b5a5bf5e5}{String\+To\+Value}} (const \mbox{\hyperlink{a01946}{AAX\+\_\+\+CString}} \&value\+String, T $\ast$value) const \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Converts a string to a real parameter value. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions inherited from \mbox{\hyperlink{a02246}{AAX\+\_\+\+IDisplay\+Delegate\+Decorator$<$ T $>$}}}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{a02246_a1e103af1eaeb6530317db4e41843c166}{AAX\+\_\+\+IDisplay\+Delegate\+Decorator}} (const \mbox{\hyperlink{a02242}{AAX\+\_\+\+IDisplay\+Delegate}}$<$ T $>$ \&display\+Delegate)
\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item 
\mbox{\hyperlink{a02246_a5e3239fa6b4289dd7b3f99ce8ac1243d}{AAX\+\_\+\+IDisplay\+Delegate\+Decorator}} (const \mbox{\hyperlink{a02246}{AAX\+\_\+\+IDisplay\+Delegate\+Decorator}} \&other)
\begin{DoxyCompactList}\small\item\em Copy constructor. \end{DoxyCompactList}\item 
\mbox{\hyperlink{a02246_a65993ca0ac3d206e9526985190e2add9}{$\sim$\+AAX\+\_\+\+IDisplay\+Delegate\+Decorator}} () \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Virtual destructor. \end{DoxyCompactList}\item 
\mbox{\hyperlink{a02246}{AAX\+\_\+\+IDisplay\+Delegate\+Decorator}}$<$ T $>$ $\ast$ \mbox{\hyperlink{a02246_a8e2ad7312467089a9112ba6460fe0e5b}{Clone}} () const \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Constructs and returns a copy of the display delegate decorator. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{a02246_ada5780cfa332ac7946bf95aa65ae96f5}{Value\+To\+String}} (T value, \mbox{\hyperlink{a01946}{AAX\+\_\+\+CString}} $\ast$value\+String) const \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Converts a string to a real parameter value. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{a02246_a29a49bb21a08c1c1e59758b08396d0a4}{Value\+To\+String}} (T value, int32\+\_\+t max\+Num\+Chars, \mbox{\hyperlink{a01946}{AAX\+\_\+\+CString}} $\ast$value\+String) const \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Converts a string to a real parameter value with a size constraint. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{a02246_a18d19293f3eca619cb5bb7f1ffde1a8d}{String\+To\+Value}} (const \mbox{\hyperlink{a01946}{AAX\+\_\+\+CString}} \&value\+String, T $\ast$value) const \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\+\_\+\+OVERRIDE}}
\begin{DoxyCompactList}\small\item\em Converts a string to a real parameter value. \end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{DoxyCompactItemize}
\item 
virtual \mbox{\hyperlink{a02242}{AAX\+\_\+\+IDisplay\+Delegate}} $\ast$ \mbox{\hyperlink{a02242_abc5378e497b2586aeb223bc3bb59154f}{Clone}} () const =0
\begin{DoxyCompactList}\small\item\em Constructs and returns a copy of the display delegate. \end{DoxyCompactList}\item 
virtual bool \mbox{\hyperlink{a02242_a7fd1e2f55055c817937bbfa66b73b2fd}{Value\+To\+String}} (T value, \mbox{\hyperlink{a01946}{AAX\+\_\+\+CString}} $\ast$value\+String) const =0
\begin{DoxyCompactList}\small\item\em Converts a real parameter value to a string representation. \end{DoxyCompactList}\item 
virtual bool \mbox{\hyperlink{a02242_a471c7381db773683b69216a9c3f5eda7}{Value\+To\+String}} (T value, int32\+\_\+t max\+Num\+Chars, \mbox{\hyperlink{a01946}{AAX\+\_\+\+CString}} $\ast$value\+String) const =0
\begin{DoxyCompactList}\small\item\em Converts a real parameter value to a string representation using a size hint, useful for control surfaces and other character limited displays. \end{DoxyCompactList}\item 
virtual bool \mbox{\hyperlink{a02242_aed5224775c9f733f091afddfba057d5e}{String\+To\+Value}} (const \mbox{\hyperlink{a01946}{AAX\+\_\+\+CString}} \&value\+String, T $\ast$value) const =0
\begin{DoxyCompactList}\small\item\em Converts a string to a real parameter value. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions inherited from \mbox{\hyperlink{a02238}{AAX\+\_\+\+IDisplay\+Delegate\+Base}}}
\begin{DoxyCompactItemize}
\item 
virtual \mbox{\hyperlink{a02238_a0fdaa922b4356fb4a246053bb441a840}{$\sim$\+AAX\+\_\+\+IDisplay\+Delegate\+Base}} ()
\begin{DoxyCompactList}\small\item\em Virtual destructor. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{a01918_ab1a468a7025667b8cecbf2fc6f4f7d21}\label{a01918_ab1a468a7025667b8cecbf2fc6f4f7d21}} 
\index{AAX\_CPercentDisplayDelegateDecorator$<$ T $>$@{AAX\_CPercentDisplayDelegateDecorator$<$ T $>$}!AAX\_CPercentDisplayDelegateDecorator@{AAX\_CPercentDisplayDelegateDecorator}}
\index{AAX\_CPercentDisplayDelegateDecorator@{AAX\_CPercentDisplayDelegateDecorator}!AAX\_CPercentDisplayDelegateDecorator$<$ T $>$@{AAX\_CPercentDisplayDelegateDecorator$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{AAX\_CPercentDisplayDelegateDecorator()}{AAX\_CPercentDisplayDelegateDecorator()}}
{\footnotesize\ttfamily template$<$typename T $>$ \\
\mbox{\hyperlink{a01918}{AAX\+\_\+\+CPercent\+Display\+Delegate\+Decorator}}$<$ T $>$\mbox{\hyperlink{a01918}{\+::\+AAX\+\_\+\+CPercent\+Display\+Delegate\+Decorator}} (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{a02242}{AAX\+\_\+\+IDisplay\+Delegate}}$<$ T $>$ \&}]{display\+Delegate }\end{DoxyParamCaption})}



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{a01918_affe52efa34c969895f75b067e875dafb}\label{a01918_affe52efa34c969895f75b067e875dafb}} 
\index{AAX\_CPercentDisplayDelegateDecorator$<$ T $>$@{AAX\_CPercentDisplayDelegateDecorator$<$ T $>$}!Clone@{Clone}}
\index{Clone@{Clone}!AAX\_CPercentDisplayDelegateDecorator$<$ T $>$@{AAX\_CPercentDisplayDelegateDecorator$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{Clone()}{Clone()}}
{\footnotesize\ttfamily template$<$typename T $>$ \\
\mbox{\hyperlink{a01918}{AAX\+\_\+\+CPercent\+Display\+Delegate\+Decorator}}$<$ T $>$ $\ast$ \mbox{\hyperlink{a01918}{AAX\+\_\+\+CPercent\+Display\+Delegate\+Decorator}}$<$ T $>$\+::\+Clone (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}



Constructs and returns a copy of the display 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\_CSubclassDisplayDelegate<T>*\ \ \ \ AAX\_CSubclassDisplayDelegate<T>::Clone()\textcolor{keyword}{\ const}}
\DoxyCodeLine{\textcolor{keyword}{}\{}
\DoxyCodeLine{\ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{new}\ AAX\_CSubclassDisplayDelegate(*\textcolor{keyword}{this});}
\DoxyCodeLine{\}}

\end{DoxyCode}
 

Implements \mbox{\hyperlink{a02242_abc5378e497b2586aeb223bc3bb59154f}{AAX\+\_\+\+IDisplay\+Delegate$<$ T $>$}}.

\mbox{\Hypertarget{a01918_a06407f0b1287891bf658bc4e4166e2e4}\label{a01918_a06407f0b1287891bf658bc4e4166e2e4}} 
\index{AAX\_CPercentDisplayDelegateDecorator$<$ T $>$@{AAX\_CPercentDisplayDelegateDecorator$<$ T $>$}!ValueToString@{ValueToString}}
\index{ValueToString@{ValueToString}!AAX\_CPercentDisplayDelegateDecorator$<$ T $>$@{AAX\_CPercentDisplayDelegateDecorator$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{ValueToString()}{ValueToString()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily template$<$typename T $>$ \\
bool \mbox{\hyperlink{a01918}{AAX\+\_\+\+CPercent\+Display\+Delegate\+Decorator}}$<$ T $>$\+::\+Value\+To\+String (\begin{DoxyParamCaption}\item[{T}]{value,  }\item[{\mbox{\hyperlink{a01946}{AAX\+\_\+\+CString}} $\ast$}]{value\+String }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}



Converts a real parameter value to a string representation. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em value} & The real parameter value that will be converted \\
\hline
\mbox{\texttt{ out}}  & {\em value\+String} & A string corresponding to value\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em true} & The string conversion was successful \\
\hline
{\em false} & The string conversion was unsuccessful \\
\hline
\end{DoxyRetVals}


Implements \mbox{\hyperlink{a02242_a7fd1e2f55055c817937bbfa66b73b2fd}{AAX\+\_\+\+IDisplay\+Delegate$<$ T $>$}}.



References \mbox{\hyperlink{a02246_ada5780cfa332ac7946bf95aa65ae96f5}{AAX\+\_\+\+IDisplay\+Delegate\+Decorator$<$ T $>$\+::\+Value\+To\+String()}}.

Here is the call graph for this function\+:
% FIG 2
\mbox{\Hypertarget{a01918_a80f4b7189ac37a15550e9f1846fcbfd7}\label{a01918_a80f4b7189ac37a15550e9f1846fcbfd7}} 
\index{AAX\_CPercentDisplayDelegateDecorator$<$ T $>$@{AAX\_CPercentDisplayDelegateDecorator$<$ T $>$}!ValueToString@{ValueToString}}
\index{ValueToString@{ValueToString}!AAX\_CPercentDisplayDelegateDecorator$<$ T $>$@{AAX\_CPercentDisplayDelegateDecorator$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{ValueToString()}{ValueToString()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily template$<$typename T $>$ \\
bool \mbox{\hyperlink{a01918}{AAX\+\_\+\+CPercent\+Display\+Delegate\+Decorator}}$<$ T $>$\+::\+Value\+To\+String (\begin{DoxyParamCaption}\item[{T}]{value,  }\item[{int32\+\_\+t}]{max\+Num\+Chars,  }\item[{\mbox{\hyperlink{a01946}{AAX\+\_\+\+CString}} $\ast$}]{value\+String }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}



Converts a real parameter value to a string representation using a size hint, useful for control surfaces and other character limited displays. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em value} & The real parameter value that will be converted \\
\hline
\mbox{\texttt{ in}}  & {\em max\+Num\+Chars} & Size hint for the desired maximum number of characters in the string (not including null termination) \\
\hline
\mbox{\texttt{ out}}  & {\em value\+String} & A string corresponding to value\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em true} & The string conversion was successful \\
\hline
{\em false} & The string conversion was unsuccessful \\
\hline
\end{DoxyRetVals}


Implements \mbox{\hyperlink{a02242_a471c7381db773683b69216a9c3f5eda7}{AAX\+\_\+\+IDisplay\+Delegate$<$ T $>$}}.



References \mbox{\hyperlink{a02246_ada5780cfa332ac7946bf95aa65ae96f5}{AAX\+\_\+\+IDisplay\+Delegate\+Decorator$<$ T $>$\+::\+Value\+To\+String()}}.

Here is the call graph for this function\+:
% FIG 3
\mbox{\Hypertarget{a01918_a702a4dea21a72dc8edf6b91b5a5bf5e5}\label{a01918_a702a4dea21a72dc8edf6b91b5a5bf5e5}} 
\index{AAX\_CPercentDisplayDelegateDecorator$<$ T $>$@{AAX\_CPercentDisplayDelegateDecorator$<$ T $>$}!StringToValue@{StringToValue}}
\index{StringToValue@{StringToValue}!AAX\_CPercentDisplayDelegateDecorator$<$ T $>$@{AAX\_CPercentDisplayDelegateDecorator$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{StringToValue()}{StringToValue()}}
{\footnotesize\ttfamily template$<$typename T $>$ \\
bool \mbox{\hyperlink{a01918}{AAX\+\_\+\+CPercent\+Display\+Delegate\+Decorator}}$<$ T $>$\+::\+String\+To\+Value (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{a01946}{AAX\+\_\+\+CString}} \&}]{value\+String,  }\item[{T $\ast$}]{value }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [virtual]}}



Converts a string to a real parameter value. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em value\+String} & The string that will be converted \\
\hline
\mbox{\texttt{ out}}  & {\em value} & The real parameter value corresponding to value\+String\\
\hline
\end{DoxyParams}

\begin{DoxyRetVals}{Return values}
{\em true} & The string conversion was successful \\
\hline
{\em false} & The string conversion was unsuccessful \\
\hline
\end{DoxyRetVals}


Implements \mbox{\hyperlink{a02242_aed5224775c9f733f091afddfba057d5e}{AAX\+\_\+\+IDisplay\+Delegate$<$ T $>$}}.



References \mbox{\hyperlink{a01946_a34ccfa250b53a721417f32d4a74bfed6}{AAX\+\_\+\+CString\+::\+Length()}}, \mbox{\hyperlink{a02246_a18d19293f3eca619cb5bb7f1ffde1a8d}{AAX\+\_\+\+IDisplay\+Delegate\+Decorator$<$ T $>$\+::\+String\+To\+Value()}}, and \mbox{\hyperlink{a01946_a35132df5b9f73bc2ddbfd673f4a5d22a}{AAX\+\_\+\+CString\+::\+Sub\+String()}}.

Here is the call graph for this function\+:
% FIG 4


The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{a00761}{AAX\+\_\+\+CPercent\+Display\+Delegate\+Decorator.\+h}}\end{DoxyCompactItemize}
