\hypertarget{classCRL_1_1SearchPath}{\section{C\-R\-L\-:\-:Search\-Path Class Reference}
\label{classCRL_1_1SearchPath}\index{C\-R\-L\-::\-Search\-Path@{C\-R\-L\-::\-Search\-Path}}
}


An ordered list of search pathes.  


\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classCRL_1_1SearchPath_1_1Element}{Element}
\begin{DoxyCompactList}\small\item\em An element of the search path (mapping a directory). \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{classCRL_1_1SearchPath_a7081332b63c642917b4ca15f665662f4}{reset} ()
\item 
size\-\_\-t \hyperlink{classCRL_1_1SearchPath_af358bdb1e940f08137f887f70eb641e3}{append} (const std\-::string \&path, const std\-::string \&name=\char`\"{}\char`\"{})
\item 
size\-\_\-t \hyperlink{classCRL_1_1SearchPath_af39d78a63d880e90ae6f947abf1fe322}{prepend} (const std\-::string \&path, const std\-::string \&name=\char`\"{}\char`\"{})
\item 
size\-\_\-t \hyperlink{classCRL_1_1SearchPath_a6cd1524e1048f246682cd5ef40145d67}{replace} (const std\-::string \&path, const std\-::string \&, size\-\_\-t index)
\item 
size\-\_\-t \hyperlink{classCRL_1_1SearchPath_af8e579af7e78dddb7a014d4bbbf9a36f}{locate} (const std\-::string \&file, std\-::ios\-::openmode mode=std\-::ios\-::in, int first=0, int last=64)
\item 
size\-\_\-t \hyperlink{classCRL_1_1SearchPath_a9ae41a1943fa287ccaf000a54edcd9dd}{get\-Size} () const 
\item 
const std\-::string \& \hyperlink{classCRL_1_1SearchPath_afe58fd540e54ccfb0b4b93604caee6e2}{get\-Selected} () const 
\item 
size\-\_\-t \hyperlink{classCRL_1_1SearchPath_ab07bf41af49374c4c59544aa008ddda6}{get\-Index} () const 
\item 
bool \hyperlink{classCRL_1_1SearchPath_a016b68705bfbeeddcfedb22c254aa511}{has\-Selected} () const 
\item 
size\-\_\-t \hyperlink{classCRL_1_1SearchPath_a6659535c41031e811a235494a6731f38}{has\-Path} (const std\-::string \&path) const 
\item 
const \hyperlink{classCRL_1_1SearchPath_1_1Element}{Element} \& \hyperlink{classCRL_1_1SearchPath_ab239552e9f81c9b5dda4e87b199c0fd0}{operator\mbox{[}$\,$\mbox{]}} (size\-\_\-t index) const 
\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static std\-::string \hyperlink{classCRL_1_1SearchPath_aef473ae1037c8cb792a3af02baea6fdc}{extract\-Lib\-Name} (const std\-::string \&)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
An ordered list of search pathes. 

The \hyperlink{classCRL_1_1SearchPath}{Search\-Path} is an \hyperlink{classCRL_1_1AllianceFramework}{Alliance\-Framework} owned object, and as such it's constructors \& destructors are made inaccessible by the outside world. 

\subsection{Member Function Documentation}
\hypertarget{classCRL_1_1SearchPath_aef473ae1037c8cb792a3af02baea6fdc}{\index{C\-R\-L\-::\-Search\-Path@{C\-R\-L\-::\-Search\-Path}!extract\-Lib\-Name@{extract\-Lib\-Name}}
\index{extract\-Lib\-Name@{extract\-Lib\-Name}!CRL::SearchPath@{C\-R\-L\-::\-Search\-Path}}
\subsubsection[{extract\-Lib\-Name}]{\setlength{\rightskip}{0pt plus 5cm}std\-::string C\-R\-L\-::\-Search\-Path\-::extract\-Lib\-Name (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}}\label{classCRL_1_1SearchPath_aef473ae1037c8cb792a3af02baea6fdc}
\begin{DoxyReturn}{Returns}
the library name guessed from a directory path. This is the last component of the, stripped of any extention. 
\end{DoxyReturn}


Referenced by append().

\hypertarget{classCRL_1_1SearchPath_a7081332b63c642917b4ca15f665662f4}{\index{C\-R\-L\-::\-Search\-Path@{C\-R\-L\-::\-Search\-Path}!reset@{reset}}
\index{reset@{reset}!CRL::SearchPath@{C\-R\-L\-::\-Search\-Path}}
\subsubsection[{reset}]{\setlength{\rightskip}{0pt plus 5cm}void C\-R\-L\-::\-Search\-Path\-::reset (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classCRL_1_1SearchPath_a7081332b63c642917b4ca15f665662f4}
Clear all the search path. Only the first, corresponding to the working library is kept. \hypertarget{classCRL_1_1SearchPath_af358bdb1e940f08137f887f70eb641e3}{\index{C\-R\-L\-::\-Search\-Path@{C\-R\-L\-::\-Search\-Path}!append@{append}}
\index{append@{append}!CRL::SearchPath@{C\-R\-L\-::\-Search\-Path}}
\subsubsection[{append}]{\setlength{\rightskip}{0pt plus 5cm}void C\-R\-L\-::\-Search\-Path\-::append (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{path, }
\item[{const std\-::string \&}]{name = {\ttfamily \char`\"{}\char`\"{}}}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{classCRL_1_1SearchPath_af358bdb1e940f08137f887f70eb641e3}
Append a search path. The {\ttfamily name} gives the library name. 

References extract\-Lib\-Name().

\hypertarget{classCRL_1_1SearchPath_af39d78a63d880e90ae6f947abf1fe322}{\index{C\-R\-L\-::\-Search\-Path@{C\-R\-L\-::\-Search\-Path}!prepend@{prepend}}
\index{prepend@{prepend}!CRL::SearchPath@{C\-R\-L\-::\-Search\-Path}}
\subsubsection[{prepend}]{\setlength{\rightskip}{0pt plus 5cm}void C\-R\-L\-::\-Search\-Path\-::prepend (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{path, }
\item[{const std\-::string \&}]{name = {\ttfamily \char`\"{}\char`\"{}}}
\end{DoxyParamCaption}
)}}\label{classCRL_1_1SearchPath_af39d78a63d880e90ae6f947abf1fe322}
Prepend a search path. The {\ttfamily name} gives the library name. \hypertarget{classCRL_1_1SearchPath_a6cd1524e1048f246682cd5ef40145d67}{\index{C\-R\-L\-::\-Search\-Path@{C\-R\-L\-::\-Search\-Path}!replace@{replace}}
\index{replace@{replace}!CRL::SearchPath@{C\-R\-L\-::\-Search\-Path}}
\subsubsection[{replace}]{\setlength{\rightskip}{0pt plus 5cm}void C\-R\-L\-::\-Search\-Path\-::replace (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{path, }
\item[{const std\-::string \&}]{name, }
\item[{size\-\_\-t}]{index}
\end{DoxyParamCaption}
)}}\label{classCRL_1_1SearchPath_a6cd1524e1048f246682cd5ef40145d67}
Replace the search path element at index {\ttfamily index}. \hypertarget{classCRL_1_1SearchPath_af8e579af7e78dddb7a014d4bbbf9a36f}{\index{C\-R\-L\-::\-Search\-Path@{C\-R\-L\-::\-Search\-Path}!locate@{locate}}
\index{locate@{locate}!CRL::SearchPath@{C\-R\-L\-::\-Search\-Path}}
\subsubsection[{locate}]{\setlength{\rightskip}{0pt plus 5cm}size\-\_\-t C\-R\-L\-::\-Search\-Path\-::locate (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{file, }
\item[{std\-::ios\-::openmode}]{mode = {\ttfamily std\-:\-:ios\-:\-:in}, }
\item[{int}]{first = {\ttfamily 0}, }
\item[{int}]{last = {\ttfamily 64}}
\end{DoxyParamCaption}
)}}\label{classCRL_1_1SearchPath_af8e579af7e78dddb7a014d4bbbf9a36f}

\begin{DoxyParams}{Parameters}
{\em file} & the requested file. \\
\hline
{\em mode} & the wanted opening mode. \\
\hline
{\em first} & the lower bound in the search path elements. \\
\hline
{\em last} & the upper bound in the search path elements. {\bfseries Returns\-:} the index of the search path element in which the file has been found.\\
\hline
\end{DoxyParams}
Try to locate a file named {\ttfamily file} (without leading path, but with extention) and check if it can be opened in the desired {\ttfamily mode}. The file is not left opened, but the memory of the search is kept for further operations. \hypertarget{classCRL_1_1SearchPath_a9ae41a1943fa287ccaf000a54edcd9dd}{\index{C\-R\-L\-::\-Search\-Path@{C\-R\-L\-::\-Search\-Path}!get\-Size@{get\-Size}}
\index{get\-Size@{get\-Size}!CRL::SearchPath@{C\-R\-L\-::\-Search\-Path}}
\subsubsection[{get\-Size}]{\setlength{\rightskip}{0pt plus 5cm}size\-\_\-t C\-R\-L\-::\-Search\-Path\-::get\-Size (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{classCRL_1_1SearchPath_a9ae41a1943fa287ccaf000a54edcd9dd}
\begin{DoxyReturn}{Returns}
the number of search path elements (directories). 
\end{DoxyReturn}
\hypertarget{classCRL_1_1SearchPath_afe58fd540e54ccfb0b4b93604caee6e2}{\index{C\-R\-L\-::\-Search\-Path@{C\-R\-L\-::\-Search\-Path}!get\-Selected@{get\-Selected}}
\index{get\-Selected@{get\-Selected}!CRL::SearchPath@{C\-R\-L\-::\-Search\-Path}}
\subsubsection[{get\-Selected}]{\setlength{\rightskip}{0pt plus 5cm}const std\-::string \& C\-R\-L\-::\-Search\-Path\-::get\-Selected (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{classCRL_1_1SearchPath_afe58fd540e54ccfb0b4b93604caee6e2}
\begin{DoxyReturn}{Returns}
the search path element selected through the last locate request. 
\end{DoxyReturn}
\hypertarget{classCRL_1_1SearchPath_ab07bf41af49374c4c59544aa008ddda6}{\index{C\-R\-L\-::\-Search\-Path@{C\-R\-L\-::\-Search\-Path}!get\-Index@{get\-Index}}
\index{get\-Index@{get\-Index}!CRL::SearchPath@{C\-R\-L\-::\-Search\-Path}}
\subsubsection[{get\-Index}]{\setlength{\rightskip}{0pt plus 5cm}size\-\_\-t C\-R\-L\-::\-Search\-Path\-::get\-Index (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{classCRL_1_1SearchPath_ab07bf41af49374c4c59544aa008ddda6}
\begin{DoxyReturn}{Returns}
the index of search path element selected through the last locate request. 
\end{DoxyReturn}
\hypertarget{classCRL_1_1SearchPath_a016b68705bfbeeddcfedb22c254aa511}{\index{C\-R\-L\-::\-Search\-Path@{C\-R\-L\-::\-Search\-Path}!has\-Selected@{has\-Selected}}
\index{has\-Selected@{has\-Selected}!CRL::SearchPath@{C\-R\-L\-::\-Search\-Path}}
\subsubsection[{has\-Selected}]{\setlength{\rightskip}{0pt plus 5cm}bool C\-R\-L\-::\-Search\-Path\-::has\-Selected (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{classCRL_1_1SearchPath_a016b68705bfbeeddcfedb22c254aa511}
\begin{DoxyReturn}{Returns}
{\bfseries true} if an element is currently selected (a locate has been performed). 
\end{DoxyReturn}
\hypertarget{classCRL_1_1SearchPath_a6659535c41031e811a235494a6731f38}{\index{C\-R\-L\-::\-Search\-Path@{C\-R\-L\-::\-Search\-Path}!has\-Path@{has\-Path}}
\index{has\-Path@{has\-Path}!CRL::SearchPath@{C\-R\-L\-::\-Search\-Path}}
\subsubsection[{has\-Path}]{\setlength{\rightskip}{0pt plus 5cm}bool C\-R\-L\-::\-Search\-Path\-::has\-Path (
\begin{DoxyParamCaption}
\item[{const std\-::string \&}]{path}
\end{DoxyParamCaption}
) const}}\label{classCRL_1_1SearchPath_a6659535c41031e811a235494a6731f38}
\begin{DoxyReturn}{Returns}
{\bfseries true} if the path is present in the search path (at any position). 
\end{DoxyReturn}
\hypertarget{classCRL_1_1SearchPath_ab239552e9f81c9b5dda4e87b199c0fd0}{\index{C\-R\-L\-::\-Search\-Path@{C\-R\-L\-::\-Search\-Path}!operator\mbox{[}$\,$\mbox{]}@{operator[]}}
\index{operator\mbox{[}$\,$\mbox{]}@{operator[]}!CRL::SearchPath@{C\-R\-L\-::\-Search\-Path}}
\subsubsection[{operator[]}]{\setlength{\rightskip}{0pt plus 5cm}const {\bf Element} \& C\-R\-L\-::\-Search\-Path\-::operator\mbox{[}$\,$\mbox{]} (
\begin{DoxyParamCaption}
\item[{size\-\_\-t}]{index}
\end{DoxyParamCaption}
) const}}\label{classCRL_1_1SearchPath_ab239552e9f81c9b5dda4e87b199c0fd0}
\begin{DoxyReturn}{Returns}
The search path element at position {\ttfamily index}. If {\ttfamily index} is out of bounds, an empty \hyperlink{classCRL_1_1SearchPath_1_1Element}{Element} is returned. 
\end{DoxyReturn}


The documentation for this class was generated from the following files\-:\begin{DoxyCompactItemize}
\item 
Search\-Path.\-h\item 
Search\-Path.\-dox\end{DoxyCompactItemize}
