Lumiera
0.pre.03
»edit your freedom«
|
Go to the source code of this file.
Actually defining a command and binding it to execution parameters.
While the header command.hpp contains everything needed for executing commands and referring to them, this more heavy-weight header is needed when defining the concrete operations to be encapsulated into a command. To create a command, you need to provide three functions (the actual operation, the undo operation and for capturing undo state prior to invoking the operation).
For actually providing these operations, the client is expected to call the definition functions in a chained manner ("fluent interface"). When finally all the required information is available, a command prototype object is built and registered with the CommandRegistry. From this point on, the corresponding Command (frontend object) can be accessed directly by ID (and only relying on the header command.hpp).
In addition to the bare definition, it is possible to provide a binding for the command's parameters immediately during the command definition. Of course it's also possible (and indeed this is the standard case) to provide these concrete arguments just immediately prior to invoking the command.
Definition in file command-def.hpp.
#include "lib/error.hpp"
#include "lib/nocopy.hpp"
#include "include/logging.h"
#include "lib/symbol.hpp"
#include "steam/control/command.hpp"
#include "steam/control/command-impl.hpp"
#include "steam/control/command-registry.hpp"
#include "steam/control/command-signature.hpp"
#include "steam/control/command-mutation.hpp"
#include "steam/control/argument-tuple-accept.hpp"
#include "lib/meta/function.hpp"
#include "lib/meta/typelist.hpp"
#include "lib/meta/typelist-manip.hpp"
#include "lib/meta/tuple-helper.hpp"
#include "lib/util.hpp"
#include <memory>
#include <functional>
Classes | |
struct | BasicDefinition< SIG > |
struct | BuildUndoDefType< U_SIG > |
type re-binding helper: create a suitable UndoDefinition type, based on the UndoSignature template instance given as parameter More... | |
class | CommandDef |
Helper class used solely for defining a Command-Object. More... | |
struct | CompletedDefinition< SIG > |
struct | UndoDefinition< SIG, MEM > |
Typedefs | |
using | Activation = function< Command &(ImplInstance &&)> |
using | ImplInstance = shared_ptr< CommandImpl > |
< helpers for building up a command definition | |
Namespaces | |
steam | |
Steam-Layer implementation namespace root. | |
steam::control | |
Steam-Layer dispatcher, controller and administrative facilities. | |