Serialization support for KeyValueTree
authorTeemu Murtola <teemu.murtola@gmail.com>
Mon, 10 Oct 2016 15:59:13 +0000 (18:59 +0300)
committerMark Abraham <mark.j.abraham@gmail.com>
Wed, 19 Oct 2016 14:39:39 +0000 (16:39 +0200)
commit37595636dc9c1a65ca9f3a68da78373bc60a49d3
tree9b561691f7f4e9d8567128ff1835e184386fccb8
parentda2ff67025e35f5ce96a97f3c6635259899a2100
Serialization support for KeyValueTree

Implement serialization of KeyValueTree objects to xdr files for use in
storing inputrec values using this format.

There is a C++ ISerializer interface in between to support testing, but
in the future, this could possibly be replaced with more direct xdr
serialization.  However, our current gmx_system_xdr.cpp does not support
in-memory serialization, which would be a requirement for broadcasting
the data structure, so the ISerializer can provide a useful abstraction
also for this.

Change-Id: I6836d8e7f725c364336e09745052521eccf331ce
13 files changed:
src/gromacs/fileio/gmxfio-xdr.cpp
src/gromacs/fileio/gmxfio-xdr.h
src/gromacs/utility/iserializer.h [new file with mode: 0644]
src/gromacs/utility/keyvaluetree.h
src/gromacs/utility/keyvaluetreebuilder.h
src/gromacs/utility/keyvaluetreeserializer.cpp [new file with mode: 0644]
src/gromacs/utility/keyvaluetreeserializer.h [new file with mode: 0644]
src/gromacs/utility/tests/CMakeLists.txt
src/gromacs/utility/tests/keyvaluetreeserializer.cpp [new file with mode: 0644]
src/gromacs/utility/tests/refdata/KeyValueTreeSerializerTest_EmptyTree.xml [new file with mode: 0644]
src/gromacs/utility/tests/refdata/KeyValueTreeSerializerTest_ObjectWithArrays.xml [new file with mode: 0644]
src/gromacs/utility/tests/refdata/KeyValueTreeSerializerTest_ObjectWithObjects.xml [new file with mode: 0644]
src/gromacs/utility/tests/refdata/KeyValueTreeSerializerTest_SimpleObject.xml [new file with mode: 0644]