Lumiera  0.pre.03
»edit your freedom«
list-diff.hpp
Go to the documentation of this file.
1 /*
2  LIST-DIFF.hpp - language to describe differences between list like sequences
3 
4  Copyright (C)
5  2014, 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 
29 #ifndef LIB_DIFF_LIST_DIFF_H
30 #define LIB_DIFF_LIST_DIFF_H
31 
32 
34 
35 
36 namespace lib {
37 namespace diff{
38 
39 
62  template<typename E>
64  {
65  public:
66  virtual ~ListDiffInterpreter() { }
67 
68  virtual void ins (E const& e) =0;
69  virtual void del (E const& e) =0;
70  virtual void pick(E const& e) =0;
71  virtual void find(E const& e) =0;
72  virtual void skip(E const& e) =0;
73  };
74 
75  template<typename E>
77  : DiffLanguage<ListDiffInterpreter<E>, E>
78  {
80 
81  DiffStep_CTOR(ins);
82  DiffStep_CTOR(del);
83  DiffStep_CTOR(pick);
84  DiffStep_CTOR(find);
85  DiffStep_CTOR(skip);
86  };
87 
88 
89 
90 
91 }} // namespace lib::diff
92 #endif /*LIB_DIFF_LIST_DIFF_H*/
Fundamental definitions for a representation of changes.
Interpreter interface to define the operations ("verbs"), which describe differences or changes in a ...
Definition: list-diff.hpp:63
Implementation namespace for support and library code.
virtual ~ListDiffInterpreter()
this is an interface
Definition: list-diff.hpp:66
Definition frame for a language to describe differences in data structures.
#define DiffStep_CTOR(_ID_)
shortcut to define tokens of the diff language.