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