]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/strmbase.tex
added vendor display name (for consistency with app display name &c) (patch 1831303)
[wxWidgets.git] / docs / latex / wx / strmbase.tex
CommitLineData
e2a6f233
JS
1% -----------------------------------------------------------------------------
2% wxStreamBase
3% -----------------------------------------------------------------------------
4\section{\class{wxStreamBase}}\label{wxstreambase}
5
fc2171bd 6This class is the base class of most stream related classes in wxWidgets. It must
7468b994
RR
7not be used directly.
8
e2a6f233
JS
9\wxheading{Derived from}
10
11None
12
954b8ae6
JS
13\wxheading{Include files}
14
15<wx/stream.h>
16
a7af285d
VZ
17\wxheading{Library}
18
19\helpref{wxBase}{librarieslist}
20
e2a6f233
JS
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
588066b7 34
15d83f72 35\membersection{wxStreamBase::wxStreamBase}\label{wxstreambasector}
e2a6f233
JS
36
37\func{}{wxStreamBase}{\void}
38
da3aea64 39Creates a dummy stream object. It doesn't do anything.
e2a6f233 40
588066b7 41
15d83f72 42\membersection{wxStreamBase::\destruct{wxStreamBase}}\label{wxstreambasedtor}
e2a6f233
JS
43
44\func{}{\destruct{wxStreamBase}}{\void}
45
46Destructor.
47
cd6ce4a9 48
588066b7 49\membersection{wxStreamBase::GetLength}\label{wxstreambasegetlength}
cd6ce4a9 50
588066b7 51\constfunc{wxFileOffset}{GetLength}{\void}
cd6ce4a9 52
588066b7 53Returns the length of the stream in bytes. If the length cannot be determined
dceb1c09 54(this is always the case for socket streams for example), returns
588066b7
VZ
55\texttt{wxInvalidOffset}.
56
57\newsince{2.5.4}
cd6ce4a9 58
cd6ce4a9 59
b919fd47 60\membersection{wxStreamBase::GetLastError}\label{wxstreambasegetlasterror}
e2a6f233 61
b919fd47 62\constfunc{wxStreamError}{GetLastError}{\void}
e2a6f233
JS
63
64This function returns the last error.
fa482912 65
07b73270
GL
66\twocolwidtha{5cm}
67\begin{twocollist}\itemsep=0pt
f6bcfd97
BP
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.}
07b73270 72\end{twocollist}
e2a6f233 73
588066b7
VZ
74
75\membersection{wxStreamBase::GetSize}\label{wxstreambasegetsize}
76
77\constfunc{size\_t}{GetSize}{\void}
78
348f211c 79\helpref{GetLength}{wxstreambasegetlength}
588066b7
VZ
80
81This function returns the size of the stream. For example, for a file it is the
82size of the file.
83
84\wxheading{Warning}
85
86There are streams which do not have size by definition, such as socket streams.
87In that cases, GetSize returns $0$ so you should always test its return value.
88
89
90\membersection{wxStreamBase::IsOk}\label{wxstreambaseisok}
91
d65fd4e9 92\constfunc{virtual bool}{IsOk}{\void}
588066b7
VZ
93
94Returns true if no error occurred on the stream.
95
96\wxheading{See also}
97
98\helpref{GetLastError}{wxstreambasegetlasterror}
99
100
bee44427 101\membersection{wxStreamBase::IsSeekable}\label{wxstreambaseisseekable}
3c70014d
MW
102
103\constfunc{bool}{IsSeekable}{\void}
104
105Returns true if the streams supports seeking to arbitrary offsets.
106
107
e2a6f233
JS
108\membersection{wxStreamBase::OnSysRead}\label{wxstreambaseonsysread}
109
40b480c3 110\func{size\_t}{OnSysRead}{\param{void*}{ buffer}, \param{size\_t}{ bufsize}}
e2a6f233 111
7468b994 112Internal function. It is called when the stream wants to read data of the
e2a6f233
JS
113specified size. It should return the size that was actually read.
114
588066b7 115
15d83f72 116\membersection{wxStreamBase::OnSysSeek}\label{wxstreambaseonsysseek}
e2a6f233 117
40b480c3 118\func{off\_t}{OnSysSeek}{\param{off\_t}{ pos}, \param{wxSeekMode}{ mode}}
e2a6f233 119
7468b994
RR
120Internal function. It is called when the stream needs to change the
121current position.
e2a6f233 122
588066b7 123
15d83f72 124\membersection{wxStreamBase::OnSysTell}\label{wxstreambaseonsystell}
e2a6f233 125
40b480c3 126\constfunc{off\_t}{OnSysTell}{\void}
e2a6f233 127
7468b994
RR
128Internal function. Is is called when the stream needs to know the
129real position.
e2a6f233 130
588066b7 131
15d83f72 132\membersection{wxStreamBase::OnSysWrite}\label{wxstreambaseonsyswrite}
40b480c3 133
01b8292d 134\func{size\_t}{OnSysWrite}{\param{const void *}{buffer}, \param{size\_t}{ bufsize}}
40b480c3
JS
135
136See \helpref{OnSysRead}{wxstreambaseonsysread}.
137