Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
tree-diff.hpp
Go to the documentation of this file.
1/*
2 TREE-DIFF.hpp - language to describe differences in hierarchical data structures
3
4 Copyright (C)
5 2015, Hermann Vosseler <Ichthyostega@web.de>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12*/
13
14
60#ifndef LIB_DIFF_TREE_DIFF_H
61#define LIB_DIFF_TREE_DIFF_H
62
63
66#include "lib/diff/gen-node.hpp"
67
68
69namespace lib {
70namespace diff{
71
72
126 {
127 public:
128 using Val = GenNode;
129
130 virtual ~TreeDiffInterpreter() { }
131
132 virtual void ins (GenNode const& n) =0;
133 virtual void del (GenNode const& n) =0;
134 virtual void pick(GenNode const& n) =0;
135 virtual void find(GenNode const& n) =0;
136 virtual void skip(GenNode const& n) =0;
137
138 virtual void after(GenNode const&n) =0;
139 virtual void set (GenNode const& n) =0;
140 virtual void mut (GenNode const& n) =0;
141 virtual void emu (GenNode const& n) =0;
142 };
143
145 : DiffLanguage<TreeDiffInterpreter, GenNode>
146 {
148
149 // List Diff sub language
155
156 // Tree structure verbs
161 };
162
163
164
165
166}} // namespace lib::diff
167#endif /*LIB_DIFF_TREE_DIFF_H*/
Interpreter interface to define the operations ("verbs"), which describe differences or changes in hi...
virtual void after(GenNode const &n)=0
virtual void ins(GenNode const &n)=0
virtual void set(GenNode const &n)=0
virtual void emu(GenNode const &n)=0
virtual void find(GenNode const &n)=0
virtual ~TreeDiffInterpreter()
this is an interface
virtual void skip(GenNode const &n)=0
virtual void pick(GenNode const &n)=0
virtual void del(GenNode const &n)=0
virtual void mut(GenNode const &n)=0
Fundamental definitions for a representation of changes.
Generic building block for tree shaped (meta)data structures.
A token language to represent changes in a list of elements.
Implementation namespace for support and library code.
Definition frame for a language to describe differences in data structures.
generic data element node within a tree
Definition gen-node.hpp:224