\hypertarget{classXrlParserFileInput}{
\section{XrlParserFileInput Class Reference}
\label{classXrlParserFileInput}\index{XrlParserFileInput@{XrlParserFileInput}}
}


\hyperlink{classXrlParserFileInput}{XrlParserFileInput} class reads lines from a data source, strips out comments and handles continuation characters.  




{\ttfamily \#include $<$xrl\_\-parser\_\-input.hh$>$}

Inheritance diagram for XrlParserFileInput:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classXrlParserFileInput}
\end{center}
\end{figure}
\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structXrlParserFileInput_1_1FileState}{FileState}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classXrlParserFileInput_aafb0fc9aedaf022982e22ad8ccba2ab0}{XrlParserFileInput} (istream $\ast$input, const char $\ast$fname=\char`\"{}\char`\"{})  throw (XrlParserInputException)
\begin{DoxyCompactList}\small\item\em Constructor. \item\end{DoxyCompactList}\item 
\hypertarget{classXrlParserFileInput_afe357345076270019de6ccc472b43bfe}{
{\bfseries XrlParserFileInput} (const char $\ast$filename)  throw (XrlParserInputException)}
\label{classXrlParserFileInput_afe357345076270019de6ccc472b43bfe}

\item 
bool \hyperlink{classXrlParserFileInput_ac301a6fb9fa8eabcc78b368f86719927}{eof} () const 
\item 
bool \hyperlink{classXrlParserFileInput_af4d45a773dec54272746660d67be00d6}{getline} (string \&line)  throw (XrlParserInputException)
\begin{DoxyCompactList}\small\item\em Retrieves 1 line of input from source. \item\end{DoxyCompactList}\item 
string \hyperlink{classXrlParserFileInput_a34c42fa4eb9234ad2dc6078ef31e5065}{stack\_\-trace} () const 
\item 
list$<$ string $>$ \& \hyperlink{classXrlParserFileInput_a97d80c34ac09dfc59ff0044387badfae}{path} ()
\end{DoxyCompactItemize}
\subsection*{Protected Types}
\begin{DoxyCompactItemize}
\item 
enum {\bfseries Mode} \{ {\bfseries NORMAL} =  0x00, 
{\bfseries IN\_\-SQUOTE} =  0x01, 
{\bfseries IN\_\-DQUOTE} =  0x02, 
{\bfseries IN\_\-C\_\-COMMENT} =  0x04
 \}
\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrlParserFileInput_a58449082fe7d8ed2fee8989e34d5851d}{
bool {\bfseries slurp\_\-line} (string \&line)  throw (XrlParserInputException)}
\label{classXrlParserFileInput_a58449082fe7d8ed2fee8989e34d5851d}

\item 
void \hyperlink{classXrlParserFileInput_a065a0d736aa4da231920aee40ea4cab9}{push\_\-stack} (const \hyperlink{structXrlParserFileInput_1_1FileState}{FileState} \&fs)  throw (XrlParserInputException)
\begin{DoxyCompactList}\small\item\em \hyperlink{classPush}{Push} \hyperlink{structXrlParserFileInput_1_1FileState}{FileState} onto stack. \item\end{DoxyCompactList}\item 
\hypertarget{classXrlParserFileInput_a3eaf20c3084b2d585daf0c1f926eac15}{
void {\bfseries pop\_\-stack} ()}
\label{classXrlParserFileInput_a3eaf20c3084b2d585daf0c1f926eac15}

\item 
\hypertarget{classXrlParserFileInput_a1dd648960e48c4064f31580edc78121f}{
\hyperlink{structXrlParserFileInput_1_1FileState}{FileState} \& {\bfseries stack\_\-top} ()}
\label{classXrlParserFileInput_a1dd648960e48c4064f31580edc78121f}

\item 
\hypertarget{classXrlParserFileInput_aa8df287bc5f75da7ceb02898836b6867}{
size\_\-t {\bfseries stack\_\-depth} () const }
\label{classXrlParserFileInput_aa8df287bc5f75da7ceb02898836b6867}

\item 
\hypertarget{classXrlParserFileInput_a152cd33a8a399868df22183d6a228237}{
ifstream $\ast$ {\bfseries path\_\-open\_\-input} (const char $\ast$filename)  throw (XrlParserInputException)}
\label{classXrlParserFileInput_a152cd33a8a399868df22183d6a228237}

\item 
\hypertarget{classXrlParserFileInput_ab41c9365455254cba37acb69ce35d0b3}{
void {\bfseries close\_\-input} (istream $\ast$pif)}
\label{classXrlParserFileInput_ab41c9365455254cba37acb69ce35d0b3}

\item 
\hypertarget{classXrlParserFileInput_acb6ca7574e858e462f187f21d65a7d10}{
string {\bfseries try\_\-include} (string::const\_\-iterator \&begin, const string::const\_\-iterator \&end)  throw (XrlParserInputException)}
\label{classXrlParserFileInput_acb6ca7574e858e462f187f21d65a7d10}

\item 
\hypertarget{classXrlParserFileInput_a849062075553620171dc8f356c91c71a}{
void {\bfseries initialize\_\-path} ()}
\label{classXrlParserFileInput_a849062075553620171dc8f356c91c71a}

\item 
bool \hyperlink{classXrlParserFileInput_a0e592318b0c9715012613386c5cb0266}{filter\_\-line} (string \&output, const string \&input)
\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classXrlParserFileInput_a09210e71354c03c2fe93ba5e005b1f28}{
vector$<$ \hyperlink{structXrlParserFileInput_1_1FileState}{FileState} $>$ {\bfseries \_\-stack}}
\label{classXrlParserFileInput_a09210e71354c03c2fe93ba5e005b1f28}

\item 
\hypertarget{classXrlParserFileInput_aafde0514528f33da3f5bc4712e6455c1}{
list$<$ string $>$ {\bfseries \_\-path}}
\label{classXrlParserFileInput_aafde0514528f33da3f5bc4712e6455c1}

\item 
\hypertarget{classXrlParserFileInput_a93e87ef9411b0a907490b8ea3ddb5079}{
bool {\bfseries \_\-own\_\-bottom}}
\label{classXrlParserFileInput_a93e87ef9411b0a907490b8ea3ddb5079}

\item 
\hypertarget{classXrlParserFileInput_a76e83c13be42a52f25fda076df7cb7c0}{
list$<$ string $>$ {\bfseries \_\-inserted\_\-lines}}
\label{classXrlParserFileInput_a76e83c13be42a52f25fda076df7cb7c0}

\item 
\hypertarget{classXrlParserFileInput_a9e8e7165ace5b84594df24e08f37cc01}{
enum XrlParserFileInput::Mode {\bfseries \_\-current\_\-mode}}
\label{classXrlParserFileInput_a9e8e7165ace5b84594df24e08f37cc01}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
\hyperlink{classXrlParserFileInput}{XrlParserFileInput} class reads lines from a data source, strips out comments and handles continuation characters. It is similar to \hyperlink{protocolthe-p}{the} C-\/preprocessor in that it strips out C and C++ comments and handles \#include directives. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classXrlParserFileInput_aafb0fc9aedaf022982e22ad8ccba2ab0}{
\index{XrlParserFileInput@{XrlParserFileInput}!XrlParserFileInput@{XrlParserFileInput}}
\index{XrlParserFileInput@{XrlParserFileInput}!XrlParserFileInput@{XrlParserFileInput}}
\subsubsection[{XrlParserFileInput}]{\setlength{\rightskip}{0pt plus 5cm}XrlParserFileInput::XrlParserFileInput (
\begin{DoxyParamCaption}
\item[{istream $\ast$}]{input, }
\item[{const char $\ast$}]{fname = {\ttfamily \char`\"{}\char`\"{}}}
\end{DoxyParamCaption}
)  throw ({\bf XrlParserInputException})}}
\label{classXrlParserFileInput_aafb0fc9aedaf022982e22ad8ccba2ab0}


Constructor. 


\begin{DoxyParams}{Parameters}
{\em input} & input file stream. \\
\hline
{\em fname} & filename. \\
\hline
\end{DoxyParams}

\begin{DoxyExceptions}{Exceptions}
{\em \hyperlink{structXrlParserInputException}{XrlParserInputException}} & if input file stream is not good(). \\
\hline
\end{DoxyExceptions}


\subsection{Member Function Documentation}
\hypertarget{classXrlParserFileInput_ac301a6fb9fa8eabcc78b368f86719927}{
\index{XrlParserFileInput@{XrlParserFileInput}!eof@{eof}}
\index{eof@{eof}!XrlParserFileInput@{XrlParserFileInput}}
\subsubsection[{eof}]{\setlength{\rightskip}{0pt plus 5cm}bool XrlParserFileInput::eof (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classXrlParserFileInput_ac301a6fb9fa8eabcc78b368f86719927}
\begin{DoxyReturn}{Returns}
true if no more data is available for reading. 
\end{DoxyReturn}


Implements \hyperlink{classXrlParserInput_a64ca4db997cc739bffd929ecc0e04942}{XrlParserInput}.

\hypertarget{classXrlParserFileInput_a0e592318b0c9715012613386c5cb0266}{
\index{XrlParserFileInput@{XrlParserFileInput}!filter\_\-line@{filter\_\-line}}
\index{filter\_\-line@{filter\_\-line}!XrlParserFileInput@{XrlParserFileInput}}
\subsubsection[{filter\_\-line}]{\setlength{\rightskip}{0pt plus 5cm}bool XrlParserFileInput::filter\_\-line (
\begin{DoxyParamCaption}
\item[{string \&}]{output, }
\item[{const string \&}]{input}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classXrlParserFileInput_a0e592318b0c9715012613386c5cb0266}
\begin{DoxyReturn}{Returns}
true if another line is required because of a continuation, false otherwise. 
\end{DoxyReturn}
\hypertarget{classXrlParserFileInput_af4d45a773dec54272746660d67be00d6}{
\index{XrlParserFileInput@{XrlParserFileInput}!getline@{getline}}
\index{getline@{getline}!XrlParserFileInput@{XrlParserFileInput}}
\subsubsection[{getline}]{\setlength{\rightskip}{0pt plus 5cm}bool XrlParserFileInput::getline (
\begin{DoxyParamCaption}
\item[{string \&}]{lineout}
\end{DoxyParamCaption}
)  throw ({\bf XrlParserInputException})\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classXrlParserFileInput_af4d45a773dec54272746660d67be00d6}


Retrieves 1 line of input from source. 


\begin{DoxyParams}{Parameters}
{\em lineout} & string that is set if line of text is available. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
true if line was read into lineout, false otherwise. 
\end{DoxyReturn}


Implements \hyperlink{classXrlParserInput_a5b392cfb43c66a20de4575f220bdfbab}{XrlParserInput}.

\hypertarget{classXrlParserFileInput_a97d80c34ac09dfc59ff0044387badfae}{
\index{XrlParserFileInput@{XrlParserFileInput}!path@{path}}
\index{path@{path}!XrlParserFileInput@{XrlParserFileInput}}
\subsubsection[{path}]{\setlength{\rightskip}{0pt plus 5cm}list$<$string$>$\& XrlParserFileInput::path (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{classXrlParserFileInput_a97d80c34ac09dfc59ff0044387badfae}
\begin{DoxyReturn}{Returns}
include path preprocessor looks for files in. 
\end{DoxyReturn}
\hypertarget{classXrlParserFileInput_a065a0d736aa4da231920aee40ea4cab9}{
\index{XrlParserFileInput@{XrlParserFileInput}!push\_\-stack@{push\_\-stack}}
\index{push\_\-stack@{push\_\-stack}!XrlParserFileInput@{XrlParserFileInput}}
\subsubsection[{push\_\-stack}]{\setlength{\rightskip}{0pt plus 5cm}void XrlParserFileInput::push\_\-stack (
\begin{DoxyParamCaption}
\item[{const {\bf FileState} \&}]{fs}
\end{DoxyParamCaption}
)  throw ({\bf XrlParserInputException})\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{classXrlParserFileInput_a065a0d736aa4da231920aee40ea4cab9}


\hyperlink{classPush}{Push} \hyperlink{structXrlParserFileInput_1_1FileState}{FileState} onto stack. 


\begin{DoxyExceptions}{Exceptions}
{\em \hyperlink{structXrlParserInputException}{XrlParserInputException}} & if input file stream is not good(); \\
\hline
\end{DoxyExceptions}
\hypertarget{classXrlParserFileInput_a34c42fa4eb9234ad2dc6078ef31e5065}{
\index{XrlParserFileInput@{XrlParserFileInput}!stack\_\-trace@{stack\_\-trace}}
\index{stack\_\-trace@{stack\_\-trace}!XrlParserFileInput@{XrlParserFileInput}}
\subsubsection[{stack\_\-trace}]{\setlength{\rightskip}{0pt plus 5cm}string XrlParserFileInput::stack\_\-trace (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classXrlParserFileInput_a34c42fa4eb9234ad2dc6078ef31e5065}
\begin{DoxyReturn}{Returns}
string containing stack trace to be used for tracking errors in \hyperlink{protocolthe-p}{the} input. 
\end{DoxyReturn}


Implements \hyperlink{classXrlParserInput_ae6528810ea8c0cd6870ffa054f141faf}{XrlParserInput}.



The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
/home/greearb/git/xorp.ct.github/xorp/libxipc/xrl\_\-parser\_\-input.hh\item 
/home/greearb/git/xorp.ct.github/xorp/libxipc/xrl\_\-parser\_\-input.cc\end{DoxyCompactItemize}
