We are implementing a CAD program (in C++, Qt) where we have interdependant classes : The smallest brick is the Pattern, it is just a distribution of points. Then we have Layouts which contain Patterns at a given height (z = constant). And finally Stacks, which are a stacking of Layout.
All these entities have a unique id and can also have a list of masks which are applied to it.
Knowing that each of the classes are linked (std::vector of pointers everywhere) by a tree structure, what would be the best way to save a project countaining several stacks ? The objective of saving would be to later load again the project and modify it.
We already looked into Boost and Qt Serialization but it seems to me that binary Serialization may be way too much for what we want to do (as it needs time to be integrated). On the other hand we tought about an XML/JSON serialization, having something which would look like this :
<Layout>
<id> 12</id>
<z> 0</z>
<patterns>
<pattern id> pattern0</pattern id>
<pattern id> pattern1</pattern id>
</patterns>
</Layout>
Are they some other ways ? What would be the best one and why ? We lack of objectivity on this point.