Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
CollectionBinding< COLL, MAT, CTR, SEL, ASS, MUT > Struct Template Reference

#include "lib/diff/tree-mutator-collection-binding.hpp"

Description

template<class COLL, class MAT, class CTR, class SEL, class ASS, class MUT>
struct lib::diff::anonymous_namespace{tree-mutator-collection-binding.hpp}::CollectionBinding< COLL, MAT, CTR, SEL, ASS, MUT >

Attach to collection: Concrete binding setup.

This record holds all the actual binding and closures used to attach the tree mutator to an external pre-existing STL container with child elements/objects. It serves as flexible connection, configuration and adaptation element, and will be embedded as a whole into the (ChildCollectionMutator), which in turn implements the TreeMutator interface. The resulting compound is able to consume tree diff messages and apply the respective changes and mutations to an otherwise opaque implementation data structure.

Template Parameters
COLLa STL compliant collection type holding "child elements"
MATa functor to determine if a child matches a diff spec (GenNode)
CTRa functor to construct a new child element from a given diff spec
SELpredicate to determine if this binding layer has to process a diff message
ASSa functor to assign / set a new value from a given diff spec
MUTa functor to construct a nested mutator for some child element

Definition at line 188 of file tree-mutator-collection-binding.hpp.

Public Types

using Coll = Strip< COLL >::TypeReferred
 
using Elm = Coll::value_type
 
using Trait = ContainerTraits< Coll >
 
using iterator = lib::iter_stl::_SeqT< Coll >::Range
 
using const_iterator = lib::iter_stl::_SeqT< const Coll >::Range
 

Public Attributes

Collcollection
 
MAT matches
 
CTR construct
 
SEL isApplicable
 
ASS assign
 
MUT openSub
 
Coll contentBuffer
 

Public Member Functions

 CollectionBinding (Coll &coll, MAT m, CTR c, SEL s, ASS a, MUT u)
 
iterator initMutation ()
 
void inject (Elm &&elm)
 
iterator search (GenNode const &targetSpec, iterator pos)
 
iterator locate (GenNode const &targetSpec)
 locate element for assignment or mutation, with special shortcut to the recently inserted element
 

Private Member Functions

iterator recentElmIter ()
 
ElmrecentElm ()
 

Additional Inherited Members

- Protected Member Functions inherited from MoveOnly
 ~MoveOnly ()=default
 
 MoveOnly ()=default
 
 MoveOnly (MoveOnly &&)=default
 
 MoveOnly (MoveOnly const &)=delete
 
MoveOnlyoperator= (MoveOnly &&)=delete
 
MoveOnlyoperator= (MoveOnly const &)=delete
 

Constructor & Destructor Documentation

◆ CollectionBinding()

template<class COLL , class MAT , class CTR , class SEL , class ASS , class MUT >
CollectionBinding ( Coll coll,
MAT  m,
CTR  c,
SEL  s,
ASS  a,
MUT  u 
)
inline

Definition at line 214 of file tree-mutator-collection-binding.hpp.

Member Typedef Documentation

◆ Coll

template<class COLL , class MAT , class CTR , class SEL , class ASS , class MUT >
using Coll = Strip<COLL>::TypeReferred

Definition at line 191 of file tree-mutator-collection-binding.hpp.

◆ Elm

template<class COLL , class MAT , class CTR , class SEL , class ASS , class MUT >
using Elm = Coll::value_type

Definition at line 192 of file tree-mutator-collection-binding.hpp.

◆ Trait

template<class COLL , class MAT , class CTR , class SEL , class ASS , class MUT >
using Trait = ContainerTraits<Coll>

Definition at line 193 of file tree-mutator-collection-binding.hpp.

◆ iterator

template<class COLL , class MAT , class CTR , class SEL , class ASS , class MUT >
using iterator = lib::iter_stl::_SeqT<Coll>::Range

Definition at line 195 of file tree-mutator-collection-binding.hpp.

◆ const_iterator

template<class COLL , class MAT , class CTR , class SEL , class ASS , class MUT >
using const_iterator = lib::iter_stl::_SeqT<const Coll>::Range

Definition at line 196 of file tree-mutator-collection-binding.hpp.

Member Function Documentation

◆ initMutation()

template<class COLL , class MAT , class CTR , class SEL , class ASS , class MUT >
iterator initMutation ( )
inline

Definition at line 233 of file tree-mutator-collection-binding.hpp.

References lib::diff::anonymous_namespace{tree-mutator-collection-binding.hpp}::collection().

+ Here is the call graph for this function:

◆ inject()

template<class COLL , class MAT , class CTR , class SEL , class ASS , class MUT >
void inject ( Elm &&  elm)
inline

Definition at line 241 of file tree-mutator-collection-binding.hpp.

References lib::diff::anonymous_namespace{tree-mutator-collection-binding.hpp}::collection().

+ Here is the call graph for this function:

◆ search()

template<class COLL , class MAT , class CTR , class SEL , class ASS , class MUT >
iterator search ( GenNode const &  targetSpec,
iterator  pos 
)
inline

Definition at line 247 of file tree-mutator-collection-binding.hpp.

◆ locate()

template<class COLL , class MAT , class CTR , class SEL , class ASS , class MUT >
iterator locate ( GenNode const &  targetSpec)
inline

locate element for assignment or mutation, with special shortcut to the recently inserted element

Definition at line 257 of file tree-mutator-collection-binding.hpp.

References lib::diff::anonymous_namespace{tree-mutator-collection-binding.hpp}::collection().

+ Here is the call graph for this function:

◆ recentElmIter()

template<class COLL , class MAT , class CTR , class SEL , class ASS , class MUT >
iterator recentElmIter ( )
inlineprivate

technicality Our iterator is actually a Lumiera RangeIter, and thus we need to construct a raw collection iterator pointing to the aftmost element and then create a range from this iterator and the end() iterator.

Definition at line 275 of file tree-mutator-collection-binding.hpp.

References lib::diff::anonymous_namespace{tree-mutator-collection-binding.hpp}::collection().

+ Here is the call graph for this function:

◆ recentElm()

template<class COLL , class MAT , class CTR , class SEL , class ASS , class MUT >
Elm & recentElm ( )
inlineprivate

Definition at line 281 of file tree-mutator-collection-binding.hpp.

References lib::diff::anonymous_namespace{tree-mutator-collection-binding.hpp}::collection().

+ Here is the call graph for this function:

Member Data Documentation

◆ collection

template<class COLL , class MAT , class CTR , class SEL , class ASS , class MUT >
Coll& collection

Definition at line 206 of file tree-mutator-collection-binding.hpp.

◆ matches

template<class COLL , class MAT , class CTR , class SEL , class ASS , class MUT >
MAT matches

Definition at line 208 of file tree-mutator-collection-binding.hpp.

◆ construct

template<class COLL , class MAT , class CTR , class SEL , class ASS , class MUT >
CTR construct

Definition at line 209 of file tree-mutator-collection-binding.hpp.

◆ isApplicable

template<class COLL , class MAT , class CTR , class SEL , class ASS , class MUT >
SEL isApplicable

Definition at line 210 of file tree-mutator-collection-binding.hpp.

◆ assign

template<class COLL , class MAT , class CTR , class SEL , class ASS , class MUT >
ASS assign

Definition at line 211 of file tree-mutator-collection-binding.hpp.

◆ openSub

template<class COLL , class MAT , class CTR , class SEL , class ASS , class MUT >
MUT openSub

Definition at line 212 of file tree-mutator-collection-binding.hpp.

◆ contentBuffer

template<class COLL , class MAT , class CTR , class SEL , class ASS , class MUT >
Coll contentBuffer

Definition at line 230 of file tree-mutator-collection-binding.hpp.

+ Inheritance diagram for CollectionBinding< COLL, MAT, CTR, SEL, ASS, MUT >:
+ Collaboration diagram for CollectionBinding< COLL, MAT, CTR, SEL, ASS, MUT >:

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