> I have to serialize some classes that look like this :
> struct A
> vector<Base*> v;
> Base* get(int i);
> struct B1: A
> Derived1* get(int i);
> struct B1000 : A
> Derived1000* get(int i);
> (well, not exactly 1000, but definitively more than a couple, and no,
> I cannot change this design).
LOL - one really has wonder about such a design! Looks like it calls
for a template if you ask me.
> I would like not to add serialization code to all of thoses classes,
> just to the base class, since all those classes are almost the same.
> Is this possible ?
I don't see how this would be possible.
What could be made to work is to make large macro which looks like: