![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "lib/diff/tree-mutator.hpp"
Customisable intermediary to abstract mutating operations on arbitrary, hierarchical object-like data.
The TreeMutator exposes two distinct interfaces
Definition at line 136 of file tree-mutator.hpp.
Public Types | |
| using | Handle = PlantingHandle< TreeMutator > |
Static Public Member Functions | |
| static Builder< TreeMutator > | build () |
| DSL: start building a custom adapted tree mutator, where the operations are tied by closures or wrappers into the current implementation context. | |
Public Member Functions | |
| virtual | ~TreeMutator () |
| this is an interface | |
| TreeMutator ()=default | |
| TreeMutator (TreeMutator &&)=default | |
| virtual void | init () |
| initialisation immediately before start of diff application | |
| virtual bool | hasSrc () |
| virtual bool | injectNew (GenNode const &) |
| establish new element at current position | |
| virtual bool | matchSrc (GenNode const &) |
| ensure the next source element matches with given spec | |
| virtual void | skipSrc (GenNode const &) |
| skip next src element and advance abstract source position. | |
| virtual bool | acceptSrc (GenNode const &) |
| accept existing element, when matching the given spec | |
| virtual bool | accept_until (GenNode const &spec) |
| repeatedly accept, until after the designated location | |
| virtual bool | findSrc (GenNode const &) |
| locate designated element and accept it at current position | |
| virtual bool | assignElm (GenNode const &) |
| locate the designated target element (must be already accepted into the target sequence). | |
| virtual bool | mutateChild (GenNode const &, Handle) |
| locate the designated target element and build a suitable sub-mutator for this element into the provided target buffer | |
| virtual bool | completeScope () |
| ensure the scope addressed by this TreeMutator was processed and exhausted without mismatch | |
Additional Inherited Members | |
Private Member Functions inherited from MoveOnly | |
| ~MoveOnly ()=default | |
| MoveOnly ()=default | |
| MoveOnly (MoveOnly &&)=default | |
| MoveOnly (MoveOnly const &)=delete | |
| MoveOnly & | operator= (MoveOnly &&)=delete |
| MoveOnly & | operator= (MoveOnly const &)=delete |
|
virtual |
|
default |
|
default |
| using Handle = PlantingHandle<TreeMutator> |
Definition at line 238 of file tree-mutator.hpp.
|
inlinevirtual |
initialisation immediately before start of diff application
Definition at line 158 of file tree-mutator.hpp.
|
inlinevirtual |
Reimplemented in BlackHoleMutation.
Definition at line 161 of file tree-mutator.hpp.
|
inlinevirtual |
establish new element at current position
true when successfully inserted something Definition at line 170 of file tree-mutator.hpp.
|
inlinevirtual |
ensure the next source element matches with given spec
Definition at line 178 of file tree-mutator.hpp.
|
inlinevirtual |
skip next src element and advance abstract source position.
The argument shall be used to determine applicability
del verb and the skip verb. Since the latter discards garbage left back by find we must not touch the contents, to prevent a SEGFAULT. Thus skipSrc can not match and thus can not return anything. Consequently the del implementation has to use matchSrc explicitly, and the latter must invoke the "layer selector" prior to performing the local match. Definition at line 195 of file tree-mutator.hpp.
|
inlinevirtual |
accept existing element, when matching the given spec
Definition at line 202 of file tree-mutator.hpp.
|
inlinevirtual |
repeatedly accept, until after the designated location
Definition at line 210 of file tree-mutator.hpp.
References Ref::ATTRIBS, and Ref::END.
|
inlinevirtual |
locate designated element and accept it at current position
Definition at line 219 of file tree-mutator.hpp.
|
inlinevirtual |
locate the designated target element (must be already accepted into the target sequence).
Perform an assignment with the given payload value
| when | assignment fails (typically error::Logic) |
Definition at line 231 of file tree-mutator.hpp.
locate the designated target element and build a suitable sub-mutator for this element into the provided target buffer
| error::Fatal | when buffer is insufficient |
false when unable to locate the target Definition at line 246 of file tree-mutator.hpp.
|
inlinevirtual |
ensure the scope addressed by this TreeMutator was processed and exhausted without mismatch
true when all "open ends" are closed and no pending work remains to be done. Definition at line 257 of file tree-mutator.hpp.
|
inlinestatic |
DSL: start building a custom adapted tree mutator, where the operations are tied by closures or wrappers into the current implementation context.
Definition at line 458 of file tree-mutator.hpp.
References TreeMutator::TreeMutator().
Referenced by Record< VAL >::Mutator::buildMutator(), NotificationHub::buildMutator(), TimelineGui::buildMutator(), MarkerWidget::buildMutator(), TimelineController::buildMutator(), TrackPresenter::buildMutator(), DiffTreeMutationListener_test::buildMutator(), ClipPresenter::buildMutator(), MockElm::buildMutator(), TreeMutatorBinding_test::mutateAttribute(), TreeMutatorBinding_test::mutateCollection(), TreeMutatorBinding_test::mutateDummy(), TreeMutatorBinding_test::mutateGenNode(), TreeMutator_test::simpleAttributeBinding(), and TreeMutator_test::simpleCollectionBinding().
Here is the call graph for this function:
Here is the caller graph for this function:
Inheritance diagram for TreeMutator:
Collaboration diagram for TreeMutator: