Basic support for transforming KeyValueTrees
commit5b4c0d0c1b1bf849b055b1cd9a609f5fd3101b45
authorTeemu Murtola <teemu.murtola@gmail.com>
Tue, 26 Jul 2016 13:05:13 +0000 (26 16:05 +0300)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 30 Aug 2016 14:41:16 +0000 (30 16:41 +0200)
tree54d67d61284d2616dd318b6ba59f77a5804aaea4
parent612f6089cb7337af55612b483c5559183b1c5758
Basic support for transforming KeyValueTrees

Add support for writing transforms from one KeyValueTree to another.
For now, only a small subset of simple transforms is supported, but this
should be mostly sufficient for a proof-of-concept for MDP processing on
the electric field code, and new cases can be relatively easily added.

These transforms can support two use cases: specifying how a legacy MDP
file maps to a more structured format, and for supporting changes from
version to version in the structured format.  However, versioning for
the structured format (in particular, if/when it will be necessary to
recognize the version from input) likely still needs some work.

There is not much in terms of consistency checks, error handling, or
documentation, but that is better to add once using code exists.

Change-Id: Ie2570eee8a62c2d64b79e00925bbf1e40b62b261
src/gromacs/utility/keyvaluetree.h
src/gromacs/utility/keyvaluetreebuilder.h
src/gromacs/utility/keyvaluetreetransform.cpp [new file with mode: 0644]
src/gromacs/utility/keyvaluetreetransform.h [new file with mode: 0644]
src/gromacs/utility/tests/CMakeLists.txt
src/gromacs/utility/tests/keyvaluetreetransform.cpp [new file with mode: 0644]
src/gromacs/utility/tests/refdata/TreeValueTransformTest_ObjectFromMultipleStrings.xml [new file with mode: 0644]
src/gromacs/utility/tests/refdata/TreeValueTransformTest_ObjectFromString.xml [new file with mode: 0644]
src/gromacs/utility/tests/refdata/TreeValueTransformTest_SimpleTransforms.xml [new file with mode: 0644]
src/gromacs/utility/tests/refdata/TreeValueTransformTest_SimpleTransformsToObject.xml [new file with mode: 0644]