\hypertarget{a00521_source}{}\doxysection{AAX\+\_\+\+CState\+Display\+Delegate.\+h}
\label{a00521_source}\index{AAX\_CStateDisplayDelegate.h@{AAX\_CStateDisplayDelegate.h}}
\mbox{\hyperlink{a00521}{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\_CSTATEDISPLAYDELEGATE\_H}}
\DoxyCodeLine{00036\ \textcolor{preprocessor}{\#define\ AAX\_CSTATEDISPLAYDELEGATE\_H}}
\DoxyCodeLine{00037\ }
\DoxyCodeLine{00038\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{a00476}{AAX\_IDisplayDelegate.h}}"{}}}
\DoxyCodeLine{00039\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{a00416}{AAX\_CString.h}}"{}}}
\DoxyCodeLine{00040\ }
\DoxyCodeLine{00041\ \textcolor{preprocessor}{\#include\ <vector>}}
\DoxyCodeLine{00042\ \textcolor{preprocessor}{\#if\ defined(WINDOWS\_VERSION)\ ||\ defined(LINUX\_VERSION)}}
\DoxyCodeLine{00043\ \textcolor{preprocessor}{\#include\ <algorithm>}}
\DoxyCodeLine{00044\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00045\ }
\DoxyCodeLine{00046\ }
\DoxyCodeLine{00047\ }
\DoxyCodeLine{00057\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00058\ \textcolor{keyword}{class\ }\mbox{\hyperlink{a01934}{AAX\_CStateDisplayDelegate}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{a02242}{AAX\_IDisplayDelegate}}<T>}
\DoxyCodeLine{00059\ \{}
\DoxyCodeLine{00060\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00068\ \ \ \ \ \textcolor{keyword}{explicit}\ \mbox{\hyperlink{a01934}{AAX\_CStateDisplayDelegate}}(\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\ iStateStrings[],\ T\ iMinState\ =\ 0\ );}
\DoxyCodeLine{00069\ \ \ \ \ }
\DoxyCodeLine{00078\ \ \ \ \ \textcolor{keyword}{explicit}\ \mbox{\hyperlink{a01934}{AAX\_CStateDisplayDelegate}}(\ int32\_t\ inNumStates,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\ iStateStrings[],\ T\ iMinState\ =\ 0\ );}
\DoxyCodeLine{00079\ \ \ \ \ }
\DoxyCodeLine{00085\ \ \ \ \ \textcolor{keyword}{explicit}\ \mbox{\hyperlink{a01934}{AAX\_CStateDisplayDelegate}}(\ \textcolor{keyword}{const}\ std::vector<AAX\_IString*>\&\ iStateStrings,\ T\ iMinState\ =\ 0\ );}
\DoxyCodeLine{00086\ \ \ \ \ }
\DoxyCodeLine{00087\ \ \ \ \ \mbox{\hyperlink{a01934}{AAX\_CStateDisplayDelegate}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{a01934}{AAX\_CStateDisplayDelegate}}\&\ other);}
\DoxyCodeLine{00088\ }
\DoxyCodeLine{00089\ \ \ \ \ \textcolor{comment}{//Virtual\ Overrides}}
\DoxyCodeLine{00090\ \ \ \ \ \mbox{\hyperlink{a02242}{AAX\_IDisplayDelegate<T>}}*\ \mbox{\hyperlink{a01934_ad6e328d8784aaccc960da70f51f040a3}{Clone}}()\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\_OVERRIDE}};}
\DoxyCodeLine{00091\ \ \ \ \ \textcolor{keywordtype}{bool}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{a01934_aa8c3a9028d0fcf4bb2a95390de8049fa}{ValueToString}}(T\ value,\ \mbox{\hyperlink{a01946}{AAX\_CString}}*\ valueString)\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\_OVERRIDE}};}
\DoxyCodeLine{00092\ \ \ \ \ \textcolor{keywordtype}{bool}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{a01934_aa8c3a9028d0fcf4bb2a95390de8049fa}{ValueToString}}(T\ value,\ int32\_t\ maxNumChars,\ \mbox{\hyperlink{a01946}{AAX\_CString}}*\ valueString)\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\_OVERRIDE}};}
\DoxyCodeLine{00093\ \ \ \ \ \textcolor{keywordtype}{bool}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{a01934_a88ad0da8c178688d38134cef85ab37b2}{StringToValue}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{a01946}{AAX\_CString}}\&\ valueString,\ T*\ value)\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a00542_ac2f24a5172689ae684344abdcce55463}{AAX\_OVERRIDE}};}
\DoxyCodeLine{00094\ \ \ \ \ }
\DoxyCodeLine{00095\ \ \ \ \ \textcolor{comment}{//AAX\_CStateDisplayDelegate}}
\DoxyCodeLine{00096\ \ \ \ \ \textcolor{keywordtype}{void}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{a01934_a64620c0927e54df1cb2881039b71b34e}{AddShortenedStrings}}(\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\ iStateStrings[],\ \textcolor{keywordtype}{int}\ iLength\ );}
\DoxyCodeLine{00097\ \ \ \ \ \textcolor{keywordtype}{bool}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{a01934_a945f045fc8348325ed05abcf75b85456}{Compare}}(\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a01946}{AAX\_CString}}\&\ valueString,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a01946}{AAX\_CString}}\&\ stateString\ )\ \textcolor{keyword}{const};}
\DoxyCodeLine{00098\ }
\DoxyCodeLine{00099\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00100\ \ \ \ \ \mbox{\hyperlink{a01934}{AAX\_CStateDisplayDelegate}}();\ \ \ \ \ \ \ \textcolor{comment}{//private\ contructor\ to\ prevent\ its\ use\ externally.}}
\DoxyCodeLine{00101\ }
\DoxyCodeLine{00102\ \ \ \ \ T\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ mMinState;}
\DoxyCodeLine{00103\ \ \ \ \ std::vector<AAX\_CString>\ \ \ \ mStateStrings;}
\DoxyCodeLine{00104\ \ \ \ \ }
\DoxyCodeLine{00105\ \ \ \ \ \textcolor{keyword}{struct\ }StringTable}
\DoxyCodeLine{00106\ \ \ \ \ \{}
\DoxyCodeLine{00107\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ mStrLength;}
\DoxyCodeLine{00108\ \ \ \ \ \ \ \ \ std::vector<AAX\_CString>\ \ \ \ mStateStrings;}
\DoxyCodeLine{00109\ \ \ \ \ \};}
\DoxyCodeLine{00110\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{bool}\ StringTableSortFunc(\textcolor{keyword}{struct}\ StringTable\ i,\ \textcolor{keyword}{struct}\ StringTable\ j)}
\DoxyCodeLine{00111\ \ \ \ \ \{}
\DoxyCodeLine{00112\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ (i.mStrLength\ <\ j.mStrLength);}
\DoxyCodeLine{00113\ \ \ \ \ \}}
\DoxyCodeLine{00114\ }
\DoxyCodeLine{00115\ \ \ \ \ std::vector<struct\ StringTable>\ mShortenedStrings;}
\DoxyCodeLine{00116\ \};}
\DoxyCodeLine{00117\ }
\DoxyCodeLine{00118\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00119\ \mbox{\hyperlink{a01934}{AAX\_CStateDisplayDelegate<T>::AAX\_CStateDisplayDelegate}}(\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\ iStateStrings[],\ T\ iMinState\ \textcolor{comment}{/*\ =\ 0\ */}\ )}
\DoxyCodeLine{00120\ \{}
\DoxyCodeLine{00121\ \ \ \ \ mMinState\ =\ iMinState;}
\DoxyCodeLine{00122\ \ \ \ \ \textcolor{keywordflow}{for}\ (\ \textcolor{keywordtype}{int}\ index\ =\ 0;\ iStateStrings[\ index\ ]\ !=\ 0;\ ++index\ )}
\DoxyCodeLine{00123\ \ \ \ \ \ \ \ \ mStateStrings.push\_back(\ \mbox{\hyperlink{a01946}{AAX\_CString}}(\ iStateStrings[\ index\ ]\ )\ );}
\DoxyCodeLine{00124\ \}}
\DoxyCodeLine{00125\ }
\DoxyCodeLine{00126\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00127\ \mbox{\hyperlink{a01934}{AAX\_CStateDisplayDelegate<T>::AAX\_CStateDisplayDelegate}}(\ int32\_t\ inNumStates,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\ iStateStrings[],\ T\ iMinState\ \textcolor{comment}{/*\ =\ 0\ */}\ )}
\DoxyCodeLine{00128\ \{}
\DoxyCodeLine{00129\ \ \ \ \ mMinState\ =\ iMinState;}
\DoxyCodeLine{00130\ \ \ \ \ \textcolor{keywordflow}{for}\ (\ \textcolor{keywordtype}{int}\ index\ =\ 0;\ (index\ <\ inNumStates)\ \&\&\ (iStateStrings[\ index\ ]\ !=\ 0);\ ++index\ )}
\DoxyCodeLine{00131\ \ \ \ \ \ \ \ \ mStateStrings.push\_back(\ \mbox{\hyperlink{a01946}{AAX\_CString}}(\ iStateStrings[\ index\ ]\ )\ );}
\DoxyCodeLine{00132\ \}}
\DoxyCodeLine{00133\ }
\DoxyCodeLine{00134\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00135\ \mbox{\hyperlink{a01934}{AAX\_CStateDisplayDelegate<T>::AAX\_CStateDisplayDelegate}}(\ \textcolor{keyword}{const}\ std::vector<AAX\_IString*>\&\ iStateStrings,\ T\ iMinState\ \textcolor{comment}{/*\ =\ 0\ */}\ )}
\DoxyCodeLine{00136\ \{}
\DoxyCodeLine{00137\ \ \ \ \ mMinState\ =\ iMinState;}
\DoxyCodeLine{00138\ \ \ \ \ \textcolor{keywordflow}{for}\ (\ std::vector<AAX\_IString*>::const\_iterator\ iter\ =\ iStateStrings.begin();\ iter\ !=\ iStateStrings.end();\ ++iter\ )}
\DoxyCodeLine{00139\ \ \ \ \ \{}
\DoxyCodeLine{00140\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (*iter)}
\DoxyCodeLine{00141\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00142\ \ \ \ \ \ \ \ \ \ \ \ \ mStateStrings.push\_back(\ *(*iter)\ );}
\DoxyCodeLine{00143\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00144\ \ \ \ \ \}}
\DoxyCodeLine{00145\ \}}
\DoxyCodeLine{00146\ }
\DoxyCodeLine{00147\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00148\ \mbox{\hyperlink{a01934}{AAX\_CStateDisplayDelegate<T>::AAX\_CStateDisplayDelegate}}(\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a01934}{AAX\_CStateDisplayDelegate}}\ \&\ iOther\ )}
\DoxyCodeLine{00149\ \{}
\DoxyCodeLine{00150\ \ \ \ \ mMinState\ =\ iOther.mMinState;}
\DoxyCodeLine{00151\ }
\DoxyCodeLine{00152\ \ \ \ \ std::vector<AAX\_CString>::const\_iterator\ iter\ =\ iOther.mStateStrings.begin();}
\DoxyCodeLine{00153\ \ \ \ \ \textcolor{keywordflow}{for}\ (\ ;\ iter\ !=\ iOther.mStateStrings.end();\ ++iter\ )}
\DoxyCodeLine{00154\ \ \ \ \ \ \ \ \ mStateStrings.push\_back(\ \mbox{\hyperlink{a01946}{AAX\_CString}}(\ *iter\ )\ );}
\DoxyCodeLine{00155\ }
\DoxyCodeLine{00156\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ iOther.mShortenedStrings.size()\ >\ 0\ )}
\DoxyCodeLine{00157\ \ \ \ \ \{}
\DoxyCodeLine{00158\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\ \textcolor{keywordtype}{int}\ i\ =\ 0;\ i\ <\ (int)iOther.mShortenedStrings.size();\ i++\ )}
\DoxyCodeLine{00159\ \ \ \ \ \ \ \ \ \ \ \ \ mShortenedStrings.push\_back(\ iOther.mShortenedStrings.at(i)\ );}
\DoxyCodeLine{00160\ \ \ \ \ \}}
\DoxyCodeLine{00161\ \}}
\DoxyCodeLine{00162\ }
\DoxyCodeLine{00163\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00164\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{a01934_a64620c0927e54df1cb2881039b71b34e}{AAX\_CStateDisplayDelegate<T>::AddShortenedStrings}}(\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\ iStateStrings[],\ \textcolor{keywordtype}{int}\ iStrLength\ )}
\DoxyCodeLine{00165\ \{}
\DoxyCodeLine{00166\ \ \ \ \ \textcolor{keyword}{struct\ }StringTable\ shortendTable;}
\DoxyCodeLine{00167\ \ \ \ \ shortendTable.mStrLength\ =\ iStrLength;}
\DoxyCodeLine{00168\ \ \ \ \ \textcolor{keywordflow}{for}\ (\ \textcolor{keywordtype}{int}\ index\ =\ 0;\ iStateStrings[\ index\ ]\ !=\ 0;\ ++index\ )}
\DoxyCodeLine{00169\ \ \ \ \ \ \ \ \ shortendTable.mStateStrings.push\_back(\ \mbox{\hyperlink{a01946}{AAX\_CString}}(\ iStateStrings[\ index\ ]\ )\ );}
\DoxyCodeLine{00170\ \ \ \ \ mShortenedStrings.push\_back(shortendTable);}
\DoxyCodeLine{00171\ \ \ \ \ }
\DoxyCodeLine{00172\ \ \ \ \ \textcolor{comment}{//\ keep\ structure\ sorted\ by\ str\ lengths}}
\DoxyCodeLine{00173\ \ \ \ \ std::sort(mShortenedStrings.begin(),\ mShortenedStrings.end(),\ AAX\_CStateDisplayDelegate::StringTableSortFunc\ );}
\DoxyCodeLine{00174\ \}}
\DoxyCodeLine{00175\ }
\DoxyCodeLine{00176\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00177\ \mbox{\hyperlink{a02242}{AAX\_IDisplayDelegate<T>}}*\ \ \ \ \ \mbox{\hyperlink{a01934_ad6e328d8784aaccc960da70f51f040a3}{AAX\_CStateDisplayDelegate<T>::Clone}}()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00178\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00179\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{new}\ \mbox{\hyperlink{a01934}{AAX\_CStateDisplayDelegate}}(*\textcolor{keyword}{this});}
\DoxyCodeLine{00180\ \}}
\DoxyCodeLine{00181\ }
\DoxyCodeLine{00182\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00183\ \textcolor{keywordtype}{bool}\ \ \ \ \mbox{\hyperlink{a01934_aa8c3a9028d0fcf4bb2a95390de8049fa}{AAX\_CStateDisplayDelegate<T>::ValueToString}}(T\ value,\ \mbox{\hyperlink{a01946}{AAX\_CString}}*\ valueString)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00184\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00185\ \ \ \ \ T\ index\ =\ value\ -\/\ mMinState;}
\DoxyCodeLine{00186\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ index\ >=\ (T)\ 0\ \&\&\ index\ <\ (T)\ mStateStrings.size()\ )}
\DoxyCodeLine{00187\ \ \ \ \ \{}
\DoxyCodeLine{00188\ \ \ \ \ \ \ \ \ *valueString\ =\ mStateStrings[\ index\ ];}
\DoxyCodeLine{00189\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00190\ \ \ \ \ \}}
\DoxyCodeLine{00191\ }
\DoxyCodeLine{00192\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00193\ \}}
\DoxyCodeLine{00194\ }
\DoxyCodeLine{00195\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00196\ \textcolor{keywordtype}{bool}\ \ \ \ \mbox{\hyperlink{a01934_aa8c3a9028d0fcf4bb2a95390de8049fa}{AAX\_CStateDisplayDelegate<T>::ValueToString}}(T\ value,\ int32\_t\ maxNumChars,\ \mbox{\hyperlink{a01946}{AAX\_CString}}*\ valueString)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00197\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00198\ \ \ \ \ \textcolor{comment}{//\ if\ we\ don't\ ahve\ any\ shortened\ strings,\ just\ return\ the\ full\ length\ version}}
\DoxyCodeLine{00199\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ mShortenedStrings.size()\ ==\ 0\ )}
\DoxyCodeLine{00200\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>ValueToString(value,\ valueString);}
\DoxyCodeLine{00201\ \ \ \ \ }
\DoxyCodeLine{00202\ \ \ \ \ \textcolor{comment}{//\ iterate\ through\ shortened\ strings\ from\ longest\ to\ shortest}}
\DoxyCodeLine{00203\ \ \ \ \ \textcolor{comment}{//\ taking\ the\ first\ set\ that\ is\ short\ enough}}
\DoxyCodeLine{00204\ \ \ \ \ T\ index\ =\ value\ -\/\ mMinState;}
\DoxyCodeLine{00205\ }
\DoxyCodeLine{00206\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ index\ <\ (T)\ 0\ ||\ index\ >=\ (T)\ mStateStrings.size()\ )}
\DoxyCodeLine{00207\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00208\ }
\DoxyCodeLine{00209\ \ \ \ \ \textcolor{comment}{//\ first\ see\ if\ the\ normal\ string\ is\ short\ enough}}
\DoxyCodeLine{00210\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ mStateStrings[\ index\ ].Length()\ <\ uint32\_t(maxNumChars)\ )}
\DoxyCodeLine{00211\ \ \ \ \ \{}
\DoxyCodeLine{00212\ \ \ \ \ \ \ \ \ *valueString\ =\ mStateStrings[\ index\ ];}
\DoxyCodeLine{00213\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00214\ \ \ \ \ \}}
\DoxyCodeLine{00215\ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{00216\ \ \ \ \ \textcolor{keywordflow}{for}\ (\ \textcolor{keywordtype}{int}\ i\ =\ (\textcolor{keywordtype}{int})mShortenedStrings.size()-\/1;\ i\ >=\ 0;\ i-\/-\/\ )}
\DoxyCodeLine{00217\ \ \ \ \ \{}
\DoxyCodeLine{00218\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }StringTable\ shortStrings\ =\ mShortenedStrings.at(i);}
\DoxyCodeLine{00219\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\ shortStrings.mStrLength\ <=\ maxNumChars\ )}
\DoxyCodeLine{00220\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00221\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\ index\ >=\ (T)\ 0\ \&\&\ index\ <\ (T)\ shortStrings.mStateStrings.size()\ )}
\DoxyCodeLine{00222\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00223\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *valueString\ =\ shortStrings.mStateStrings[\ index\ ];}
\DoxyCodeLine{00224\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00225\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00226\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00227\ \ \ \ \ \}}
\DoxyCodeLine{00228\ }
\DoxyCodeLine{00229\ \ \ \ \ \textcolor{comment}{//\ if\ we\ can't\ find\ one\ short\ enough,\ just\ use\ the\ shortest\ version\ we\ can\ find}}
\DoxyCodeLine{00230\ \ \ \ \ \textcolor{keyword}{struct\ }StringTable\ shortestStrings\ =\ mShortenedStrings.at(0);}
\DoxyCodeLine{00231\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ index\ >=\ (T)\ 0\ \&\&\ index\ <\ (T)\ shortestStrings.mStateStrings.size()\ )}
\DoxyCodeLine{00232\ \ \ \ \ \{}
\DoxyCodeLine{00233\ \ \ \ \ \ \ \ \ *valueString\ =\ shortestStrings.mStateStrings[\ index\ ];}
\DoxyCodeLine{00234\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00235\ \ \ \ \ \}}
\DoxyCodeLine{00236\ \ \ \ \ }
\DoxyCodeLine{00237\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00238\ \}}
\DoxyCodeLine{00239\ }
\DoxyCodeLine{00240\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00241\ \textcolor{keywordtype}{bool}\ \ \ \ \mbox{\hyperlink{a01934_a88ad0da8c178688d38134cef85ab37b2}{AAX\_CStateDisplayDelegate<T>::StringToValue}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{a01946}{AAX\_CString}}\&\ valueString,\ T*\ value)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00242\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00243\ \ \ \ \ std::vector<AAX\_CString>::const\_iterator\ iter\ =\ mStateStrings.begin();}
\DoxyCodeLine{00244\ \ \ \ \ \textcolor{keywordflow}{for}\ (\ T\ index\ =\ 0;\ iter\ !=\ mStateStrings.end();\ ++index,\ ++iter\ )}
\DoxyCodeLine{00245\ \ \ \ \ \{}
\DoxyCodeLine{00246\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (Compare(valueString,*iter))}
\DoxyCodeLine{00247\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00248\ \ \ \ \ \ \ \ \ \ \ \ \ *value\ =\ index\ +\ mMinState;}
\DoxyCodeLine{00249\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00250\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00251\ \ \ \ \ \}}
\DoxyCodeLine{00252\ \ \ \ \ }
\DoxyCodeLine{00253\ \ \ \ \ *value\ =\ mMinState;}
\DoxyCodeLine{00254\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00255\ \}}
\DoxyCodeLine{00256\ }
\DoxyCodeLine{00257\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00258\ \textcolor{keywordtype}{bool}\ \ \ \ \mbox{\hyperlink{a01934_a945f045fc8348325ed05abcf75b85456}{AAX\_CStateDisplayDelegate<T>::Compare}}(\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a01946}{AAX\_CString}}\&\ valueString,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a01946}{AAX\_CString}}\&\ stateString\ )\textcolor{keyword}{\ const}}
\DoxyCodeLine{00259\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00260\ \ \ \ \ \textcolor{keywordflow}{return}\ valueString==stateString;}
\DoxyCodeLine{00261\ \}}
\DoxyCodeLine{00262\ }
\DoxyCodeLine{00263\ \ \ \ \ }
\DoxyCodeLine{00264\ }
\DoxyCodeLine{00265\ }
\DoxyCodeLine{00266\ }
\DoxyCodeLine{00267\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//AAX\_CSTATEDISPLAYDELEGATE\_H}}

\end{DoxyCode}
