]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/outptstr.tex
mention that read_write mode doesn't work for standalone buffers
[wxWidgets.git] / docs / latex / wx / outptstr.tex
1 % -----------------------------------------------------------------------------
2 % wxOutputStream
3 % -----------------------------------------------------------------------------
4 \section{\class{wxOutputStream}}\label{wxoutputstream}
5
6 wxOutputStream 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
22 \membersection{wxOutputStream::wxOutputStream}
23
24 \func{}{wxOutputStream}{\void}
25
26 Creates a dummy wxOutputStream object.
27
28
29 \membersection{wxOutputStream::\destruct{wxOutputStream}}
30
31 \func{}{\destruct{wxOutputStream}}{\void}
32
33 Destructor.
34
35
36 \membersection{wxOutputStream::LastWrite}\label{wxoutputstreamlastwrite}
37
38 \constfunc{size\_t}{LastWrite}{\void}
39
40 Returns the number of bytes written during the last
41 \helpref{Write()}{wxoutputstreamwrite}. It may return $0$ even if there is no
42 error on the stream if it is only temporarily impossible to write to it.
43
44
45 \membersection{wxOutputStream::PutC}
46
47 \func{void}{PutC}{\param{char}{ c}}
48
49 Puts the specified character in the output queue and increments the
50 stream position.
51
52
53 \membersection{wxOutputStream::SeekO}\label{wxoutputstreamseeko}
54
55 \func{off\_t}{SeekO}{\param{off\_t}{ pos}, \param{wxSeekMode}{ mode = wxFromStart}}
56
57 Changes the stream current position.
58
59 \wxheading{Parameters}
60
61 \docparam{pos}{Offset to seek to.}
62
63 \docparam{mode}{One of {\bf wxFromStart}, {\bf wxFromEnd}, {\bf wxFromCurrent}.}
64
65 \wxheading{Return value}
66
67 The new stream position or wxInvalidOffset on error.
68
69
70 \membersection{wxOutputStream::TellO}
71
72 \constfunc{off\_t}{TellO}{\void}
73
74 Returns the current stream position.
75
76
77 \membersection{wxOutputStream::Write}\label{wxoutputstreamwrite}
78
79 \func{wxOutputStream\&}{Write}{\param{const void *}{buffer}, \param{size\_t}{ size}}
80
81 Writes up to the specified amount of bytes using the data of {\it buffer}. Note
82 that not all data can always be written so you must check the number of bytes
83 really written to the stream using \helpref{LastWrite()}{wxoutputstreamlastwrite}
84 when this function returns. In some cases (for example a write end of a pipe
85 which is currently full) it is even possible that there is no errors and zero
86 bytes have been written.
87
88 This function returns a reference on the current object, so the user can test
89 any states of the stream right away.
90
91 \func{wxOutputStream\&}{Write}{\param{wxInputStream\&}{ stream\_in}}
92
93 Reads data from the specified input stream and stores them
94 in the current stream. The data is read until an error is raised
95 by one of the two streams.
96