Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/diff/tree-mutator-collection-binding.hpp"
Attach to collection: Building block for a concrete TreeMutator
.
This decorator will be outfitted with actual binding and closures and then layered on top of the (TreeMutator) base. The resulting compound is able to consume tree diff messages and apply the respective changes and mutations to an otherwise opaque implementation data structure.
TreeMutator
setup. PAR | base implementation TreeMutator; anything not implemented within this current "onion layer", is delegated down to the parent. This way, a complete TreeMutator implementation is assembled from several layers. |
BIN | binding adapter to the actual target collection. This implementation of TreeMutator operations does not directly manipulate the attached collection, but rather uses the primitive operation building blocks provided through the binding; typically these building blocks are in fact lambdas, provided when setting up this binding to the target. |
Definition at line 315 of file tree-mutator-collection-binding.hpp.
Public Member Functions | |
ChildCollectionMutator (BIN &&wiringClosures, PAR &&chain) | |
virtual bool | accept_until (GenNode const &spec) override |
repeatedly accept, until after the designated location | |
virtual bool | acceptSrc (GenNode const &n) override |
accept existing element, when matching the given spec | |
virtual bool | assignElm (GenNode const &spec) override |
locate element already accepted into the target sequence and assign the designated payload value to it. More... | |
virtual bool | completeScope () override |
verify all our pending (old) source elements where mentioned. More... | |
virtual bool | findSrc (GenNode const &refSpec) override |
locate designated element and accept it at current position | |
virtual bool | hasSrc () override |
virtual void | init () override |
virtual bool | injectNew (GenNode const &n) override |
fabricate a new element, based on the given specification (GenNode), and insert it at current position into the target sequence. | |
virtual bool | matchSrc (GenNode const &spec) override |
ensure the next recorded source element matches on a formal level with given spec | |
virtual bool | mutateChild (GenNode const &spec, TreeMutator::Handle targetBuff) override |
locate the designated target element and build a suitable sub-mutator for this element into the provided target buffer. More... | |
virtual void | skipSrc (GenNode const &n) override |
skip next pending src element, causing this element to be discarded More... | |
Private Types | |
using | Iter = typename BIN::iterator |
Private Attributes | |
BIN | binding_ |
Iter | pos_ |
|
inlineoverridevirtual |
skip next pending src element, causing this element to be discarded
Definition at line 382 of file tree-mutator-collection-binding.hpp.
|
inlineoverridevirtual |
locate element already accepted into the target sequence and assign the designated payload value to it.
Definition at line 465 of file tree-mutator-collection-binding.hpp.
|
inlineoverridevirtual |
locate the designated target element and build a suitable sub-mutator for this element into the provided target buffer.
MUT
to the CollectionBinding instance, which in turn was created by the TreeMutator builder-DSL. However, in practice, the most relevant implementation will be the default implementation, which recursively forwards this invocation again to the DiffMutable::buildMutator() virtual function, which then is implemented on each actual "diff mutable" UI-Element. This default implementation can be found in tree-mutator-diffmutable-binding.cpp, within the struct _DefaultBinding
(at the bottom of the file). Typically the concrete implementation will invoke targetBuff.emplant( TreeMutator::build() ...)
Definition at line 489 of file tree-mutator-collection-binding.hpp.
|
inlineoverridevirtual |
verify all our pending (old) source elements where mentioned.
Definition at line 503 of file tree-mutator-collection-binding.hpp.