50#ifndef LIB_DIFF_TREE_MUTATOR_GEN_NODE_BINDING_H
51#define LIB_DIFF_TREE_MUTATOR_GEN_NODE_BINDING_H
89 : PAR(
std::forward<PAR>(chain))
90 , targetObj_(targetObj)
102 return PAR::injectNew (spec);
114 return PAR::assignElm (spec);
119 inline Builder<ObjectTypeHandler<MUT>>
123 return Builder<ObTyHa>{ObTyHa {targetTree, move(chain)}};
148 auto rawBinding = this->attach (collection (accessChildren(targetTree)))
149 .
attach (collection (accessAttribs(targetTree))
150 .isApplicableIf ([](
GenNode const& spec) ->
bool
155 return filterObjectTypeAttribute(targetTree, move(rawBinding));
void setType(string const &newTypeID)
Helper to deal with the magic "object type" attribute.
ObjectTypeHandler(Rec::Mutator &targetObj, PAR &&chain)
Rec::Mutator & targetObj_
virtual bool assignElm(GenNode const &spec) override
virtual bool injectNew(GenNode const &spec) override
Generic building block for tree shaped (meta)data structures.
RecordSetup< GenNode >::Storage Storage
Storage & accessAttribs(Rec::Mutator &targetTree)
Builder< ObjectTypeHandler< MUT > > filterObjectTypeAttribute(Rec::Mutator &targetTree, Builder< MUT > &&chain)
Storage & accessChildren(Rec::Mutator &targetTree)
Implementation namespace for support and library code.
generic data element node within a tree
Builder-DSL to create and configure a concrete TreeMutator.
auto attach(BIN &&collectionBindingSetup)
set up a binding to a structure of "child objects", implemented through a typical STL container
Special binding implementation for lib::diff::TreeMutator, allowing to map tree diff operations onto ...
Customisable intermediary to abstract generic tree mutation operations.