|
Derived from: none
Declared in: be/support/DataIO.h
Library: libbe.so
Summary: more...
BDataIO is an abstract class that defines protocols for objects that can Read() and Write() data. BPositionIO, BDataIO's main subclass, declares an additional set of functions (ReadAt(), WriteAt(), Seek(), and Position()) for objects that can keep track of the current position in the I/O buffer; it implements Read() and Write() in terms of these other functions.
Neither BDataIO nor BPositionIO declares any data members, nor do they implement the functions in the protocols they declare. It's up to derived classes to implement them based on the properties of the particular kinds of data sources/repositories they represent.
BDataIO() |
BDataIO(void) Does nothing.
~BDataIO() |
virtual ~BDataIO() Does nothing.
Read() , ReadAt() |
virtual ssize_t Read(void *buffer, size_t numBytes) = 0 Read() is implemented by derived classes to copy numBytes bytes of data from the object to the buffer. It should return the number of bytes actually read, which may be 0, or an error code if something goes wrong.
Write() |
virtual ssize_t Write(const void *buffer, size_t numBytes) = 0 Write() is implemented by derived classes to copy numBytes bytes of data from the buffer to the object. It should return the number of bytes actually written, which may be 0, or an error code if the operation fails.
|
Copyright © 2000 Be, Inc. All rights reserved..