1 % -----------------------------------------------------------------------------
3 % -----------------------------------------------------------------------------
4 \section{\class{wxOutputStream
}}\label{wxoutputstream
}
6 wxOutputStream is an abstract base class which may not be used directly.
8 \wxheading{Derived from
}
10 \helpref{wxStreamBase
}{wxstreambase
}
12 \wxheading{Include files
}
16 \latexignore{\rtfignore{\wxheading{Members
}}}
22 \membersection{wxOutputStream::wxOutputStream
}\label{wxoutputstreamctor
}
24 \func{}{wxOutputStream
}{\void}
26 Creates a dummy wxOutputStream object.
29 \membersection{wxOutputStream::
\destruct{wxOutputStream
}}\label{wxoutputstreamdtor
}
31 \func{}{\destruct{wxOutputStream
}}{\void}
36 \membersection{wxOutputStream::Close
}\label{wxoutputstreamclose
}
38 \func{bool
}{Close
}{\void}
40 Closes the stream, returning
{\tt false
} if an error occurs. The
41 stream is closed implicitly in the destructor if Close() is not
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.
49 \membersection{wxOutputStream::LastWrite
}\label{wxoutputstreamlastwrite
}
51 \constfunc{size
\_t}{LastWrite
}{\void}
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.
58 \membersection{wxOutputStream::PutC
}\label{wxoutputstreamputc
}
60 \func{void
}{PutC
}{\param{char
}{ c
}}
62 Puts the specified character in the output queue and increments the
66 \membersection{wxOutputStream::SeekO
}\label{wxoutputstreamseeko
}
68 \func{off
\_t}{SeekO
}{\param{off
\_t}{ pos
},
\param{wxSeekMode
}{ mode = wxFromStart
}}
70 Changes the stream current position.
72 \wxheading{Parameters
}
74 \docparam{pos
}{Offset to seek to.
}
76 \docparam{mode
}{One of
{\bf wxFromStart
},
{\bf wxFromEnd
},
{\bf wxFromCurrent
}.
}
78 \wxheading{Return value
}
80 The new stream position or wxInvalidOffset on error.
83 \membersection{wxOutputStream::TellO
}\label{wxoutputstreamtello
}
85 \constfunc{off
\_t}{TellO
}{\void}
87 Returns the current stream position.
90 \membersection{wxOutputStream::Write
}\label{wxoutputstreamwrite
}
92 \func{wxOutputStream\&
}{Write
}{\param{const void *
}{buffer
},
\param{size
\_t}{ size
}}
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.
101 This function returns a reference on the current object, so the user can test
102 any states of the stream right away.
104 \func{wxOutputStream\&
}{Write
}{\param{wxInputStream\&
}{ stream
\_in}}
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.