]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/strmbase.tex
readding
[wxWidgets.git] / docs / latex / wx / strmbase.tex
CommitLineData
e2a6f233
JS
1% -----------------------------------------------------------------------------
2% wxStreamBase
3% -----------------------------------------------------------------------------
4\section{\class{wxStreamBase}}\label{wxstreambase}
5
6\wxheading{Derived from}
7
8None
9
954b8ae6
JS
10\wxheading{Include files}
11
12<wx/stream.h>
13
e2a6f233
JS
14\wxheading{See also}
15
16\helpref{wxStreamBuffer}{wxstreambuffer}
17
18% -----------------------------------------------------------------------------
19% Members
20% -----------------------------------------------------------------------------
21\latexignore{\rtfignore{\wxheading{Members}}}
22
23% -----------
24% ctor & dtor
25% -----------
26
27\membersection{wxStreamBase::wxStreamBase}
28
29\func{}{wxStreamBase}{\void}
30
da3aea64 31Creates a dummy stream object. It doesn't do anything.
e2a6f233
JS
32
33\membersection{wxStreamBase::\destruct{wxStreamBase}}
34
35\func{}{\destruct{wxStreamBase}}{\void}
36
37Destructor.
38
39\membersection{wxStreamBase::LastError}\label{wxstreambaselasterror}
40
41\constfunc{wxStreamError}{LastError}{\void}
42
43This function returns the last error.
07b73270
GL
44\twocolwidtha{5cm}
45\begin{twocollist}\itemsep=0pt
294e9a7a
GL
46\twocolitem{{\bf wxStream\_NOERROR}}{No error occured.}
47\twocolitem{{\bf wxStream\_EOF}}{An End-Of-File occured.}
48\twocolitem{{\bf wxStream\_WRITE\_ERR}}{A generic error occured on the last write call.}
49\twocolitem{{\bf wxStream\_READ\_ERR}}{A generic error occured on the last read call.}
07b73270 50\end{twocollist}
e2a6f233 51
e2a6f233
JS
52\membersection{wxStreamBase::OnSysRead}\label{wxstreambaseonsysread}
53
40b480c3 54\func{size\_t}{OnSysRead}{\param{void*}{ buffer}, \param{size\_t}{ bufsize}}
e2a6f233
JS
55
56Internal function. It is called when the stream buffer needs a buffer of the
57specified size. It should return the size that was actually read.
58
e2a6f233
JS
59\membersection{wxStreamBase::OnSysSeek}
60
40b480c3 61\func{off\_t}{OnSysSeek}{\param{off\_t}{ pos}, \param{wxSeekMode}{ mode}}
e2a6f233
JS
62
63Internal function. It is called when the stream buffer needs to change the
64current position in the stream. See \helpref{wxStreamBuffer::Seek}{wxstreambufferseek}
65
66\membersection{wxStreamBase::OnSysTell}
67
40b480c3 68\constfunc{off\_t}{OnSysTell}{\void}
e2a6f233
JS
69
70Internal function. Is is called when the stream buffer needs to know the
7f42cff1 71real position in the stream.
e2a6f233 72
40b480c3
JS
73\membersection{wxStreamBase::OnSysWrite}
74
75\func{size\_t}{OnSysWrite}{\param{void *}{buffer}, \param{size\_t}{ bufsize}}
76
77See \helpref{OnSysRead}{wxstreambaseonsysread}.
78
39b91eca 79\membersection{wxStreamBase::GetSize}\label{wxstreambasegetsize}
40b480c3 80
41bf0eb3 81\constfunc{size\_t}{GetSize}{\void}
40b480c3
JS
82
83This function returns the size of the stream. For example, for a file it is the size of
84the file).
85
86\wxheading{Warning}
87
88There are streams which do not have size by definition, such as socket streams.
41bf0eb3 89In that cases, GetSize returns an invalid size represented by
40b480c3
JS
90
91\begin{verbatim}
92~(size_t)0
93\end{verbatim}
94