\section{U\-T\-I\-L\-:\-:Index\-Map Class Reference}
\label{classUTIL_1_1IndexMap}\index{U\-T\-I\-L\-::\-Index\-Map@{U\-T\-I\-L\-::\-Index\-Map}}


utility class to manage indexes according to Collection Parameters  




{\ttfamily \#include $<$U\-T\-I\-L/\-Index\-Map.\-h$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\bf Index\-Map} (const {\bf E\-V\-E\-N\-T\-::\-L\-C\-Collection} $\ast$col, const std\-::string \&key1, const std\-::string \&key2)
\begin{DoxyCompactList}\small\item\em Constructor\-: takes as arguments the collection where the parameters are stored and the parameter names to manage Before you loop over a collection create an \doxyref{Index\-Map}{p.}{classUTIL_1_1IndexMap} object with the keys to manage. \end{DoxyCompactList}\item 
int {\bf encode} (const std\-::string name)
\begin{DoxyCompactList}\small\item\em encode string to index (e.\-g. \end{DoxyCompactList}\item 
const std\-::string \& {\bf decode} (int type) const 
\begin{DoxyCompactList}\small\item\em decode int to string (e.\-g. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
const {\bf E\-V\-E\-N\-T\-::\-L\-C\-Collection} $\ast$ {\bfseries \-\_\-col}\label{classUTIL_1_1IndexMap_adc1a923e1d36675e26c0245f3488fa80}

\item 
const std\-::string {\bfseries \-\_\-key1}\label{classUTIL_1_1IndexMap_aa08c1bcb769223b2b8ef445ec390d217}

\item 
const std\-::string {\bfseries \-\_\-key2}\label{classUTIL_1_1IndexMap_a24ad5b4a95349eb1342b74737e6cfa03}

\item 
{\bf E\-V\-E\-N\-T\-::\-String\-Vec} {\bfseries \-\_\-strvec}\label{classUTIL_1_1IndexMap_abe2f444c24fbfcf5f36882175d34ede0}

\item 
{\bf E\-V\-E\-N\-T\-::\-Int\-Vec} {\bfseries \-\_\-intvec}\label{classUTIL_1_1IndexMap_a9220d1550d19f3e670ed15c1b6fd2ec9}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
utility class to manage indexes according to Collection Parameters 

E\-X\-P\-: U\-N\-D\-E\-R D\-E\-V\-E\-L\-O\-P\-M\-E\-N\-T!!! -\/ Don't use this class yet

\begin{DoxyAuthor}{Author}
engels 
\end{DoxyAuthor}
\begin{DoxyVersion}{Version}

\end{DoxyVersion}
\begin{DoxyParagraph}{Id\-:}
\doxyref{Index\-Map.\-h}{p.}{IndexMap_8h_source},v 1.\-2 2006-\/09-\/21 06\-:10\-:38 gaede Exp 
\end{DoxyParagraph}


\subsection{Constructor \& Destructor Documentation}
\index{U\-T\-I\-L\-::\-Index\-Map@{U\-T\-I\-L\-::\-Index\-Map}!Index\-Map@{Index\-Map}}
\index{Index\-Map@{Index\-Map}!UTIL::IndexMap@{U\-T\-I\-L\-::\-Index\-Map}}
\subsubsection[{Index\-Map}]{\setlength{\rightskip}{0pt plus 5cm}U\-T\-I\-L\-::\-Index\-Map\-::\-Index\-Map (
\begin{DoxyParamCaption}
\item[{const {\bf E\-V\-E\-N\-T\-::\-L\-C\-Collection} $\ast$}]{col, }
\item[{const std\-::string \&}]{key1, }
\item[{const std\-::string \&}]{key2}
\end{DoxyParamCaption}
)}\label{classUTIL_1_1IndexMap_ad8612fb83f745cc315c22d1e864519fe}


Constructor\-: takes as arguments the collection where the parameters are stored and the parameter names to manage Before you loop over a collection create an \doxyref{Index\-Map}{p.}{classUTIL_1_1IndexMap} object with the keys to manage. 

Example\-:

L\-C\-Collection$\ast$ col = evt-\/$>$get\-Collection( \char`\"{}\-Vertices\char`\"{} ) ;

\doxyref{Index\-Map}{p.}{classUTIL_1_1IndexMap} imvtx( col, \char`\"{}\-Algorithm\-Names\char`\"{}, \char`\"{}\-Algorithm\-Types\char`\"{} ) ;

Loop over Collection....

Vertex$\ast$ v = dynamic\-\_\-cast$<$\-Vertex$\ast$$>$( col-\/$>$get\-Element\-At( i ) ) ;

cout $<$$<$ \char`\"{}vertex \char`\"{} $<$$<$ i $<$$<$ has been created with " $<$$<$ imvtx.\-decode( v-\/$>$get\-Algorithm\-Type() ) $<$$<$ endl;

End Loop 



For using the encoding use similar process\-:

\doxyref{Index\-Map}{p.}{classUTIL_1_1IndexMap} imvtx( col, \char`\"{}\-Algorithm\-Names\char`\"{}, \char`\"{}\-Algorithm\-Types\char`\"{} ) ;

Loop for creating vertices...

Vertex\-Impl$\ast$ v = new Vertex\-Impl ;

v-\/$>$set\-Algorithm\-Type( imvtx.\-encode( \char`\"{}\-Zv\-Top\char`\"{} ) );

// If the parameter \char`\"{}\-Zv\-Top\char`\"{} or even the collection parameters \char`\"{}\-Algorithm\-Names\char`\"{} and \char`\"{}\-Algorithm\-Types\char`\"{} do not exist // they are automatically added and Zv\-Top gets a corresponding new Algorithm\-Type which is also automatically added

End Loop 

References E\-V\-E\-N\-T\-::\-L\-C\-Parameters\-::get\-Int\-Vals(), E\-V\-E\-N\-T\-::\-L\-C\-Collection\-::get\-Parameters(), and E\-V\-E\-N\-T\-::\-L\-C\-Parameters\-::get\-String\-Vals().



\subsection{Member Function Documentation}
\index{U\-T\-I\-L\-::\-Index\-Map@{U\-T\-I\-L\-::\-Index\-Map}!decode@{decode}}
\index{decode@{decode}!UTIL::IndexMap@{U\-T\-I\-L\-::\-Index\-Map}}
\subsubsection[{decode}]{\setlength{\rightskip}{0pt plus 5cm}const std\-::string \& U\-T\-I\-L\-::\-Index\-Map\-::decode (
\begin{DoxyParamCaption}
\item[{int}]{type}
\end{DoxyParamCaption}
) const}\label{classUTIL_1_1IndexMap_a81943d38f04d730385d34b2c62ec7cb7}


decode int to string (e.\-g. 

cout $<$$<$ \char`\"{}vertex has been created with \char`\"{} $<$$<$ imvtx.\-decode( vtx-\/$>$get\-Algorithm\-Type() ) $<$$<$ endl; \index{U\-T\-I\-L\-::\-Index\-Map@{U\-T\-I\-L\-::\-Index\-Map}!encode@{encode}}
\index{encode@{encode}!UTIL::IndexMap@{U\-T\-I\-L\-::\-Index\-Map}}
\subsubsection[{encode}]{\setlength{\rightskip}{0pt plus 5cm}int U\-T\-I\-L\-::\-Index\-Map\-::encode (
\begin{DoxyParamCaption}
\item[{const std\-::string}]{name}
\end{DoxyParamCaption}
)}\label{classUTIL_1_1IndexMap_a6306ab410a666f340b9e83ee106f8131}


encode string to index (e.\-g. 

vertex-\/$>$set\-Algorithm\-Type( imvtx.\-enconde( \char`\"{}\-Zv\-Top\char`\"{} ) ); 

The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
Index\-Map.\-h\item 
Index\-Map.\-cc\end{DoxyCompactItemize}
