#include <wx/stream.h>

Public Member Functions | |
| wxOutputStream () | |
| virtual | ~wxOutputStream () |
| virtual bool | Close () |
| virtual size_t | LastWrite () const |
| void | PutC (char c) |
| virtual wxFileOffset | SeekO (wxFileOffset pos, wxSeekMode mode=wxFromStart) |
| virtual wxFileOffset | TellO () const |
| virtual wxOutputStream & | Write (const void *buffer, size_t size) |
| wxOutputStream & | Write (wxInputStream &stream_in) |
| wxOutputStream::wxOutputStream | ( | ) |
Creates a dummy wxOutputStream object.
| virtual wxOutputStream::~wxOutputStream | ( | ) | [virtual] |
Destructor.
| virtual bool wxOutputStream::Close | ( | ) | [virtual] |
Closes the stream, returning false if an error occurs. The stream is closed implicitly in the destructor if Close() is not called explicitly.
If this stream wraps another stream or some other resource such as a file, then the underlying resource is closed too if it is owned by this stream, or left open otherwise.
Reimplemented in wxArchiveOutputStream, wxTarOutputStream, and wxZipOutputStream.
| virtual size_t wxOutputStream::LastWrite | ( | ) | const [virtual] |
Returns the number of bytes written during the last Write(). It may return 0 even if there is no error on the stream if it is only temporarily impossible to write to it.
| void wxOutputStream::PutC | ( | char | c | ) |
Puts the specified character in the output queue and increments the stream position.
| virtual wxFileOffset wxOutputStream::SeekO | ( | wxFileOffset | pos, | |
| wxSeekMode | mode = wxFromStart | |||
| ) | [virtual] |
Changes the stream current position.
| pos | Offset to seek to. | |
| mode | One of wxFromStart, wxFromEnd, wxFromCurrent. |
Reimplemented in wxBufferedOutputStream.
| virtual wxFileOffset wxOutputStream::TellO | ( | ) | const [virtual] |
Returns the current stream position.
| virtual wxOutputStream& wxOutputStream::Write | ( | const void * | buffer, | |
| size_t | size | |||
| ) | [virtual] |
Writes up to the specified amount of bytes using the data of buffer. Note that not all data can always be written so you must check the number of bytes really written to the stream using LastWrite() when this function returns.
In some cases (for example a write end of a pipe which is currently full) it is even possible that there is no errors and zero bytes have been written. This function returns a reference on the current object, so the user can test any states of the stream right away.
| wxOutputStream& wxOutputStream::Write | ( | wxInputStream & | stream_in | ) |
Reads data from the specified input stream and stores them in the current stream. The data is read until an error is raised by one of the two streams.
|
[ top ] |