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.