59#ifndef CONTROL_COMMAND_H
60#define CONTROL_COMMAND_H
89 using std::shared_ptr;
118 , lib::Handle<CommandImpl>
149 template<
typename...TYPES>
201 operator
string()
const;
241 template<
typename...TYPES>
270#define _FAILSAFE_COMMAND_QUERY(_ID_, _QUERY_) \
273 return Command::get(_ID_)._QUERY_; \
275 catch(lumiera::error::Invalid&) \
295#undef _FAILSAFE_COMMAND_QUERY
Implementation helper to bind Steam-Layer commands with arbitrary argument tuples.
Mixin-templates providing arbitrary function call operators and argument binding functions.
Token or Atom with distinct identity.
object-like record of data.
Helper Template for control::Command, mix-in complete set of bind(...) functions.
Helper class used solely for defining a Command-Object.
Steam-Layer Command implementation.
Handle object representing a single Command instance to be used by client code.
Command(Command &&)=default
ExecResult execSync()
invoke using a default "synchronous" execution pattern
Command & bindArg(std::tuple< TYPES... > const &)
void duplicate_detected(Symbol) const
HandlingPattern::ID setHandlingPattern(HandlingPattern::ID)
define a handling pattern to be used by default
friend bool operator<(Command const &, Command const &)
allow for sets and associative containers
Command(Command const &)=default
static Command maybeGetNewInstance(Symbol cmdID)
try to access an existing command definition and immediately create a new clone copy by calling newIn...
static bool defined(Symbol cmdID)
static size_t definition_count()
static Command fetchDef(Symbol cmdID)
friend bool operator==(Command const &, Command const &)
Command()
undefined command
Command & operator=(Command &&)=default
Command & unbind()
discard any argument data previously bound.
void activate(shared_ptr< CommandImpl > &&, Symbol cmdID=0)
void setArguments(Arguments &)
Command newInstance() const
create independent (anonymous) clone copy of this command
Symbol getID() const noexcept
static Command get(Symbol cmdID)
Access existing command for use.
HandlingPattern::ID getDefaultHandlingPattern() const
static bool remove(Symbol cmdID)
Command storeDef(Symbol newCmdID) const
create a clone definition
static size_t instance_count()
Result (Status) of command execution.
Interface: Operation Skeleton how to invoke or undo a command.
#define _FAILSAFE_COMMAND_QUERY(_ID_, _QUERY_)
#define LUMIERA_ERROR_DECLARE(err)
Forward declare an error constant.
Lumiera error handling (C++ interface).
Generic building block for tree shaped (meta)data structures.
A generic opaque handle to an implementation entity, including lifecycle management.
Pre-defined command execution skeletons.
Implementation namespace for support and library code.
Lumiera public interface.
bool operator!=(Command const &c1, Command const &c2)
Steam-Layer implementation namespace root.
Basic set of definitions and includes commonly used together.
Marker types to indicate a literal string and a Symbol.
Metaprogramming with tuples-of-types and the std::tuple record.