]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/strmbase.tex
ugh. Nesting the (per class) plugin sentries can require them to
[wxWidgets.git] / docs / latex / wx / strmbase.tex
1 % -----------------------------------------------------------------------------
2 % wxStreamBase
3 % -----------------------------------------------------------------------------
4 \section{\class{wxStreamBase}}\label{wxstreambase}
5
6 This class is the base class of most stream related classes in wxWindows. It must
7 not be used directly.
8
9 \wxheading{Derived from}
10
11 None
12
13 \wxheading{Include files}
14
15 <wx/stream.h>
16
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
34 Creates a dummy stream object. It doesn't do anything.
35
36 \membersection{wxStreamBase::\destruct{wxStreamBase}}
37
38 \func{}{\destruct{wxStreamBase}}{\void}
39
40 Destructor.
41
42 \membersection{wxStreamBase::IsOk}\label{wxstreambaseisok}
43
44 \constfunc{wxStreamError}{IsOk}{\void}
45
46 Returns TRUE if no error occurred on the stream.
47
48 \wxheading{See also}
49
50 \helpref{LastError}{wxstreambaselasterror}
51
52 \membersection{wxStreamBase::LastError}\label{wxstreambaselasterror}
53
54 \constfunc{wxStreamError}{LastError}{\void}
55
56 This function returns the last error.
57
58 \twocolwidtha{5cm}
59 \begin{twocollist}\itemsep=0pt
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.}
64 \end{twocollist}
65
66 \membersection{wxStreamBase::OnSysRead}\label{wxstreambaseonsysread}
67
68 \func{size\_t}{OnSysRead}{\param{void*}{ buffer}, \param{size\_t}{ bufsize}}
69
70 Internal function. It is called when the stream wants to read data of the
71 specified size. It should return the size that was actually read.
72
73 \membersection{wxStreamBase::OnSysSeek}
74
75 \func{off\_t}{OnSysSeek}{\param{off\_t}{ pos}, \param{wxSeekMode}{ mode}}
76
77 Internal function. It is called when the stream needs to change the
78 current position.
79
80 \membersection{wxStreamBase::OnSysTell}
81
82 \constfunc{off\_t}{OnSysTell}{\void}
83
84 Internal function. Is is called when the stream needs to know the
85 real position.
86
87 \membersection{wxStreamBase::OnSysWrite}
88
89 \func{size\_t}{OnSysWrite}{\param{void *}{buffer}, \param{size\_t}{ bufsize}}
90
91 See \helpref{OnSysRead}{wxstreambaseonsysread}.
92
93 \membersection{wxStreamBase::GetSize}\label{wxstreambasegetsize}
94
95 \constfunc{size\_t}{GetSize}{\void}
96
97 This function returns the size of the stream. For example, for a file it is the size of
98 the file.
99
100 \wxheading{Warning}
101
102 There are streams which do not have size by definition, such as socket streams.
103 In that cases, GetSize returns an invalid size represented by
104
105 \begin{verbatim}
106 ~(size_t)0
107 \end{verbatim}
108