]>
Commit | Line | Data |
---|---|---|
e2a6f233 JS |
1 | % ----------------------------------------------------------------------------- |
2 | % wxStreamBase | |
3 | % ----------------------------------------------------------------------------- | |
4 | \section{\class{wxStreamBase}}\label{wxstreambase} | |
5 | ||
7468b994 RR |
6 | This class is the base class of most stream related classes in wxWindows. It must |
7 | not be used directly. | |
8 | ||
e2a6f233 JS |
9 | \wxheading{Derived from} |
10 | ||
11 | None | |
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 | 34 | Creates a dummy stream object. It doesn't do anything. |
e2a6f233 JS |
35 | |
36 | \membersection{wxStreamBase::\destruct{wxStreamBase}} | |
37 | ||
38 | \func{}{\destruct{wxStreamBase}}{\void} | |
39 | ||
40 | Destructor. | |
41 | ||
cd6ce4a9 VZ |
42 | \membersection{wxStreamBase::IsOk}\label{wxstreambaseisok} |
43 | ||
44 | \constfunc{wxStreamError}{IsOk}{\void} | |
45 | ||
46 | Returns TRUE if no error occured on the stream. | |
47 | ||
48 | \wxheading{See also} | |
49 | ||
50 | \helpref{LastError}{wxstreambaselasterror} | |
51 | ||
e2a6f233 JS |
52 | \membersection{wxStreamBase::LastError}\label{wxstreambaselasterror} |
53 | ||
54 | \constfunc{wxStreamError}{LastError}{\void} | |
55 | ||
56 | This function returns the last error. | |
07b73270 GL |
57 | \twocolwidtha{5cm} |
58 | \begin{twocollist}\itemsep=0pt | |
7468b994 RR |
59 | \twocolitem{{\bf wxSTREAM\_NO\_ERROR}}{No error occured.} |
60 | \twocolitem{{\bf wxSTREAM\_EOF}}{An End-Of-File occured.} | |
61 | \twocolitem{{\bf wxSTREAM\_WRITE\_ERROR}}{A generic error occured on the last write call.} | |
62 | \twocolitem{{\bf wxSTREAM\_READ\_ERROR}}{A generic error occured on the last read call.} | |
07b73270 | 63 | \end{twocollist} |
e2a6f233 | 64 | |
e2a6f233 JS |
65 | \membersection{wxStreamBase::OnSysRead}\label{wxstreambaseonsysread} |
66 | ||
40b480c3 | 67 | \func{size\_t}{OnSysRead}{\param{void*}{ buffer}, \param{size\_t}{ bufsize}} |
e2a6f233 | 68 | |
7468b994 | 69 | Internal function. It is called when the stream wants to read data of the |
e2a6f233 JS |
70 | specified size. It should return the size that was actually read. |
71 | ||
e2a6f233 JS |
72 | \membersection{wxStreamBase::OnSysSeek} |
73 | ||
40b480c3 | 74 | \func{off\_t}{OnSysSeek}{\param{off\_t}{ pos}, \param{wxSeekMode}{ mode}} |
e2a6f233 | 75 | |
7468b994 RR |
76 | Internal function. It is called when the stream needs to change the |
77 | current position. | |
e2a6f233 JS |
78 | |
79 | \membersection{wxStreamBase::OnSysTell} | |
80 | ||
40b480c3 | 81 | \constfunc{off\_t}{OnSysTell}{\void} |
e2a6f233 | 82 | |
7468b994 RR |
83 | Internal function. Is is called when the stream needs to know the |
84 | real position. | |
e2a6f233 | 85 | |
40b480c3 JS |
86 | \membersection{wxStreamBase::OnSysWrite} |
87 | ||
88 | \func{size\_t}{OnSysWrite}{\param{void *}{buffer}, \param{size\_t}{ bufsize}} | |
89 | ||
90 | See \helpref{OnSysRead}{wxstreambaseonsysread}. | |
91 | ||
39b91eca | 92 | \membersection{wxStreamBase::GetSize}\label{wxstreambasegetsize} |
40b480c3 | 93 | |
41bf0eb3 | 94 | \constfunc{size\_t}{GetSize}{\void} |
40b480c3 JS |
95 | |
96 | This function returns the size of the stream. For example, for a file it is the size of | |
cd6ce4a9 | 97 | the file. |
40b480c3 JS |
98 | |
99 | \wxheading{Warning} | |
100 | ||
101 | There are streams which do not have size by definition, such as socket streams. | |
41bf0eb3 | 102 | In that cases, GetSize returns an invalid size represented by |
40b480c3 JS |
103 | |
104 | \begin{verbatim} | |
105 | ~(size_t)0 | |
106 | \end{verbatim} | |
107 |