Lumiera  0.pre.03
»edit your freedom«
DiffLanguage< I, E > Struct Template Reference

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

Description

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

Parameters
IInterpreter interface of the actual language to use
Etype of the elementary data elements.
Remarks
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 156 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 = DiffStep(DiffVerb(), E())
 fixed "invalid" marker token More...
 

Classes

struct  DiffStep
 

Member Data Documentation

◆ NIL

const DiffLanguage< I, E >::DiffStep NIL = DiffStep(DiffVerb(), E())
static

fixed "invalid" marker token

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

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

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

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