Main Page Class Hierarchy Compound List File List Compound Members Related Pages
rel::IODevice Class Reference
#include <IODevice.h>
Inheritance diagram for rel::IODevice:
[legend]List of all members.
Public Types |
typedef int64_t | size_type |
Public Methods |
| IODevice () |
virtual | ~IODevice () |
virtual int | getReadDescriptor () const |
virtual bool | isDirectAccess () const |
virtual size_type | at () const |
virtual bool | at (size_type offset) |
| change location in stream.
|
virtual bool | atEnd () const |
virtual size_type | writeBytes (const char *data, size_type len) |
virtual void | flush () |
virtual size_type | readBytes (char *data, size_type maxLen) |
virtual SmartPtr< char *> | print () |
Detailed Description
IODevice defines an API for reading and writing data.
Reading from an IODevice can be either destructive or non-destructive.
The default implementation of most functions is to simply return an error value. The functions must be implemented by a base class to provide useful operation.
Member Function Documentation
IODevice::size_type IODevice::at |
( |
|
) |
const [virtual] |
|
|
Return current location in stream (not supported by all streams - they might always return -1) |
void IODevice::flush |
( |
|
) |
[virtual] |
|
|
force writing any buffered data. It may have already been written, there is no guarentee that buffering is done up until a sync() is called. |
int IODevice::getReadDescriptor |
( |
|
) |
const [virtual] |
|
|
Return a file descriptor corresponding to device input. This is to make it easy to incorporate into event loops. |
bool IODevice::isDirectAccess |
( |
|
) |
const [virtual] |
|
|
Returns TRUE if the stream is repositionable. If false, then at() and at(int) operations are not valid.. |
SmartPtr< char *> IODevice::print |
( |
|
) |
[virtual] |
|
|
display output in human readable form - for debugging.. |
IODevice::size_type IODevice::readBytes |
( |
char * |
data, |
|
|
size_type |
bytes |
|
) |
[virtual] |
|
|
Reads at most maxLen bytes of data from the stream into data and returns number actually read. |
IODevice::size_type IODevice::writeBytes |
( |
const char * |
data, |
|
|
size_type |
len |
|
) |
[virtual] |
|
|
Writes len bytes from data and returns the number of bytes actually written. |
The documentation for this class was generated from the following files:
Generated at Sat Sep 22 02:20:01 2001 for librel by
1.2.10 written by Dimitri van Heesch,
© 1997-2001