]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/inputstr.tex
added frame icon for HTMLhelp frame
[wxWidgets.git] / docs / latex / wx / inputstr.tex
... / ...
CommitLineData
1% -----------------------------------------------------------------------------
2% wxInputStream
3% -----------------------------------------------------------------------------
4\section{\class{wxInputStream}}\label{wxinputstream}
5
6\wxheading{Derived from}
7
8\helpref{wxStreamBase}{wxstreambase}
9
10\wxheading{Include files}
11
12<wx/stream.h>
13
14% -----------
15% ctor & dtor
16% -----------
17\membersection{wxInputStream::wxInputStream}
18
19\func{}{wxInputStream}{\void}
20
21Creates a dummy input stream.
22
23\membersection{wxInputStream::\destruct{wxInputStream}}
24
25\func{}{\destruct{wxInputStream}}{\void}
26
27Destructor.
28
29\membersection{wxInputStream::GetC}
30
31\func{char}{GetC}{\void}
32
33Returns the first character in the input queue and removes it.
34
35\membersection{wxInputStream::LastRead}\label{wxinputstreamlastread}
36
37\constfunc{size\_t}{LastRead}{\void}
38
39Returns the last number of bytes read.
40
41\membersection{wxInputStream::Peek}
42
43\func{char}{Peek}{\void}
44
45Returns the first character in the input queue without removing it.
46
47\membersection{wxInputStream::Read}
48
49\func{wxInputStream\&}{Read}{\param{void *}{buffer}, \param{size\_t}{ size}}
50
51Reads the specified amount of bytes and stores the data in \it{buffer}.
52
53\wxheading{Warning}
54
55The buffer absolutely needs to have at least the specified size.
56
57\wxheading{Return value}
58
59This function returns a reference on the current object, so the user can test
60any states of the stream right away.
61
62\func{wxInputStream\&}{Read}{\param{wxOutputStream\&}{ stream\_out}}
63
64Reads data from the input queue and stores it in the specified output stream.
65The data is read until an error is raised by one of the two streams.
66
67\wxheading{Return value}
68
69This function returns a reference on the current object, so the user can test
70any states of the stream right away.
71
72\membersection{wxInputStream::SeekI}
73
74\func{off\_t}{SeekI}{\param{off\_t}{ pos}, \param{wxSeekMode}{ mode = wxFromStart}}
75
76Changes the stream current position.
77
78\membersection{wxInputStream::TellI}
79
80\constfunc{off\_t}{TellI}{\void}
81
82Returns the current stream position.
83
84\membersection{wxInputStream::Ungetch}\label{wxinputstream_ungetch}
85
86\func{size\_t}{Ungetch}{\param{const char*}{ buffer}, \param{size\_t}{ size}}
87
88This function is only useful in \it{read} mode. It is the manager of the "Write-Back"
89buffer. This buffer acts like a temporary buffer where datas which has to be
90read during the next read IO call are put. This is useful when you get a big
91block of data which you didn't want to read: you can replace them at the top
92of the input queue by this way.
93
94\wxheading{Return value}
95
96Returns the amount of bytes saved in the Write-Back buffer.
97
98\func{bool}{Ungetch}{\param{char }{c}}
99
100This function acts like the previous one except that it takes only one
101character: it is sometimes shorter to use than the generic function.
102