rename the operation "closeArguments", which is more to the point
This commit is contained in:
parent
efd6e99c99
commit
b6246cbb10
3 changed files with 8 additions and 6 deletions
|
|
@ -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<SIG> (params_)
|
||||
.bind ( unboundFunctor.getFun<SIG>()) );
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -324,9 +324,9 @@ namespace test {
|
|||
typedef function<void()> OpFun;
|
||||
|
||||
// now close all the functions with the stored parameter values...
|
||||
OpFun bound_doItFun = args.bindArguments (CmdFunctor(doItFun)).getFun<void()>();
|
||||
OpFun bound_undoFun = args.bindArguments (CmdFunctor(undoFun)).getFun<void()>();
|
||||
OpFun bound_captFun = args.bindArguments (CmdFunctor(captFun)).getFun<void()>();
|
||||
OpFun bound_doItFun = args.closeArguments (CmdFunctor(doItFun)).getFun<void()>();
|
||||
OpFun bound_undoFun = args.closeArguments (CmdFunctor(undoFun)).getFun<void()>();
|
||||
OpFun bound_captFun = args.closeArguments (CmdFunctor(captFun)).getFun<void()>();
|
||||
|
||||
protocol.seekp(0);
|
||||
protocol << "START...";
|
||||
|
|
|
|||
Loading…
Reference in a new issue