]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/inputstr.tex
*** empty log message ***
[wxWidgets.git] / docs / latex / wx / inputstr.tex
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
21 Creates a dummy input stream.
22
23 \membersection{wxInputStream::\destruct{wxInputStream}}
24
25 \func{}{\destruct{wxInputStream}}{\void}
26
27 Destructor.
28
29 \membersection{wxInputStream::GetC}
30
31 \func{char}{GetC}{\void}
32
33 Returns 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
39 Returns the last number of bytes read.
40
41 \membersection{wxInputStream::Peek}
42
43 \func{char}{Peek}{\void}
44
45 Returns 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
51 Reads the specified amount of bytes and stores the data in \it{buffer}.
52
53 \wxheading{Warning}
54
55 The buffer absolutely needs to have at least the specified size.
56
57 \wxheading{Return value}
58
59 This function returns a reference on the current object, so the user can test
60 any states of the stream right away.
61
62 \func{wxInputStream\&}{Read}{\param{wxOutputStream\&}{ stream\_out}}
63
64 Reads data from the input queue and stores it in the specified output stream.
65 The data is read until an error is raised by one of the two streams.
66
67 \wxheading{Return value}
68
69 This function returns a reference on the current object, so the user can test
70 any 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
76 Changes the stream current position.
77
78 \membersection{wxInputStream::TellI}
79
80 \constfunc{off\_t}{TellI}{\void}
81
82 Returns 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
88 This function is only useful in \it{read} mode. It is the manager of the "Write-Back"
89 buffer. This buffer acts like a temporary buffer where datas which has to be
90 read during the next read IO call are put. This is useful when you get a big
91 block of data which you didn't want to read: you can replace them at the top
92 of the input queue by this way.
93
94 \wxheading{Return value}
95
96 Returns the amount of bytes saved in the Write-Back buffer.
97
98 \func{bool}{Ungetch}{\param{char }{c}}
99
100 This function acts like the previous one except that it takes only one
101 character: it is sometimes shorter to use than the generic function.
102