From be2179ea8153da799e5e62464b81974381afe639 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sat, 6 Feb 2016 16:29:06 +0100 Subject: [PATCH] command-closure-design(#301): better naming of implementation classes Seems this was part of the confusion when looking at the inheritance graph: Names where almost reversed to the meaning. the ArgumentHolder was *not* the argument holder, but the top level closure. And the class "Closure" was not "the" Closure, but just the argument holder. ;-) --- src/proc/control/command-closure.hpp | 28 ++++----- .../control/command-impl-clone-builder.hpp | 6 +- src/proc/control/command-impl.cpp | 59 ------------------- src/proc/control/command-impl.hpp | 25 +++++--- src/proc/control/command-registry.hpp | 12 ++-- ...-holder.hpp => command-storage-holder.hpp} | 47 ++++++++------- src/proc/control/command.cpp | 4 +- src/proc/control/memento-tie.hpp | 2 +- tests/45controller.tests | 30 +++++----- .../control/argument-tuple-accept-test.cpp | 2 +- .../proc/control/command-argument-test.cpp | 20 +++---- .../control/command-clone-builder-test.cpp | 2 +- .../proc/control/command-equality-test.cpp | 10 ++-- .../proc/control/command-mutation-test.cpp | 8 +-- 14 files changed, 104 insertions(+), 151 deletions(-) delete mode 100644 src/proc/control/command-impl.cpp rename src/proc/control/{command-argument-holder.hpp => command-storage-holder.hpp} (86%) diff --git a/src/proc/control/command-closure.hpp b/src/proc/control/command-closure.hpp index 21aa47cdd..42faa71c2 100644 --- a/src/proc/control/command-closure.hpp +++ b/src/proc/control/command-closure.hpp @@ -29,9 +29,9 @@ ** ** Most of the command machinery accesses this function closure through the generic ** interface CmdClosure, while, when defining a command, subclasses typed to the specific - ** function arguments are created. Especially, there is an ArgumentHolder template, - ** which is used to define the storage for the concrete arguments. This ArgumentHolder - ** internally contains an Closure instance (where SIG is the signature of the + ** function arguments are created. Especially, there is an StorageHolder template, + ** which is used to define the storage for the concrete arguments. This StorageHolder + ** internally contains an OpClosure instance (where SIG is the signature of the ** actual command operation function), which implements the invocation of the ** operation function with the stored argument tuple. ** @@ -44,9 +44,9 @@ ** Later on, any command needs to be made ready for execution by binding it to a specific ** execution environment, which especially includes the target objects to be mutated by the ** command. Effectively, this means "closing" the Mutation (and UNDO) functor(s)) with the - ** actual function arguments. These arguments are stored embedded within an ArgumentHolder, - ** which thereby acts as closure. Besides, the ArgumentHolder also has to accommodate for - ** storage holding the captured UNDO state (memento). Internally the ArgumentHolder + ** actual function arguments. These arguments are stored embedded within an StorageHolder, + ** which thereby acts as closure. Besides, the StorageHolder also has to accommodate for + ** storage holding the captured UNDO state (memento). Internally the StorageHolder ** has to keep track of the actual types, thus allowing to re-construct the concrete ** function signature when closing the Mutation. ** @@ -222,7 +222,7 @@ namespace control { template - class Closure + class OpClosure : public AbstractClosure { using Args = typename FunctionSignature< function >::Args; @@ -235,7 +235,7 @@ namespace control { public: typedef Tuple ArgTuple; - Closure (ArgTuple const& args) + OpClosure (ArgTuple const& args) : params_(args) { } @@ -243,7 +243,7 @@ namespace control { PClo createClone (TypedAllocationManager& storageManager) { - return storageManager.create (*this); + return storageManager.create (*this); } /** assign a new parameter tuple to this */ @@ -285,10 +285,10 @@ namespace control { operator string() const override { std::ostringstream buff; - params_.dump (buff << "Closure(" ); + params_.dump (buff << "OpClosure(" ); string dumped (buff.str()); - if (8 < dumped.length()) + if (10 < dumped.length()) // remove trailing comma... return dumped.substr (0, dumped.length()-1) +")"; else @@ -299,13 +299,13 @@ namespace control { bool isValid () const override { return true; } /// Supporting equality comparisons... - friend bool operator== (Closure const& c1, Closure const& c2) { return compare (c1.params_, c2.params_); } - friend bool operator!= (Closure const& c1, Closure const& c2) { return not (c1 == c2); } + friend bool operator== (OpClosure const& c1, OpClosure const& c2) { return compare (c1.params_, c2.params_); } + friend bool operator!= (OpClosure const& c1, OpClosure const& c2) { return not (c1 == c2); } bool equals (CmdClosure const& other) const override { - const Closure* toCompare = dynamic_cast (&other); + const OpClosure* toCompare = dynamic_cast (&other); return (toCompare) && (*this == *toCompare); } diff --git a/src/proc/control/command-impl-clone-builder.hpp b/src/proc/control/command-impl-clone-builder.hpp index e40de13e2..3f68fdcee 100644 --- a/src/proc/control/command-impl-clone-builder.hpp +++ b/src/proc/control/command-impl-clone-builder.hpp @@ -36,7 +36,7 @@ ** ** @see CommandRegistry#createCloneImpl ** @see CommandImpl - ** @see ArgumentHolder#createClone + ** @see StorageHolder#createClone ** @see command-clone-builder-test.cpp ** */ @@ -145,7 +145,7 @@ namespace control { /** to be executed from within the specifically typed context - * of a concrete command ArgumentHolder; allocate a clone copy + * of a concrete command StorageHolder; allocate a clone copy * and then prepare a new UNDO-Functor, which is correctly wired * with the memento holder within this new \em clone closure. * After that point, these prepared parts can be retrieved @@ -173,7 +173,7 @@ namespace control { } - /** after visitation: provide cloned ArgumentHolder, + /** after visitation: provide cloned StorageHolder, * but already stripped down to the generic usage type */ PClo const& clonedClosuere () diff --git a/src/proc/control/command-impl.cpp b/src/proc/control/command-impl.cpp deleted file mode 100644 index 3a8f66e36..000000000 --- a/src/proc/control/command-impl.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* - CommandImpl - Proc-Layer command implementation (top level) - - Copyright (C) Lumiera.org - 2009, Hermann Vosseler - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of - the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -* *****************************************************/ - - -/** @file command-impl.cpp - ** //TODO - ** - ** @see command.hpp - ** @see command-registry.hpp - ** - */ - - -#include "proc/control/command-impl.hpp" -#include "proc/control/command-argument-holder.hpp" -//#include "proc/mobject/mobject-ref.hpp" -//#include "proc/mobject/mobject.hpp" -//#include "proc/mobject/placement.hpp" - -//#include -//using boost::str; - -namespace proc { -namespace control { - - - - /** */ - CommandImpl::~CommandImpl() { } - - - /////////////////////////////////////////TODO: is this impl file actually necessary?? - - - - - - - -}} // namespace proc::control diff --git a/src/proc/control/command-impl.hpp b/src/proc/control/command-impl.hpp index a316c0bf2..41cf81693 100644 --- a/src/proc/control/command-impl.hpp +++ b/src/proc/control/command-impl.hpp @@ -51,7 +51,6 @@ #include #include - #include #include @@ -71,6 +70,14 @@ namespace control { * - command operation functor * - a functor to UNDO the command effect * - closure holding actual parameters and UNDO state + * @remarks the ctor is templated on the concrete type of operation arguments. + * This information is erased (discarded) immediately after construction. + * Usually, CommandImpl instances are created + * [within the registry](\ref CommandRegistry::newCommandImpl()). + * The implementation type of the closure is `StorageHolder` + * @see CmdClosure Closure interface + * @see StorageHolder + * @see Mutation */ class CommandImpl : public lib::BoolCheckableisValid(); + and pClo_->isValid(); } bool canUndo() const ///< state check: has undo state been captured? { - return isValid() && pClo_->isCaptured(); + return isValid() and pClo_->isCaptured(); } operator string() const @@ -236,11 +243,11 @@ namespace control { operator== (CommandImpl const& ci1, CommandImpl const& ci2) { return (ci1.do_ == ci2.do_) -// && (ci1.undo_ == ci2.undo_) // causes failure regularly, due to the missing equality on boost::function. See Ticket #294 - && (ci1.defaultPatt_ == ci2.defaultPatt_) - && (ci1.canExec() == ci2.canExec()) - && (ci1.canUndo() == ci2.canUndo()) - && (ci1.pClo_->equals(*ci2.pClo_)) +// and (ci1.undo_ == ci2.undo_) // causes failure regularly, due to the missing equality on boost::function. See Ticket #294 + and (ci1.defaultPatt_ == ci2.defaultPatt_) + and (ci1.canExec() == ci2.canExec()) + and (ci1.canUndo() == ci2.canUndo()) + and (ci1.pClo_->equals(*ci2.pClo_)) ; } diff --git a/src/proc/control/command-registry.hpp b/src/proc/control/command-registry.hpp index f296b5b41..94165bc02 100644 --- a/src/proc/control/command-registry.hpp +++ b/src/proc/control/command-registry.hpp @@ -40,7 +40,7 @@ ** through the CommandRegistry. ** ** Later on, client code is assumed to re-access the command by ID. It may bind arguments, which are - ** stored in the already allocated ArgumentHolder. (-->Ticket #269). As the Command frontend is a + ** stored in the already allocated StorageHolder. (-->Ticket #269). As the Command frontend is a ** smart-ptr, commands may be copied, stored away and passed on. When finally the ref-count of ** a given definition goes to zero, de-allocation happens automatically. This can't happen for ** a registered command definition though, as a Command instance is stored within the index @@ -65,7 +65,7 @@ #include "proc/control/command.hpp" #include "proc/control/command-signature.hpp" -#include "proc/control/command-argument-holder.hpp" +#include "proc/control/command-storage-holder.hpp" #include "lib/typed-allocation-manager.hpp" #include @@ -238,7 +238,7 @@ namespace control { // derive the storage type necessary // to hold the command arguments and UNDO memento typedef typename UndoSignature::Memento Mem; - typedef ArgumentHolder Arguments; + typedef StorageHolder Arguments; shared_ptr pArg (allocator_.create()); @@ -250,10 +250,10 @@ namespace control { /** create an allocation for holding a clone of the given CommandImpl data. * This is a tricky operation, as the CommandImpl after construction erases the - * specific type information pertaining the ArgumentHolder. But this specific + * specific type information pertaining the StorageHolder. But this specific * type information is vital for determining the exact allocation size for - * the clone ArgumentHolder. The only solution is to delegate the cloning - * of the arguments down into the ArgumentHolder, passing a reference + * the clone StorageHolder. The only solution is to delegate the cloning + * of the arguments down into the StorageHolder, passing a reference * to the memory manager for allocating the clone. Actually, we perform * this operation through the help of a visitor, which re-gains the * complete type context and prepares the necessary clone objects; diff --git a/src/proc/control/command-argument-holder.hpp b/src/proc/control/command-storage-holder.hpp similarity index 86% rename from src/proc/control/command-argument-holder.hpp rename to src/proc/control/command-storage-holder.hpp index 221e787a1..90265932f 100644 --- a/src/proc/control/command-argument-holder.hpp +++ b/src/proc/control/command-storage-holder.hpp @@ -1,5 +1,5 @@ /* - COMMAND-ARGUMENT-HOLDER.hpp - specifically typed container for storage of command arguments + COMMAND-STORAGE-HOLDER.hpp - specifically typed container for storage of command arguments Copyright (C) Lumiera.org 2009, Hermann Vosseler @@ -21,8 +21,10 @@ */ -/** @file command-argument-holder.hpp +/** @file command-storage-holder.hpp ** A passive container record holding the actual command arguments & UNDO state. + ** Effectively, this is the top level CmdClosure Implementation, which in turn + ** delegates to sub-closures for the operation arguments and for UNDO management. ** While all command objects themselves have a common type (type erasure), ** the actual argument tuple and the state memento for UNDO can't. Especially, ** the size of arguments and memento will depend on their respective types. @@ -39,8 +41,8 @@ -#ifndef CONTROL_COMMAND_ARGUMENT_HOLDER_H -#define CONTROL_COMMAND_ARGUMENT_HOLDER_H +#ifndef CONTROL_COMMAND_STORAGE_HOLDER_H +#define CONTROL_COMMAND_STORAGE_HOLDER_H #include "lib/typed-allocation-manager.hpp" #include "proc/control/command-closure.hpp" @@ -59,16 +61,16 @@ namespace control { using std::string; - namespace { // empty state marker objects for ArgumentHolder + namespace { // empty state marker objects for StorageHolder template struct MissingArguments - : Closure + : OpClosure { - typedef typename Closure::ArgTuple ArgTuple; + typedef typename OpClosure::ArgTuple ArgTuple; MissingArguments () - : Closure (ArgTuple ()) + : OpClosure (ArgTuple ()) { } private: @@ -94,24 +96,25 @@ namespace control { /** - * Specifically typed CmdClosure, which serves for + * This is "the" top level CmdClosure implementation. + * It is a specifically typed CmdClosure, which serves for * actually allocating storage to hold the command arguments * and the UNDO state (memento) for Proc-Layer commands. - * Both the contained components within ArgumentHolder + * Both the contained components within StorageHolder * can be in \em empty state; there are no distinct - * lifecycle limitations. ArgumentHolder is part + * lifecycle limitations. StorageHolder is part * of Proc-Layer command's implementation * and should not be used standalone. */ template - class ArgumentHolder + class StorageHolder : public AbstractClosure { /** copy construction allowed(but no assignment)*/ - ArgumentHolder& operator= (ArgumentHolder const&); + StorageHolder& operator= (StorageHolder const&); - using ArgHolder = Closure; + using ArgHolder = OpClosure; using MemHolder = MementoTie; using ArgumentBuff = InPlaceBuffer>; @@ -193,18 +196,18 @@ namespace control { - /** per default, all data within ArgumentHolder + /** per default, all data within StorageHolder * is set up in \em empty state. Later on, the * command arguments are to be provided by #bind , * whereas the undo functions will be wired by #tie */ - ArgumentHolder () + StorageHolder () : arguments_() , memento_() { } /** copy construction allowed(but no assignment) */ - ArgumentHolder (ArgumentHolder const& oAh) + StorageHolder (StorageHolder const& oAh) : arguments_() , memento_() { @@ -229,7 +232,7 @@ namespace control { bool empty () const { return !arguments_->isValid(); } - /** store a new argument tuple within this ArgumentHolder, + /** store a new argument tuple within this StorageHolder, * discarding any previously stored arguments */ void storeTuple (ArgTuple const& argTup) @@ -274,14 +277,14 @@ namespace control { bool equals (CmdClosure const& other) const { - const ArgumentHolder* toCompare = dynamic_cast (&other); + const StorageHolder* toCompare = dynamic_cast (&other); return (toCompare) && (*this == *toCompare); } /// Supporting equality comparisons... friend bool - operator== (ArgumentHolder const& a1, ArgumentHolder const& a2) + operator== (StorageHolder const& a1, StorageHolder const& a2) { return (a1.arguments_->isValid() == a2.arguments_->isValid()) && (*a1.arguments_ == *a2.arguments_) @@ -291,7 +294,7 @@ namespace control { } friend bool - operator!= (ArgumentHolder const& a1, ArgumentHolder const& a2) + operator!= (StorageHolder const& a1, StorageHolder const& a2) { return not (a1 == a2); } @@ -300,4 +303,4 @@ namespace control { }} // namespace proc::control -#endif +#endif /*CONTROL_COMMAND_STORAGE_HOLDER_H*/ diff --git a/src/proc/control/command.cpp b/src/proc/control/command.cpp index bcea3f989..c4abfcbc6 100644 --- a/src/proc/control/command.cpp +++ b/src/proc/control/command.cpp @@ -109,6 +109,8 @@ namespace control { Command::~Command() { } + CommandImpl::~CommandImpl() { } + @@ -206,7 +208,7 @@ namespace control { /** @note this bit of implementation from CommandRegistry rather * heavily relies on implementation details from CommandImpl and - * the help of CommandImplCloneBuilder and ArgumentHolder. It's + * the help of CommandImplCloneBuilder and StorageHolder. It's * implemented within command.cpp to keep the includes of * the handling patterns clean. */ shared_ptr diff --git a/src/proc/control/memento-tie.hpp b/src/proc/control/memento-tie.hpp index f2cf2dcad..c0ce5db8c 100644 --- a/src/proc/control/memento-tie.hpp +++ b/src/proc/control/memento-tie.hpp @@ -68,7 +68,7 @@ namespace control { * Binding together state capturing and execution of the undo operation. * MementoTie itself is a passive container object with a very specific type, * depending on the type of the operation arguments and the type of the memento. - * It is to be allocated within the ArgumentHolder of the command, thereby wrapping + * It is to be allocated within the StorageHolder of the command, thereby wrapping * the undo and capture function, setting up the necessary bindings and closures for * allowing them to cooperate behind the scenes to carry out the UNDO functionality. * On construction, the UndoMutation functor retrieves the wired up functions, diff --git a/tests/45controller.tests b/tests/45controller.tests index c79ef6d99..879294067 100644 --- a/tests/45controller.tests +++ b/tests/45controller.tests @@ -11,26 +11,26 @@ END TEST "Argument & Memento handling" CommandArgument_test <. -out: would be serialised.....Command-State. arguments=Closure\(\), ·noUNDO·. -out: would be serialised.....Command-State. arguments=Closure\(.\), ·noUNDO·. -out: would be serialised.....Command-State. arguments=Closure\(.,.+s.*\), ·noUNDO·. -out: would be serialised.....Command-State. arguments=Closure\(.+s.*,glorious,..\), . -out: sizeof\( control::ArgumentHolder, Tracker, int\), Tracker > \) = [0-9]{2,3} -out: Command-State. arguments=Closure\(.+s.*,Lumiera rocks,..\), ·noUNDO·. +out: Command-State. arguments=OpClosure\(\), ·noUNDO·. +out: Command-State. arguments=OpClosure\(.\), ·noUNDO·. +out: Command-State. arguments=OpClosure\(.,.+s.*\), ·noUNDO·. +out: Command-State. arguments=OpClosure\(.+s.*,glorious,..\), . +out: would be serialised.....Command-State. arguments=OpClosure\(\), ·noUNDO·. +out: would be serialised.....Command-State. arguments=OpClosure\(.\), ·noUNDO·. +out: would be serialised.....Command-State. arguments=OpClosure\(.,.+s.*\), ·noUNDO·. +out: would be serialised.....Command-State. arguments=OpClosure\(.+s.*,glorious,..\), . +out: sizeof\( control::StorageHolder, Tracker, int\), Tracker > \) = [0-9]{2,3} +out: Command-State. arguments=OpClosure\(.+s.*,Lumiera rocks,..\), ·noUNDO·. out: capture state... out: captured state: START...Lumiera rocks -out: Command-State. arguments=Closure\(.+s.*,Lumiera rocks,..\), . +out: Command-State. arguments=OpClosure\(.+s.*,Lumiera rocks,..\), . out: invoke operation... out: START...doIt\( Time=.+s.* "Lumiera rocks" rand=.. \) out: undo... memento=START...Lumiera rocks out: START...doIt\( Time=.+s.* "Lumiera rocks" rand=.. \)undoIt\(time=.+s\)----memento-:START...Lumiera rocks out: capture state... -out: modified: Command-State. arguments=Closure\(123ms,unbelievable,..\), . -out: copied : Command-State. arguments=Closure\(.+s.*,Lumiera rocks,..\), . +out: modified: Command-State. arguments=OpClosure\(123ms,unbelievable,..\), . +out: copied : Command-State. arguments=OpClosure\(.+s.*,Lumiera rocks,..\), . out: undo... memento=START...doIt\( Time=.+s.* "Lumiera rocks" rand=.. \)undoIt\(time=.+s\)----memento-:START...Lumiera rocksLumiera rocks out: RESET...undoIt\(time=.+s\)----memento-:START...doIt\( Time=.+s.* "Lumiera rocks" rand=.. \)undoIt\(time=.+s\)----memento-:START...Lumiera rocksLumiera rocks return: 0 @@ -46,8 +46,8 @@ END TEST "Command functor and UNDO functor" CommandMutation_test < A1; - typedef ArgumentHolder A2; - typedef ArgumentHolder A3; - typedef ArgumentHolder A4; + typedef StorageHolder A1; + typedef StorageHolder A2; + typedef StorageHolder A3; + typedef StorageHolder A4; - typedef ArgumentHolder A5; + typedef StorageHolder A5; A1* arg1 = new A1(); tup.manage (arg1); @@ -277,7 +277,7 @@ namespace test { void checkArgumentComparison () { - ArgumentHolder one, two; + StorageHolder one, two; CHECK (one == two); // empty, identically typed argument holders -->equal one.tie(dummyU,dummyC) @@ -324,8 +324,8 @@ namespace test { simulateCmdLifecycle() { typedef void SIG_do(Tracker, Tracker, int); - typedef ArgumentHolder > Args; - typedef MementoTie > MemHolder; + using Args = StorageHolder>; + using MemHolder = MementoTie>; Args args; CHECK (isnil (args)); diff --git a/tests/core/proc/control/command-clone-builder-test.cpp b/tests/core/proc/control/command-clone-builder-test.cpp index 4064dc640..266a877f7 100644 --- a/tests/core/proc/control/command-clone-builder-test.cpp +++ b/tests/core/proc/control/command-clone-builder-test.cpp @@ -58,7 +58,7 @@ namespace test { * This includes verifying sane allocation management. * @note this test covers a very specific low-level perspective, but on an * integration level, involving TypedAllocationManager, CommandRegistry, - * CommandImpl, CmdClosure, ArgumentHolder, UndoMutation, MementoTie. + * CommandImpl, CmdClosure, StorageHolder, UndoMutation, MementoTie. * Closes: Ticket #298 * * @see Command diff --git a/tests/core/proc/control/command-equality-test.cpp b/tests/core/proc/control/command-equality-test.cpp index f7f630145..f0bdf6562 100644 --- a/tests/core/proc/control/command-equality-test.cpp +++ b/tests/core/proc/control/command-equality-test.cpp @@ -26,7 +26,7 @@ #include "proc/control/command-def.hpp" #include "proc/control/command-mutation.hpp" #include "proc/control/argument-erasure.hpp" -#include "proc/control/command-argument-holder.hpp" +#include "proc/control/command-storage-holder.hpp" #include "proc/control/memento-tie.hpp" #include "lib/meta/tuple-helper.hpp" #include "lib/format-cout.hpp" @@ -84,7 +84,7 @@ namespace test { typedef function Fun_u; using ArgTuple = Tuple>; - using ArgHolder = Closure; + using ArgHolder = OpClosure; using MemHolder = MementoTie; } @@ -181,9 +181,9 @@ namespace test { CHECK (a1 == a2); CHECK (a2 == a1); - typedef ArgumentHolder AHImpl; - AHImpl abuff1; - AHImpl abuff2; + typedef StorageHolder Storage; + Storage abuff1; + Storage abuff2; CHECK (abuff1 == abuff2); abuff1.bindArguments(newArgs); CHECK (abuff1 != abuff2); diff --git a/tests/core/proc/control/command-mutation-test.cpp b/tests/core/proc/control/command-mutation-test.cpp index 16482a3f3..425d1c255 100644 --- a/tests/core/proc/control/command-mutation-test.cpp +++ b/tests/core/proc/control/command-mutation-test.cpp @@ -24,7 +24,7 @@ #include "lib/test/run.hpp" #include "lib/test/test-helper.hpp" #include "proc/control/command-mutation.hpp" -#include "proc/control/command-argument-holder.hpp" +#include "proc/control/command-storage-holder.hpp" #include "proc/control/memento-tie.hpp" #include "lib/meta/tuple-helper.hpp" #include "lib/meta/typelist.hpp" @@ -110,7 +110,7 @@ hich is bound to our \c testFunc(int) . // now create a real closure.... Tuple > param = std::make_tuple (23); - Closure close_over (param); + OpClosure close_over (param); CmdClosure& closure (close_over); CHECK (closure); @@ -138,7 +138,7 @@ hich is bound to our \c testFunc(int) . * @note Mutation and UndoMutation are value objects, but they refer * to a common command state, which for this test is modelled * by local variables and which for the real commands is - * contained in a CommandArgumentHolder + * contained in a Command-StorageHolder */ void checkUndoMutation () @@ -157,7 +157,7 @@ hich is bound to our \c testFunc(int) . VERIFY_ERROR (UNBOUND_ARGUMENTS, undoFunctor.captureState(nullClosure) ); Tuple > param; - Closure clo (param); + OpClosure clo (param); CHECK (!mementoHolder); VERIFY_ERROR (MISSING_MEMENTO, undoFunctor (clo) );