struct A : public base {
virtual std::string get_name () {
return STRUCT_STR(A);
}
template
void serialize(Archive &ar, const int version) {
ar & boost::serialization::base_object(*this);
}
};
struct B : public A {
B(int _e) {e = _e;}
B() {}
virtual std::string get_name () {
std::cout << e;
return STRUCT_STR(B);
}
template<class Archive>
void serialize(Archive &ar, const int version) {
ar & boost::serialization::base_object<A>(*this);
ar & e;
ar & p;
}
int e;
ProcessStatus p = UNINITIALIZED;
struct base { virtual std::string get_name () { return STRUCT_STR(base); } template
void serialize(Archive &ar, const int version) {
}
};
struct A : public base { virtual std::string get_name () { return STRUCT_STR(A); } template
void serialize(Archive &ar, const int version) {
ar & boost::serialization::base_object (*this);
}
};
struct B : public A { B(int _e) {e = _e;} B() {} virtual std::string get_name () { std::cout << e; return STRUCT_STR(B); }
};
void register_oa_class_type(boost::archive::text_oarchive& oa) { oa.register_type ();
oa.register_type();
oa.register_type();
}
void register_ia_class_type(boost::archive::text_iarchive& ia) { ia.register_type ();
ia.register_type();
ia.register_type();
}