Made option value assignment use transactions.
authorTeemu Murtola <teemu.murtola@cbr.su.se>
Sat, 30 Jul 2011 16:27:18 +0000 (19:27 +0300)
committerTeemu Murtola <teemu.murtola@cbr.su.se>
Mon, 1 Aug 2011 17:42:28 +0000 (20:42 +0300)
commit89e902f691246fbd665e9a7e91e5664966a0d18b
treefb98ced98c945a064a50119836cd455b18b86e95
parent82b766f68719b3a939b6baa246e873a3f1434962
Made option value assignment use transactions.

It's now more predictable what will happen when option assignment fails:
if assignment of a set of values fails, the whole set is rolled back.
Within a set, there are still cases where the state may be different
after error recovery than it was before the erroneous values were added
(if value conversion may create more than one value from a single
value), but these could also be handled if they become issues.
src/gromacs/options/abstractoption.cpp
src/gromacs/options/abstractoptionstorage.h
src/gromacs/options/basicoptions.cpp
src/gromacs/options/basicoptionstorage.h
src/gromacs/options/optionflags.h
src/gromacs/options/optionstoragetemplate.h
src/gromacs/options/tests/abstractoptionstorage.cpp
src/gromacs/options/tests/optionsassigner.cpp
src/gromacs/selection/selectionoption.cpp
src/gromacs/selection/selectionoptionstorage.h