wxWidgets/docs/latex/wx/fileostr.tex

66 lines
2.3 KiB
TeX
Raw Normal View History

% -----------------------------------------------------------------------------
% wxFileOutputStream
% -----------------------------------------------------------------------------
\section{\class{wxFileOutputStream}}\label{wxfileoutputstream}
This class represents data written to a file. There are actually
two such groups of classes: this one is based on \helpref{wxFile}{wxfile}
whereas \helpref{wxFFileInputStream}{wxffileinputstream} is based in
the \helpref{wxFFile}{wxffile} class.
Note that \helpref{wxFile}{wxfile} and \helpref{wxFFile}{wxffile} differ
in one aspect, namely when to report that the end of the file has been
reached. This is documented in \helpref{wxFile::Eof}{wxfileeof} and
\helpref{wxFFile::Eof}{wxffileeof} and the behaviour of the stream
classes reflects this difference, i.e. wxFileInputStream will report
wxSTREAM\_EOF after having read the last byte whereas wxFFileInputStream
will report wxSTREAM\_EOF after trying to read {\it past} the last byte.
Related to EOF behavior, note that \helpref{SeekO()}{wxoutputstreamseeko}
can seek beyond the end of the stream (file) and will thus not return
{\it wxInvalidOffset} for that.
\wxheading{Derived from}
\helpref{wxOutputStream}{wxoutputstream}
\wxheading{Include files}
<wx/wfstream.h>
\wxheading{See also}
\helpref{wxBufferedOutputStream}{wxbufferedoutputstream}, \helpref{wxFileInputStream}{wxfileinputstream}, \helpref{wxFFileInputStream}{wxffileinputstream}
% ----------
% Members
% ----------
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxFileOutputStream::wxFileOutputStream}\label{wxfileoutputstreamctor}
\func{}{wxFileOutputStream}{\param{const wxString\&}{ ofileName}}
Creates a new file with {\it ofilename} name and initializes the stream in
write-only mode.
\func{}{wxFileOutputStream}{\param{wxFile\&}{ file}}
Initializes a file stream in write-only mode using the file I/O object {\it file}.
\func{}{wxFileOutputStream}{\param{int}{ fd}}
Initializes a file stream in write-only mode using the file descriptor {\it fd}.
\membersection{wxFileOutputStream::\destruct{wxFileOutputStream}}\label{wxfileoutputstreamdtor}
\func{}{\destruct{wxFileOutputStream}}{\void}
Destructor.
\membersection{wxFileOutputStream::Ok}\label{wxfileoutputstreamok}
\constfunc{bool}{Ok}{\void}
Returns true if the stream is initialized and ready.