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