better name for nested handle type

This commit is contained in:
Fischlurch 2016-06-09 01:18:21 +02:00
parent ef27c09fa2
commit 37cfdbb7e1
5 changed files with 13 additions and 13 deletions

View file

@ -501,7 +501,7 @@ namespace diff{
/** locate the designated target element and build a suitable
* sub-mutator for this element into the provided target buffer */
virtual bool
mutateChild (GenNode const& spec, TreeMutator::MutatorBuffer targetBuff)
mutateChild (GenNode const& spec, TreeMutator::Handle targetBuff)
{
if (PAR::mutateChild (spec, targetBuff))
return true;

View file

@ -271,7 +271,7 @@
: public AttributeBindingBase<PAR>
{
ASSERT_VALID_SIGNATURE (MUT, void(TreeMutator::MutatorBuffer));
ASSERT_VALID_SIGNATURE (MUT, void(TreeMutator::Handle));
MUT mutatorBuilder_;
@ -287,7 +287,7 @@
* which is assumed to construct a nested TreeMutator into the provided Buffer,
* able to deal with the nested attribute object referred by this binding */
virtual bool
mutateChild (GenNode const& spec, TreeMutator::MutatorBuffer targetBuff) override
mutateChild (GenNode const& spec, TreeMutator::Handle targetBuff) override
{
if (not this->isApplicable(spec))
return PAR::mutateChild(spec, targetBuff);

View file

@ -96,7 +96,7 @@
ASSERT_VALID_SIGNATURE (CTR, Elm (GenNode const&))
ASSERT_VALID_SIGNATURE (SEL, bool(GenNode const&))
ASSERT_VALID_SIGNATURE (ASS, bool(Elm&, GenNode const&))
ASSERT_VALID_SIGNATURE (MUT, bool(Elm&, GenNode::ID const&, TreeMutator::MutatorBuffer))
ASSERT_VALID_SIGNATURE (MUT, bool(Elm&, GenNode::ID const&, TreeMutator::Handle))
Coll& collection;
@ -302,7 +302,7 @@
/** locate the designated target element and build a suitable
* sub-mutator for this element into the provided target buffer */
virtual bool
mutateChild (GenNode const& spec, TreeMutator::MutatorBuffer targetBuff)
mutateChild (GenNode const& spec, TreeMutator::Handle targetBuff)
{
Iter target_found = binding_.locate (spec);
return target_found? binding_.openSub (*target_found, spec.idi, targetBuff)
@ -466,7 +466,7 @@
}
static bool
disable_childMutation (Elm&, GenNode::ID const&, TreeMutator::MutatorBuffer)
disable_childMutation (Elm&, GenNode::ID const&, TreeMutator::Handle)
{
return false;
}

View file

@ -271,7 +271,7 @@ namespace diff{
}
using MutatorBuffer = PlantingHandle<TreeMutator>;
using Handle = PlantingHandle<TreeMutator>;
/** locate the designated target element
* and build a suitable sub-mutator for this element
@ -279,7 +279,7 @@ namespace diff{
* @throw error::Fatal when buffer is insufficient
* @return false when unable to locate the target */
virtual bool
mutateChild (GenNode const&, MutatorBuffer)
mutateChild (GenNode const&, Handle)
{
// do nothing by default
return false;

View file

@ -304,7 +304,7 @@ namespace test{
// implementation of TreeMutator without any further functionality.
InPlaceBuffer<TreeMutator, sizeof(mutator3)> subMutatorBuffer;
TreeMutator::MutatorBuffer placementHandle(subMutatorBuffer);
TreeMutator::Handle placementHandle(subMutatorBuffer);
CHECK (mutator3.mutateChild (SUB_NODE, placementHandle)); // mutateChild
CHECK (not subMutatorBuffer->hasSrc()); // ...this is all we can do here
@ -534,7 +534,7 @@ namespace test{
target.val = render(spec.data);
return true;
})
.buildChildMutator ([&](Data& target, GenNode::ID const& subID, TreeMutator::MutatorBuffer buff) -> bool
.buildChildMutator ([&](Data& target, GenNode::ID const& subID, TreeMutator::Handle buff) -> bool
{
// use our "inside knowledge" to get at the nested scope implementation
VecD& subScope = subScopes[subID];
@ -575,7 +575,7 @@ namespace test{
// rather we invoke the operations on a nested mutator right from here.
InPlaceBuffer<TreeMutator, sizeof(mutator1)> subMutatorBuffer;
TreeMutator::MutatorBuffer placementHandle(subMutatorBuffer);
TreeMutator::Handle placementHandle(subMutatorBuffer);
CHECK (mutator3.mutateChild (SUB_NODE, placementHandle)); // mutateChild
@ -834,7 +834,7 @@ namespace test{
LOG_SETTER ("gamma")
gamma = val;
})
.mutateAttrib("δ", [&](TreeMutator::MutatorBuffer buff)
.mutateAttrib("δ", [&](TreeMutator::Handle buff)
{
// NOTE: we use "implementation inside knowledge" regarding the nested scope,
// which is here represented as TestMutationTarget
@ -887,7 +887,7 @@ namespace test{
// use some suitable size here, not the point in focus for this test
InPlaceBuffer<TreeMutator, BUFF_SIZ> subMutatorBuffer;
TreeMutator::MutatorBuffer placementHandle(subMutatorBuffer);
TreeMutator::Handle placementHandle(subMutatorBuffer);
CHECK (mutator3.mutateChild (ATTRIB_NODE, placementHandle)); // mutateChild