1999-01-25 18:33:08 +00:00
|
|
|
% -----------------------------------------------------------------------------
|
|
|
|
% wxStreamBase
|
|
|
|
% -----------------------------------------------------------------------------
|
|
|
|
\section{\class{wxStreamBase}}\label{wxstreambase}
|
|
|
|
|
2004-05-04 08:27:20 +00:00
|
|
|
This class is the base class of most stream related classes in wxWidgets. It must
|
1999-12-27 14:27:05 +00:00
|
|
|
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
|
|
|
|
% -----------
|
|
|
|
|
2004-11-10 21:10:30 +00:00
|
|
|
|
2004-09-22 10:59:57 +00:00
|
|
|
\membersection{wxStreamBase::wxStreamBase}\label{wxstreambasector}
|
1999-01-25 18:33:08 +00:00
|
|
|
|
|
|
|
\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
|
|
|
|
2004-11-10 21:10:30 +00:00
|
|
|
|
2004-09-22 10:59:57 +00:00
|
|
|
\membersection{wxStreamBase::\destruct{wxStreamBase}}\label{wxstreambasedtor}
|
1999-01-25 18:33:08 +00:00
|
|
|
|
|
|
|
\func{}{\destruct{wxStreamBase}}{\void}
|
|
|
|
|
|
|
|
Destructor.
|
|
|
|
|
2000-03-02 19:06:13 +00:00
|
|
|
|
2004-11-10 21:10:30 +00:00
|
|
|
\membersection{wxStreamBase::GetLength}\label{wxstreambasegetlength}
|
2000-03-02 19:06:13 +00:00
|
|
|
|
2004-11-10 21:10:30 +00:00
|
|
|
\constfunc{wxFileOffset}{GetLength}{\void}
|
2000-03-02 19:06:13 +00:00
|
|
|
|
2004-11-10 21:10:30 +00:00
|
|
|
Returns the length of the stream in bytes. If the length cannot be determined
|
|
|
|
(this is always the case for socket streams for example), returns
|
|
|
|
\texttt{wxInvalidOffset}.
|
|
|
|
|
|
|
|
\newsince{2.5.4}
|
2000-03-02 19:06:13 +00:00
|
|
|
|
|
|
|
|
2004-01-22 12:53:04 +00:00
|
|
|
\membersection{wxStreamBase::GetLastError}\label{wxstreambasegetlasterror}
|
1999-01-25 18:33:08 +00:00
|
|
|
|
2004-01-22 12:53:04 +00:00
|
|
|
\constfunc{wxStreamError}{GetLastError}{\void}
|
1999-01-25 18:33:08 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
2004-11-10 21:10:30 +00:00
|
|
|
|
|
|
|
\membersection{wxStreamBase::GetSize}\label{wxstreambasegetsize}
|
|
|
|
|
|
|
|
\constfunc{size\_t}{GetSize}{\void}
|
|
|
|
|
|
|
|
\deprecated{\helpref{GetLength}{wxstreambasegetlength}}
|
|
|
|
|
|
|
|
This function returns the size of the stream. For example, for a file it is the
|
|
|
|
size of the file.
|
|
|
|
|
|
|
|
\wxheading{Warning}
|
|
|
|
|
|
|
|
There are streams which do not have size by definition, such as socket streams.
|
|
|
|
In that cases, GetSize returns $0$ so you should always test its return value.
|
|
|
|
|
|
|
|
|
|
|
|
\membersection{wxStreamBase::IsOk}\label{wxstreambaseisok}
|
|
|
|
|
|
|
|
\constfunc{wxStreamError}{IsOk}{\void}
|
|
|
|
|
|
|
|
Returns true if no error occurred on the stream.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{GetLastError}{wxstreambasegetlasterror}
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
2004-11-10 21:10:30 +00:00
|
|
|
|
2004-09-22 10:59:57 +00:00
|
|
|
\membersection{wxStreamBase::OnSysSeek}\label{wxstreambaseonsysseek}
|
1999-01-25 18:33:08 +00:00
|
|
|
|
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
|
|
|
|
2004-11-10 21:10:30 +00:00
|
|
|
|
2004-09-22 10:59:57 +00:00
|
|
|
\membersection{wxStreamBase::OnSysTell}\label{wxstreambaseonsystell}
|
1999-01-25 18:33:08 +00:00
|
|
|
|
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
|
|
|
|
2004-11-10 21:10:30 +00:00
|
|
|
|
2004-09-22 10:59:57 +00:00
|
|
|
\membersection{wxStreamBase::OnSysWrite}\label{wxstreambaseonsyswrite}
|
1999-02-25 15:07:00 +00:00
|
|
|
|
|
|
|
\func{size\_t}{OnSysWrite}{\param{void *}{buffer}, \param{size\_t}{ bufsize}}
|
|
|
|
|
|
|
|
See \helpref{OnSysRead}{wxstreambaseonsysread}.
|
|
|
|
|
|
|
|
|