Lumiera  0.pre.03
DiffLanguage< I, E > Struct Template Reference

#include "lib/diff/diff-language.hpp"


template<class I, typename E>
struct lib::diff::DiffLanguage< I, E >

Definition frame for a language to describe differences in data structures.

We use a linearised representation as a sequence of DiffStep messages of constant size. The actual verbs of the diff language in use are defined through the operations of the Interpreter; each #VerbToken corresponds to a handler function on the Interpreter interface. In addition to the verb, each DiffStep also carries a content data element as argument, like e.g. "insert elm at next position".

IInterpreter interface of the actual language to use
Etype of the elementary data elements.
recommendation is to set up a builder function for each distinct kind of verb to be used in the actual language: this diffTokenBuilder takes the data element as argument and wraps a copy in the created DiffStep of the specific kind it is configured for.

Definition at line 154 of file diff-language.hpp.

Public Types

using DiffToken = std::tuple< DiffVerb, E >
using DiffVerb = VerbToken< I, void(E const &)>
using Interpreter = I

Static Public Attributes

static const DiffStep NIL
 fixed "invalid" marker token More...


struct  DiffStep

Member Typedef Documentation

◆ DiffVerb

using DiffVerb = VerbToken<I, void(E const&)>

Definition at line 157 of file diff-language.hpp.

◆ DiffToken

using DiffToken = std::tuple<DiffVerb, E>

Definition at line 158 of file diff-language.hpp.

◆ Interpreter

using Interpreter = I

Definition at line 159 of file diff-language.hpp.

Member Data Documentation


const DiffLanguage< I, E >::DiffStep NIL

fixed "invalid" marker token

use for internal state marking only – invoking this token produces undefined behaviour

Definition at line 187 of file diff-language.hpp.

Referenced by DiffDetector< SEQ >::DiffFrame::checkPoint(), and DiffDetector< SEQ >::DiffFrame::establishNextState().

+ Inheritance diagram for DiffLanguage< I, E >:
+ Collaboration diagram for DiffLanguage< I, E >:

The documentation for this struct was generated from the following file: