Gromacs
2024.3
|
#include <gromacs/utility/include/gromacs/utility/keyvaluetreetransform.h>
Inherited by gmx::KeyValueTreeTransformRulesScoped::Impl.
Interface to declare rules for transforming key-value trees.
This interface is used to add transformation rules for key-value trees. A transformation is a set of rules that is used to map an input key-value tree to an output key-value tree, with possible conversion steps performed in the process. Currently, each rule maps one item from the source tree to one item in the target tree (it is possible to expand a single value into an object with multiple properties). See KeyValueTreeTransformRuleBuilder for the kinds of rules currently supported.
The main use currently is in converting flat-format mdp files to a structured internal representation.
Public Member Functions | |
virtual KeyValueTreeTransformRuleBuilder | addRule ()=0 |
Creates a new rule. More... | |
virtual KeyValueTreeTransformRulesScoped | scopedTransform (const KeyValueTreePath &scope)=0 |
Creates a scoped set of rules, where all rules use a target sub-tree. More... | |
|
pure virtual |
Creates a new rule.
Properties of the new rule must be specified using the returned builder.
|
pure virtual |
Creates a scoped set of rules, where all rules use a target sub-tree.
[in] | scope | Prefix defining the scope in the target tree |
Any rules added to the returned scope will have scope
prefixed to their target paths, i.e., it is not possible to produce elements outside the specified subtree.