Boost logo

Boost Users :

From: Robert Bielik (robert.bielik_at_[hidden])
Date: 2007-10-19 02:10:42


Robert Ramey skrev:
> Then it would only be applied with you included that particular
> header. Might be useful for debugging or whatever.
>
> So your problem now is - you've got too many ideas to
> choose from.

Yes, I see. I did however like the idea of having it at streambuf or stream
level as I know how many bytes are in the stream. This I had in mind earlier also.

>> It's better to implement the progress callback at the streambuf
>> level, the stream level, or the archive level (in decreasing order of
>> betterness.)

Perhaps in betterness, but the lower you get, lesser the info. On the archive
level, it would be possible to also include names of classes/members being
serialized. But progress info will be sufficient.

What I do is something like this:

A a;
boost::archive::xml_iarchive ia(stream);
ia >> boost::serialization::make_nvp("xmldoc", A);

where stream is std::istream& . I'm not sure where to hook into the stream (I'm
no STL lowlevel expert). Should I make my own streambuf implementation?

TIA
/Rob


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net