1999-01-25 13:33:08 -05:00
|
|
|
% -----------------------------------------------------------------------------
|
|
|
|
% wxStreamBase
|
|
|
|
% -----------------------------------------------------------------------------
|
|
|
|
\section{\class{wxStreamBase}}\label{wxstreambase}
|
|
|
|
|
2004-05-04 04:27:20 -04:00
|
|
|
This class is the base class of most stream related classes in wxWidgets. It must
|
1999-12-27 09:27:05 -05:00
|
|
|
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
|
|
|
|
% -----------
|
|
|
|
|
2004-11-10 16:10:30 -05:00
|
|
|
|
2004-09-22 06:59:57 -04:00
|
|
|
\membersection{wxStreamBase::wxStreamBase}\label{wxstreambasector}
|
1999-01-25 13:33:08 -05:00
|
|
|
|
|
|
|
\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
|
|
|
|
2004-11-10 16:10:30 -05:00
|
|
|
|
2004-09-22 06:59:57 -04:00
|
|
|
\membersection{wxStreamBase::\destruct{wxStreamBase}}\label{wxstreambasedtor}
|
1999-01-25 13:33:08 -05:00
|
|
|
|
|
|
|
\func{}{\destruct{wxStreamBase}}{\void}
|
|
|
|
|
|
|
|
Destructor.
|
|
|
|
|
2000-03-02 14:06:13 -05:00
|
|
|
|
2004-11-10 16:10:30 -05:00
|
|
|
\membersection{wxStreamBase::GetLength}\label{wxstreambasegetlength}
|
2000-03-02 14:06:13 -05:00
|
|
|
|
2004-11-10 16:10:30 -05:00
|
|
|
\constfunc{wxFileOffset}{GetLength}{\void}
|
2000-03-02 14:06:13 -05:00
|
|
|
|
2004-11-10 16:10:30 -05:00
|
|
|
Returns the length of the stream in bytes. If the length cannot be determined
|
2005-02-11 15:08:51 -05:00
|
|
|
(this is always the case for socket streams for example), returns
|
2004-11-10 16:10:30 -05:00
|
|
|
\texttt{wxInvalidOffset}.
|
|
|
|
|
|
|
|
\newsince{2.5.4}
|
2000-03-02 14:06:13 -05:00
|
|
|
|
|
|
|
|
2004-01-22 07:53:04 -05:00
|
|
|
\membersection{wxStreamBase::GetLastError}\label{wxstreambasegetlasterror}
|
1999-01-25 13:33:08 -05:00
|
|
|
|
2004-01-22 07:53:04 -05:00
|
|
|
\constfunc{wxStreamError}{GetLastError}{\void}
|
1999-01-25 13:33:08 -05:00
|
|
|
|
|
|
|
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
|
|
|
|
2004-11-10 16:10:30 -05:00
|
|
|
|
|
|
|
\membersection{wxStreamBase::GetSize}\label{wxstreambasegetsize}
|
|
|
|
|
|
|
|
\constfunc{size\_t}{GetSize}{\void}
|
|
|
|
|
2004-11-11 02:00:11 -05:00
|
|
|
\helpref{GetLength}{wxstreambasegetlength}
|
2004-11-10 16:10:30 -05:00
|
|
|
|
|
|
|
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}
|
|
|
|
|
2005-02-06 13:25:54 -05:00
|
|
|
\constfunc{bool}{IsOk}{\void}
|
2004-11-10 16:10:30 -05:00
|
|
|
|
|
|
|
Returns true if no error occurred on the stream.
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{GetLastError}{wxstreambasegetlasterror}
|
|
|
|
|
|
|
|
|
2005-02-11 07:39:03 -05:00
|
|
|
\membersection{wxStreamBase::IsSeekable}\label{wxstreambaseisok}
|
|
|
|
|
|
|
|
\constfunc{bool}{IsSeekable}{\void}
|
|
|
|
|
|
|
|
Returns true if the streams supports seeking to arbitrary offsets.
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
2004-11-10 16:10:30 -05:00
|
|
|
|
2004-09-22 06:59:57 -04:00
|
|
|
\membersection{wxStreamBase::OnSysSeek}\label{wxstreambaseonsysseek}
|
1999-01-25 13:33:08 -05:00
|
|
|
|
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
|
|
|
|
2004-11-10 16:10:30 -05:00
|
|
|
|
2004-09-22 06:59:57 -04:00
|
|
|
\membersection{wxStreamBase::OnSysTell}\label{wxstreambaseonsystell}
|
1999-01-25 13:33:08 -05:00
|
|
|
|
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
|
|
|
|
2004-11-10 16:10:30 -05:00
|
|
|
|
2004-09-22 06:59:57 -04:00
|
|
|
\membersection{wxStreamBase::OnSysWrite}\label{wxstreambaseonsyswrite}
|
1999-02-25 10:07:00 -05:00
|
|
|
|
|
|
|
\func{size\_t}{OnSysWrite}{\param{void *}{buffer}, \param{size\_t}{ bufsize}}
|
|
|
|
|
|
|
|
See \helpref{OnSysRead}{wxstreambaseonsysread}.
|
|
|
|
|