Skip to content

GUI: DataItems serialization refactoring

Mikhail Svechnikov requested to merge serialization into main

DataItem, SpecularDataItem and IntensityDataItem represent now the approach that will be applied to all other classes.

Tags for serialization are declared in the .cpp of corresponding class, they are not shared between classes.

Attributes like value, version etc are shared; the are put to XML::Attrib namespace of UtilXML.h.

Reading and writing is done in separate functions, this disentangles them and allows us to read data even in arbitrary order and perform any special interventions that may be required to read the old project.

Classes have version number that should be increased by one if parameters or tags change.

Edited by Mikhail Svechnikov

Merge request reports

Loading