Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
command-def.hpp File Reference

Go to the source code of this file.

Description

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.

See also
Command
Mutation
CommandClosure
ProcDispatcher
CommandBasic_test simple usage example

Definition in file command-def.hpp.

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 More...
 

Namespaces

 proc
 Proc-Layer implementation namespace root.
 
 proc::control
 Proc-Layer dispatcher, controller and administrative facilities.
 
 proc::control::stage
 

Class Documentation

struct proc::control::stage::BuildUndoDefType
Class Members
typedef UndoDefinition
< typename OperateSig,
typename Memento >
Type
+ Collaboration diagram for BuildUndoDefType< U_SIG >: