1999-01-25 13:33:08 -05:00
|
|
|
% -----------------------------------------------------------------------------
|
|
|
|
% wxInputStream
|
|
|
|
% -----------------------------------------------------------------------------
|
|
|
|
\section{\class{wxInputStream}}\label{wxinputstream}
|
|
|
|
|
1999-12-06 11:16:14 -05:00
|
|
|
wxInputStream is an abstract base class which may not be used directly.
|
|
|
|
|
1999-01-25 13:33:08 -05:00
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxStreamBase}{wxstreambase}
|
|
|
|
|
1999-02-15 15:41:29 -05:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/stream.h>
|
|
|
|
|
1999-01-25 13:33:08 -05:00
|
|
|
% -----------
|
|
|
|
% ctor & dtor
|
|
|
|
% -----------
|
|
|
|
\membersection{wxInputStream::wxInputStream}
|
|
|
|
|
|
|
|
\func{}{wxInputStream}{\void}
|
|
|
|
|
|
|
|
Creates a dummy input stream.
|
|
|
|
|
|
|
|
\membersection{wxInputStream::\destruct{wxInputStream}}
|
|
|
|
|
|
|
|
\func{}{\destruct{wxInputStream}}{\void}
|
|
|
|
|
|
|
|
Destructor.
|
|
|
|
|
|
|
|
\membersection{wxInputStream::GetC}
|
|
|
|
|
|
|
|
\func{char}{GetC}{\void}
|
|
|
|
|
|
|
|
Returns the first character in the input queue and removes it.
|
|
|
|
|
1999-07-30 13:54:18 -04:00
|
|
|
\membersection{wxInputStream::LastRead}\label{wxinputstreamlastread}
|
1999-02-25 10:07:00 -05:00
|
|
|
|
|
|
|
\constfunc{size\_t}{LastRead}{\void}
|
|
|
|
|
|
|
|
Returns the last number of bytes read.
|
|
|
|
|
|
|
|
\membersection{wxInputStream::Peek}
|
|
|
|
|
|
|
|
\func{char}{Peek}{\void}
|
|
|
|
|
|
|
|
Returns the first character in the input queue without removing it.
|
|
|
|
|
1999-01-25 13:33:08 -05:00
|
|
|
\membersection{wxInputStream::Read}
|
|
|
|
|
1999-02-25 10:07:00 -05:00
|
|
|
\func{wxInputStream\&}{Read}{\param{void *}{buffer}, \param{size\_t}{ size}}
|
1999-01-25 13:33:08 -05:00
|
|
|
|
1999-12-24 18:40:13 -05:00
|
|
|
Reads the specified amount of bytes and stores the data in {\it buffer}.
|
1999-01-25 13:33:08 -05:00
|
|
|
|
1999-02-09 13:12:20 -05:00
|
|
|
\wxheading{Warning}
|
|
|
|
|
|
|
|
The buffer absolutely needs to have at least the specified size.
|
|
|
|
|
|
|
|
\wxheading{Return value}
|
1999-01-25 13:33:08 -05:00
|
|
|
|
|
|
|
This function returns a reference on the current object, so the user can test
|
|
|
|
any states of the stream right away.
|
|
|
|
|
1999-03-13 15:14:37 -05:00
|
|
|
\func{wxInputStream\&}{Read}{\param{wxOutputStream\&}{ stream\_out}}
|
1999-01-25 13:33:08 -05:00
|
|
|
|
|
|
|
Reads data from the input queue and stores it in the specified output stream.
|
|
|
|
The data is read until an error is raised by one of the two streams.
|
|
|
|
|
1999-02-09 13:12:20 -05:00
|
|
|
\wxheading{Return value}
|
|
|
|
|
|
|
|
This function returns a reference on the current object, so the user can test
|
|
|
|
any states of the stream right away.
|
|
|
|
|
1999-01-25 13:33:08 -05:00
|
|
|
\membersection{wxInputStream::SeekI}
|
|
|
|
|
1999-02-25 10:07:00 -05:00
|
|
|
\func{off\_t}{SeekI}{\param{off\_t}{ pos}, \param{wxSeekMode}{ mode = wxFromStart}}
|
1999-01-25 13:33:08 -05:00
|
|
|
|
|
|
|
Changes the stream current position.
|
|
|
|
|
|
|
|
\membersection{wxInputStream::TellI}
|
|
|
|
|
1999-02-25 10:07:00 -05:00
|
|
|
\constfunc{off\_t}{TellI}{\void}
|
1999-01-25 13:33:08 -05:00
|
|
|
|
|
|
|
Returns the current stream position.
|
|
|
|
|
1999-07-09 13:10:49 -04:00
|
|
|
\membersection{wxInputStream::Ungetch}\label{wxinputstream_ungetch}
|
|
|
|
|
|
|
|
\func{size\_t}{Ungetch}{\param{const char*}{ buffer}, \param{size\_t}{ size}}
|
|
|
|
|
1999-12-24 18:40:13 -05:00
|
|
|
This function is only useful in {\it read} mode. It is the manager of the "Write-Back"
|
1999-07-09 13:10:49 -04:00
|
|
|
buffer. This buffer acts like a temporary buffer where datas which has to be
|
|
|
|
read during the next read IO call are put. This is useful when you get a big
|
|
|
|
block of data which you didn't want to read: you can replace them at the top
|
|
|
|
of the input queue by this way.
|
|
|
|
|
1999-12-06 11:16:14 -05:00
|
|
|
Be very careful about this call in connection with calling SeekI() on the same
|
|
|
|
stream. Any call to SeekI() will invalidate any previous call to this method
|
|
|
|
(otherwise you could SeekI() to one position, "unread" a few bytes there, SeekI()
|
|
|
|
to another position and data would be either lost or corrupted).
|
|
|
|
|
1999-07-09 13:10:49 -04:00
|
|
|
\wxheading{Return value}
|
|
|
|
|
|
|
|
Returns the amount of bytes saved in the Write-Back buffer.
|
|
|
|
|
|
|
|
\func{bool}{Ungetch}{\param{char }{c}}
|
|
|
|
|
|
|
|
This function acts like the previous one except that it takes only one
|
|
|
|
character: it is sometimes shorter to use than the generic function.
|
|
|
|
|