]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/strmbase.tex
removed unneeded (after patch 1027243) disable.bmp
[wxWidgets.git] / docs / latex / wx / strmbase.tex
CommitLineData
e2a6f233
JS
1% -----------------------------------------------------------------------------
2% wxStreamBase
3% -----------------------------------------------------------------------------
4\section{\class{wxStreamBase}}\label{wxstreambase}
5
fc2171bd 6This class is the base class of most stream related classes in wxWidgets. It must
7468b994
RR
7not be used directly.
8
e2a6f233
JS
9\wxheading{Derived from}
10
11None
12
954b8ae6
JS
13\wxheading{Include files}
14
15<wx/stream.h>
16
e2a6f233
JS
17\wxheading{See also}
18
19\helpref{wxStreamBuffer}{wxstreambuffer}
20
21% -----------------------------------------------------------------------------
22% Members
23% -----------------------------------------------------------------------------
24\latexignore{\rtfignore{\wxheading{Members}}}
25
26% -----------
27% ctor & dtor
28% -----------
29
30\membersection{wxStreamBase::wxStreamBase}
31
32\func{}{wxStreamBase}{\void}
33
da3aea64 34Creates a dummy stream object. It doesn't do anything.
e2a6f233
JS
35
36\membersection{wxStreamBase::\destruct{wxStreamBase}}
37
38\func{}{\destruct{wxStreamBase}}{\void}
39
40Destructor.
41
cd6ce4a9
VZ
42\membersection{wxStreamBase::IsOk}\label{wxstreambaseisok}
43
44\constfunc{wxStreamError}{IsOk}{\void}
45
cc81d32f 46Returns true if no error occurred on the stream.
cd6ce4a9
VZ
47
48\wxheading{See also}
49
b919fd47 50\helpref{GetLastError}{wxstreambasegetlasterror}
cd6ce4a9 51
b919fd47 52\membersection{wxStreamBase::GetLastError}\label{wxstreambasegetlasterror}
e2a6f233 53
b919fd47 54\constfunc{wxStreamError}{GetLastError}{\void}
e2a6f233
JS
55
56This function returns the last error.
fa482912 57
07b73270
GL
58\twocolwidtha{5cm}
59\begin{twocollist}\itemsep=0pt
f6bcfd97
BP
60\twocolitem{{\bf wxSTREAM\_NO\_ERROR}}{No error occurred.}
61\twocolitem{{\bf wxSTREAM\_EOF}}{An End-Of-File occurred.}
62\twocolitem{{\bf wxSTREAM\_WRITE\_ERROR}}{A generic error occurred on the last write call.}
63\twocolitem{{\bf wxSTREAM\_READ\_ERROR}}{A generic error occurred on the last read call.}
07b73270 64\end{twocollist}
e2a6f233 65
e2a6f233
JS
66\membersection{wxStreamBase::OnSysRead}\label{wxstreambaseonsysread}
67
40b480c3 68\func{size\_t}{OnSysRead}{\param{void*}{ buffer}, \param{size\_t}{ bufsize}}
e2a6f233 69
7468b994 70Internal function. It is called when the stream wants to read data of the
e2a6f233
JS
71specified size. It should return the size that was actually read.
72
e2a6f233
JS
73\membersection{wxStreamBase::OnSysSeek}
74
40b480c3 75\func{off\_t}{OnSysSeek}{\param{off\_t}{ pos}, \param{wxSeekMode}{ mode}}
e2a6f233 76
7468b994
RR
77Internal function. It is called when the stream needs to change the
78current position.
e2a6f233
JS
79
80\membersection{wxStreamBase::OnSysTell}
81
40b480c3 82\constfunc{off\_t}{OnSysTell}{\void}
e2a6f233 83
7468b994
RR
84Internal function. Is is called when the stream needs to know the
85real position.
e2a6f233 86
40b480c3
JS
87\membersection{wxStreamBase::OnSysWrite}
88
89\func{size\_t}{OnSysWrite}{\param{void *}{buffer}, \param{size\_t}{ bufsize}}
90
91See \helpref{OnSysRead}{wxstreambaseonsysread}.
92
39b91eca 93\membersection{wxStreamBase::GetSize}\label{wxstreambasegetsize}
40b480c3 94
41bf0eb3 95\constfunc{size\_t}{GetSize}{\void}
40b480c3
JS
96
97This function returns the size of the stream. For example, for a file it is the size of
cd6ce4a9 98the file.
40b480c3
JS
99
100\wxheading{Warning}
101
102There are streams which do not have size by definition, such as socket streams.
f6e7cd0a 103In that cases, GetSize returns $0$ so you should always test its return value.
40b480c3 104