]>
Commit | Line | Data |
---|---|---|
e2a6f233 JS |
1 | % ----------------------------------------------------------------------------- |
2 | % wxStreamBase | |
3 | % ----------------------------------------------------------------------------- | |
4 | \section{\class{wxStreamBase}}\label{wxstreambase} | |
5 | ||
6 | \wxheading{Derived from} | |
7 | ||
8 | None | |
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 | 31 | Creates a dummy stream object. It doesn't do anything. |
e2a6f233 JS |
32 | |
33 | \membersection{wxStreamBase::\destruct{wxStreamBase}} | |
34 | ||
35 | \func{}{\destruct{wxStreamBase}}{\void} | |
36 | ||
37 | Destructor. | |
38 | ||
39 | \membersection{wxStreamBase::LastError}\label{wxstreambaselasterror} | |
40 | ||
41 | \constfunc{wxStreamError}{LastError}{\void} | |
42 | ||
43 | This function returns the last error. | |
07b73270 GL |
44 | \twocolwidtha{5cm} |
45 | \begin{twocollist}\itemsep=0pt | |
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.} | |
750b78ba | 49 | \twocolitem{{\bf wxStream_READ_ERR}}{A generic error occured on the last read call.} |
07b73270 | 50 | \end{twocollist} |
e2a6f233 JS |
51 | |
52 | \membersection{wxStreamBase::StreamSize} | |
53 | \constfunc{size_t}{StreamSize}{\void} | |
54 | ||
55 | This function returns the size of the stream. For example, for a file it is the size of | |
da3aea64 GL |
56 | the file). |
57 | ||
58 | \wxheading{Warning} | |
59 | ||
60 | There are streams which do not have size by definition, such as socket streams. | |
61 | In that cases, StreamSize returns an invalid size represented by | |
62 | \begin{verbatim} | |
63 | ~(size_t)0 | |
64 | \end{verbatim} | |
e2a6f233 JS |
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 buffer needs a buffer of the | |
71 | specified size. It should return the size that was actually read. | |
72 | ||
73 | \membersection{wxStreamBase::OnSysWrite} | |
74 | ||
75 | \func{size_t}{OnSysWrite}{\param{void *}{buffer}, \param{size_t}{ bufsize}} | |
76 | ||
77 | See \helpref{OnSysRead}{wxstreambaseonsysread}. | |
78 | ||
79 | \membersection{wxStreamBase::OnSysSeek} | |
80 | ||
81 | \func{off_t}{OnSysSeek}{\param{off_t}{ pos}, \param{wxSeekMode}{ mode}} | |
82 | ||
83 | Internal function. It is called when the stream buffer needs to change the | |
84 | current position in the stream. See \helpref{wxStreamBuffer::Seek}{wxstreambufferseek} | |
85 | ||
86 | \membersection{wxStreamBase::OnSysTell} | |
87 | ||
88 | \constfunc{off_t}{OnSysTell}{\void} | |
89 | ||
90 | Internal function. Is is called when the stream buffer needs to know the | |
7f42cff1 | 91 | real position in the stream. |
e2a6f233 | 92 |