
On Tuesday, June 20, 2006 at 12:50:37 (+0200) Vidal Roca writes:
It is possible to define more than one serialization format for a data structure with the serialization library? If not, has someone some good purposes to make it to?
How do you mean? There are several archive formats: binary, text, xml. See: #include <boost/archive/binary_oarchive.hpp> #include <boost/archive/binary_iarchive.hpp> #include <boost/archive/text_oarchive.hpp> #include <boost/archive/text_iarchive.hpp> #include <boost/archive/xml_oarchive.hpp> #include <boost/archive/xml_iarchive.hpp> Or do you mean define different serialization methods for a class? Such as: class Foo { template<class Archive> void serialize(Archive& ar, const unsigned int version); template<class Archive> void serialize_II(Archive& ar, const unsigned int version); }; Where serialize_II presumably reads and writes the data structure in a different order? Or do you mean something else? Bill