]>
Commit | Line | Data |
---|---|---|
e2a6f233 JS |
1 | % ----------------------------------------------------------------------------- |
2 | % wxOutputStream | |
3 | % ----------------------------------------------------------------------------- | |
4 | \section{\class{wxOutputStream}}\label{wxoutputstream} | |
5 | ||
d984207c RR |
6 | wxOutputStream is an abstract base class which may not be used directly. |
7 | ||
e2a6f233 JS |
8 | \wxheading{Derived from} |
9 | ||
10 | \helpref{wxStreamBase}{wxstreambase} | |
11 | ||
954b8ae6 JS |
12 | \wxheading{Include files} |
13 | ||
14 | <wx/stream.h> | |
15 | ||
fa482912 JS |
16 | \latexignore{\rtfignore{\wxheading{Members}}} |
17 | ||
e2a6f233 JS |
18 | % ----------- |
19 | % ctor & dtor | |
20 | % ----------- | |
b68b06e2 | 21 | |
6d06e061 | 22 | \membersection{wxOutputStream::wxOutputStream}\label{wxoutputstreamctor} |
e2a6f233 JS |
23 | |
24 | \func{}{wxOutputStream}{\void} | |
25 | ||
26 | Creates a dummy wxOutputStream object. | |
27 | ||
b68b06e2 | 28 | |
6d06e061 | 29 | \membersection{wxOutputStream::\destruct{wxOutputStream}}\label{wxoutputstreamdtor} |
e2a6f233 JS |
30 | |
31 | \func{}{\destruct{wxOutputStream}}{\void} | |
32 | ||
33 | Destructor. | |
34 | ||
b68b06e2 | 35 | |
8f0ff178 RN |
36 | \membersection{wxOutputStream::Close}\label{wxoutputstreamclose} |
37 | ||
38 | \func{bool}{Close}{\void} | |
39 | ||
40 | Closes the stream, returning {\tt false} if an error occurs. The | |
41 | stream is closed implicitly in the destructor if Close() is not | |
42 | called explicitly. | |
43 | ||
44 | If this stream wraps another stream or some other resource such | |
45 | as a file, then the underlying resource is closed too if it is owned | |
46 | by this stream, or left open otherwise. | |
47 | ||
48 | ||
b68b06e2 | 49 | \membersection{wxOutputStream::LastWrite}\label{wxoutputstreamlastwrite} |
e2a6f233 | 50 | |
294e9a7a | 51 | \constfunc{size\_t}{LastWrite}{\void} |
e2a6f233 | 52 | |
b68b06e2 VZ |
53 | Returns the number of bytes written during the last |
54 | \helpref{Write()}{wxoutputstreamwrite}. It may return $0$ even if there is no | |
55 | error on the stream if it is only temporarily impossible to write to it. | |
56 | ||
d984207c | 57 | |
dcbd177f | 58 | \membersection{wxOutputStream::PutC}\label{wxoutputstreamputc} |
e2a6f233 | 59 | |
40b480c3 | 60 | \func{void}{PutC}{\param{char}{ c}} |
e2a6f233 | 61 | |
40b480c3 JS |
62 | Puts the specified character in the output queue and increments the |
63 | stream position. | |
e2a6f233 | 64 | |
b68b06e2 | 65 | |
0915d0b2 | 66 | \membersection{wxOutputStream::SeekO}\label{wxoutputstreamseeko} |
e2a6f233 | 67 | |
a84e46f2 | 68 | \func{off\_t}{SeekO}{\param{off\_t}{ pos}, \param{wxSeekMode}{ mode = wxFromStart}} |
e2a6f233 JS |
69 | |
70 | Changes the stream current position. | |
71 | ||
a84e46f2 VS |
72 | \wxheading{Parameters} |
73 | ||
74 | \docparam{pos}{Offset to seek to.} | |
75 | ||
76 | \docparam{mode}{One of {\bf wxFromStart}, {\bf wxFromEnd}, {\bf wxFromCurrent}.} | |
77 | ||
78 | \wxheading{Return value} | |
79 | ||
80 | The new stream position or wxInvalidOffset on error. | |
81 | ||
b68b06e2 | 82 | |
a203f6c0 | 83 | \membersection{wxOutputStream::TellO}\label{wxoutputstreamtello} |
e2a6f233 | 84 | |
294e9a7a | 85 | \constfunc{off\_t}{TellO}{\void} |
e2a6f233 JS |
86 | |
87 | Returns the current stream position. | |
88 | ||
b68b06e2 VZ |
89 | |
90 | \membersection{wxOutputStream::Write}\label{wxoutputstreamwrite} | |
e2a6f233 | 91 | |
294e9a7a | 92 | \func{wxOutputStream\&}{Write}{\param{const void *}{buffer}, \param{size\_t}{ size}} |
e2a6f233 | 93 | |
b68b06e2 VZ |
94 | Writes up to the specified amount of bytes using the data of {\it buffer}. Note |
95 | that not all data can always be written so you must check the number of bytes | |
96 | really written to the stream using \helpref{LastWrite()}{wxoutputstreamlastwrite} | |
97 | when this function returns. In some cases (for example a write end of a pipe | |
98 | which is currently full) it is even possible that there is no errors and zero | |
99 | bytes have been written. | |
e2a6f233 | 100 | |
40b480c3 JS |
101 | This function returns a reference on the current object, so the user can test |
102 | any states of the stream right away. | |
e2a6f233 | 103 | |
294e9a7a | 104 | \func{wxOutputStream\&}{Write}{\param{wxInputStream\&}{ stream\_in}} |
40b480c3 JS |
105 | |
106 | Reads data from the specified input stream and stores them | |
107 | in the current stream. The data is read until an error is raised | |
108 | by one of the two streams. | |
e2a6f233 | 109 |