47 #ifndef LIB_DIFF_TREE_MUTATOR_LISTENER_BINDING_H 48 #define LIB_DIFF_TREE_MUTATOR_LISTENER_BINDING_H 83 template<
class PAR,
typename LIS,
bool assign =false>
88 bool triggered_ =
false;
91 trigger(
bool relevant =
true)
99 : PAR(std::forward<PAR>(chain))
100 , changeListener_{functor}
119 bool injectNew (Elm elm)
override { trigger();
return PAR::injectNew (elm); }
120 bool findSrc (Elm elm)
override { trigger();
return PAR::findSrc (elm); }
121 void skipSrc (Elm elm)
override { trigger(); PAR::skipSrc (elm); }
122 bool assignElm (Elm elm)
override { trigger(assign);
return PAR::assignElm (elm); }
130 template<
typename LIS>
132 Builder<PAR>::onSeqChange (LIS changeListener)
136 return chainedBuilder<Detector4StructuralChanges<PAR,LIS>> (changeListener);
143 template<
typename LIS>
145 Builder<PAR>::onLocalChange (LIS changeListener)
149 return chainedBuilder<Detector4StructuralChanges<PAR,LIS, true>> (changeListener);
#define ASSERT_VALID_SIGNATURE(_FUN_, _SIG_)
Macro for a compile-time check to verify the given generic functors or lambdas expose some expected s...
Decorator for TreeMutator bindings, to fire a listener function when the applied diff describes a rel...
Implementation namespace for support and library code.
~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.
Generic building block for tree shaped (meta)data structures.
Lumiera error handling (C++ interface).
Customisable intermediary to abstract generic tree mutation operations.
generic data element node within a tree