Lumiera
0.pre.03
»edit your freedom«
|
#include "lib/diff/tree-mutator-listener-binding.hpp"
Decorator for TreeMutator bindings, to fire a listener function when the applied diff describes a relevant change.
Changes can be structural, they can be value mutations or child mutations. By convention, all changes pertaining the sequence of children are classified as structural changes. Thus, effectively a structural change incurs usage of the INS
, DEL
, SKIP
or FIND
verbs, which in turn will be translated into the three API operations intercepted here in the basic setup. When value assignments count as "relevant", then we'll also have to intercept the assignElm
API operation. However, the relevance of mutations to child elements is difficult to assess on this level, since we can not see what a nested scope actually does to the mutated child elements.
assign | also trigger on assignments in addition to structural changes (which will always trigger). Defaults to false |
Definition at line 84 of file tree-mutator-listener-binding.hpp.
Public Types | |
using | Elm = GenNode const & |
Public Member Functions | |
Detector4StructuralChanges (LIS functor, PAR &&chain) | |
Detector4StructuralChanges (Detector4StructuralChanges &&)=default | |
~Detector4StructuralChanges () | |
once the diff for this level is completely applied, the TreeMutator will be discarded, and we can fire our change listener at that point. More... | |
bool | assignElm (Elm elm) override |
bool | findSrc (Elm elm) override |
bool | injectNew (Elm elm) override |
void | skipSrc (Elm elm) override |
Private Member Functions | |
void | trigger (bool relevant=true) |
Private Attributes | |
LIS | changeListener_ |
bool | triggered_ = false |
|
inline |
once the diff for this level is completely applied, the TreeMutator will be discarded, and we can fire our change listener at that point.
Definition at line 109 of file tree-mutator-listener-binding.hpp.
References ASSERT_VALID_SIGNATURE.