38 #ifndef LIB_DIFF_TREE_MUTATOR_LISTENER_BINDING_H 39 #define LIB_DIFF_TREE_MUTATOR_LISTENER_BINDING_H 74 template<
class PAR,
typename LIS,
bool assign =false>
79 bool triggered_ =
false;
82 trigger(
bool relevant =
true)
90 : PAR(std::forward<PAR>(chain))
91 , changeListener_{functor}
110 bool injectNew (Elm elm)
override { trigger();
return PAR::injectNew (elm); }
111 bool findSrc (Elm elm)
override { trigger();
return PAR::findSrc (elm); }
112 void skipSrc (Elm elm)
override { trigger(); PAR::skipSrc (elm); }
113 bool assignElm (Elm elm)
override { trigger(assign);
return PAR::assignElm (elm); }
121 template<
typename LIS>
123 Builder<PAR>::onSeqChange (LIS changeListener)
127 return chainedBuilder<Detector4StructuralChanges<PAR,LIS>> (changeListener);
134 template<
typename LIS>
136 Builder<PAR>::onLocalChange (LIS changeListener)
140 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