\doxysection{Qore\+::Data\+Line\+Iterator Class Reference}
\hypertarget{class_qore_1_1_data_line_iterator}{}\label{class_qore_1_1_data_line_iterator}\index{Qore::DataLineIterator@{Qore::DataLineIterator}}


This class defines a line iterator for string data.  




{\ttfamily \#include $<$QC\+\_\+\+Data\+Line\+Iterator.\+dox.\+h$>$}



Inheritance diagram for Qore\+::Data\+Line\+Iterator\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=223pt]{class_qore_1_1_data_line_iterator__inherit__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_qore_1_1_data_line_iterator_a53ca2e16ed781527acd3e5237a19f081}{constructor}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{str}}, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{eol}}, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{group__string__functions_gae8d314e819a299d46d181696600d4293}{trim}}=\mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}})
\begin{DoxyCompactList}\small\item\em creates the \doxylink{class_qore_1_1_data_line_iterator}{Data\+Line\+Iterator} based on the string given \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_data_line_iterator_aaa5890d6209019446a8c5436ea5445bd}{copy}} ()
\begin{DoxyCompactList}\small\item\em Creates a new \doxylink{class_qore_1_1_data_line_iterator}{Data\+Line\+Iterator} object, based on the same object being iterated in the original object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_data_line_iterator_a8f5d01c498dfcd61e6b88c3ef4803041}{get\+Encoding}} ()
\begin{DoxyCompactList}\small\item\em Returns the \doxylink{character_encoding}{character encoding} for the Data\+Line\+Iterator. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_data_line_iterator_affdfe2642623b31f782eda63e98f5d76}{get\+Line}} ()
\begin{DoxyCompactList}\small\item\em returns the current line in the data or throws an {\ttfamily ITERATOR-\/\+ERROR} exception if the iterator is invalid \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_data_line_iterator_a0d695de4158d1f10ded8071ae96d3b88}{get\+Value}} ()
\begin{DoxyCompactList}\small\item\em returns the current line in the data or throws an {\ttfamily ITERATOR-\/\+ERROR} exception if the iterator is invalid \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_data_line_iterator_a2e9f211ca438b8b3f8a122b040ce46ae}{index}} ()
\begin{DoxyCompactList}\small\item\em returns the current iterator line number in the data (the first line is line 1) or 0 if not pointing at a valid element \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1_data_line_iterator_afa97a63c0d6f6ae2410ae3c7ae68696e}{next}} ()
\begin{DoxyCompactList}\small\item\em Moves the current position to the next line in the data; returns \doxysectlink{basic_data_types_False}{False}{2} if there are no more lines to read; if the iterator is not pointing at a valid element before this call, the iterator will be positioned to the beginning of the data. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_data_line_iterator_a5bcdb07579f2c7eb0629a822e22220bc}{reset}} ()
\begin{DoxyCompactList}\small\item\em Reset the iterator instance to its initial state. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1_data_line_iterator_af64f428889d1af031d68da288f2f9dbe}{valid}} ()
\begin{DoxyCompactList}\small\item\em returns \doxysectlink{basic_data_types_True}{True}{2} if the iterator is currently pointing at a valid element, \doxysectlink{basic_data_types_False}{False}{2} if not \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{class_qore_1_1_abstract_line_iterator}{Qore\+::\+Abstract\+Line\+Iterator}}}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{abstract}} \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_abstract_line_iterator_a8ad4c0503f09b24e93bbeac266f2b2a0}{get\+Line}} ()
\begin{DoxyCompactList}\small\item\em Returns the current line in the data or throws an {\ttfamily INVALID-\/\+ITERATOR} exception if the iterator is invalid. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{list}}$<$ \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} $>$ \mbox{\hyperlink{class_qore_1_1_abstract_line_iterator_a6e572b42827159c979e52eedd5485015}{get\+Split\+Line}} (\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{sep}}, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{quote}}, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{eol}}="{}\textbackslash{}n"{}, \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{trim\+\_\+unquoted}}=\mbox{\hyperlink{group__boolean__constants_ga9da2b9a8003cd3788e48305f8a00540f}{False}})
\begin{DoxyCompactList}\small\item\em Returns the current line and splits the string into a list of components based on a separator string and a quote character. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{abstract}} \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} \mbox{\hyperlink{class_qore_1_1_abstract_line_iterator_acc1342afce2820c3d1dded7aeb2b8dd8}{get\+Value}} ()
\begin{DoxyCompactList}\small\item\em Returns the current line in the data or throws an {\ttfamily INVALID-\/\+ITERATOR} exception if the iterator is invalid. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{abstract}} \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_abstract_line_iterator_acde61f19ac0b96adcaafbe4962e9a335}{index}} ()
\begin{DoxyCompactList}\small\item\em Returns the current iterator line number (the first line is line 1) or 0 if not pointing at a valid element. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{abstract}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1_abstract_line_iterator_ac5f7742a325b335f3cd2ab0bb5f37272}{next}} ()
\begin{DoxyCompactList}\small\item\em Moves the current position to the next line; returns \doxysectlink{basic_data_types_False}{False}{2} if there are no more lines to read. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{abstract}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1_abstract_line_iterator_a06fc51d01bfae9f17f290ac247ffd3f3}{valid}} ()
\begin{DoxyCompactList}\small\item\em Returns \doxysectlink{basic_data_types_True}{True}{2} if the iterator is currently pointing at a valid element, \doxysectlink{basic_data_types_False}{False}{2} if not. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \mbox{\hyperlink{class_qore_1_1_abstract_iterator}{Qore\+::\+Abstract\+Iterator}}}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{abstract}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{auto}} \mbox{\hyperlink{class_qore_1_1_abstract_iterator_aa01374b285003faa21b045082063ac12}{get\+Value}} ()
\begin{DoxyCompactList}\small\item\em returns the current value \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{abstract}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1_abstract_iterator_ab10d5694cc2fcd3b6689ea7494da79de}{next}} ()
\begin{DoxyCompactList}\small\item\em Moves the current position to the next element; returns \doxysectlink{basic_data_types_False}{False}{2} if there are no more elements. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{abstract}} \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} \mbox{\hyperlink{class_qore_1_1_abstract_iterator_aee1def5d872b487b8917a166d9b263e8}{valid}} ()
\begin{DoxyCompactList}\small\item\em returns \doxysectlink{basic_data_types_True}{True}{2} if the iterator is currently pointing at a valid element, \doxysectlink{basic_data_types_False}{False}{2} if not \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This class defines a line iterator for string data. 

\begin{DoxySince}{Since}
Qore 0.\+8.\+12
\end{DoxySince}
\begin{DoxyParagraph}{Example\+: Data\+Line\+Iterator basic usage}

\begin{DoxyCode}{0}
\DoxyCodeLine{string\ str\ =\ \textcolor{stringliteral}{"{}a2ps-\/4.13-\/1332.1.x86\_64}}
\DoxyCodeLine{\textcolor{stringliteral}{a2ps-\/devel-\/4.13-\/1332.1.x86\_64}}
\DoxyCodeLine{\textcolor{stringliteral}{aaa\_base-\/11.3-\/7.2.x86\_64"{};}}
\DoxyCodeLine{\textcolor{stringliteral}{}}
\DoxyCodeLine{\textcolor{stringliteral}{DataLineIterator\ it(str);}}
\DoxyCodeLine{\textcolor{stringliteral}{}\textcolor{keywordflow}{while}\ (it.next())\ \{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}line\ \%d\ =\ \%n\(\backslash\)n"{}},\ it.index(),\ it.getValue());}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{line\ 1\ =\ \textcolor{stringliteral}{"{}a2ps-\/4.13-\/1332.1.x86\_64"{}}}
\DoxyCodeLine{line\ 2\ =\ \textcolor{stringliteral}{"{}a2ps-\/devel-\/4.13-\/1332.1.x86\_64"{}}}
\DoxyCodeLine{line\ 3\ =\ \textcolor{stringliteral}{"{}aaa\_base-\/11.3-\/7.2.x86\_64"{}}}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\doxylink{class_qore_1_1_input_stream_line_iterator}{Qore\+::\+Input\+Stream\+Line\+Iterator} 

\doxylink{class_qore_1_1_file_line_iterator}{Qore\+::\+File\+Line\+Iterator} 
\end{DoxySeeAlso}


\doxysubsection{Member Function Documentation}
\Hypertarget{class_qore_1_1_data_line_iterator_a53ca2e16ed781527acd3e5237a19f081}\label{class_qore_1_1_data_line_iterator_a53ca2e16ed781527acd3e5237a19f081} 
\index{Qore::DataLineIterator@{Qore::DataLineIterator}!constructor@{constructor}}
\index{constructor@{constructor}!Qore::DataLineIterator@{Qore::DataLineIterator}}
\doxysubsubsection{\texorpdfstring{constructor()}{constructor()}}
{\footnotesize\ttfamily Qore\+::\+Data\+Line\+Iterator\+::constructor (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{str,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{\+\_\+\+\_\+7\+\_\+}} \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{eol,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}}}]{trim = {\ttfamily \mbox{\hyperlink{group__boolean__constants_ga3ba2df91713a6249449347131ea526c3}{True}}} }\end{DoxyParamCaption})}



creates the \doxylink{class_qore_1_1_data_line_iterator}{Data\+Line\+Iterator} based on the string given 


\begin{DoxyParams}{Parameters}
{\em str} & the string to iterate over; note that if this string is in a non-\/ascii-\/compatible character encoding, it will be converted to UTF-\/8 for processing in the constructor and the UTF-\/8 version of the string will be used for iterating in this object \\
\hline
{\em eol} & the optional end of line character(s) to use to detect lines in the data; if this string is not passed, then the end of line character(s) are detected automatically, and can be either {\ttfamily "{}\textbackslash{}n"{}}, {\ttfamily "{}\textbackslash{}r"{}}, or {\ttfamily "{}\textbackslash{}r\textbackslash{}n"{}}; if this string is passed and has a different \doxylink{character_encoding}{character encoding} from this object\textquotesingle{}s (as determined by the {\ttfamily encoding} parameter), then it will be converted to the \doxylink{class_qore_1_1_data_line_iterator}{Data\+Line\+Iterator}\textquotesingle{}s \doxylink{character_encoding}{character encoding} \\
\hline
{\em trim} & if \doxysectlink{basic_data_types_True}{True}{2} the string return values for the lines iterated will be trimmed of the eol bytes\\
\hline
\end{DoxyParams}

\begin{DoxyExceptions}{Exceptions}
{\em ENCODING-\/\+CONVERSION-\/\+ERROR} & this exception could be thrown if the eol argument has a different \doxylink{character_encoding}{character encoding} from the data\textquotesingle{}s and an error occurs during encoding conversion \\
\hline
\end{DoxyExceptions}
\Hypertarget{class_qore_1_1_data_line_iterator_aaa5890d6209019446a8c5436ea5445bd}\label{class_qore_1_1_data_line_iterator_aaa5890d6209019446a8c5436ea5445bd} 
\index{Qore::DataLineIterator@{Qore::DataLineIterator}!copy@{copy}}
\index{copy@{copy}!Qore::DataLineIterator@{Qore::DataLineIterator}}
\doxysubsubsection{\texorpdfstring{copy()}{copy()}}
{\footnotesize\ttfamily Qore\+::\+Data\+Line\+Iterator\+::copy (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Creates a new \doxylink{class_qore_1_1_data_line_iterator}{Data\+Line\+Iterator} object, based on the same object being iterated in the original object. 

\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{DataLineIterator\ ni\ =\ i.copy();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\Hypertarget{class_qore_1_1_data_line_iterator_a8f5d01c498dfcd61e6b88c3ef4803041}\label{class_qore_1_1_data_line_iterator_a8f5d01c498dfcd61e6b88c3ef4803041} 
\index{Qore::DataLineIterator@{Qore::DataLineIterator}!getEncoding@{getEncoding}}
\index{getEncoding@{getEncoding}!Qore::DataLineIterator@{Qore::DataLineIterator}}
\doxysubsubsection{\texorpdfstring{getEncoding()}{getEncoding()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Data\+Line\+Iterator\+::get\+Encoding (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the \doxylink{character_encoding}{character encoding} for the Data\+Line\+Iterator. 

\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{string\ encoding\ =\ f.getEncoding();}

\end{DoxyCode}

\end{DoxyParagraph}
\begin{DoxyReturn}{Returns}
the \doxylink{character_encoding}{character encoding} for the Data\+Line\+Iterator 
\end{DoxyReturn}
\Hypertarget{class_qore_1_1_data_line_iterator_affdfe2642623b31f782eda63e98f5d76}\label{class_qore_1_1_data_line_iterator_affdfe2642623b31f782eda63e98f5d76} 
\index{Qore::DataLineIterator@{Qore::DataLineIterator}!getLine@{getLine}}
\index{getLine@{getLine}!Qore::DataLineIterator@{Qore::DataLineIterator}}
\doxysubsubsection{\texorpdfstring{getLine()}{getLine()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Data\+Line\+Iterator\+::get\+Line (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



returns the current line in the data or throws an {\ttfamily ITERATOR-\/\+ERROR} exception if the iterator is invalid 

\begin{DoxyReturn}{Returns}
the current line in the data or throws an {\ttfamily ITERATOR-\/\+ERROR} exception if the iterator is invalid
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{while}\ (i.next())\ \{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}+\ \%y\(\backslash\)n"{}},\ i.getLine());}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em ITERATOR-\/\+ERROR} & the iterator is not pointing at a valid element \\
\hline
{\em ITERATOR-\/\+THREAD-\/\+ERROR} & this exception is thrown if this method is called from any thread other than the thread that created the object\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\doxylink{class_qore_1_1_data_line_iterator_a0d695de4158d1f10ded8071ae96d3b88}{Data\+Line\+Iterator\+::get\+Value()} 
\end{DoxySeeAlso}
\Hypertarget{class_qore_1_1_data_line_iterator_a0d695de4158d1f10ded8071ae96d3b88}\label{class_qore_1_1_data_line_iterator_a0d695de4158d1f10ded8071ae96d3b88} 
\index{Qore::DataLineIterator@{Qore::DataLineIterator}!getValue@{getValue}}
\index{getValue@{getValue}!Qore::DataLineIterator@{Qore::DataLineIterator}}
\doxysubsubsection{\texorpdfstring{getValue()}{getValue()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} Qore\+::\+Data\+Line\+Iterator\+::get\+Value (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



returns the current line in the data or throws an {\ttfamily ITERATOR-\/\+ERROR} exception if the iterator is invalid 

\begin{DoxyReturn}{Returns}
the current line in the data or throws an {\ttfamily ITERATOR-\/\+ERROR} exception if the iterator is invalid
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{while}\ (i.next())\ \{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}+\ \%y\(\backslash\)n"{}},\ i.getValue());}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em ITERATOR-\/\+ERROR} & the iterator is not pointing at a valid element \\
\hline
{\em ITERATOR-\/\+THREAD-\/\+ERROR} & this exception is thrown if this method is called from any thread other than the thread that created the object\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\doxylink{class_qore_1_1_data_line_iterator_affdfe2642623b31f782eda63e98f5d76}{Data\+Line\+Iterator\+::get\+Line()} 
\end{DoxySeeAlso}
\Hypertarget{class_qore_1_1_data_line_iterator_a2e9f211ca438b8b3f8a122b040ce46ae}\label{class_qore_1_1_data_line_iterator_a2e9f211ca438b8b3f8a122b040ce46ae} 
\index{Qore::DataLineIterator@{Qore::DataLineIterator}!index@{index}}
\index{index@{index}!Qore::DataLineIterator@{Qore::DataLineIterator}}
\doxysubsubsection{\texorpdfstring{index()}{index()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Data\+Line\+Iterator\+::index (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



returns the current iterator line number in the data (the first line is line 1) or 0 if not pointing at a valid element 

\begin{DoxyReturn}{Returns}
the current iterator line number in the data (the first line is line 1) or 0 if not pointing at a valid element
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{while}\ (i.next())\ \{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}+\ \%d:\ \%y\(\backslash\)n"{}},\ i.index(),\ i.getValue());}
\DoxyCodeLine{\}}

\end{DoxyCode}
 
\end{DoxyParagraph}
\Hypertarget{class_qore_1_1_data_line_iterator_afa97a63c0d6f6ae2410ae3c7ae68696e}\label{class_qore_1_1_data_line_iterator_afa97a63c0d6f6ae2410ae3c7ae68696e} 
\index{Qore::DataLineIterator@{Qore::DataLineIterator}!next@{next}}
\index{next@{next}!Qore::DataLineIterator@{Qore::DataLineIterator}}
\doxysubsubsection{\texorpdfstring{next()}{next()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} Qore\+::\+Data\+Line\+Iterator\+::next (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Moves the current position to the next line in the data; returns \doxysectlink{basic_data_types_False}{False}{2} if there are no more lines to read; if the iterator is not pointing at a valid element before this call, the iterator will be positioned to the beginning of the data. 

This method will return \doxysectlink{basic_data_types_True}{True}{2} again after it returns \doxysectlink{basic_data_types_False}{False}{2} once if data is not empty, otherwise it will always return \doxysectlink{basic_data_types_False}{False}{2} The iterator object should not be used after this method returns \doxysectlink{basic_data_types_False}{False}{2}

\begin{DoxyReturn}{Returns}
\doxysectlink{basic_data_types_False}{False}{2} if there are no more lines in the data (in which case the iterator object is invalid and should not be used); \doxysectlink{basic_data_types_True}{True}{2} if successful (meaning that the iterator object is valid)
\end{DoxyReturn}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{while}\ (i.next())\ \{}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}line:\ \%y\(\backslash\)n"{}},\ i.getValue());}
\DoxyCodeLine{\}}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em ITERATOR-\/\+THREAD-\/\+ERROR} & this exception is thrown if this method is called from any thread other than the thread that created the object \\
\hline
\end{DoxyExceptions}
\Hypertarget{class_qore_1_1_data_line_iterator_a5bcdb07579f2c7eb0629a822e22220bc}\label{class_qore_1_1_data_line_iterator_a5bcdb07579f2c7eb0629a822e22220bc} 
\index{Qore::DataLineIterator@{Qore::DataLineIterator}!reset@{reset}}
\index{reset@{reset}!Qore::DataLineIterator@{Qore::DataLineIterator}}
\doxysubsubsection{\texorpdfstring{reset()}{reset()}}
{\footnotesize\ttfamily Qore\+::\+Data\+Line\+Iterator\+::reset (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Reset the iterator instance to its initial state. 

Reset the iterator instance to its initial state

\begin{DoxyParagraph}{Example}

\begin{DoxyCode}{0}
\DoxyCodeLine{i.reset();}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em ITERATOR-\/\+THREAD-\/\+ERROR} & this exception is thrown if this method is called from any thread other than the thread that created the object \\
\hline
\end{DoxyExceptions}
\Hypertarget{class_qore_1_1_data_line_iterator_af64f428889d1af031d68da288f2f9dbe}\label{class_qore_1_1_data_line_iterator_af64f428889d1af031d68da288f2f9dbe} 
\index{Qore::DataLineIterator@{Qore::DataLineIterator}!valid@{valid}}
\index{valid@{valid}!Qore::DataLineIterator@{Qore::DataLineIterator}}
\doxysubsubsection{\texorpdfstring{valid()}{valid()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga9a401e5112c58f63c05e7ee1e15968ef}{bool}} Qore\+::\+Data\+Line\+Iterator\+::valid (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



returns \doxysectlink{basic_data_types_True}{True}{2} if the iterator is currently pointing at a valid element, \doxysectlink{basic_data_types_False}{False}{2} if not 

\begin{DoxyReturn}{Returns}
\doxysectlink{basic_data_types_True}{True}{2} if the iterator is currently pointing at a valid element, \doxysectlink{basic_data_types_False}{False}{2} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Code Flags\+:}
\doxysectlink{code_flags_CONSTANT}{CONSTANT}{1}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{keywordflow}{if}\ (i.valid())}
\DoxyCodeLine{\ \ \ \ printf(\textcolor{stringliteral}{"{}current\ value:\ \%y\(\backslash\)n"{}},\ i.getValue());}

\end{DoxyCode}
 
\end{DoxyParagraph}
