37 #ifndef CONTROL_COMMAND_SIMPLE_CLOSURE_H 38 #define CONTROL_COMMAND_SIMPLE_CLOSURE_H 67 template<
typename SIG>
74 using ArgTuple =
typename ArgHolder::ArgTuple;
75 using Args =
typename lib::meta::RebindTupleTypes<ArgTuple>::Seq;
90 return arguments_->isValid();
131 throw err::State{
"Lifecycle error: can't bind functor, " 132 "command arguments not yet provided" 133 , LERR_(UNBOUND_ARGUMENTS)};
135 arguments_->invoke(func);
140 operator string()
const override 142 return "Command-Closure{ arguments=" 143 + (arguments_->isValid()? string(*arguments_) :
"unbound")
169 if (oAh.arguments_->isValid())
170 arguments_.template create<ArgHolder> (*oAh.arguments_);
183 bool empty ()
const {
return !arguments_->isValid(); }
191 arguments_.template create<ArgHolder> (argTup);
197 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.