I am working on a C++ desktop application using the MVC design-pattern. In a nutshell, it allows to monitor the position of a real robot in a 3D environment and create tasks for it by modifying the virtual 3D environment.
Everything in the 3D scene is a "DataObject" with properties and signals when a property change (a bit like a QObject in Qt). We want the user to be able to save the scene in a file to work on it later.
Our DataObject framework is capable of (de)serializing every DataObjets. This is convenient, however, I do not want every DataObjects to be serialized. For instance, the origin marker of the 3D scene or the robot model are DataObjects, but I do not want them to be serialized as I would not be able to update them on old files. E.g. if I make an update where the origin marker is bigger, it wouldn't affect old persistence files.
I first wanted to do a "persistence layer" that will pick the DataObjects we want to serialize. Someone proposed to use the current system but add a "shouldBeSerialized" boolean on every DataObjects.
I am feeling we are not doing things rights. I already read this post and this one, but I am still not sure what to do.