]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/strmbase.tex
fix LaTeX error (escape underscores); don't abuse bold face
[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 wxWidgets. 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{Library}
18
19 \helpref{wxBase}{librarieslist}
20
21 \wxheading{See also}
22
23 \helpref{wxStreamBuffer}{wxstreambuffer}
24
25 % -----------------------------------------------------------------------------
26 % Members
27 % -----------------------------------------------------------------------------
28 \latexignore{\rtfignore{\wxheading{Members}}}
29
30 % -----------
31 % ctor & dtor
32 % -----------
33
34
35 \membersection{wxStreamBase::wxStreamBase}\label{wxstreambasector}
36
37 \func{}{wxStreamBase}{\void}
38
39 Creates a dummy stream object. It doesn't do anything.
40
41
42 \membersection{wxStreamBase::\destruct{wxStreamBase}}\label{wxstreambasedtor}
43
44 \func{}{\destruct{wxStreamBase}}{\void}
45
46 Destructor.
47
48
49 \membersection{wxStreamBase::GetLength}\label{wxstreambasegetlength}
50
51 \constfunc{wxFileOffset}{GetLength}{\void}
52
53 Returns the length of the stream in bytes. If the length cannot be determined
54 (this is always the case for socket streams for example), returns
55 \texttt{wxInvalidOffset}.
56
57 \newsince{2.5.4}
58
59
60 \membersection{wxStreamBase::GetLastError}\label{wxstreambasegetlasterror}
61
62 \constfunc{wxStreamError}{GetLastError}{\void}
63
64 This function returns the last error.
65
66 \twocolwidtha{5cm}
67 \begin{twocollist}\itemsep=0pt
68 \twocolitem{{\bf wxSTREAM\_NO\_ERROR}}{No error occurred.}
69 \twocolitem{{\bf wxSTREAM\_EOF}}{An End-Of-File occurred.}
70 \twocolitem{{\bf wxSTREAM\_WRITE\_ERROR}}{A generic error occurred on the last write call.}
71 \twocolitem{{\bf wxSTREAM\_READ\_ERROR}}{A generic error occurred on the last read call.}
72 \end{twocollist}
73
74
75 \membersection{wxStreamBase::GetSize}\label{wxstreambasegetsize}
76
77 \constfunc{size\_t}{GetSize}{\void}
78
79 \helpref{GetLength}{wxstreambasegetlength}
80
81 This function returns the size of the stream. For example, for a file it is the
82 size of the file.
83
84 \wxheading{Warning}
85
86 There are streams which do not have size by definition, such as socket streams.
87 In that cases, GetSize returns $0$ so you should always test its return value.
88
89
90 \membersection{wxStreamBase::IsOk}\label{wxstreambaseisok}
91
92 \constfunc{virtual bool}{IsOk}{\void}
93
94 Returns true if no error occurred on the stream.
95
96 \wxheading{See also}
97
98 \helpref{GetLastError}{wxstreambasegetlasterror}
99
100
101 \membersection{wxStreamBase::IsSeekable}\label{wxstreambaseisseekable}
102
103 \constfunc{bool}{IsSeekable}{\void}
104
105 Returns true if the streams supports seeking to arbitrary offsets.
106
107
108 \membersection{wxStreamBase::OnSysRead}\label{wxstreambaseonsysread}
109
110 \func{size\_t}{OnSysRead}{\param{void*}{ buffer}, \param{size\_t}{ bufsize}}
111
112 Internal function. It is called when the stream wants to read data of the
113 specified size. It should return the size that was actually read.
114
115
116 \membersection{wxStreamBase::OnSysSeek}\label{wxstreambaseonsysseek}
117
118 \func{off\_t}{OnSysSeek}{\param{off\_t}{ pos}, \param{wxSeekMode}{ mode}}
119
120 Internal function. It is called when the stream needs to change the
121 current position.
122
123
124 \membersection{wxStreamBase::OnSysTell}\label{wxstreambaseonsystell}
125
126 \constfunc{off\_t}{OnSysTell}{\void}
127
128 Internal function. Is is called when the stream needs to know the
129 real position.
130
131
132 \membersection{wxStreamBase::OnSysWrite}\label{wxstreambaseonsyswrite}
133
134 \func{size\_t}{OnSysWrite}{\param{const void *}{buffer}, \param{size\_t}{ bufsize}}
135
136 See \helpref{OnSysRead}{wxstreambaseonsysread}.
137