Lumiera  0.pre.03
»edit your freedom«
TreeDiffMutatorBinding Class Reference

#include "lib/diff/tree-diff-application.hpp"

Description

Implementation of the tree-diff-language to work on arbitrary tree-like data.

This is the core part of the implementation, which maps the diff verbs onto the corresponding primitive operations of the TreeMutator interface. The concrete implementation of TreeMutator then is responsible to translate those operations into the correct manipulation of target data.

Note
implementation of these functions is emitted in tree-diff.cpp and thus within the library module. For an actual diff-applicator, we also need to bind to a concrete TreeMutator, for which we need to instantiate the template DiffApplicationStrategy with the concrete target type as parameter (see below). This concrete instantiation happens inline from within the usage context, while inheriting the actual implementation logic from this baseclass here
Exceptions
lumiera::error::Statewhen diff application fails structurally.
<em>unspecifiederrors when delegated operations fail.
See also
TreeDiffInterpreter explanation of the verbs
DiffComplexApplication_test demonstration of usage
implementation of the binding functions

Definition at line 272 of file tree-diff-application.hpp.

Protected Attributes

ScopeManagerscopeManger_
 
TreeMutatortreeMutator_
 

Private Member Functions

void __expect_end_of_scope (GenNode::ID const &idi)
 
void __expect_further_elements (GenNode const &elm)
 
void __expect_valid_parent_scope (GenNode::ID const &idi)
 
void __fail_not_found (GenNode const &elm)
 
void __failMismatch (Literal oper, GenNode const &spec)
 
virtual void after (GenNode const &n) override
 cue to a position behind the named node, thereby picking (accepting) all traversed elements into the reshaped new data structure as-is
 
virtual void del (GenNode const &n) override
 
virtual void emu (GenNode const &n) override
 finish and leave child object scope, return to parent
 
virtual void find (GenNode const &n) override
 
virtual void ins (GenNode const &n) override
 
virtual void mut (GenNode const &n) override
 open nested scope to apply diff to child object
 
virtual void pick (GenNode const &n) override
 
virtual void set (GenNode const &n) override
 assignment of changed value in one step
 
virtual void skip (GenNode const &n) override
 

Additional Inherited Members

- Public Types inherited from TreeDiffInterpreter
using Val = GenNode
 
- Public Member Functions inherited from TreeDiffInterpreter
virtual ~TreeDiffInterpreter ()
 this is an interface
 
+ Inheritance diagram for TreeDiffMutatorBinding:
+ Collaboration diagram for TreeDiffMutatorBinding:

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