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