align naming of mutation primitives
...convinced myself to retain an uniform naming scheme, even while the implementation spans several onion-like layers
This commit is contained in:
parent
8bcd37df0a
commit
48f519e785
4 changed files with 20 additions and 15 deletions
|
|
@ -291,19 +291,19 @@ namespace diff{
|
|||
/* == Forwarding: mutation primitives == */
|
||||
|
||||
void
|
||||
skip_src (GenNode const& n)
|
||||
skipSrc (GenNode const& n)
|
||||
{
|
||||
UNIMPLEMENTED("skip matching src element and advance abstract source position");
|
||||
}
|
||||
|
||||
void
|
||||
accept_src (GenNode const& n)
|
||||
acceptSrc (GenNode const& n)
|
||||
{
|
||||
UNIMPLEMENTED("accept existing element");
|
||||
}
|
||||
|
||||
void
|
||||
inject (GenNode const& n)
|
||||
injectNew (GenNode const& n)
|
||||
{
|
||||
UNIMPLEMENTED("inject a new element at current abstract position");
|
||||
}
|
||||
|
|
@ -327,13 +327,13 @@ namespace diff{
|
|||
}
|
||||
|
||||
void
|
||||
locate_and_open_for_mutation (GenNode const& n)
|
||||
locate_and_openSubScope (GenNode const& n)
|
||||
{
|
||||
UNIMPLEMENTED("locate allready accepted element and open recursive sub-scope for mutation");
|
||||
}
|
||||
|
||||
void
|
||||
close_subScope()
|
||||
closeSubScope()
|
||||
{
|
||||
UNIMPLEMENTED("finish and leave sub scope and return to invoking parent scope");
|
||||
}
|
||||
|
|
@ -345,28 +345,28 @@ namespace diff{
|
|||
virtual void
|
||||
ins (GenNode const& n) override
|
||||
{
|
||||
inject (n);
|
||||
injectNew (n);
|
||||
}
|
||||
|
||||
virtual void
|
||||
del (GenNode const& n) override
|
||||
{
|
||||
__expect_in_target(n, "remove");
|
||||
skip_src (n);
|
||||
skipSrc (n);
|
||||
}
|
||||
|
||||
virtual void
|
||||
pick (GenNode const& n) override
|
||||
{
|
||||
__expect_in_target(n, "pick");
|
||||
accept_src (n);
|
||||
acceptSrc (n);
|
||||
}
|
||||
|
||||
virtual void
|
||||
skip (GenNode const& n) override
|
||||
{
|
||||
__expect_further_elements (n);
|
||||
skip_src (n);
|
||||
skipSrc (n);
|
||||
} // assume the actual content has been moved away by a previous find()
|
||||
|
||||
virtual void
|
||||
|
|
@ -402,7 +402,7 @@ namespace diff{
|
|||
virtual void
|
||||
mut (GenNode const& n) override
|
||||
{
|
||||
locate_and_open_for_mutation (n);
|
||||
locate_and_openSubScope (n);
|
||||
|
||||
Rec const& childRecord = child.data.get<Rec>();
|
||||
TRACE (diff, "tree-diff: ENTER scope %s", cStr(childRecord));
|
||||
|
|
@ -415,7 +415,7 @@ namespace diff{
|
|||
TRACE (diff, "tree-diff: LEAVE scope %s", cStr(describeScope()));
|
||||
|
||||
__expect_end_of_scope (n.idi);
|
||||
close_subScope();
|
||||
closeSubScope();
|
||||
__expect_valid_parent_scope (n.idi);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ namespace diff{
|
|||
/* ==== operation API ==== */
|
||||
|
||||
virtual void
|
||||
insertChild (GenNode const& n)
|
||||
injectNew (GenNode const& n)
|
||||
{
|
||||
UNIMPLEMENTED("establish new child node at current position");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ namespace test{
|
|||
|
||||
CHECK (isnil (target));
|
||||
|
||||
mutator.insertChild (ATTRIB1);
|
||||
mutator.injectNew (ATTRIB1);
|
||||
CHECK (!isnil (target));
|
||||
CHECK (target.contains("α = 1"));
|
||||
CHECK (target.verifyEvent("insert","α = 1")
|
||||
|
|
|
|||
|
|
@ -1700,11 +1700,16 @@
|
|||
<node CREATED="1456523612849" ID="ID_729852941" MODIFIED="1456523625883" TEXT="Test zum Aufbau des Interfaces"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1456528418823" ID="ID_1372068793" MODIFIED="1456528421522" TEXT="Bestandteile">
|
||||
<node CREATED="1456528418823" HGAP="30" ID="ID_1372068793" MODIFIED="1457038621939" TEXT="Bestandteile" VSHIFT="-1">
|
||||
<node CREATED="1456528424246" ID="ID_472044094" MODIFIED="1456528428306" TEXT="Selektor"/>
|
||||
<node CREATED="1457038643034" ID="ID_1057400532" MODIFIED="1457038646822" TEXT="abstrakte Position"/>
|
||||
</node>
|
||||
<node CREATED="1457038527402" HGAP="16" ID="ID_1909805079" MODIFIED="1457038617372" TEXT="Mutations-Primitive" VSHIFT="7">
|
||||
<node CREATED="1457038788583" ID="ID_131880970" MODIFIED="1457038801193" TEXT="einheitlich benannt"/>
|
||||
<node CREATED="1457038801733" ID="ID_428479460" MODIFIED="1457038805816" TEXT="auf mehreren Ebenen"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1456528462585" ID="ID_1770521063" MODIFIED="1456528465332" TEXT="Elemente">
|
||||
<node CREATED="1456528462585" HGAP="27" ID="ID_1770521063" MODIFIED="1457038563027" TEXT="Elemente" VSHIFT="12">
|
||||
<node CREATED="1456528472016" ID="ID_315938795" MODIFIED="1456528476211" TEXT="bleiben abstrakt"/>
|
||||
<node CREATED="1456528477415" ID="ID_1931717091" MODIFIED="1456528481850" TEXT="abstrakte "Position"">
|
||||
<node CREATED="1456533135345" ID="ID_1775378899" MODIFIED="1456533178551" TEXT="Problem: wem gehört diese Position">
|
||||
|
|
|
|||
Loading…
Reference in a new issue