diff --git a/src/proc/control/command-closure.hpp b/src/proc/control/command-closure.hpp index b3af1080d..dce2c9e22 100644 --- a/src/proc/control/command-closure.hpp +++ b/src/proc/control/command-closure.hpp @@ -101,7 +101,9 @@ namespace control { virtual bool isValid () const =0; - virtual CmdFunctor bindArguments (CmdFunctor const&) =0; + virtual void bindArguments (Arguments&) =0; + + virtual CmdFunctor closeArguments (CmdFunctor const&) =0; }; @@ -208,7 +210,7 @@ namespace control { * can't be const. */ CmdFunctor - bindArguments (CmdFunctor const& unboundFunctor) + closeArguments (CmdFunctor const& unboundFunctor) { return CmdFunctor (TupleApplicator (params_) .bind ( unboundFunctor.getFun()) ); diff --git a/src/proc/control/command-mutation.hpp b/src/proc/control/command-mutation.hpp index 25fa31bc5..92a5c876b 100644 --- a/src/proc/control/command-mutation.hpp +++ b/src/proc/control/command-mutation.hpp @@ -105,7 +105,7 @@ namespace control { { REQUIRE (!clo_, "Lifecycle error: already closed over the arguments"); REQUIRE (func_, "Param error: not bound to a valid function"); - func_ = cmdClosure.bindArguments(func_); + func_ = cmdClosure.closeArguments(func_); clo_ = &cmdClosure; return *this; } diff --git a/tests/components/proc/control/command-argument-test.cpp b/tests/components/proc/control/command-argument-test.cpp index e50751b77..ab7e8ab22 100644 --- a/tests/components/proc/control/command-argument-test.cpp +++ b/tests/components/proc/control/command-argument-test.cpp @@ -324,9 +324,9 @@ namespace test { typedef function OpFun; // now close all the functions with the stored parameter values... - OpFun bound_doItFun = args.bindArguments (CmdFunctor(doItFun)).getFun(); - OpFun bound_undoFun = args.bindArguments (CmdFunctor(undoFun)).getFun(); - OpFun bound_captFun = args.bindArguments (CmdFunctor(captFun)).getFun(); + OpFun bound_doItFun = args.closeArguments (CmdFunctor(doItFun)).getFun(); + OpFun bound_undoFun = args.closeArguments (CmdFunctor(undoFun)).getFun(); + OpFun bound_captFun = args.closeArguments (CmdFunctor(captFun)).getFun(); protocol.seekp(0); protocol << "START...";