\hypertarget{a00512_source}{}\doxysection{AAX\+\_\+\+CState\+Display\+Delegate.\+h}
\label{a00512_source}\index{AAX\_CStateDisplayDelegate.h@{AAX\_CStateDisplayDelegate.h}}
\mbox{\hyperlink{a00512}{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\ Avid\ Technology,\ Inc.}}
\DoxyCodeLine{00005\ \textcolor{comment}{\ *\ \ All\ rights\ reserved.}}
\DoxyCodeLine{00006\ \textcolor{comment}{\ *\ \ }}
\DoxyCodeLine{00007\ \textcolor{comment}{\ *\ \ CONFIDENTIAL:\ this\ document\ contains\ confidential\ information\ of\ Avid.\ Do}}
\DoxyCodeLine{00008\ \textcolor{comment}{\ *\ \ not\ disclose\ to\ any\ third\ party.\ Use\ of\ the\ information\ contained\ in\ this}}
\DoxyCodeLine{00009\ \textcolor{comment}{\ *\ \ document\ is\ subject\ to\ an\ Avid\ SDK\ license.}}
\DoxyCodeLine{00010\ \textcolor{comment}{\ *}}
\DoxyCodeLine{00011\ \textcolor{comment}{\ */}}
\DoxyCodeLine{00012\ }
\DoxyCodeLine{00019\ \textcolor{comment}{/*================================================================================================*/}}
\DoxyCodeLine{00020\ }
\DoxyCodeLine{00021\ }
\DoxyCodeLine{00022\ \textcolor{preprocessor}{\#ifndef\ AAX\_CSTATEDISPLAYDELEGATE\_H}}
\DoxyCodeLine{00023\ \textcolor{preprocessor}{\#define\ AAX\_CSTATEDISPLAYDELEGATE\_H}}
\DoxyCodeLine{00024\ }
\DoxyCodeLine{00025\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{a00467}{AAX\_IDisplayDelegate.h}}"{}}}
\DoxyCodeLine{00026\ \textcolor{preprocessor}{\#include\ "{}\mbox{\hyperlink{a00413}{AAX\_CString.h}}"{}}}
\DoxyCodeLine{00027\ }
\DoxyCodeLine{00028\ \textcolor{preprocessor}{\#include\ <vector>}}
\DoxyCodeLine{00029\ \textcolor{preprocessor}{\#if\ defined(WINDOWS\_VERSION)\ ||\ defined(LINUX\_VERSION)}}
\DoxyCodeLine{00030\ \textcolor{preprocessor}{\#include\ <algorithm>}}
\DoxyCodeLine{00031\ \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{00032\ }
\DoxyCodeLine{00033\ }
\DoxyCodeLine{00034\ }
\DoxyCodeLine{00044\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00045\ \textcolor{keyword}{class\ }\mbox{\hyperlink{a01921}{AAX\_CStateDisplayDelegate}}\ :\ \textcolor{keyword}{public}\ \mbox{\hyperlink{a02221}{AAX\_IDisplayDelegate}}<T>}
\DoxyCodeLine{00046\ \{}
\DoxyCodeLine{00047\ \textcolor{keyword}{public}:}
\DoxyCodeLine{00055\ \ \ \ \ \textcolor{keyword}{explicit}\ \mbox{\hyperlink{a01921}{AAX\_CStateDisplayDelegate}}(\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\ iStateStrings[],\ T\ iMinState\ =\ 0\ );}
\DoxyCodeLine{00056\ \ \ \ \ }
\DoxyCodeLine{00065\ \ \ \ \ \textcolor{keyword}{explicit}\ \mbox{\hyperlink{a01921}{AAX\_CStateDisplayDelegate}}(\ int32\_t\ inNumStates,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\ iStateStrings[],\ T\ iMinState\ =\ 0\ );}
\DoxyCodeLine{00066\ \ \ \ \ }
\DoxyCodeLine{00072\ \ \ \ \ \textcolor{keyword}{explicit}\ \mbox{\hyperlink{a01921}{AAX\_CStateDisplayDelegate}}(\ \textcolor{keyword}{const}\ std::vector<AAX\_IString*>\&\ iStateStrings,\ T\ iMinState\ =\ 0\ );}
\DoxyCodeLine{00073\ \ \ \ \ }
\DoxyCodeLine{00074\ \ \ \ \ \mbox{\hyperlink{a01921}{AAX\_CStateDisplayDelegate}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{a01921}{AAX\_CStateDisplayDelegate}}\&\ other);}
\DoxyCodeLine{00075\ }
\DoxyCodeLine{00076\ \ \ \ \ \textcolor{comment}{//Virtual\ Overrides}}
\DoxyCodeLine{00077\ \ \ \ \ \mbox{\hyperlink{a02221}{AAX\_IDisplayDelegate<T>}}*\ \mbox{\hyperlink{a01921_ad6e328d8784aaccc960da70f51f040a3}{Clone}}()\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a00533_ac2f24a5172689ae684344abdcce55463}{AAX\_OVERRIDE}};}
\DoxyCodeLine{00078\ \ \ \ \ \textcolor{keywordtype}{bool}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{a01921_aa8c3a9028d0fcf4bb2a95390de8049fa}{ValueToString}}(T\ value,\ \mbox{\hyperlink{a01933}{AAX\_CString}}*\ valueString)\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a00533_ac2f24a5172689ae684344abdcce55463}{AAX\_OVERRIDE}};}
\DoxyCodeLine{00079\ \ \ \ \ \textcolor{keywordtype}{bool}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{a01921_aa8c3a9028d0fcf4bb2a95390de8049fa}{ValueToString}}(T\ value,\ int32\_t\ maxNumChars,\ \mbox{\hyperlink{a01933}{AAX\_CString}}*\ valueString)\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a00533_ac2f24a5172689ae684344abdcce55463}{AAX\_OVERRIDE}};}
\DoxyCodeLine{00080\ \ \ \ \ \textcolor{keywordtype}{bool}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{a01921_a88ad0da8c178688d38134cef85ab37b2}{StringToValue}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{a01933}{AAX\_CString}}\&\ valueString,\ T*\ value)\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a00533_ac2f24a5172689ae684344abdcce55463}{AAX\_OVERRIDE}};}
\DoxyCodeLine{00081\ \ \ \ \ }
\DoxyCodeLine{00082\ \ \ \ \ \textcolor{comment}{//AAX\_CStateDisplayDelegate}}
\DoxyCodeLine{00083\ \ \ \ \ \textcolor{keywordtype}{void}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{a01921_a64620c0927e54df1cb2881039b71b34e}{AddShortenedStrings}}(\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\ iStateStrings[],\ \textcolor{keywordtype}{int}\ iLength\ );}
\DoxyCodeLine{00084\ \ \ \ \ \textcolor{keywordtype}{bool}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \mbox{\hyperlink{a01921_a945f045fc8348325ed05abcf75b85456}{Compare}}(\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a01933}{AAX\_CString}}\&\ valueString,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a01933}{AAX\_CString}}\&\ stateString\ )\ \textcolor{keyword}{const};}
\DoxyCodeLine{00085\ }
\DoxyCodeLine{00086\ \textcolor{keyword}{private}:}
\DoxyCodeLine{00087\ \ \ \ \ \mbox{\hyperlink{a01921}{AAX\_CStateDisplayDelegate}}();\ \ \ \ \ \ \ \textcolor{comment}{//private\ contructor\ to\ prevent\ its\ use\ externally.}}
\DoxyCodeLine{00088\ }
\DoxyCodeLine{00089\ \ \ \ \ T\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ mMinState;}
\DoxyCodeLine{00090\ \ \ \ \ std::vector<AAX\_CString>\ \ \ \ mStateStrings;}
\DoxyCodeLine{00091\ \ \ \ \ }
\DoxyCodeLine{00092\ \ \ \ \ \textcolor{keyword}{struct\ }StringTable}
\DoxyCodeLine{00093\ \ \ \ \ \{}
\DoxyCodeLine{00094\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{int}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ mStrLength;}
\DoxyCodeLine{00095\ \ \ \ \ \ \ \ \ std::vector<AAX\_CString>\ \ \ \ mStateStrings;}
\DoxyCodeLine{00096\ \ \ \ \ \};}
\DoxyCodeLine{00097\ \ \ \ \ \textcolor{keyword}{static}\ \textcolor{keywordtype}{bool}\ StringTableSortFunc(\textcolor{keyword}{struct}\ StringTable\ i,\ \textcolor{keyword}{struct}\ StringTable\ j)}
\DoxyCodeLine{00098\ \ \ \ \ \{}
\DoxyCodeLine{00099\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ (i.mStrLength\ <\ j.mStrLength);}
\DoxyCodeLine{00100\ \ \ \ \ \}}
\DoxyCodeLine{00101\ }
\DoxyCodeLine{00102\ \ \ \ \ std::vector<struct\ StringTable>\ mShortenedStrings;}
\DoxyCodeLine{00103\ \};}
\DoxyCodeLine{00104\ }
\DoxyCodeLine{00105\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00106\ \mbox{\hyperlink{a01921}{AAX\_CStateDisplayDelegate<T>::AAX\_CStateDisplayDelegate}}(\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\ iStateStrings[],\ T\ iMinState\ \textcolor{comment}{/*\ =\ 0\ */}\ )}
\DoxyCodeLine{00107\ \{}
\DoxyCodeLine{00108\ \ \ \ \ mMinState\ =\ iMinState;}
\DoxyCodeLine{00109\ \ \ \ \ \textcolor{keywordflow}{for}\ (\ \textcolor{keywordtype}{int}\ index\ =\ 0;\ iStateStrings[\ index\ ]\ !=\ 0;\ ++index\ )}
\DoxyCodeLine{00110\ \ \ \ \ \ \ \ \ mStateStrings.push\_back(\ \mbox{\hyperlink{a01933}{AAX\_CString}}(\ iStateStrings[\ index\ ]\ )\ );}
\DoxyCodeLine{00111\ \}}
\DoxyCodeLine{00112\ }
\DoxyCodeLine{00113\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00114\ \mbox{\hyperlink{a01921}{AAX\_CStateDisplayDelegate<T>::AAX\_CStateDisplayDelegate}}(\ int32\_t\ inNumStates,\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\ iStateStrings[],\ T\ iMinState\ \textcolor{comment}{/*\ =\ 0\ */}\ )}
\DoxyCodeLine{00115\ \{}
\DoxyCodeLine{00116\ \ \ \ \ mMinState\ =\ iMinState;}
\DoxyCodeLine{00117\ \ \ \ \ \textcolor{keywordflow}{for}\ (\ \textcolor{keywordtype}{int}\ index\ =\ 0;\ (index\ <\ inNumStates)\ \&\&\ (iStateStrings[\ index\ ]\ !=\ 0);\ ++index\ )}
\DoxyCodeLine{00118\ \ \ \ \ \ \ \ \ mStateStrings.push\_back(\ \mbox{\hyperlink{a01933}{AAX\_CString}}(\ iStateStrings[\ index\ ]\ )\ );}
\DoxyCodeLine{00119\ \}}
\DoxyCodeLine{00120\ }
\DoxyCodeLine{00121\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00122\ \mbox{\hyperlink{a01921}{AAX\_CStateDisplayDelegate<T>::AAX\_CStateDisplayDelegate}}(\ \textcolor{keyword}{const}\ std::vector<AAX\_IString*>\&\ iStateStrings,\ T\ iMinState\ \textcolor{comment}{/*\ =\ 0\ */}\ )}
\DoxyCodeLine{00123\ \{}
\DoxyCodeLine{00124\ \ \ \ \ mMinState\ =\ iMinState;}
\DoxyCodeLine{00125\ \ \ \ \ \textcolor{keywordflow}{for}\ (\ std::vector<AAX\_IString*>::const\_iterator\ iter\ =\ iStateStrings.begin();\ iter\ !=\ iStateStrings.end();\ ++iter\ )}
\DoxyCodeLine{00126\ \ \ \ \ \{}
\DoxyCodeLine{00127\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (*iter)}
\DoxyCodeLine{00128\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00129\ \ \ \ \ \ \ \ \ \ \ \ \ mStateStrings.push\_back(\ *(*iter)\ );}
\DoxyCodeLine{00130\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00131\ \ \ \ \ \}}
\DoxyCodeLine{00132\ \}}
\DoxyCodeLine{00133\ }
\DoxyCodeLine{00134\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00135\ \mbox{\hyperlink{a01921}{AAX\_CStateDisplayDelegate<T>::AAX\_CStateDisplayDelegate}}(\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a01921}{AAX\_CStateDisplayDelegate}}\ \&\ iOther\ )}
\DoxyCodeLine{00136\ \{}
\DoxyCodeLine{00137\ \ \ \ \ mMinState\ =\ iOther.mMinState;}
\DoxyCodeLine{00138\ }
\DoxyCodeLine{00139\ \ \ \ \ std::vector<AAX\_CString>::const\_iterator\ iter\ =\ iOther.mStateStrings.begin();}
\DoxyCodeLine{00140\ \ \ \ \ \textcolor{keywordflow}{for}\ (\ ;\ iter\ !=\ iOther.mStateStrings.end();\ ++iter\ )}
\DoxyCodeLine{00141\ \ \ \ \ \ \ \ \ mStateStrings.push\_back(\ \mbox{\hyperlink{a01933}{AAX\_CString}}(\ *iter\ )\ );}
\DoxyCodeLine{00142\ }
\DoxyCodeLine{00143\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ iOther.mShortenedStrings.size()\ >\ 0\ )}
\DoxyCodeLine{00144\ \ \ \ \ \{}
\DoxyCodeLine{00145\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{for}\ (\ \textcolor{keywordtype}{int}\ i\ =\ 0;\ i\ <\ (int)iOther.mShortenedStrings.size();\ i++\ )}
\DoxyCodeLine{00146\ \ \ \ \ \ \ \ \ \ \ \ \ mShortenedStrings.push\_back(\ iOther.mShortenedStrings.at(i)\ );}
\DoxyCodeLine{00147\ \ \ \ \ \}}
\DoxyCodeLine{00148\ \}}
\DoxyCodeLine{00149\ }
\DoxyCodeLine{00150\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00151\ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{a01921_a64620c0927e54df1cb2881039b71b34e}{AAX\_CStateDisplayDelegate<T>::AddShortenedStrings}}(\ \textcolor{keyword}{const}\ \textcolor{keywordtype}{char}\ *\ iStateStrings[],\ \textcolor{keywordtype}{int}\ iStrLength\ )}
\DoxyCodeLine{00152\ \{}
\DoxyCodeLine{00153\ \ \ \ \ \textcolor{keyword}{struct\ }StringTable\ shortendTable;}
\DoxyCodeLine{00154\ \ \ \ \ shortendTable.mStrLength\ =\ iStrLength;}
\DoxyCodeLine{00155\ \ \ \ \ \textcolor{keywordflow}{for}\ (\ \textcolor{keywordtype}{int}\ index\ =\ 0;\ iStateStrings[\ index\ ]\ !=\ 0;\ ++index\ )}
\DoxyCodeLine{00156\ \ \ \ \ \ \ \ \ shortendTable.mStateStrings.push\_back(\ \mbox{\hyperlink{a01933}{AAX\_CString}}(\ iStateStrings[\ index\ ]\ )\ );}
\DoxyCodeLine{00157\ \ \ \ \ mShortenedStrings.push\_back(shortendTable);}
\DoxyCodeLine{00158\ \ \ \ \ }
\DoxyCodeLine{00159\ \ \ \ \ \textcolor{comment}{//\ keep\ structure\ sorted\ by\ str\ lengths}}
\DoxyCodeLine{00160\ \ \ \ \ std::sort(mShortenedStrings.begin(),\ mShortenedStrings.end(),\ AAX\_CStateDisplayDelegate::StringTableSortFunc\ );}
\DoxyCodeLine{00161\ \}}
\DoxyCodeLine{00162\ }
\DoxyCodeLine{00163\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00164\ \mbox{\hyperlink{a02221}{AAX\_IDisplayDelegate<T>}}*\ \ \ \ \ \mbox{\hyperlink{a01921_ad6e328d8784aaccc960da70f51f040a3}{AAX\_CStateDisplayDelegate<T>::Clone}}()\textcolor{keyword}{\ const}}
\DoxyCodeLine{00165\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00166\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{new}\ \mbox{\hyperlink{a01921}{AAX\_CStateDisplayDelegate}}(*\textcolor{keyword}{this});}
\DoxyCodeLine{00167\ \}}
\DoxyCodeLine{00168\ }
\DoxyCodeLine{00169\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00170\ \textcolor{keywordtype}{bool}\ \ \ \ \mbox{\hyperlink{a01921_aa8c3a9028d0fcf4bb2a95390de8049fa}{AAX\_CStateDisplayDelegate<T>::ValueToString}}(T\ value,\ \mbox{\hyperlink{a01933}{AAX\_CString}}*\ valueString)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00171\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00172\ \ \ \ \ T\ index\ =\ value\ -\/\ mMinState;}
\DoxyCodeLine{00173\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ index\ >=\ (T)\ 0\ \&\&\ index\ <\ (T)\ mStateStrings.size()\ )}
\DoxyCodeLine{00174\ \ \ \ \ \{}
\DoxyCodeLine{00175\ \ \ \ \ \ \ \ \ *valueString\ =\ mStateStrings[\ index\ ];}
\DoxyCodeLine{00176\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00177\ \ \ \ \ \}}
\DoxyCodeLine{00178\ }
\DoxyCodeLine{00179\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00180\ \}}
\DoxyCodeLine{00181\ }
\DoxyCodeLine{00182\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00183\ \textcolor{keywordtype}{bool}\ \ \ \ \mbox{\hyperlink{a01921_aa8c3a9028d0fcf4bb2a95390de8049fa}{AAX\_CStateDisplayDelegate<T>::ValueToString}}(T\ value,\ int32\_t\ maxNumChars,\ \mbox{\hyperlink{a01933}{AAX\_CString}}*\ valueString)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00184\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00185\ \ \ \ \ \textcolor{comment}{//\ if\ we\ don't\ ahve\ any\ shortened\ strings,\ just\ return\ the\ full\ length\ version}}
\DoxyCodeLine{00186\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ mShortenedStrings.size()\ ==\ 0\ )}
\DoxyCodeLine{00187\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ this-\/>ValueToString(value,\ valueString);}
\DoxyCodeLine{00188\ \ \ \ \ }
\DoxyCodeLine{00189\ \ \ \ \ \textcolor{comment}{//\ iterate\ through\ shortened\ strings\ from\ longest\ to\ shortest}}
\DoxyCodeLine{00190\ \ \ \ \ \textcolor{comment}{//\ taking\ the\ first\ set\ that\ is\ short\ enough}}
\DoxyCodeLine{00191\ \ \ \ \ T\ index\ =\ value\ -\/\ mMinState;}
\DoxyCodeLine{00192\ }
\DoxyCodeLine{00193\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ index\ <\ (T)\ 0\ ||\ index\ >=\ (T)\ mStateStrings.size()\ )}
\DoxyCodeLine{00194\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00195\ }
\DoxyCodeLine{00196\ \ \ \ \ \textcolor{comment}{//\ first\ see\ if\ the\ normal\ string\ is\ short\ enough}}
\DoxyCodeLine{00197\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ mStateStrings[\ index\ ].Length()\ <\ uint32\_t(maxNumChars)\ )}
\DoxyCodeLine{00198\ \ \ \ \ \{}
\DoxyCodeLine{00199\ \ \ \ \ \ \ \ \ *valueString\ =\ mStateStrings[\ index\ ];}
\DoxyCodeLine{00200\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00201\ \ \ \ \ \}}
\DoxyCodeLine{00202\ \ \ \ \ \ \ \ \ }
\DoxyCodeLine{00203\ \ \ \ \ \textcolor{keywordflow}{for}\ (\ \textcolor{keywordtype}{int}\ i\ =\ (\textcolor{keywordtype}{int})mShortenedStrings.size()-\/1;\ i\ >=\ 0;\ i-\/-\/\ )}
\DoxyCodeLine{00204\ \ \ \ \ \{}
\DoxyCodeLine{00205\ \ \ \ \ \ \ \ \ \textcolor{keyword}{struct\ }StringTable\ shortStrings\ =\ mShortenedStrings.at(i);}
\DoxyCodeLine{00206\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\ shortStrings.mStrLength\ <=\ maxNumChars\ )}
\DoxyCodeLine{00207\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00208\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (\ index\ >=\ (T)\ 0\ \&\&\ index\ <\ (T)\ shortStrings.mStateStrings.size()\ )}
\DoxyCodeLine{00209\ \ \ \ \ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00210\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ *valueString\ =\ shortStrings.mStateStrings[\ index\ ];}
\DoxyCodeLine{00211\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00212\ \ \ \ \ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00213\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00214\ \ \ \ \ \}}
\DoxyCodeLine{00215\ }
\DoxyCodeLine{00216\ \ \ \ \ \textcolor{comment}{//\ if\ we\ can't\ find\ one\ short\ enough,\ just\ use\ the\ shortest\ version\ we\ can\ find}}
\DoxyCodeLine{00217\ \ \ \ \ \textcolor{keyword}{struct\ }StringTable\ shortestStrings\ =\ mShortenedStrings.at(0);}
\DoxyCodeLine{00218\ \ \ \ \ \textcolor{keywordflow}{if}\ (\ index\ >=\ (T)\ 0\ \&\&\ index\ <\ (T)\ shortestStrings.mStateStrings.size()\ )}
\DoxyCodeLine{00219\ \ \ \ \ \{}
\DoxyCodeLine{00220\ \ \ \ \ \ \ \ \ *valueString\ =\ shortestStrings.mStateStrings[\ index\ ];}
\DoxyCodeLine{00221\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00222\ \ \ \ \ \}}
\DoxyCodeLine{00223\ \ \ \ \ }
\DoxyCodeLine{00224\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00225\ \}}
\DoxyCodeLine{00226\ }
\DoxyCodeLine{00227\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00228\ \textcolor{keywordtype}{bool}\ \ \ \ \mbox{\hyperlink{a01921_a88ad0da8c178688d38134cef85ab37b2}{AAX\_CStateDisplayDelegate<T>::StringToValue}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{a01933}{AAX\_CString}}\&\ valueString,\ T*\ value)\textcolor{keyword}{\ const}}
\DoxyCodeLine{00229\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00230\ \ \ \ \ std::vector<AAX\_CString>::const\_iterator\ iter\ =\ mStateStrings.begin();}
\DoxyCodeLine{00231\ \ \ \ \ \textcolor{keywordflow}{for}\ (\ T\ index\ =\ 0;\ iter\ !=\ mStateStrings.end();\ ++index,\ ++iter\ )}
\DoxyCodeLine{00232\ \ \ \ \ \{}
\DoxyCodeLine{00233\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (Compare(valueString,*iter))}
\DoxyCodeLine{00234\ \ \ \ \ \ \ \ \ \{}
\DoxyCodeLine{00235\ \ \ \ \ \ \ \ \ \ \ \ \ *value\ =\ index\ +\ mMinState;}
\DoxyCodeLine{00236\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{true};}
\DoxyCodeLine{00237\ \ \ \ \ \ \ \ \ \}}
\DoxyCodeLine{00238\ \ \ \ \ \}}
\DoxyCodeLine{00239\ \ \ \ \ }
\DoxyCodeLine{00240\ \ \ \ \ *value\ =\ mMinState;}
\DoxyCodeLine{00241\ \ \ \ \ \textcolor{keywordflow}{return}\ \textcolor{keyword}{false};}
\DoxyCodeLine{00242\ \}}
\DoxyCodeLine{00243\ }
\DoxyCodeLine{00244\ \textcolor{keyword}{template}\ <\textcolor{keyword}{typename}\ T>}
\DoxyCodeLine{00245\ \textcolor{keywordtype}{bool}\ \ \ \ \mbox{\hyperlink{a01921_a945f045fc8348325ed05abcf75b85456}{AAX\_CStateDisplayDelegate<T>::Compare}}(\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a01933}{AAX\_CString}}\&\ valueString,\ \textcolor{keyword}{const}\ \mbox{\hyperlink{a01933}{AAX\_CString}}\&\ stateString\ )\textcolor{keyword}{\ const}}
\DoxyCodeLine{00246\ \textcolor{keyword}{}\{}
\DoxyCodeLine{00247\ \ \ \ \ \textcolor{keywordflow}{return}\ valueString==stateString;}
\DoxyCodeLine{00248\ \}}
\DoxyCodeLine{00249\ }
\DoxyCodeLine{00250\ \ \ \ \ }
\DoxyCodeLine{00251\ }
\DoxyCodeLine{00252\ }
\DoxyCodeLine{00253\ }
\DoxyCodeLine{00254\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//AAX\_CSTATEDISPLAYDELEGATE\_H}}

\end{DoxyCode}
