[serialization] Special case of abstract Interface serialization.
Hello. I have a problem which I think it's not documented, and I don't know how to solve it. The problem is the following: I have a framework with an Object base class. I have an interface IDrawable. Interfaces don't inherit Object. Now I have a container, which holds IDrawables. class IDrawable { virtual void draw() const = 0; } Container<IDrawable *> drawables; //holds IDrawables that I know they are Objects. I do know that inside the drawables, objects are held, so now I want to serialize that container: ar << drawables; IDrawable does not hold any data, but Object does. So I want to serialize these objects in a polymorphic way, so that I can save anything derived from Object which is pointed by an IDrawable. Thanks for your time.
participants (1)
-
Germán Diago