1999-01-25 13:33:08 -05:00
|
|
|
% -----------------------------------------------------------------------------
|
|
|
|
% wxStreamBase
|
|
|
|
% -----------------------------------------------------------------------------
|
|
|
|
\section{\class{wxStreamBase}}\label{wxstreambase}
|
|
|
|
|
1999-12-27 09:27:05 -05:00
|
|
|
This class is the base class of most stream related classes in wxWindows. It must
|
|
|
|
not be used directly.
|
|
|
|
|
1999-01-25 13:33:08 -05:00
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
None
|
|
|
|
|
1999-02-15 15:41:29 -05:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/stream.h>
|
|
|
|
|
1999-01-25 13:33:08 -05:00
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxStreamBuffer}{wxstreambuffer}
|
|
|
|
|
|
|
|
% -----------------------------------------------------------------------------
|
|
|
|
% Members
|
|
|
|
% -----------------------------------------------------------------------------
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
% -----------
|
|
|
|
% ctor & dtor
|
|
|
|
% -----------
|
|
|
|
|
|
|
|
\membersection{wxStreamBase::wxStreamBase}
|
|
|
|
|
|
|
|
\func{}{wxStreamBase}{\void}
|
|
|
|
|
1999-02-09 13:12:20 -05:00
|
|
|
Creates a dummy stream object. It doesn't do anything.
|
1999-01-25 13:33:08 -05:00
|
|
|
|
|
|
|
\membersection{wxStreamBase::\destruct{wxStreamBase}}
|
|
|
|
|
|
|
|
\func{}{\destruct{wxStreamBase}}{\void}
|
|
|
|
|
|
|
|
Destructor.
|
|
|
|
|
2000-03-02 14:06:13 -05:00
|
|
|
\membersection{wxStreamBase::IsOk}\label{wxstreambaseisok}
|
|
|
|
|
|
|
|
\constfunc{wxStreamError}{IsOk}{\void}
|
|
|
|
|
2003-01-17 19:16:34 -05:00
|
|
|
Returns true if no error occurred on the stream.
|
2000-03-02 14:06:13 -05:00
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{LastError}{wxstreambaselasterror}
|
|
|
|
|
1999-01-25 13:33:08 -05:00
|
|
|
\membersection{wxStreamBase::LastError}\label{wxstreambaselasterror}
|
|
|
|
|
|
|
|
\constfunc{wxStreamError}{LastError}{\void}
|
|
|
|
|
|
|
|
This function returns the last error.
|
2000-03-14 19:21:49 -05:00
|
|
|
|
1999-02-07 16:12:41 -05:00
|
|
|
\twocolwidtha{5cm}
|
|
|
|
\begin{twocollist}\itemsep=0pt
|
2000-07-15 15:51:35 -04:00
|
|
|
\twocolitem{{\bf wxSTREAM\_NO\_ERROR}}{No error occurred.}
|
|
|
|
\twocolitem{{\bf wxSTREAM\_EOF}}{An End-Of-File occurred.}
|
|
|
|
\twocolitem{{\bf wxSTREAM\_WRITE\_ERROR}}{A generic error occurred on the last write call.}
|
|
|
|
\twocolitem{{\bf wxSTREAM\_READ\_ERROR}}{A generic error occurred on the last read call.}
|
1999-02-07 16:12:41 -05:00
|
|
|
\end{twocollist}
|
1999-01-25 13:33:08 -05:00
|
|
|
|
|
|
|
\membersection{wxStreamBase::OnSysRead}\label{wxstreambaseonsysread}
|
|
|
|
|
1999-02-25 10:07:00 -05:00
|
|
|
\func{size\_t}{OnSysRead}{\param{void*}{ buffer}, \param{size\_t}{ bufsize}}
|
1999-01-25 13:33:08 -05:00
|
|
|
|
1999-12-27 09:27:05 -05:00
|
|
|
Internal function. It is called when the stream wants to read data of the
|
1999-01-25 13:33:08 -05:00
|
|
|
specified size. It should return the size that was actually read.
|
|
|
|
|
|
|
|
\membersection{wxStreamBase::OnSysSeek}
|
|
|
|
|
1999-02-25 10:07:00 -05:00
|
|
|
\func{off\_t}{OnSysSeek}{\param{off\_t}{ pos}, \param{wxSeekMode}{ mode}}
|
1999-01-25 13:33:08 -05:00
|
|
|
|
1999-12-27 09:27:05 -05:00
|
|
|
Internal function. It is called when the stream needs to change the
|
|
|
|
current position.
|
1999-01-25 13:33:08 -05:00
|
|
|
|
|
|
|
\membersection{wxStreamBase::OnSysTell}
|
|
|
|
|
1999-02-25 10:07:00 -05:00
|
|
|
\constfunc{off\_t}{OnSysTell}{\void}
|
1999-01-25 13:33:08 -05:00
|
|
|
|
1999-12-27 09:27:05 -05:00
|
|
|
Internal function. Is is called when the stream needs to know the
|
|
|
|
real position.
|
1999-01-25 13:33:08 -05:00
|
|
|
|
1999-02-25 10:07:00 -05:00
|
|
|
\membersection{wxStreamBase::OnSysWrite}
|
|
|
|
|
|
|
|
\func{size\_t}{OnSysWrite}{\param{void *}{buffer}, \param{size\_t}{ bufsize}}
|
|
|
|
|
|
|
|
See \helpref{OnSysRead}{wxstreambaseonsysread}.
|
|
|
|
|
1999-07-30 13:54:18 -04:00
|
|
|
\membersection{wxStreamBase::GetSize}\label{wxstreambasegetsize}
|
1999-02-25 10:07:00 -05:00
|
|
|
|
1999-07-25 10:38:28 -04:00
|
|
|
\constfunc{size\_t}{GetSize}{\void}
|
1999-02-25 10:07:00 -05:00
|
|
|
|
|
|
|
This function returns the size of the stream. For example, for a file it is the size of
|
2000-03-02 14:06:13 -05:00
|
|
|
the file.
|
1999-02-25 10:07:00 -05:00
|
|
|
|
|
|
|
\wxheading{Warning}
|
|
|
|
|
|
|
|
There are streams which do not have size by definition, such as socket streams.
|
1999-07-25 10:38:28 -04:00
|
|
|
In that cases, GetSize returns an invalid size represented by
|
1999-02-25 10:07:00 -05:00
|
|
|
|
|
|
|
\begin{verbatim}
|
|
|
|
~(size_t)0
|
|
|
|
\end{verbatim}
|
|
|
|
|