\hypertarget{class_qore_1_1_file_poll_operation}{}\doxysection{Qore\+::File\+Poll\+Operation Class Reference}
\label{class_qore_1_1_file_poll_operation}\index{Qore::FilePollOperation@{Qore::FilePollOperation}}


\mbox{\hyperlink{class_qore_1_1_file}{File}} poll operation object returned by \mbox{\hyperlink{class_qore_1_1_file}{File}} polling methods.  




{\ttfamily \#include $<$QC\+\_\+\+File\+Poll\+Operation.\+dox.\+h$>$}



Inheritance diagram for Qore\+::File\+Poll\+Operation\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=248pt]{class_qore_1_1_file_poll_operation__inherit__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_qore_1_1_file_poll_operation_a56ec6f1a5d4f79002504b0bbdff72410}{constructor}} (\mbox{\hyperlink{class_qore_1_1_read_only_file}{Read\+Only\+File}} file, \mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}} path, bool to\+\_\+string, \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} num\+\_\+bytes=-\/1)
\begin{DoxyCompactList}\small\item\em Creates the object with the given goal. \end{DoxyCompactList}\item 
\+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_socket_poll_info}{Socket\+Poll\+Info}} $>$ \mbox{\hyperlink{class_qore_1_1_file_poll_operation_ac7fa5dddc950045fa131ea6f23df3cca}{continue\+Poll}} ()
\begin{DoxyCompactList}\small\item\em Returns a socket poll hash if polling should continue or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if complete. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_file_poll_operation_aec96b9e3289341123ea19dec529b19f9}{copy}} ()
\begin{DoxyCompactList}\small\item\em Throws an exception; objects of this class cannot be copied. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_file_poll_operation_a144e4e589b904c4517ac5d428810ed94}{destructor}} ()
\begin{DoxyCompactList}\small\item\em Destroys the object. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\mbox{\hyperlink{class_qore_1_1_file}{File}} poll operation object returned by \mbox{\hyperlink{class_qore_1_1_file}{File}} polling methods. 

This class implements the polling logic for Files and the state machine behind it

private members\+:
\begin{DoxyItemize}
\item \mbox{\hyperlink{class_qore_1_1_file}{File}} sock\+: the \mbox{\hyperlink{class_qore_1_1_file}{File}} being polled
\item \mbox{\hyperlink{data_type_declarations_string_type}{string}} goal\+: the goal of the poll operation
\end{DoxyItemize}

\begin{DoxySince}{Since}
Qore 1.\+19 
\end{DoxySince}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_qore_1_1_file_poll_operation_a56ec6f1a5d4f79002504b0bbdff72410}\label{class_qore_1_1_file_poll_operation_a56ec6f1a5d4f79002504b0bbdff72410}} 
\index{Qore::FilePollOperation@{Qore::FilePollOperation}!constructor@{constructor}}
\index{constructor@{constructor}!Qore::FilePollOperation@{Qore::FilePollOperation}}
\doxysubsubsection{\texorpdfstring{constructor()}{constructor()}}
{\footnotesize\ttfamily Qore\+::\+File\+Poll\+Operation\+::constructor (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{class_qore_1_1_read_only_file}{Read\+Only\+File}}}]{file,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_gacf16b4126b795f4b6933ef3425cadae3}{string}}}]{path,  }\item[{bool}]{to\+\_\+string,  }\item[{\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}}}]{num\+\_\+bytes = {\ttfamily -\/1} }\end{DoxyParamCaption})}



Creates the object with the given goal. 


\begin{DoxyParams}{Parameters}
{\em file} & the \mbox{\hyperlink{class_qore_1_1_file}{File}} object to poll \\
\hline
{\em path} & the path to read \\
\hline
{\em to\+\_\+string} & if the output should be a string or not; if so, the string\textquotesingle{}s encoding will be the same as the File\textquotesingle{}s encoding \\
\hline
{\em num\+\_\+bytes} & the number of bytes to read; \texorpdfstring{$<$}{<} 0 means read the entire file \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_qore_1_1_file_poll_operation_ac7fa5dddc950045fa131ea6f23df3cca}\label{class_qore_1_1_file_poll_operation_ac7fa5dddc950045fa131ea6f23df3cca}} 
\index{Qore::FilePollOperation@{Qore::FilePollOperation}!continuePoll@{continuePoll}}
\index{continuePoll@{continuePoll}!Qore::FilePollOperation@{Qore::FilePollOperation}}
\doxysubsubsection{\texorpdfstring{continuePoll()}{continuePoll()}}
{\footnotesize\ttfamily \+\_\+\+\_\+7\+\_\+ \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}}$<$ \mbox{\hyperlink{struct_qore_1_1_socket_poll_info}{Socket\+Poll\+Info}} $>$ Qore\+::\+File\+Poll\+Operation\+::continue\+Poll (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Returns a socket poll hash if polling should continue or \mbox{\hyperlink{basic_data_types_nothing}{NOTHING}} if complete. 

\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_NOTHING}{NOTHING}} if there is no more to poll and the poll operation was successful (i.\+e. the goal was reached), otherwise this method must return a new socket poll hash to continue the polling operation with another operation, after which this method will be called again if a matching event is received for the socket. If a socket poll hash is returned, then the internal state is also updated. 
\end{DoxyReturn}


Implements \mbox{\hyperlink{class_qore_1_1_abstract_poll_operation_a2ff39800fcf14c9cc4bdf2f69c879e84}{Qore\+::\+Abstract\+Poll\+Operation}}.

\mbox{\Hypertarget{class_qore_1_1_file_poll_operation_aec96b9e3289341123ea19dec529b19f9}\label{class_qore_1_1_file_poll_operation_aec96b9e3289341123ea19dec529b19f9}} 
\index{Qore::FilePollOperation@{Qore::FilePollOperation}!copy@{copy}}
\index{copy@{copy}!Qore::FilePollOperation@{Qore::FilePollOperation}}
\doxysubsubsection{\texorpdfstring{copy()}{copy()}}
{\footnotesize\ttfamily Qore\+::\+File\+Poll\+Operation\+::copy (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Throws an exception; objects of this class cannot be copied. 


\begin{DoxyExceptions}{Exceptions}
{\em FILEPOLLOPERATION-\/\+COPY-\/\+ERROR} & objects of this class cannot be copied \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_file_poll_operation_a144e4e589b904c4517ac5d428810ed94}\label{class_qore_1_1_file_poll_operation_a144e4e589b904c4517ac5d428810ed94}} 
\index{Qore::FilePollOperation@{Qore::FilePollOperation}!destructor@{destructor}}
\index{destructor@{destructor}!Qore::FilePollOperation@{Qore::FilePollOperation}}
\doxysubsubsection{\texorpdfstring{destructor()}{destructor()}}
{\footnotesize\ttfamily Qore\+::\+File\+Poll\+Operation\+::destructor (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Destroys the object. 

Destroys the object 
