]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/outptstr.tex
Added automatic dialog scrolling ability
[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 \wxheading{Library}
17
18 \helpref{wxBase}{librarieslist}
19
20 \latexignore{\rtfignore{\wxheading{Members}}}
21
22 % -----------
23 % ctor & dtor
24 % -----------
25
26 \membersection{wxOutputStream::wxOutputStream}\label{wxoutputstreamctor}
27
28 \func{}{wxOutputStream}{\void}
29
30 Creates a dummy wxOutputStream object.
31
32
33 \membersection{wxOutputStream::\destruct{wxOutputStream}}\label{wxoutputstreamdtor}
34
35 \func{}{\destruct{wxOutputStream}}{\void}
36
37 Destructor.
38
39
40 \membersection{wxOutputStream::Close}\label{wxoutputstreamclose}
41
42 \func{bool}{Close}{\void}
43
44 Closes the stream, returning {\tt false} if an error occurs. The
45 stream is closed implicitly in the destructor if Close() is not
46 called explicitly.
47
48 If this stream wraps another stream or some other resource such
49 as a file, then the underlying resource is closed too if it is owned
50 by this stream, or left open otherwise.
51
52
53 \membersection{wxOutputStream::LastWrite}\label{wxoutputstreamlastwrite}
54
55 \constfunc{size\_t}{LastWrite}{\void}
56
57 Returns the number of bytes written during the last
58 \helpref{Write()}{wxoutputstreamwrite}. It may return $0$ even if there is no
59 error on the stream if it is only temporarily impossible to write to it.
60
61
62 \membersection{wxOutputStream::PutC}\label{wxoutputstreamputc}
63
64 \func{void}{PutC}{\param{char}{ c}}
65
66 Puts the specified character in the output queue and increments the
67 stream position.
68
69
70 \membersection{wxOutputStream::SeekO}\label{wxoutputstreamseeko}
71
72 \func{off\_t}{SeekO}{\param{off\_t}{ pos}, \param{wxSeekMode}{ mode = wxFromStart}}
73
74 Changes the stream current position.
75
76 \wxheading{Parameters}
77
78 \docparam{pos}{Offset to seek to.}
79
80 \docparam{mode}{One of {\bf wxFromStart}, {\bf wxFromEnd}, {\bf wxFromCurrent}.}
81
82 \wxheading{Return value}
83
84 The new stream position or wxInvalidOffset on error.
85
86
87 \membersection{wxOutputStream::TellO}\label{wxoutputstreamtello}
88
89 \constfunc{off\_t}{TellO}{\void}
90
91 Returns the current stream position.
92
93
94 \membersection{wxOutputStream::Write}\label{wxoutputstreamwrite}
95
96 \func{wxOutputStream\&}{Write}{\param{const void *}{buffer}, \param{size\_t}{ size}}
97
98 Writes up to the specified amount of bytes using the data of {\it buffer}. Note
99 that not all data can always be written so you must check the number of bytes
100 really written to the stream using \helpref{LastWrite()}{wxoutputstreamlastwrite}
101 when this function returns. In some cases (for example a write end of a pipe
102 which is currently full) it is even possible that there is no errors and zero
103 bytes have been written.
104
105 This function returns a reference on the current object, so the user can test
106 any states of the stream right away.
107
108 \func{wxOutputStream\&}{Write}{\param{wxInputStream\&}{ stream\_in}}
109
110 Reads data from the specified input stream and stores them
111 in the current stream. The data is read until an error is raised
112 by one of the two streams.
113