\hypertarget{class_qore_1_1_term_i_o_s}{}\doxysection{Qore\+::Term\+IOS Class Reference}
\label{class_qore_1_1_term_i_o_s}\index{Qore::TermIOS@{Qore::TermIOS}}


This class allows Qore scripts to get or set terminal settings on UNIX platforms.  




{\ttfamily \#include $<$QC\+\_\+\+Term\+IOS.\+dox.\+h$>$}

\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_qore_1_1_term_i_o_s_abd4f71ca3f95a97f6364cc2e121d3edd}{constructor}} ()
\begin{DoxyCompactList}\small\item\em Creates the \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{Term\+IOS}} object with random contents. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_qore_1_1_term_i_o_s_ae7df6c469ad6e7a92d12a01e1d29e23f}{copy}} ()
\begin{DoxyCompactList}\small\item\em Returns a copy of the object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a19c2c027b3a521c36e3797a30573fd6d}{get\+CC}} (softint cc)
\begin{DoxyCompactList}\small\item\em Returns the integer value for the given control character from the given \mbox{\hyperlink{group__tattr__control__character__constants}{control character code}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_term_i_o_s_ac93293f545a552695b77b55afd5c30ca}{get\+CFlag}} ()
\begin{DoxyCompactList}\small\item\em Returns the \mbox{\hyperlink{group__tattr__control__mode__constants}{control mode flag}} for the object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a6df9b9729177d42f486bb5aa7a6fced2}{get\+IFlag}} ()
\begin{DoxyCompactList}\small\item\em Returns the \mbox{\hyperlink{group__tattr__input__mode__constants}{input mode flag}} for the object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a03ee02f6433eb9c9eb7dddfb633784ab}{get\+LFlag}} ()
\begin{DoxyCompactList}\small\item\em Returns the \mbox{\hyperlink{group__tattr__local__mode__constants}{local mode flag}} for the object. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} \mbox{\hyperlink{class_qore_1_1_term_i_o_s_ac9c94e83cf61a23908f368a686c31872}{get\+OFlag}} ()
\begin{DoxyCompactList}\small\item\em Returns the \mbox{\hyperlink{group__tattr__output__mode__constants}{output mode flag}} for the object. \end{DoxyCompactList}\item 
bool \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a74a86e4703525ee046e0221482484b61}{is\+Equal}} (Termios termios)
\begin{DoxyCompactList}\small\item\em Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{Term\+IOS}} object passed as an argument is equal to the current object; \mbox{\hyperlink{basic_data_types_False}{False}} if not. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_term_i_o_s_ae203d13b7146e01541a18008136069cd}{set\+CC}} (softint offset, softint value)
\begin{DoxyCompactList}\small\item\em Sets the value of the given \mbox{\hyperlink{group__tattr__control__character__constants}{control character}}. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a8ea7b285dbfb95acd99a26e7a13c6248}{set\+CFlag}} (softint flag)
\begin{DoxyCompactList}\small\item\em Sets the control mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__control__mode__constants}{Terminal Attribute Control Mode Constants}}. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a749c05bee07d390cc8489702cec57b38}{set\+IFlag}} (softint flag)
\begin{DoxyCompactList}\small\item\em Sets the input mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__input__mode__constants}{Terminal Attributes Input Mode Constants}}. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a46e094432e30639e488896355dc0531f}{set\+LFlag}} (softint flag)
\begin{DoxyCompactList}\small\item\em Sets the local mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__local__mode__constants}{Terminal Attribute Local Mode Constants}}. \end{DoxyCompactList}\item 
nothing \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a7fc74118f636d4b0de33d88fabf16d57}{set\+OFlag}} (softint flag)
\begin{DoxyCompactList}\small\item\em Sets the output mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__output__mode__constants}{Terminal Attributes Output Mode Constants}}. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}} \mbox{\hyperlink{class_qore_1_1_term_i_o_s_a5374031d9a2784ca2653a36088f0a0c8}{get\+Window\+Size}} ()
\begin{DoxyCompactList}\small\item\em Returns a hash giving the current terminal window size in hash keys {\ttfamily \char`\"{}rows\char`\"{}} and {\ttfamily \char`\"{}columns\char`\"{}}. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This class allows Qore scripts to get or set terminal settings on UNIX platforms. 

\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaa92bf6eafb76a4ccf1a0d0df45b13363}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+TERMINAL\+\_\+\+IO}}
\end{DoxyParagraph}
On platforms without \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{Term\+IOS}} support (such as Windows), none of the methods in this class are available; to write a portable program, check the \mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+HAVE\+\_\+\+TERMIOS}} constant at runtime before using this functionality.

This class contains the data structure used to read and set terminal attributes on terminal I/O constants (\mbox{\hyperlink{group__io__constants_ga0cfa7aea34f3c921036623600e42b21f}{stdin}}, \mbox{\hyperlink{group__io__constants_ga44ab38fe66ed7aa87731a2de976017c6}{stdout}}, \mbox{\hyperlink{group__io__constants_ga697e4968984d273562f14bfed155b4a8}{stderr}}).

This class is used with \mbox{\hyperlink{class_qore_1_1_file_a0a9d380a83dc9e70f143c8ad1f85c7b4}{File\+::get\+Terminal\+Attributes()}}, \mbox{\hyperlink{class_qore_1_1_file_aa1d7a62aa8f383cad5b8bdee78c350dd}{File\+::set\+Terminal\+Attributes()}}, and the terminal I/O constants to manipulate terminal attributes.

For example, here is some code to set terminal attributes, read in a character from standard input with a timeout, and reset the terminal attributes\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{TermIOS t();}
\DoxyCodeLine{stdin.getTerminalAttributes(t);}
\DoxyCodeLine{TermIOS orig = t.copy();}
\DoxyCodeLine{on\_exit}
\DoxyCodeLine{    stdin.setTerminalAttributes(TCSADRAIN, orig);}
\DoxyCodeLine{}
\DoxyCodeLine{int lflag = t.getLFlag();}
\DoxyCodeLine{lflag \&= \string~ICANON;}
\DoxyCodeLine{lflag \&= \string~ECHO;}
\DoxyCodeLine{lflag \&= \string~ISIG;}
\DoxyCodeLine{t.setLFlag(lflag);}
\DoxyCodeLine{t.setCC(VMIN, 1);}
\DoxyCodeLine{t.setCC(VTIME, 0);}
\DoxyCodeLine{stdin.setTerminalAttributes(TCSADRAIN, t);}
\DoxyCodeLine{}
\DoxyCodeLine{stdout.printf(\textcolor{stringliteral}{"{}Press any key: "{}});}
\DoxyCodeLine{\textcolor{keywordflow}{while} (!stdin.isDataAvailable(20ms)) \{}
\DoxyCodeLine{    stdout.printf(\textcolor{stringliteral}{"{}."{}});}
\DoxyCodeLine{    stdout.sync();}
\DoxyCodeLine{    usleep(1ms);}
\DoxyCodeLine{\}}
\DoxyCodeLine{string c = stdin.read(1);}
\DoxyCodeLine{stdout.printf(\textcolor{stringliteral}{"{} GOT ASCII 0x\%02x (\%d) '\%s'\(\backslash\)n"{}}, ord(c), ord(c), c);}

\end{DoxyCode}


For more information on terminal attributes, see your system\textquotesingle{}s manual pages for \char`\"{}termios\char`\"{}.

\begin{DoxyNote}{Note}
This class is not available with the \mbox{\hyperlink{group__parse__options_gaa92bf6eafb76a4ccf1a0d0df45b13363}{PO\+\_\+\+NO\+\_\+\+TERMINAL\+\_\+\+IO}} parse option. 
\end{DoxyNote}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_abd4f71ca3f95a97f6364cc2e121d3edd}\label{class_qore_1_1_term_i_o_s_abd4f71ca3f95a97f6364cc2e121d3edd}} 
\index{Qore::TermIOS@{Qore::TermIOS}!constructor@{constructor}}
\index{constructor@{constructor}!Qore::TermIOS@{Qore::TermIOS}}
\doxysubsubsection{\texorpdfstring{constructor()}{constructor()}}
{\footnotesize\ttfamily Qore\+::\+Term\+IOS\+::constructor (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Creates the \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{Term\+IOS}} object with random contents. 

Use \mbox{\hyperlink{class_qore_1_1_file_a0a9d380a83dc9e70f143c8ad1f85c7b4}{File\+::get\+Terminal\+Attributes()}} with a terminal I/O constant to initialize the object with terminal settings

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+HAVE\+\_\+\+TERMIOS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{TermIOS termios();}
\DoxyCodeLine{stdin.getTerminalAttributes(termios);}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_ae7df6c469ad6e7a92d12a01e1d29e23f}\label{class_qore_1_1_term_i_o_s_ae7df6c469ad6e7a92d12a01e1d29e23f}} 
\index{Qore::TermIOS@{Qore::TermIOS}!copy@{copy}}
\index{copy@{copy}!Qore::TermIOS@{Qore::TermIOS}}
\doxysubsubsection{\texorpdfstring{copy()}{copy()}}
{\footnotesize\ttfamily Qore\+::\+Term\+IOS\+::copy (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns a copy of the object. 

\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+HAVE\+\_\+\+TERMIOS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{TermIOS t2 = t.copy();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a19c2c027b3a521c36e3797a30573fd6d}\label{class_qore_1_1_term_i_o_s_a19c2c027b3a521c36e3797a30573fd6d}} 
\index{Qore::TermIOS@{Qore::TermIOS}!getCC@{getCC}}
\index{getCC@{getCC}!Qore::TermIOS@{Qore::TermIOS}}
\doxysubsubsection{\texorpdfstring{getCC()}{getCC()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Term\+IOS\+::get\+CC (\begin{DoxyParamCaption}\item[{softint}]{cc }\end{DoxyParamCaption})}



Returns the integer value for the given control character from the given \mbox{\hyperlink{group__tattr__control__character__constants}{control character code}}. 


\begin{DoxyParams}{Parameters}
{\em cc} & the \mbox{\hyperlink{group__tattr__control__character__constants}{control character code}} for the character to retrieve\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the integer value for the given control character from the given \mbox{\hyperlink{group__tattr__control__character__constants}{control character code}}
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+HAVE\+\_\+\+TERMIOS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{\# get minimum characters to return on a read}}
\DoxyCodeLine{int vmin = t.getCC(VMIN);}
\DoxyCodeLine{\textcolor{comment}{\# get character input timer in 0.1 second increments}}
\DoxyCodeLine{int vtime = t.getCC(VTIME);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em TERMIOS-\/\+CC-\/\+ERROR} & the \mbox{\hyperlink{group__tattr__control__character__constants}{control character}} is invalid \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_ac93293f545a552695b77b55afd5c30ca}\label{class_qore_1_1_term_i_o_s_ac93293f545a552695b77b55afd5c30ca}} 
\index{Qore::TermIOS@{Qore::TermIOS}!getCFlag@{getCFlag}}
\index{getCFlag@{getCFlag}!Qore::TermIOS@{Qore::TermIOS}}
\doxysubsubsection{\texorpdfstring{getCFlag()}{getCFlag()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Term\+IOS\+::get\+CFlag (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the \mbox{\hyperlink{group__tattr__control__mode__constants}{control mode flag}} for the object. 

\begin{DoxyReturn}{Returns}
the \mbox{\hyperlink{group__tattr__control__mode__constants}{control mode flag}} for the object
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+HAVE\+\_\+\+TERMIOS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int flag = termios.getCFlag();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a6df9b9729177d42f486bb5aa7a6fced2}\label{class_qore_1_1_term_i_o_s_a6df9b9729177d42f486bb5aa7a6fced2}} 
\index{Qore::TermIOS@{Qore::TermIOS}!getIFlag@{getIFlag}}
\index{getIFlag@{getIFlag}!Qore::TermIOS@{Qore::TermIOS}}
\doxysubsubsection{\texorpdfstring{getIFlag()}{getIFlag()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Term\+IOS\+::get\+IFlag (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the \mbox{\hyperlink{group__tattr__input__mode__constants}{input mode flag}} for the object. 

\begin{DoxyReturn}{Returns}
the \mbox{\hyperlink{group__tattr__input__mode__constants}{input mode flag}} for the object
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+HAVE\+\_\+\+TERMIOS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int flag = termios.getIFlag();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a03ee02f6433eb9c9eb7dddfb633784ab}\label{class_qore_1_1_term_i_o_s_a03ee02f6433eb9c9eb7dddfb633784ab}} 
\index{Qore::TermIOS@{Qore::TermIOS}!getLFlag@{getLFlag}}
\index{getLFlag@{getLFlag}!Qore::TermIOS@{Qore::TermIOS}}
\doxysubsubsection{\texorpdfstring{getLFlag()}{getLFlag()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Term\+IOS\+::get\+LFlag (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the \mbox{\hyperlink{group__tattr__local__mode__constants}{local mode flag}} for the object. 

\begin{DoxyReturn}{Returns}
the \mbox{\hyperlink{group__tattr__local__mode__constants}{local mode flag}} for the object
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+HAVE\+\_\+\+TERMIOS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int flag = termios.getLFlag();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_ac9c94e83cf61a23908f368a686c31872}\label{class_qore_1_1_term_i_o_s_ac9c94e83cf61a23908f368a686c31872}} 
\index{Qore::TermIOS@{Qore::TermIOS}!getOFlag@{getOFlag}}
\index{getOFlag@{getOFlag}!Qore::TermIOS@{Qore::TermIOS}}
\doxysubsubsection{\texorpdfstring{getOFlag()}{getOFlag()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__type__conversion__functions_ga2de8717e92c5f97ccc6511f6062d6502}{int}} Qore\+::\+Term\+IOS\+::get\+OFlag (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Returns the \mbox{\hyperlink{group__tattr__output__mode__constants}{output mode flag}} for the object. 

\begin{DoxyReturn}{Returns}
the \mbox{\hyperlink{group__tattr__output__mode__constants}{output mode flag}} for the object
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+HAVE\+\_\+\+TERMIOS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int flag = termios.getOFlag();}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a5374031d9a2784ca2653a36088f0a0c8}\label{class_qore_1_1_term_i_o_s_a5374031d9a2784ca2653a36088f0a0c8}} 
\index{Qore::TermIOS@{Qore::TermIOS}!getWindowSize@{getWindowSize}}
\index{getWindowSize@{getWindowSize}!Qore::TermIOS@{Qore::TermIOS}}
\doxysubsubsection{\texorpdfstring{getWindowSize()}{getWindowSize()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{group__type__conversion__functions_ga24ee71727f0785d3b826833ed6f5e2ee}{hash}} Qore\+::\+Term\+IOS\+::get\+Window\+Size (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Returns a hash giving the current terminal window size in hash keys {\ttfamily \char`\"{}rows\char`\"{}} and {\ttfamily \char`\"{}columns\char`\"{}}. 

\begin{DoxyReturn}{Returns}
a hash giving the current terminal window size in hash keys {\ttfamily \char`\"{}rows\char`\"{}} and {\ttfamily \char`\"{}columns\char`\"{}} 
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+HAVE\+\_\+\+TERMIOS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Restrictions\+:}
\mbox{\hyperlink{group__parse__options_gaa92bf6eafb76a4ccf1a0d0df45b13363}{Qore\+::\+PO\+\_\+\+NO\+\_\+\+TERMINAL\+\_\+\+IO}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_RET_VALUE_ONLY}{RET\+\_\+\+VALUE\+\_\+\+ONLY}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}
hash wh = termios.\+get\+Window\+Size(); 
\begin{DoxyCode}{0}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a74a86e4703525ee046e0221482484b61}\label{class_qore_1_1_term_i_o_s_a74a86e4703525ee046e0221482484b61}} 
\index{Qore::TermIOS@{Qore::TermIOS}!isEqual@{isEqual}}
\index{isEqual@{isEqual}!Qore::TermIOS@{Qore::TermIOS}}
\doxysubsubsection{\texorpdfstring{isEqual()}{isEqual()}}
{\footnotesize\ttfamily bool Qore\+::\+Term\+IOS\+::is\+Equal (\begin{DoxyParamCaption}\item[{Termios}]{termios }\end{DoxyParamCaption})}



Returns \mbox{\hyperlink{basic_data_types_True}{True}} if the \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{Term\+IOS}} object passed as an argument is equal to the current object; \mbox{\hyperlink{basic_data_types_False}{False}} if not. 

\begin{DoxyReturn}{Returns}
\mbox{\hyperlink{basic_data_types_True}{True}} if the \mbox{\hyperlink{class_qore_1_1_term_i_o_s}{Term\+IOS}} object passed as an argument is equal to the current object; \mbox{\hyperlink{basic_data_types_False}{False}} if not
\end{DoxyReturn}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+HAVE\+\_\+\+TERMIOS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Code Flags\+:}
\mbox{\hyperlink{code_flags_CONSTANT}{CONSTANT}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{bool b = termios.isEqual(termios2);}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_ae203d13b7146e01541a18008136069cd}\label{class_qore_1_1_term_i_o_s_ae203d13b7146e01541a18008136069cd}} 
\index{Qore::TermIOS@{Qore::TermIOS}!setCC@{setCC}}
\index{setCC@{setCC}!Qore::TermIOS@{Qore::TermIOS}}
\doxysubsubsection{\texorpdfstring{setCC()}{setCC()}}
{\footnotesize\ttfamily nothing Qore\+::\+Term\+IOS\+::set\+CC (\begin{DoxyParamCaption}\item[{softint}]{offset,  }\item[{softint}]{value }\end{DoxyParamCaption})}



Sets the value of the given \mbox{\hyperlink{group__tattr__control__character__constants}{control character}}. 


\begin{DoxyParams}{Parameters}
{\em offset} & the \mbox{\hyperlink{group__tattr__control__character__constants}{control character}} to set \\
\hline
{\em value} & the value to set for the \mbox{\hyperlink{group__tattr__control__character__constants}{control character}}\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+HAVE\+\_\+\+TERMIOS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{comment}{\# set minimum characters to return on a read}}
\DoxyCodeLine{t.setCC(VMIN, 1);}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{\# set character input timer in 0.1 second increments (= no timer)}}
\DoxyCodeLine{t.setCC(VTIME, 0);}

\end{DoxyCode}

\end{DoxyParagraph}

\begin{DoxyExceptions}{Exceptions}
{\em TERMIOS-\/\+CC-\/\+ERROR} & the \mbox{\hyperlink{group__tattr__control__character__constants}{control character}} is invalid \\
\hline
\end{DoxyExceptions}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a8ea7b285dbfb95acd99a26e7a13c6248}\label{class_qore_1_1_term_i_o_s_a8ea7b285dbfb95acd99a26e7a13c6248}} 
\index{Qore::TermIOS@{Qore::TermIOS}!setCFlag@{setCFlag}}
\index{setCFlag@{setCFlag}!Qore::TermIOS@{Qore::TermIOS}}
\doxysubsubsection{\texorpdfstring{setCFlag()}{setCFlag()}}
{\footnotesize\ttfamily nothing Qore\+::\+Term\+IOS\+::set\+CFlag (\begin{DoxyParamCaption}\item[{softint}]{flag }\end{DoxyParamCaption})}



Sets the control mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__control__mode__constants}{Terminal Attribute Control Mode Constants}}. 


\begin{DoxyParams}{Parameters}
{\em flag} & the control mode (see \mbox{\hyperlink{group__tattr__control__mode__constants}{Terminal Attribute Control Mode Constants}} for masks for this value)\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+HAVE\+\_\+\+TERMIOS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int cflag = termios.getCFlag();}
\DoxyCodeLine{cflag = (cflag \& \string~CSIZE) | CS8 | CSTOPB;}
\DoxyCodeLine{cflag = (cflag | CLOCAL | CREAD) \& \string~CRTSCTS;}
\DoxyCodeLine{termios.setCFlag(cflag);}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a749c05bee07d390cc8489702cec57b38}\label{class_qore_1_1_term_i_o_s_a749c05bee07d390cc8489702cec57b38}} 
\index{Qore::TermIOS@{Qore::TermIOS}!setIFlag@{setIFlag}}
\index{setIFlag@{setIFlag}!Qore::TermIOS@{Qore::TermIOS}}
\doxysubsubsection{\texorpdfstring{setIFlag()}{setIFlag()}}
{\footnotesize\ttfamily nothing Qore\+::\+Term\+IOS\+::set\+IFlag (\begin{DoxyParamCaption}\item[{softint}]{flag }\end{DoxyParamCaption})}



Sets the input mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__input__mode__constants}{Terminal Attributes Input Mode Constants}}. 


\begin{DoxyParams}{Parameters}
{\em flag} & the input mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__input__mode__constants}{Terminal Attributes Input Mode Constants}}\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+HAVE\+\_\+\+TERMIOS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int iflag = termios.getIFlag();}
\DoxyCodeLine{\textcolor{comment}{\# ring bell on input queue full}}
\DoxyCodeLine{iflag |= IMAXBEL;}
\DoxyCodeLine{termios.setIFlag(iflag);}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a46e094432e30639e488896355dc0531f}\label{class_qore_1_1_term_i_o_s_a46e094432e30639e488896355dc0531f}} 
\index{Qore::TermIOS@{Qore::TermIOS}!setLFlag@{setLFlag}}
\index{setLFlag@{setLFlag}!Qore::TermIOS@{Qore::TermIOS}}
\doxysubsubsection{\texorpdfstring{setLFlag()}{setLFlag()}}
{\footnotesize\ttfamily nothing Qore\+::\+Term\+IOS\+::set\+LFlag (\begin{DoxyParamCaption}\item[{softint}]{flag }\end{DoxyParamCaption})}



Sets the local mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__local__mode__constants}{Terminal Attribute Local Mode Constants}}. 


\begin{DoxyParams}{Parameters}
{\em flag} & the local mode (see \mbox{\hyperlink{group__tattr__local__mode__constants}{Terminal Attribute Local Mode Constants}} for masks for this value)\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+HAVE\+\_\+\+TERMIOS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int lflag = termios.getLFlag();}
\DoxyCodeLine{\textcolor{comment}{\# disable canonical input mode (= turn on "{}raw"{} mode)}}
\DoxyCodeLine{lflag \&= \string~ICANON;}
\DoxyCodeLine{\textcolor{comment}{\# turn off echo mode}}
\DoxyCodeLine{lflag \&= \string~ECHO;}
\DoxyCodeLine{\textcolor{comment}{\# do not check for special input characters (INTR, QUIT, and SUSP)}}
\DoxyCodeLine{lflag \&= \string~ISIG;}
\DoxyCodeLine{termios.setLFlag(lflag);}

\end{DoxyCode}
 
\end{DoxyParagraph}
\mbox{\Hypertarget{class_qore_1_1_term_i_o_s_a7fc74118f636d4b0de33d88fabf16d57}\label{class_qore_1_1_term_i_o_s_a7fc74118f636d4b0de33d88fabf16d57}} 
\index{Qore::TermIOS@{Qore::TermIOS}!setOFlag@{setOFlag}}
\index{setOFlag@{setOFlag}!Qore::TermIOS@{Qore::TermIOS}}
\doxysubsubsection{\texorpdfstring{setOFlag()}{setOFlag()}}
{\footnotesize\ttfamily nothing Qore\+::\+Term\+IOS\+::set\+OFlag (\begin{DoxyParamCaption}\item[{softint}]{flag }\end{DoxyParamCaption})}



Sets the output mode flag for the object from a mask of \mbox{\hyperlink{group__tattr__output__mode__constants}{Terminal Attributes Output Mode Constants}}. 


\begin{DoxyParams}{Parameters}
{\em flag} & the output mode (see \mbox{\hyperlink{group__tattr__output__mode__constants}{Terminal Attributes Output Mode Constants}} for masks for this value)\\
\hline
\end{DoxyParams}
\begin{DoxyParagraph}{Platform Availability\+:}
\mbox{\hyperlink{group__option__constants_ga98899bee8f8dda3f4b1feed875118b85}{Qore\+::\+Option\+::\+HAVE\+\_\+\+TERMIOS}}
\end{DoxyParagraph}
\begin{DoxyParagraph}{Example\+:}

\begin{DoxyCode}{0}
\DoxyCodeLine{int oflag = termios.getOFlag();}
\DoxyCodeLine{\textcolor{comment}{\# translate linefeeds to crlf}}
\DoxyCodeLine{oflag |= ONLCR;}
\DoxyCodeLine{termios.setOFlag(oflag);}

\end{DoxyCode}
 
\end{DoxyParagraph}
