-
class
PortableDataIO
(Return to index)
-
Generic Data I/O interface, similar to Be's BDataIO.
Type:
Include file:
../../dataio/PortableDataIO.h
Synopsis:
- Public:
- pure virtual void
FlushOutput
()
;
-
- pure virtual ssize_t
Read
(void * buffer, size_t size)
;
-
- pure virtual ssize_t
Write
(const void * buffer, size_t size)
;
-
- virtual
~PortableDataIO
()
;
-
Public methods:
- public pure virtual void
FlushOutput ()
Flushes the output buffer, if possible. For some implementations,
this is a no-op. For others (e.g. TCPSocketDataIO) this can be
called to improve latency of outgoing data blocks.
- public pure virtual ssize_t
Read (void * buffer, size_t size)
Tries to place (size) bytes of new data into (buffer). Returns the
actual number of bytes placed, or a negative value if there
was an error.
- public pure virtual ssize_t
Write (const void * buffer, size_t size)
Takes (size) bytes from (buffer) and pushes them in to the
outgoing I/O stream. Returns the actual number of bytes
read from (buffer) and pushed, or a negative value if there
was an error.
- public virtual
~PortableDataIO ()
empty virtual destructor: necessary because C++ is lame