]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/inputstr.tex
compilation fix after TRUE/FALSE change
[wxWidgets.git] / docs / latex / wx / inputstr.tex
... / ...
CommitLineData
1% -----------------------------------------------------------------------------
2% wxInputStream
3% -----------------------------------------------------------------------------
4\section{\class{wxInputStream}}\label{wxinputstream}
5
6wxInputStream is an abstract base class which may not be used directly.
7
8\wxheading{Derived from}
9
10\helpref{wxStreamBase}{wxstreambase}
11
12\wxheading{Include files}
13
14<wx/stream.h>
15
16\latexignore{\rtfignore{\wxheading{Members}}}
17
18% -----------
19% ctor & dtor
20% -----------
21\membersection{wxInputStream::wxInputStream}
22
23\func{}{wxInputStream}{\void}
24
25Creates a dummy input stream.
26
27\membersection{wxInputStream::\destruct{wxInputStream}}
28
29\func{}{\destruct{wxInputStream}}{\void}
30
31Destructor.
32
33\membersection{wxInputStream::GetC}
34
35\func{char}{GetC}{\void}
36
37Returns the first character in the input queue and removes it.
38
39\membersection{wxInputStream::Eof}\label{wxinputstreameof}
40
41\constfunc{wxInputStream}{Eof}{\void}
42
43Returns TRUE if the end of stream has been reached.
44
45\membersection{wxInputStream::LastRead}\label{wxinputstreamlastread}
46
47\constfunc{size\_t}{LastRead}{\void}
48
49Returns the last number of bytes read.
50
51\membersection{wxInputStream::Peek}
52
53\func{char}{Peek}{\void}
54
55Returns the first character in the input queue without removing it.
56
57\membersection{wxInputStream::Read}
58
59\func{wxInputStream\&}{Read}{\param{void *}{buffer}, \param{size\_t}{ size}}
60
61Reads the specified amount of bytes and stores the data in {\it buffer}.
62
63\wxheading{Warning}
64
65The buffer absolutely needs to have at least the specified size.
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\func{wxInputStream\&}{Read}{\param{wxOutputStream\&}{ stream\_out}}
73
74Reads data from the input queue and stores it in the specified output stream.
75The data is read until an error is raised by one of the two streams.
76
77\wxheading{Return value}
78
79This function returns a reference on the current object, so the user can test
80any states of the stream right away.
81
82\membersection{wxInputStream::SeekI}
83
84\func{off\_t}{SeekI}{\param{off\_t}{ pos}, \param{wxSeekMode}{ mode = wxFromStart}}
85
86Changes the stream current position.
87
88\membersection{wxInputStream::TellI}
89
90\constfunc{off\_t}{TellI}{\void}
91
92Returns the current stream position.
93
94\membersection{wxInputStream::Ungetch}\label{wxinputstreamungetch}
95
96\func{size\_t}{Ungetch}{\param{const char*}{ buffer}, \param{size\_t}{ size}}
97
98This function is only useful in {\it read} mode. It is the manager of the "Write-Back"
99buffer. This buffer acts like a temporary buffer where datas which has to be
100read during the next read IO call are put. This is useful when you get a big
101block of data which you didn't want to read: you can replace them at the top
102of the input queue by this way.
103
104Be very careful about this call in connection with calling SeekI() on the same
105stream. Any call to SeekI() will invalidate any previous call to this method
106(otherwise you could SeekI() to one position, "unread" a few bytes there, SeekI()
107to another position and data would be either lost or corrupted).
108
109\wxheading{Return value}
110
111Returns the amount of bytes saved in the Write-Back buffer.
112
113\func{bool}{Ungetch}{\param{char }{c}}
114
115This function acts like the previous one except that it takes only one
116character: it is sometimes shorter to use than the generic function.
117