\hypertarget{a00623_source}{}\doxysection{AAX\+\_\+\+CUnit\+Prefix\+Display\+Delegate\+Decorator.\+h}
\label{a00623_source}\index{AAX\_CUnitPrefixDisplayDelegateDecorator.h@{AAX\_CUnitPrefixDisplayDelegateDecorator.h}}
\mbox{\hyperlink{a00623}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{00001\ \textcolor{comment}{/*================================================================================================*/}}
\DoxyCodeLine{00002\ \textcolor{comment}{/*}}
\DoxyCodeLine{00003\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00004\ \textcolor{comment}{\ *\ \ Copyright\ 2014-\/2017,\ 2019,\ 2023-\/2024\ Avid\ Technology,\ Inc.}}
\DoxyCodeLine{00005\ \textcolor{comment}{\ *\ \ All\ rights\ reserved.}}
\DoxyCodeLine{00006\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00007\ \textcolor{comment}{\ *\ \ This\ file\ is\ part\ of\ the\ Avid\ AAX\ SDK.}}
\DoxyCodeLine{00008\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00009\ \textcolor{comment}{\ *\ \ The\ AAX\ SDK\ is\ subject\ to\ commercial\ or\ open-\/source\ licensing.}}
\DoxyCodeLine{00010\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00011\ \textcolor{comment}{\ *\ \ By\ using\ the\ AAX\ SDK,\ you\ agree\ to\ the\ terms\ of\ both\ the\ Avid\ AAX\ SDK\ License}}
\DoxyCodeLine{00012\ \textcolor{comment}{\ *\ \ Agreement\ and\ Avid\ Privacy\ Policy.}}
\DoxyCodeLine{00013\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00014\ \textcolor{comment}{\ *\ \ AAX\ SDK\ License:\ https://developer.avid.com/aax}}
\DoxyCodeLine{00015\ \textcolor{comment}{\ *\ \ Privacy\ Policy:\ https://www.avid.com/legal/privacy-\/policy-\/statement}}
\DoxyCodeLine{00016\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00017\ \textcolor{comment}{\ *\ \ Or:\ You\ may\ also\ use\ this\ code\ under\ the\ terms\ of\ the\ GPL\ v3\ (see}}
\DoxyCodeLine{00018\ \textcolor{comment}{\ *\ \ www.gnu.org/licenses).}}
\DoxyCodeLine{00019\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00020\ \textcolor{comment}{\ *\ \ THE\ AAX\ SDK\ IS\ PROVIDED\ "{}AS\ IS"{}\ WITHOUT\ ANY\ WARRANTY,\ AND\ ALL\ WARRANTIES,\ WHETHER}}
\DoxyCodeLine{00021\ \textcolor{comment}{\ *\ \ EXPRESSED\ OR\ IMPLIED,\ INCLUDING\ MERCHANTABILITY\ AND\ FITNESS\ FOR\ PURPOSE,\ ARE}}
\DoxyCodeLine{00022\ \textcolor{comment}{\ *\ \ DISCLAIMED.}}
\DoxyCodeLine{00023\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00024\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00025\ }
\DoxyCodeLine{00032\ \textcolor{comment}{/*================================================================================================*/}}
\DoxyCodeLine{00033\ }
\DoxyCodeLine{00034\ }
\DoxyCodeLine{00035\ \textcolor{preprocessor}{\#ifndef\ AAX\_CUNITPREFIXDISPLAYDELEGATEDECORATOR\_H}}
\DoxyCodeLine{00036\ \textcolor{preprocessor}{\#define\ AAX\_CUNITPREFIXDISPLAYDELEGATEDECORATOR\_H}}
\DoxyCodeLine{00037\ }
\DoxyCodeLine{00038\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{a00548}{AAX\_IDisplayDelegateDecorator.h}}"{}}}
\DoxyCodeLine{00039\ }
\DoxyCodeLine{00040\ }
\DoxyCodeLine{00071\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00072\ \textcolor{keyword}{class\ }\mbox{\hyperlink{a01978}{AAX\_CUnitPrefixDisplayDelegateDecorator}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{a02246}{AAX\_IDisplayDelegateDecorator}}<T>}
\DoxyCodeLine{00073\ \{}
\DoxyCodeLine{00074\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00075\ \ \ \ \ \mbox{\hyperlink{a01978}{AAX\_CUnitPrefixDisplayDelegateDecorator}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{a02242}{AAX\_IDisplayDelegate<T>}}\&\ displayDelegate);}
\DoxyCodeLine{00076\ \ \ \ \ }
\DoxyCodeLine{00077\ \ \ \ \ \textcolor{comment}{//Virtual\ overrides}}
\DoxyCodeLine{00078\ \ \ \ \ \mbox{\hyperlink{a01978}{AAX\_CUnitPrefixDisplayDelegateDecorator<T>}}*\ \ \ \mbox{\hyperlink{a01978_aa09598c77cd1e9556013bc8cdd651a2b}{Clone}}()\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\_OVERRIDE}};}
\DoxyCodeLine{00079\ \ \ \ \ \textcolor{keywordtype}{bool}\ \ \ \ \ \ \ \ \mbox{\hyperlink{a01978_a74d63ddd342455674e9b1b00dc0f76e2}{ValueToString}}(T\ value,\ \mbox{\hyperlink{a01946}{AAX\_CString}}*\ valueString)\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\_OVERRIDE}};}
\DoxyCodeLine{00080\ \ \ \ \ \textcolor{keywordtype}{bool}\ \ \ \ \ \ \ \ \mbox{\hyperlink{a01978_a74d63ddd342455674e9b1b00dc0f76e2}{ValueToString}}(T\ value,\ int32\_t\ maxNumChars,\ \mbox{\hyperlink{a01946}{AAX\_CString}}*\ valueString)\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\_OVERRIDE}};}
\DoxyCodeLine{00081\ \ \ \ \ \textcolor{keywordtype}{bool}\ \ \ \ \ \ \ \ \mbox{\hyperlink{a01978_a6d930afe0a249f6936504c25d9c29764}{StringToValue}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{a01946}{AAX\_CString}}\&\ valueString,\ T*\ value)\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\_OVERRIDE}};}
\DoxyCodeLine{00082\ \};}
\DoxyCodeLine{00083\ }
\DoxyCodeLine{00084\ }
\DoxyCodeLine{00085\ }
\DoxyCodeLine{00086\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00087\ \mbox{\hyperlink{a01978_a016d8c90bc04c7cb1ad6a1c23a4caed0}{AAX\_CUnitPrefixDisplayDelegateDecorator<T>::AAX\_CUnitPrefixDisplayDelegateDecorator}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{a02242}{AAX\_IDisplayDelegate<T>}}\&\ displayDelegate)\ \ :}
\DoxyCodeLine{00088\ \ \ \ \ \mbox{\hyperlink{a02246}{AAX\_IDisplayDelegateDecorator}}<T>(displayDelegate)}
\DoxyCodeLine{00089\ \{}
\DoxyCodeLine{00090\ }
\DoxyCodeLine{00091\ \}}
\DoxyCodeLine{00092\ }
\DoxyCodeLine{00093\ }
\DoxyCodeLine{00094\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00095\ \mbox{\hyperlink{a01978}{AAX\_CUnitPrefixDisplayDelegateDecorator<T>}}*\ \ \ \ \ \ \ \mbox{\hyperlink{a01978_aa09598c77cd1e9556013bc8cdd651a2b}{AAX\_CUnitPrefixDisplayDelegateDecorator<T>::Clone}}()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00096\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00097\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{new}\ \mbox{\hyperlink{a01978}{AAX\_CUnitPrefixDisplayDelegateDecorator}}(*\textcolor{keyword}{this});}
\DoxyCodeLine{00098\ \}}
\DoxyCodeLine{00099\ }
\DoxyCodeLine{00100\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00101\ \textcolor{keywordtype}{bool}\ \ \ \ \ \ \ \ \mbox{\hyperlink{a01978_a74d63ddd342455674e9b1b00dc0f76e2}{AAX\_CUnitPrefixDisplayDelegateDecorator<T>::ValueToString}}(T\ value,\ \mbox{\hyperlink{a01946}{AAX\_CString}}*\ valueString)\textcolor{keyword}{\ const\ }}
\DoxyCodeLine{00102\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00103\ \ \ \ \ \textcolor{comment}{//Find\ the\ proper\ unit\ prefix.}}
\DoxyCodeLine{00104\ \ \ \ \ T\ absValue\ =\ fabsf(\textcolor{keywordtype}{float}(value));\ \ \ \textcolor{comment}{//If\ you\ fail\ to\ compile\ on\ this\ line,\ you're\ trying\ to\ use\ this\ class\ with\ an\ integer\ type,\ which\ is\ not\ supported.}}
\DoxyCodeLine{00105\ \ \ \ \ \textcolor{keywordflow}{if}\ (absValue\ >=\ 1000000.0)}
\DoxyCodeLine{00106\ \ \ \ \ \{}
\DoxyCodeLine{00107\ \ \ \ \ \ \ \ \ value\ =\ value\ /\ ((T)\ 1000000.0);}
\DoxyCodeLine{00108\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ succeeded\ =\ \mbox{\hyperlink{a02246_ada5780cfa332ac7946bf95aa65ae96f5}{AAX\_IDisplayDelegateDecorator<T>::ValueToString}}(value,\ valueString);}
\DoxyCodeLine{00109\ \ \ \ \ \ \ \ \ *valueString\ +=\ \mbox{\hyperlink{a01946}{AAX\_CString}}(\textcolor{stringliteral}{"{}M"{}});}
\DoxyCodeLine{00110\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ succeeded;}
\DoxyCodeLine{00111\ \ \ \ \ \}}
\DoxyCodeLine{00112\ \ \ \ \ \textcolor{keywordflow}{if}\ (absValue\ >=\ ((T)\ 1000.0))}
\DoxyCodeLine{00113\ \ \ \ \ \{}
\DoxyCodeLine{00114\ \ \ \ \ \ \ \ \ value\ =\ value\ /\ ((T)\ 1000.0);}
\DoxyCodeLine{00115\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ succeeded\ =\ \mbox{\hyperlink{a02246_ada5780cfa332ac7946bf95aa65ae96f5}{AAX\_IDisplayDelegateDecorator<T>::ValueToString}}(value,\ valueString);}
\DoxyCodeLine{00116\ \ \ \ \ \ \ \ \ *valueString\ +=\ \mbox{\hyperlink{a01946}{AAX\_CString}}(\textcolor{stringliteral}{"{}k"{}});}
\DoxyCodeLine{00117\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ succeeded;}
\DoxyCodeLine{00118\ \ \ \ \ \}}
\DoxyCodeLine{00119\ \ \ \ \ \textcolor{keywordflow}{if}\ (absValue\ >=\ ((T)\ 1.0))}
\DoxyCodeLine{00120\ \ \ \ \ \{}
\DoxyCodeLine{00121\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{a02246_ada5780cfa332ac7946bf95aa65ae96f5}{AAX\_IDisplayDelegateDecorator<T>::ValueToString}}(value,\ valueString);}
\DoxyCodeLine{00122\ \ \ \ \ \}}
\DoxyCodeLine{00123\ \ \ \ \ \textcolor{keywordflow}{if}\ (absValue\ >=\ ((T)\ 0.001))}
\DoxyCodeLine{00124\ \ \ \ \ \{}
\DoxyCodeLine{00125\ \ \ \ \ \ \ \ \ value\ =\ value\ /\ ((T)\ 0.001);}
\DoxyCodeLine{00126\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ succeeded\ =\ \mbox{\hyperlink{a02246_ada5780cfa332ac7946bf95aa65ae96f5}{AAX\_IDisplayDelegateDecorator<T>::ValueToString}}(value,\ valueString);}
\DoxyCodeLine{00127\ \ \ \ \ \ \ \ \ *valueString\ +=\ \mbox{\hyperlink{a01946}{AAX\_CString}}(\textcolor{stringliteral}{"{}m"{}});}
\DoxyCodeLine{00128\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ succeeded;}
\DoxyCodeLine{00129\ \ \ \ \ \}}
\DoxyCodeLine{00130\ \ \ \ \ \textcolor{keywordflow}{if}\ (absValue\ >=\ ((T)\ 0.000001))}
\DoxyCodeLine{00131\ \ \ \ \ \{}
\DoxyCodeLine{00132\ \ \ \ \ \ \ \ \ value\ =\ value\ /\ ((T)\ 0.000001);}
\DoxyCodeLine{00133\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ succeeded\ =\ \mbox{\hyperlink{a02246_ada5780cfa332ac7946bf95aa65ae96f5}{AAX\_IDisplayDelegateDecorator<T>::ValueToString}}(value,\ valueString);}
\DoxyCodeLine{00134\ \ \ \ \ \ \ \ \ *valueString\ +=\ \mbox{\hyperlink{a01946}{AAX\_CString}}(\textcolor{stringliteral}{"{}u"{}});}
\DoxyCodeLine{00135\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ succeeded;}
\DoxyCodeLine{00136\ \ \ \ \ \}}
\DoxyCodeLine{00137\ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{a02246_ada5780cfa332ac7946bf95aa65ae96f5}{AAX\_IDisplayDelegateDecorator<T>::ValueToString}}(value,\ valueString);}
\DoxyCodeLine{00138\ \}}
\DoxyCodeLine{00139\ }
\DoxyCodeLine{00140\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00141\ \textcolor{keywordtype}{bool}\ \ \ \ \ \ \ \ \mbox{\hyperlink{a01978_a74d63ddd342455674e9b1b00dc0f76e2}{AAX\_CUnitPrefixDisplayDelegateDecorator<T>::ValueToString}}(T\ value,\ int32\_t\ maxNumChars,\ \mbox{\hyperlink{a01946}{AAX\_CString}}*\ valueString)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00142\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00143\ \ \ \ \ \textcolor{comment}{//Find\ the\ proper\ unit\ prefix.}}
\DoxyCodeLine{00144\ \ \ \ \ \textcolor{comment}{//<DMT>\ The\ maxNumChars\ is\ decremented\ by\ 1\ in\ case\ of\ the\ unit\ modifier\ being\ required\ as\ this\ is\ more\ important\ than\ precision.}}
\DoxyCodeLine{00145\ \ \ \ \ }
\DoxyCodeLine{00146\ \ \ \ \ T\ absValue\ =\ fabsf(\textcolor{keywordtype}{float}(value));\ \ \ \textcolor{comment}{//If\ you\ fail\ to\ compile\ on\ this\ line,\ you're\ trying\ to\ use\ this\ class\ with\ an\ integer\ type,\ which\ is\ not\ supported.}}
\DoxyCodeLine{00147\ \ \ \ \ \textcolor{keywordflow}{if}\ (absValue\ >=\ 1000000.0)}
\DoxyCodeLine{00148\ \ \ \ \ \{}
\DoxyCodeLine{00149\ \ \ \ \ \ \ \ \ value\ =\ value\ /\ ((T)\ 1000000.0);}
\DoxyCodeLine{00150\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ succeeded\ =\ \mbox{\hyperlink{a02246_ada5780cfa332ac7946bf95aa65ae96f5}{AAX\_IDisplayDelegateDecorator<T>::ValueToString}}(value,\ maxNumChars-\/1,\ valueString);}
\DoxyCodeLine{00151\ \ \ \ \ \ \ \ \ *valueString\ +=\ \mbox{\hyperlink{a01946}{AAX\_CString}}(\textcolor{stringliteral}{"{}M"{}});}
\DoxyCodeLine{00152\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ succeeded;}
\DoxyCodeLine{00153\ \ \ \ \ \}}
\DoxyCodeLine{00154\ \ \ \ \ \textcolor{keywordflow}{if}\ (absValue\ >=\ ((T)\ 1000.0))}
\DoxyCodeLine{00155\ \ \ \ \ \{}
\DoxyCodeLine{00156\ \ \ \ \ \ \ \ \ value\ =\ value\ /\ ((T)\ 1000.0);}
\DoxyCodeLine{00157\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ succeeded\ =\ \mbox{\hyperlink{a02246_ada5780cfa332ac7946bf95aa65ae96f5}{AAX\_IDisplayDelegateDecorator<T>::ValueToString}}(value,\ maxNumChars-\/1,\ valueString);}
\DoxyCodeLine{00158\ \ \ \ \ \ \ \ \ *valueString\ +=\ \mbox{\hyperlink{a01946}{AAX\_CString}}(\textcolor{stringliteral}{"{}k"{}});}
\DoxyCodeLine{00159\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ succeeded;}
\DoxyCodeLine{00160\ \ \ \ \ \}}
\DoxyCodeLine{00161\ \ \ \ \ \textcolor{keywordflow}{if}\ (absValue\ >=\ ((T)\ 1.0))}
\DoxyCodeLine{00162\ \ \ \ \ \{}
\DoxyCodeLine{00163\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{a02246_ada5780cfa332ac7946bf95aa65ae96f5}{AAX\_IDisplayDelegateDecorator<T>::ValueToString}}(value,\ maxNumChars,\ valueString);}
\DoxyCodeLine{00164\ \ \ \ \ \}}
\DoxyCodeLine{00165\ \ \ \ \ \textcolor{keywordflow}{if}\ (absValue\ >=\ ((T)\ 0.001))}
\DoxyCodeLine{00166\ \ \ \ \ \{}
\DoxyCodeLine{00167\ \ \ \ \ \ \ \ \ value\ =\ value\ /\ ((T)\ 0.001);}
\DoxyCodeLine{00168\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ succeeded\ =\ \mbox{\hyperlink{a02246_ada5780cfa332ac7946bf95aa65ae96f5}{AAX\_IDisplayDelegateDecorator<T>::ValueToString}}(value,\ maxNumChars-\/1,\ valueString);}
\DoxyCodeLine{00169\ \ \ \ \ \ \ \ \ *valueString\ +=\ \mbox{\hyperlink{a01946}{AAX\_CString}}(\textcolor{stringliteral}{"{}m"{}});}
\DoxyCodeLine{00170\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ succeeded;}
\DoxyCodeLine{00171\ \ \ \ \ \}}
\DoxyCodeLine{00172\ \ \ \ \ \textcolor{keywordflow}{if}\ (absValue\ >=\ ((T)\ 0.000001))}
\DoxyCodeLine{00173\ \ \ \ \ \{}
\DoxyCodeLine{00174\ \ \ \ \ \ \ \ \ value\ =\ value\ /\ ((T)\ 0.000001);}
\DoxyCodeLine{00175\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{bool}\ succeeded\ =\ \mbox{\hyperlink{a02246_ada5780cfa332ac7946bf95aa65ae96f5}{AAX\_IDisplayDelegateDecorator<T>::ValueToString}}(value,\ maxNumChars-\/1,\ valueString);}
\DoxyCodeLine{00176\ \ \ \ \ \ \ \ \ *valueString\ +=\ \mbox{\hyperlink{a01946}{AAX\_CString}}(\textcolor{stringliteral}{"{}u"{}});}
\DoxyCodeLine{00177\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ succeeded;}
\DoxyCodeLine{00178\ \ \ \ \ \}}
\DoxyCodeLine{00179\ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{a02246_ada5780cfa332ac7946bf95aa65ae96f5}{AAX\_IDisplayDelegateDecorator<T>::ValueToString}}(value,\ maxNumChars,\ valueString);}
\DoxyCodeLine{00180\ \}}
\DoxyCodeLine{00181\ }
\DoxyCodeLine{00182\ }
\DoxyCodeLine{00183\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00184\ \textcolor{keywordtype}{bool}\ \ \ \ \ \ \ \ \mbox{\hyperlink{a01978_a6d930afe0a249f6936504c25d9c29764}{AAX\_CUnitPrefixDisplayDelegateDecorator<T>::StringToValue}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{a01946}{AAX\_CString}}\&\ valueString,\ T*\ value)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00185\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00186\ \ \ \ \ \textcolor{comment}{//Just\ call\ through\ if\ there\ is\ obviously\ no\ unit\ string.}}
\DoxyCodeLine{00187\ \ \ \ \ \textcolor{keywordflow}{if}\ (valueString.\mbox{\hyperlink{a01946_a34ccfa250b53a721417f32d4a74bfed6}{Length}}()\ <=\ 1)}
\DoxyCodeLine{00188\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{a02246_a18d19293f3eca619cb5bb7f1ffde1a8d}{AAX\_IDisplayDelegateDecorator<T>::StringToValue}}(valueString,\ value);}
\DoxyCodeLine{00189\ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{00190\ \ \ \ \ \textcolor{comment}{//Just\ call\ through\ if\ the\ end\ of\ this\ string\ does\ not\ match\ the\ unit\ string.\ \ \ }}
\DoxyCodeLine{00191\ \ \ \ \ \mbox{\hyperlink{a01946}{AAX\_CString}}\ valueStringCopy(valueString);}
\DoxyCodeLine{00192\ \ \ \ \ T\ valueScalar\ =\ 1;}
\DoxyCodeLine{00193\ \ \ \ \ T\ valueDivScalar\ =\ 1;}
\DoxyCodeLine{00194\ \ \ \ \ \textcolor{keywordflow}{switch}(valueString[valueString.\mbox{\hyperlink{a01946_a34ccfa250b53a721417f32d4a74bfed6}{Length}}()-\/1])}
\DoxyCodeLine{00195\ \ \ \ \ \{}
\DoxyCodeLine{00196\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \textcolor{charliteral}{'M'}:}
\DoxyCodeLine{00197\ \ \ \ \ \ \ \ \ \ \ \ \ valueScalar\ =\ ((T)\ 1000000.0);}
\DoxyCodeLine{00198\ \ \ \ \ \ \ \ \ \ \ \ \ valueStringCopy.\mbox{\hyperlink{a01946_a8b31ded2ef83e2a4e32e547dded7f5bd}{Erase}}(valueString.\mbox{\hyperlink{a01946_a34ccfa250b53a721417f32d4a74bfed6}{Length}}()-\/1,\ 1);}
\DoxyCodeLine{00199\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{00200\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \textcolor{charliteral}{'k'}:}
\DoxyCodeLine{00201\ \ \ \ \ \ \ \ \ \ \ \ \ valueScalar\ =\ ((T)\ 1000.0);}
\DoxyCodeLine{00202\ \ \ \ \ \ \ \ \ \ \ \ \ valueStringCopy.\mbox{\hyperlink{a01946_a8b31ded2ef83e2a4e32e547dded7f5bd}{Erase}}(valueString.\mbox{\hyperlink{a01946_a34ccfa250b53a721417f32d4a74bfed6}{Length}}()-\/1,\ 1);}
\DoxyCodeLine{00203\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{00204\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \textcolor{charliteral}{'m'}:}
\DoxyCodeLine{00205\ \ \ \ \ \ \ \ \ \ \ \ \ valueScalar\ =\ ((T)\ 0.001);}
\DoxyCodeLine{00206\ \ \ \ \ \ \ \ \ \ \ \ \ valueStringCopy.\mbox{\hyperlink{a01946_a8b31ded2ef83e2a4e32e547dded7f5bd}{Erase}}(valueString.\mbox{\hyperlink{a01946_a34ccfa250b53a721417f32d4a74bfed6}{Length}}()-\/1,\ 1);}
\DoxyCodeLine{00207\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{00208\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{case}\ \textcolor{charliteral}{'u'}:}
\DoxyCodeLine{00209\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ Rounding\ errors\ occur\ when\ trying\ to\ use\ 0.000001\ so\ went\ to\ a\ div\ scalar\ instead.}}
\DoxyCodeLine{00210\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{comment}{//\ See\ bug\ https://audio-\/jira.avid.com/browse/PTSW-\/149426.}}
\DoxyCodeLine{00211\ \ \ \ \ \ \ \ \ \ \ \ \ valueDivScalar\ =\ ((T)\ 1000000.0);}
\DoxyCodeLine{00212\ \ \ \ \ \ \ \ \ \ \ \ \ valueStringCopy.\mbox{\hyperlink{a01946_a8b31ded2ef83e2a4e32e547dded7f5bd}{Erase}}(valueString.\mbox{\hyperlink{a01946_a34ccfa250b53a721417f32d4a74bfed6}{Length}}()-\/1,\ 1);}
\DoxyCodeLine{00213\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{break};}
\DoxyCodeLine{00214\ \ \ \ \ \}}
\DoxyCodeLine{00215\ \ \ \ \ \ }
\DoxyCodeLine{00216\ \ \ \ \ \textcolor{keywordtype}{bool}\ success\ =\ \mbox{\hyperlink{a02246_a18d19293f3eca619cb5bb7f1ffde1a8d}{AAX\_IDisplayDelegateDecorator<T>::StringToValue}}(valueStringCopy,\ value);}
\DoxyCodeLine{00217\ \ \ \ \ *value\ =\ valueScalar\ *\ (*value);}
\DoxyCodeLine{00218\ \ \ \ \ *value\ =\ (*value)\ /\ valueDivScalar;}
\DoxyCodeLine{00219\ \ \ \ \ \textcolor{keywordflow}{return}\ success;}
\DoxyCodeLine{00220\ \}}
\DoxyCodeLine{00221\ }
\DoxyCodeLine{00222\ }
\DoxyCodeLine{00223\ }
\DoxyCodeLine{00224\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//AAX\_CUNITPREFIXDISPLAYDELEGATEDECORATOR}}

\end{DoxyCode}
