[mbackup-devel] cvs commits
Status: Alpha
Brought to you by:
jo2y
|
From: James O'K. <jo...@mi...> - 2001-12-24 00:39:46
|
I committed some big changes to cvs a week or so ago. Should I send out
email everytime I make a significate commit?
In this update, I rearranged the way that filters are added to the stream
of data. Before, one would have to do something like this:
file->add_filter(foo);
file->read(...);
tape->write(...);
Now, I've changed things so that filters act more like wrappers.
source = filter->add_stream(file);
destination = filter2->add_stream(tape);
source->read(...);
destination->write(...);
See src/base/main.cc to see a more detailed sample.
I currently debating which of the two would be better.
Should the tape keep track of where on the tape the data is, or should
something higher level just position the tape and the tape object just
blindly does it. To illustrate the two:
tape->restore("/foo");
tape->read(...);
And if the tape multiplexes files on the tape it will know where on the
tape each part starts and ends and rejoin them.
Or, at a higher level, where we do something like this. and the tape
module has less intelligence.
tape->seek(offset);
tape->read(...);
tape->seek(newoffset);
tape->read(...);
etc..
-james
|