Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::IKeyValueTreeTransformRules Class Referenceabstract

#include <gromacs/utility/keyvaluetreetransform.h>

Inherited by gmx::KeyValueTreeTransformRulesScoped::Impl.

Description

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...
 

Member Function Documentation

virtual KeyValueTreeTransformRuleBuilder gmx::IKeyValueTreeTransformRules::addRule ( )
pure virtual

Creates a new rule.

Properties of the new rule must be specified using the returned builder.

virtual KeyValueTreeTransformRulesScoped gmx::IKeyValueTreeTransformRules::scopedTransform ( const KeyValueTreePath scope)
pure virtual

Creates a scoped set of rules, where all rules use a target sub-tree.

Parameters
[in]scopePrefix 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.


The documentation for this class was generated from the following files: