Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 151 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...
 

Classes

struct  DiffStep
 

Member Typedef Documentation

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

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

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

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

using Interpreter = I

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

Member Data Documentation

const DiffLanguage< I, E >::DiffStep NIL
static

fixed "invalid" marker token

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

Definition at line 184 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: