Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
lib::diff Namespace Reference

Namespaces

 test
 

Typedefs

using DataValues = meta::Types< int,int64_t,short,char,bool,double,string,time::Time,time::Offset,time::Duration,time::TimeSpan,hash::LuidH,RecRef,Rec >
 
template<class I , typename E >
using HandlerFun = void(I::*)(E const &)
 
using MakeRec = Rec::Mutator
 
using Rec = Record< GenNode >
 
using RecRef = RecordRef< GenNode >
 

Classes

struct  can_wrap_in_GenNode
 metafunction to detect types able to be wrapped into a GenNode. More...
 
class  DataCap
 
struct  defines_custom_BufferSize
 
singleton  DiffApplicationStrategy
 Extension point: define how a specific diff language can be applied to elements in a concrete container. More...
 
class  DiffApplicationStrategy< TAR, enable_if< TreeDiffTraits< TAR > > >
 Interpreter for the tree-diff-language to work on arbitrary opaque target data structures. More...
 
class  DiffApplicationStrategy< vector< E, ARGS...> >
 concrete strategy to apply a list diff to a target sequence given as vector. More...
 
class  DiffApplicator
 generic builder to apply a diff description to a given target data structure. More...
 
class  DiffDetector
 Detect and describe changes in a monitored data sequence. More...
 
struct  DiffLanguage
 Definition frame for a language to describe differences in data structures. More...
 
class  DiffMessage
 
class  DiffMutable
 Marker or capability interface: an otherwise not further disclosed data structure, which can be transformed through "tree diff messages". More...
 
struct  DiffStepBuilder
 generator to produce specific language tokens More...
 
class  exposes_MutatorBuilder
 helper to detect presence of a TreeMutator builder function More...
 
struct  GenNode
 generic data element node within a tree More...
 
class  IndexTable
 data snapshot and lookup table More...
 
struct  InterpreterScheme
 < base case is to expect typedef I::Val More...
 
struct  InterpreterScheme< HandlerFun< I, E > >
 < alternatively derive value and interpreter from a Handler binding More...
 
struct  InterpreterScheme< IP< E > >
 < alternatively, the interpreter value type can be templated More...
 
class  ListDiffInterpreter
 Interpreter interface to define the operations ("verbs"), which describe differences or changes in a given list of data elements. More...
 
struct  ListDiffLanguage
 
class  Record
 object-like record of data. More...
 
class  RecordRef
 wrapped record reference. More...
 
struct  RecordSetup
 
struct  RecordSetup< GenNode >
 Define actual data storage and access types used. More...
 
struct  RecordSetup< string >
 Type configuration (extension point). More...
 
struct  Ref
 Constructor for a specially crafted 'ref GenNode'. More...
 
class  ScopeManager
 Management interface to deal with storage for TreeMutators dedicated to nested scopes. More...
 
class  StackScopeManager
 Typical standard implementation of the ScopeManager. More...
 
class  TestMutationTarget
 Test adapter to watch and verify how the TreeMutator binds to custom tree data structures. More...
 
class  TreeDiffInterpreter
 Interpreter interface to define the operations ("verbs"), which describe differences or changes in hierarchical data structure. More...
 
struct  TreeDiffLanguage
 
class  TreeDiffMutatorBinding
 Implementation of the tree-diff-language to work on arbitrary tree-like data. More...
 
struct  TreeDiffTraits
 
struct  TreeDiffTraits< TAR, enable_if< exposes_MutatorBuilder< TAR > > >
 
struct  TreeDiffTraits< TAR, enable_if< is_same< TAR, DiffMutable > > >
 
class  TreeMutator
 Customisable intermediary to abstract mutating operations on arbitrary, hierarchical object-like data. More...
 
struct  TreeMutatorSizeTraits
 Heuristics to guide the allocation for nested TreeMutator. More...
 
struct  TreeMutatorSizeTraits< TAR, enable_if< defines_custom_BufferSize< TAR > > >
 

Functions

template<class H >
DiffStepBuilder< typename
InterpreterScheme< H >
::Interpreter > 
diffTokenBuilder (H handlerFun, Literal id)
 set up a diff language token generator, based on the specific handler function given. More...
 
template<typename T >
constexpr T * getSelector ()
 
 LAUNCHER (DiffListGeneration_test,"unit common")
 Register this test class... More...
 
 LUMIERA_ERROR_DECLARE (DIFF_CONFLICT)
 Collision in diff application: contents of target not as expected. More...
 
 LUMIERA_ERROR_DEFINE (DIFF_CONFLICT,"Collision in diff application: contents of target not as expected.")
 
template<typename VAL >
Record< VAL >::Mutator & mutateInPlace (Record< VAL > &record_to_mutate)
 open an existing record for modification in-place. More...
 
template<class TAR >
TreeDiffTraits< TAR >::Ret mutatorBinding (TAR &subject)
 public access point to this configuration machinery More...
 
constexpr size_t treeMutatorSize (...)
 

Typedef Documentation

using HandlerFun = void (I::*) (E const&)

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

using Rec = Record<GenNode>

Definition at line 133 of file gen-node.hpp.

Definition at line 134 of file gen-node.hpp.

Definition at line 135 of file gen-node.hpp.

using DataValues = meta::Types<int ,int64_t ,short ,char ,bool ,double ,string ,time::Time ,time::Offset ,time::Duration ,time::TimeSpan ,hash::LuidH ,RecRef ,Rec >

Definition at line 150 of file gen-node.hpp.


Class Documentation

struct lib::diff::defines_custom_BufferSize
Class Members
__unnamed__
+ Collaboration diagram for defines_custom_BufferSize< T >:
singleton lib::diff::DiffApplicationStrategy
+ Inheritance diagram for DiffApplicationStrategy< TAR, SEL >:
+ Collaboration diagram for DiffApplicationStrategy< TAR, SEL >:
struct lib::diff::InterpreterScheme
Class Members
typedef I Interpreter
typedef typename Val Val
typedef HandlerFun< I, Val > Handler
+ Collaboration diagram for InterpreterScheme< I >:
struct lib::diff::InterpreterScheme< HandlerFun< I, E > >
Class Members
typedef E Val
typedef I Interpreter
typedef HandlerFun< I, E > Handler
+ Collaboration diagram for InterpreterScheme< HandlerFun< I, E > >:
struct lib::diff::InterpreterScheme< IP< E > >
Class Members
typedef E Val
typedef IP< E > Interpreter
typedef HandlerFun
< Interpreter, Val >
Handler
+ Collaboration diagram for InterpreterScheme< IP< E > >:
struct lib::diff::RecordSetup
+ Collaboration diagram for RecordSetup< VAL >:
struct lib::diff::RecordSetup< GenNode >
Class Members
typedef vector< GenNode > Storage
typedef typename const_iterator ElmIter
typedef GenNode const & Access using const reference data access relevant for handling large subtrees
+ Collaboration diagram for RecordSetup< GenNode >:
struct lib::diff::RecordSetup< string >
Class Members
typedef vector< string > Storage
typedef typename const_iterator ElmIter
typedef string Access data access by value copy
+ Collaboration diagram for RecordSetup< string >:
struct lib::diff::TreeMutatorSizeTraits
Class Members
__unnamed__
+ Collaboration diagram for TreeMutatorSizeTraits< TAR, SEL >:
struct lib::diff::TreeMutatorSizeTraits< TAR, enable_if< defines_custom_BufferSize< TAR > > >
Class Members
__unnamed__
+ Collaboration diagram for TreeMutatorSizeTraits< TAR, enable_if< defines_custom_BufferSize< TAR > > >:

Function Documentation

lib::diff::LUMIERA_ERROR_DECLARE ( DIFF_CONFLICT  )

Collision in diff application: contents of target not as expected.

DiffStepBuilder<typename InterpreterScheme<H>::Interpreter> lib::diff::diffTokenBuilder ( handlerFun,
Literal  id 
)
inline

set up a diff language token generator, based on the specific handler function given.

This generator will produce tokens, wrapping concrete content elements of type E. In the end, the purpose is to send a sequence of such tokens around, to feed them to a consumer, which implements the Interpreter interface of the diff language. E.g. this consumer might apply the diff.

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

lib::diff::LUMIERA_ERROR_DEFINE ( DIFF_CONFLICT  ,
"Collision in diff application: contents of target not as expected."   
)
Record<VAL>::Mutator& lib::diff::mutateInPlace ( Record< VAL > &  record_to_mutate)
inline

open an existing record for modification in-place.

Warning
this function undermines the immutability of Record
Remarks
exploits the specific and known memory layout of Rec::Mutator. This trickery is necessary to avoid copying a large and possibly nested object tree; this happens when applying a diff, when recursively descending into nested child objects.
Todo:
do we have a design mismatch here?? /////////////////////////////////////////TICKET #970
See also
tree-diff-application.hpp

Definition at line 587 of file record.hpp.

constexpr size_t lib::diff::treeMutatorSize (   ...)

Definition at line 104 of file tree-diff-traits.hpp.

constexpr T* lib::diff::getSelector ( )

Definition at line 112 of file tree-diff-traits.hpp.

TreeDiffTraits<TAR>::Ret lib::diff::mutatorBinding ( TAR &  subject)

public access point to this configuration machinery

Returns
depending on the circumstances, either a direct reference to DiffMutable, or a transient functor object implementing the DiffMutable interface
Warning
beware of dangling references! either use this call immediately inline, or (preferably) use an auto typed variable to hold the return value in local scope as long as necessary

Definition at line 213 of file tree-diff-traits.hpp.

Referenced by DiffApplicationStrategy< TAR, enable_if< TreeDiffTraits< TAR > > >::initDiffApplication().

+ Here is the caller graph for this function:

lib::diff::LAUNCHER ( DiffListGeneration_test  ,
"unit common"   
)

Register this test class...