46 #ifndef CONTROL_COMMAND_SIMPLE_CLOSURE_H 47 #define CONTROL_COMMAND_SIMPLE_CLOSURE_H 76 template<
typename SIG>
83 using ArgTuple =
typename ArgHolder::ArgTuple;
84 using Args =
typename lib::meta::RebindTupleTypes<ArgTuple>::Seq;
99 return arguments_->isValid();
140 throw err::State{
"Lifecycle error: can't bind functor, " 141 "command arguments not yet provided" 142 , LERR_(UNBOUND_ARGUMENTS)};
144 arguments_->invoke(func);
149 operator string()
const override 151 return "Command-Closure{ arguments=" 152 + (arguments_->isValid()? string(*arguments_) :
"unbound")
178 if (oAh.arguments_->isValid())
179 arguments_.template create<ArgHolder> (*oAh.arguments_);
192 bool empty ()
const {
return !arguments_->isValid(); }
200 arguments_.template create<ArgHolder> (argTup);
206 arguments_.template create<ArgHolder>();
Implementation of the concrete (sub)-closure of a command, responsible for invoking the actual comman...
Abstract foundation for building custom allocation managers.
void storeTuple(ArgTuple const &argTup)
store a new argument tuple within this StorageHolder, discarding any previously stored arguments ...
Steam-Layer implementation namespace root.
closure to deal with the actual command operation.
virtual void bindArguments(lib::diff::Rec const ¶mData) override
assign a new set of parameter values to this.
Derived specific exceptions within Lumiera's exception hierarchy.
virtual void bindArguments(Arguments &args) override
assign a new parameter tuple to this
void accept(CommandImplCloneBuilder &) const override
assist with creating clone closure without disclosing concrete type
virtual void invoke(CmdFunctor const &func) override
invoke functor using the stored parameter values
Helper allowing type erasure while holding the actual object inline.
Dummy / proof-of-concept implementation of CmdClosure.
Visitor to support creating a CommandImpl clone.
virtual void unbindArguments() override
discard any argument data and return to empty state
Buffer to place and maintain an object instance privately within another object.
virtual bool isCaptured() const override
does this closure hold captured UNDO state?
virtual bool isValid() const override
does this closure hold a valid argument tuple?
SimpleClosure()
per default, all data within StorageHolder is set up in empty state.
bool canUndo() const
has undo state capturing been invoked?
object-like record of data.