Skip to content

Refactor serialization of SessionItem (less generic, more explicit)

Serialization means writing and reading of BornAgain project files.

The generic approach makes it very difficult to implement backward compatibility. If e.g. a property name was misspelled ("heigt"), this can't be corrected. Therefore a serialization should be implemented where each data element is expicitly stored/loaded and can be corrected/enhanced/removed/added more easily.

Also the current file versioning is quite limited (only good for whole file OK/NOK, it can't be used for compatibility).

After first discussions, we decided to take a closer look at the boost serialization library.

Another discussion outcome was to go for a single project file solution (either completely created by boost or as a (zip?) archive) instead of a multi-file project stored in a folder structure. This seems more convenient for the users and reduces errors when moving or exchanging files.


Note:
Regarding the design of how to serialize, read also the discussion in !573 (merged): !573 (comment 170494)

This has to be done for

  • Material items
  • Sample items
  • Instrument items
  • Job items
  • Real data items
Edited by Mikhail Svechnikov