|
Boost Users : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2007-10-18 12:01:06
This would be something that would be better to do yourself. Here is a
suggestion:
Suppose you've got
class A {
B b;
C c;
D d;
};
and
class B {
std::vector<E> ve;
};
Suppose you want a call back every time something is serialized
template<class Archive>
void serialize(Archive & ar, E & e, const unsigned int version){
ar & e;
my_callback_e(); //
}
template<class Archive>
void serialize(Archive & ar, B & b, const unsigned int version){
ar & b;
my_callback_b(); //
}
etc.
If you wanted something more generc, you could make an archive
adaptor which could add the same functionalty to any archive.
Robert Ramey
Robert Bielik wrote:
> It would be nice to be able to specify a callback that can notify how
> far a serialization (at loading) has come. I have a structure that
> can take a LONG time to load, and it would be good to be able to
> present a progress bar for the user.
>
> /R
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