#include <wx/stream.h>

Public Member Functions | |
| wxInputStream () | |
| virtual | ~wxInputStream () |
| virtual bool | CanRead () const |
| virtual bool | Eof () const |
| int | GetC () |
| virtual size_t | LastRead () const |
| virtual char | Peek () |
| virtual wxInputStream & | Read (void *buffer, size_t size) |
| wxInputStream & | Read (wxOutputStream &stream_out) |
| virtual wxFileOffset | SeekI (wxFileOffset pos, wxSeekMode mode=wxFromStart) |
| virtual wxFileOffset | TellI () const |
| size_t | Ungetch (const void *buffer, size_t size) |
| bool | Ungetch (char c) |
| wxInputStream::wxInputStream | ( | ) |
Creates a dummy input stream.
| virtual wxInputStream::~wxInputStream | ( | ) | [virtual] |
Destructor.
| virtual bool wxInputStream::CanRead | ( | ) | const [virtual] |
Returns true if some data is available in the stream right now, so that calling Read() wouldn't block.
| virtual bool wxInputStream::Eof | ( | ) | const [virtual] |
Returns true after an attempt has been made to read past the end of the stream.
| int wxInputStream::GetC | ( | ) |
Returns the first character in the input queue and removes it, blocking until it appears if necessary.
On success returns a value between 0 - 255; on end of file returns wxEOF.
| virtual size_t wxInputStream::LastRead | ( | ) | const [virtual] |
Returns the last number of bytes read.
| virtual char wxInputStream::Peek | ( | ) | [virtual] |
Returns the first character in the input queue without removing it.
| virtual wxInputStream& wxInputStream::Read | ( | void * | buffer, | |
| size_t | size | |||
| ) | [virtual] |
Reads the specified amount of bytes and stores the data in buffer.
| wxInputStream& wxInputStream::Read | ( | wxOutputStream & | stream_out | ) |
Reads data from the input queue and stores it in the specified output stream. The data is read until an error is raised by one of the two streams.
| virtual wxFileOffset wxInputStream::SeekI | ( | wxFileOffset | pos, | |
| wxSeekMode | mode = wxFromStart | |||
| ) | [virtual] |
Changes the stream current position.
| pos | Offset to seek to. | |
| mode | One of wxFromStart, wxFromEnd, wxFromCurrent. |
| virtual wxFileOffset wxInputStream::TellI | ( | ) | const [virtual] |
Returns the current stream position.
| size_t wxInputStream::Ungetch | ( | const void * | buffer, | |
| size_t | size | |||
| ) |
This function is only useful in read mode. It is the manager of the "Write-Back" buffer. This buffer acts like a temporary buffer where data which has to be read during the next read IO call are put. This is useful when you get a big block of data which you didn't want to read: you can replace them at the top of the input queue by this way.
Be very careful about this call in connection with calling SeekI() on the same stream. Any call to SeekI() will invalidate any previous call to this method (otherwise you could SeekI() to one position, "unread" a few bytes there, SeekI() to another position and data would be either lost or corrupted).
| bool wxInputStream::Ungetch | ( | char | c | ) |
This function acts like the previous one except that it takes only one character: it is sometimes shorter to use than the generic function.
|
[ top ] |