diff --git a/src/proc/control/command-argument-holder.hpp b/src/proc/control/command-argument-holder.hpp index 3248c11ce..2a2226593 100644 --- a/src/proc/control/command-argument-holder.hpp +++ b/src/proc/control/command-argument-holder.hpp @@ -43,7 +43,6 @@ #define CONTROL_COMMAND_ARGUMENT_HOLDER_H #include "lib/typed-allocation-manager.hpp" -#include "proc/control/argument-tuple-accept.hpp" #include "proc/control/command-closure.hpp" #include "proc/control/memento-tie.hpp" #include "lib/opaque-holder.hpp" @@ -105,13 +104,7 @@ namespace control { */ template class ArgumentHolder - : public AcceptArgumentBinding< SIG // to derive the desired bind(..) signature - , ArgumentHolder // target class providing the implementation - , CmdClosure // base class to inherit from - > - -////////////////////////TODO: Ticket #266 -// : public CmdClosure + : public CmdClosure { /** copy construction allowed(but no assignment)*/ ArgumentHolder& operator= (ArgumentHolder const&); @@ -152,7 +145,7 @@ namespace control { virtual void bindArguments (Arguments& args) { if (!arguments_->isValid()) - bindArg(args.get()); + storeTuple (args.get()); else arguments_->bindArguments(args); } @@ -214,7 +207,7 @@ namespace control { /** store a new argument tuple within this ArgumentHolder, * discarding any previously stored arguments */ void - bindArg (ArgTuple const& argTup) + storeTuple (ArgTuple const& argTup) { arguments_.template create (argTup); } diff --git a/tests/components/proc/control/command-argument-test.cpp b/tests/components/proc/control/command-argument-test.cpp index 67ab7e678..a1a2c6562 100644 --- a/tests/components/proc/control/command-argument-test.cpp +++ b/tests/components/proc/control/command-argument-test.cpp @@ -26,6 +26,7 @@ #include "proc/control/command-argument-holder.hpp" #include "lib/scoped-ptrvect.hpp" #include "lib/lumitime-fmt.hpp" +#include "lib/meta/tuple.hpp" #include "lib/util.hpp" #include @@ -52,7 +53,7 @@ namespace test { using lib::test::showSizeof; using lib::test::randTime; - + using namespace lumiera::typelist; @@ -214,13 +215,12 @@ namespace test { for_each (tup, showIt); -////////////////////////TODO: Ticket #266 - arg1->bind (); - arg2->bind (rand() % 10); - arg3->bind (rand() % 10, randTime()); - arg4->bind (rand() % 10, randTime()); + arg1->storeTuple (tuple::makeNullTuple()); + arg2->storeTuple (tuple::make (rand() % 10)); + arg3->storeTuple (tuple::make (rand() % 10, randTime())); + arg4->storeTuple (tuple::make (rand() % 10, randTime())); - arg5->bind (TTime (randTime()), Tstr("glorious"), rand() % 25); + arg5->storeTuple (tuple::make (TTime (randTime()), Tstr("glorious"), rand() % 25)); ASSERT (!arg5->canUndo()); @@ -265,23 +265,23 @@ namespace test { two.memento() = one.memento(); // put the same UNDO state in both ASSERT (one == two); // ...makes them equal again - one.bind (1,2); // verify argument tuple comparison - ASSERT (one != two); + one.storeTuple (tuple::make (1,2)); + ASSERT (one != two); // verify argument tuple comparison ASSERT (two != one); ASSERT (!isnil (one)); ASSERT ( isnil (two)); - two.bind (3,4); + two.storeTuple (tuple::make (3,4)); ASSERT (!isnil (two)); ASSERT (one != two); ASSERT (two != one); - one.bind (1,4); + one.storeTuple (tuple::make (1,4)); ASSERT (!isnil (one)); ASSERT (one != two); ASSERT (two != one); - one.bind (3,4); + one.storeTuple (tuple::make (3,4)); ASSERT (!isnil (one)); ASSERT (one == two); ASSERT (two == one); @@ -308,7 +308,8 @@ namespace test { cout << showSizeof(args) << endl; // store a set of parameter values, later to be used on invocation - args.bind (TTime(randTime()), Tstr("Lumiera rocks"), rand() % 100); + args.storeTuple ( + tuple::make (TTime(randTime()), Tstr("Lumiera rocks"), rand() % 100)); ASSERT (!isnil (args)); cout << args << endl; @@ -351,7 +352,8 @@ namespace test { protocol.seekp(0); protocol << "RESET..."; - args.bind (TTime(Time(123456)), Tstr("unbelievable"), rand() %100); + args.storeTuple ( + tuple::make (TTime(Time(123456)), Tstr("unbelievable"), rand() %100)); cout << "modified: " << args << endl; cout << "copied : " << argsCopy << endl; // holds still the old params & memento