![]() |
Lumiera 0.pre.04~rc.1
»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 306 of file tree-mutator-collection-binding.hpp.
Public Member Functions | |
| ChildCollectionMutator (BIN &&wiringClosures, PAR &&chain) | |
| 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 | hasSrc () override |
| virtual bool | matchSrc (GenNode const &spec) override |
| ensure the next recorded source element matches on a formal level with given spec | |
| virtual void | skipSrc (GenNode const &n) override |
| skip next pending src element, causing this element to be discarded | |
| virtual bool | acceptSrc (GenNode const &n) override |
| accept existing element, when matching the given spec | |
| virtual bool | findSrc (GenNode const &refSpec) override |
| locate designated element and accept it at current position | |
| virtual bool | accept_until (GenNode const &spec) override |
| repeatedly accept, until after the designated location | |
| virtual bool | assignElm (GenNode const &spec) override |
| locate element already accepted into the target sequence and assign the designated payload value to it. | |
| 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. | |
| virtual bool | completeScope () override |
| verify all our pending (old) source elements where mentioned. | |
Private Types | |
| using | Iter = BIN::iterator |
Private Attributes | |
| BIN | binding_ |
| Iter | pos_ |
|
inline |
Definition at line 316 of file tree-mutator-collection-binding.hpp.
|
private |
Definition at line 309 of file tree-mutator-collection-binding.hpp.
|
inlineoverridevirtual |
Definition at line 328 of file tree-mutator-collection-binding.hpp.
|
inlineoverridevirtual |
fabricate a new element, based on the given specification (GenNode), and insert it at current position into the target sequence.
Definition at line 340 of file tree-mutator-collection-binding.hpp.
|
inlineoverridevirtual |
Definition at line 352 of file tree-mutator-collection-binding.hpp.
|
inlineoverridevirtual |
ensure the next recorded source element matches on a formal level with given spec
Definition at line 360 of file tree-mutator-collection-binding.hpp.
|
inlineoverridevirtual |
skip next pending src element, causing this element to be discarded
Definition at line 373 of file tree-mutator-collection-binding.hpp.
|
inlineoverridevirtual |
accept existing element, when matching the given spec
Definition at line 386 of file tree-mutator-collection-binding.hpp.
|
inlineoverridevirtual |
locate designated element and accept it at current position
Definition at line 404 of file tree-mutator-collection-binding.hpp.
|
inlineoverridevirtual |
repeatedly accept, until after the designated location
Definition at line 421 of file tree-mutator-collection-binding.hpp.
References GenNode::matches().
Here is the call graph for this function:
|
inlineoverridevirtual |
locate element already accepted into the target sequence and assign the designated payload value to it.
Definition at line 456 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 480 of file tree-mutator-collection-binding.hpp.
References GenNode::idi.
|
inlineoverridevirtual |
verify all our pending (old) source elements where mentioned.
Definition at line 494 of file tree-mutator-collection-binding.hpp.
|
private |
Definition at line 311 of file tree-mutator-collection-binding.hpp.
|
private |
Definition at line 312 of file tree-mutator-collection-binding.hpp.
Inheritance diagram for ChildCollectionMutator< PAR, BIN >:
Collaboration diagram for ChildCollectionMutator< PAR, BIN >: