Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/diff/tree-mutator-collection-binding.hpp"
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.
COLL | a STL compliant collection type holding "child elements" |
MAT | a functor to determine if a child matches a diff spec (GenNode) |
CTR | a functor to construct a new child element from a given diff spec |
SEL | predicate to determine if this binding layer has to process a diff message |
ASS | a functor to assign / set a new value from a given diff spec |
MUT | a functor to construct a nested mutator for some child element |
Definition at line 197 of file tree-mutator-collection-binding.hpp.
Public Types | |
using | Coll = typename Strip< COLL >::TypeReferred |
using | const_iterator = typename lib::iter_stl::_SeqT< const Coll >::Range |
using | Elm = typename Coll::value_type |
using | iterator = typename lib::iter_stl::_SeqT< Coll >::Range |
using | Trait = ContainerTraits< Coll > |
Public Member Functions | |
CollectionBinding (Coll &coll, MAT m, CTR c, SEL s, ASS a, MUT u) | |
iterator | initMutation () |
void | inject (Elm &&elm) |
iterator | locate (GenNode const &targetSpec) |
locate element for assignment or mutation, with special shortcut to the recently inserted element | |
iterator | search (GenNode const &targetSpec, iterator pos) |
Public Attributes | |
ASS | assign |
Coll & | collection |
CTR | construct |
Coll | contentBuffer |
SEL | isApplicable |
MAT | matches |
MUT | openSub |
Private Member Functions | |
Elm & | recentElm () |
iterator | recentElmIter () |
Additional Inherited Members | |
Protected Member Functions inherited from MoveOnly | |
MoveOnly (MoveOnly &&)=default | |
MoveOnly (MoveOnly const &)=delete | |
MoveOnly & | operator= (MoveOnly &&)=delete |
MoveOnly & | operator= (MoveOnly const &)=delete |
|
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 284 of file tree-mutator-collection-binding.hpp.