Improve key-value tree gmx dump support
commit9d5579480821d523c0248d3d04ff4a2e3b830b4f
authorTeemu Murtola <teemu.murtola@gmail.com>
Sun, 26 Mar 2017 11:31:08 +0000 (26 14:31 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Tue, 11 Apr 2017 16:36:35 +0000 (11 18:36 +0200)
tree9c5ad5965ccbfe105e32e5471dec4f98496960b9
parentaa7bd5950642357ed75db08538a00f280fca674a
Improve key-value tree gmx dump support

Add test coverage for basic option types with the functionality used by
gmx dump, and implement missing types.  Move the dump functionality into
a free function.  Expose the to-string conversion for basic Variant
values outside keyvaluetree.cpp, as that will be at least transitionally
needed elsewhere, and it can also be useful for debugging.

Change-Id: I8d85ea308bec9369557b54528622948ead3fbed5
14 files changed:
src/gromacs/mdtypes/inputrec.cpp
src/gromacs/options/tests/refdata/TreeValueSupportTest_SupportsBooleanOption.xml
src/gromacs/options/tests/refdata/TreeValueSupportTest_SupportsDoubleOption.xml
src/gromacs/options/tests/refdata/TreeValueSupportTest_SupportsEnumIntOption.xml
src/gromacs/options/tests/refdata/TreeValueSupportTest_SupportsEnumOption.xml
src/gromacs/options/tests/refdata/TreeValueSupportTest_SupportsFloatOption.xml
src/gromacs/options/tests/refdata/TreeValueSupportTest_SupportsInt64Option.xml
src/gromacs/options/tests/refdata/TreeValueSupportTest_SupportsIntegerOption.xml
src/gromacs/options/tests/refdata/TreeValueSupportTest_SupportsStringOption.xml
src/gromacs/options/tests/treesupport.cpp
src/gromacs/utility/keyvaluetree.cpp
src/gromacs/utility/keyvaluetree.h
src/gromacs/utility/variant.cpp [new file with mode: 0644]
src/gromacs/utility/variant.h