1999-01-25 18:33:08 +00:00
|
|
|
% -----------------------------------------------------------------------------
|
|
|
|
% wxOutputStream
|
|
|
|
% -----------------------------------------------------------------------------
|
|
|
|
\section{\class{wxOutputStream}}\label{wxoutputstream}
|
|
|
|
|
1999-12-06 16:16:14 +00:00
|
|
|
wxOutputStream is an abstract base class which may not be used directly.
|
|
|
|
|
1999-01-25 18:33:08 +00:00
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxStreamBase}{wxstreambase}
|
|
|
|
|
1999-02-15 20:41:29 +00:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/stream.h>
|
|
|
|
|
2007-07-28 12:21:03 +00:00
|
|
|
\wxheading{Library}
|
|
|
|
|
|
|
|
\helpref{wxBase}{librarieslist}
|
|
|
|
|
2000-03-15 00:21:49 +00:00
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
1999-01-25 18:33:08 +00:00
|
|
|
% -----------
|
|
|
|
% ctor & dtor
|
|
|
|
% -----------
|
2004-07-21 10:45:28 +00:00
|
|
|
|
2004-09-21 13:24:41 +00:00
|
|
|
\membersection{wxOutputStream::wxOutputStream}\label{wxoutputstreamctor}
|
1999-01-25 18:33:08 +00:00
|
|
|
|
|
|
|
\func{}{wxOutputStream}{\void}
|
|
|
|
|
|
|
|
Creates a dummy wxOutputStream object.
|
|
|
|
|
2004-07-21 10:45:28 +00:00
|
|
|
|
2004-09-21 13:24:41 +00:00
|
|
|
\membersection{wxOutputStream::\destruct{wxOutputStream}}\label{wxoutputstreamdtor}
|
1999-01-25 18:33:08 +00:00
|
|
|
|
|
|
|
\func{}{\destruct{wxOutputStream}}{\void}
|
|
|
|
|
|
|
|
Destructor.
|
|
|
|
|
2004-07-21 10:45:28 +00:00
|
|
|
|
2004-11-23 14:26:10 +00:00
|
|
|
\membersection{wxOutputStream::Close}\label{wxoutputstreamclose}
|
|
|
|
|
|
|
|
\func{bool}{Close}{\void}
|
|
|
|
|
|
|
|
Closes the stream, returning {\tt false} if an error occurs. The
|
|
|
|
stream is closed implicitly in the destructor if Close() is not
|
|
|
|
called explicitly.
|
|
|
|
|
|
|
|
If this stream wraps another stream or some other resource such
|
|
|
|
as a file, then the underlying resource is closed too if it is owned
|
|
|
|
by this stream, or left open otherwise.
|
|
|
|
|
|
|
|
|
2004-07-21 10:45:28 +00:00
|
|
|
\membersection{wxOutputStream::LastWrite}\label{wxoutputstreamlastwrite}
|
1999-01-25 18:33:08 +00:00
|
|
|
|
1999-03-13 20:14:37 +00:00
|
|
|
\constfunc{size\_t}{LastWrite}{\void}
|
1999-01-25 18:33:08 +00:00
|
|
|
|
2004-07-21 10:45:28 +00:00
|
|
|
Returns the number of bytes written during the last
|
|
|
|
\helpref{Write()}{wxoutputstreamwrite}. It may return $0$ even if there is no
|
|
|
|
error on the stream if it is only temporarily impossible to write to it.
|
|
|
|
|
1999-12-06 16:16:14 +00:00
|
|
|
|
2004-09-28 11:54:59 +00:00
|
|
|
\membersection{wxOutputStream::PutC}\label{wxoutputstreamputc}
|
1999-01-25 18:33:08 +00:00
|
|
|
|
1999-02-25 15:07:00 +00:00
|
|
|
\func{void}{PutC}{\param{char}{ c}}
|
1999-01-25 18:33:08 +00:00
|
|
|
|
1999-02-25 15:07:00 +00:00
|
|
|
Puts the specified character in the output queue and increments the
|
|
|
|
stream position.
|
1999-01-25 18:33:08 +00:00
|
|
|
|
2004-07-21 10:45:28 +00:00
|
|
|
|
2003-09-26 20:07:22 +00:00
|
|
|
\membersection{wxOutputStream::SeekO}\label{wxoutputstreamseeko}
|
1999-01-25 18:33:08 +00:00
|
|
|
|
2004-04-11 20:58:56 +00:00
|
|
|
\func{off\_t}{SeekO}{\param{off\_t}{ pos}, \param{wxSeekMode}{ mode = wxFromStart}}
|
1999-01-25 18:33:08 +00:00
|
|
|
|
|
|
|
Changes the stream current position.
|
|
|
|
|
2004-04-11 20:58:56 +00:00
|
|
|
\wxheading{Parameters}
|
|
|
|
|
|
|
|
\docparam{pos}{Offset to seek to.}
|
|
|
|
|
|
|
|
\docparam{mode}{One of {\bf wxFromStart}, {\bf wxFromEnd}, {\bf wxFromCurrent}.}
|
|
|
|
|
|
|
|
\wxheading{Return value}
|
|
|
|
|
|
|
|
The new stream position or wxInvalidOffset on error.
|
|
|
|
|
2004-07-21 10:45:28 +00:00
|
|
|
|
2004-09-20 11:21:04 +00:00
|
|
|
\membersection{wxOutputStream::TellO}\label{wxoutputstreamtello}
|
1999-01-25 18:33:08 +00:00
|
|
|
|
1999-03-13 20:14:37 +00:00
|
|
|
\constfunc{off\_t}{TellO}{\void}
|
1999-01-25 18:33:08 +00:00
|
|
|
|
|
|
|
Returns the current stream position.
|
|
|
|
|
2004-07-21 10:45:28 +00:00
|
|
|
|
|
|
|
\membersection{wxOutputStream::Write}\label{wxoutputstreamwrite}
|
1999-01-25 18:33:08 +00:00
|
|
|
|
1999-03-13 20:14:37 +00:00
|
|
|
\func{wxOutputStream\&}{Write}{\param{const void *}{buffer}, \param{size\_t}{ size}}
|
1999-01-25 18:33:08 +00:00
|
|
|
|
2004-07-21 10:45:28 +00:00
|
|
|
Writes up to the specified amount of bytes using the data of {\it buffer}. Note
|
|
|
|
that not all data can always be written so you must check the number of bytes
|
|
|
|
really written to the stream using \helpref{LastWrite()}{wxoutputstreamlastwrite}
|
|
|
|
when this function returns. In some cases (for example a write end of a pipe
|
|
|
|
which is currently full) it is even possible that there is no errors and zero
|
|
|
|
bytes have been written.
|
1999-01-25 18:33:08 +00:00
|
|
|
|
1999-02-25 15:07:00 +00:00
|
|
|
This function returns a reference on the current object, so the user can test
|
|
|
|
any states of the stream right away.
|
1999-01-25 18:33:08 +00:00
|
|
|
|
1999-03-13 20:14:37 +00:00
|
|
|
\func{wxOutputStream\&}{Write}{\param{wxInputStream\&}{ stream\_in}}
|
1999-02-25 15:07:00 +00:00
|
|
|
|
|
|
|
Reads data from the specified input stream and stores them
|
|
|
|
in the current stream. The data is read until an error is raised
|
|
|
|
by one of the two streams.
|
1999-01-25 18:33:08 +00:00
|
|
|
|