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

Go to the source code of this file.

Description

Metaprogramming helpers for deriving the precise function signatures necessary to implement a given command.

Basically, commands can be implemented by arbitrary functions, but the signatures of the operation function, the undo function and the undo state capturing function are required to obey fixed relationships. Thus, at various stages of the command definition, we need to accept functor objects with a very specific and predetermined signature, thus allowing for strict type checking by the compiler.

Relation of function signatures (MEM = type of the "memento" for Undo)
  • operation: void(P1,..PN)
  • captureUndo: MEM(P1,..PN)
  • undoOperation void(P1,..PN,MEM)
  • bind takes the arguments:(P1,..PN)
See also
Command
CommandDef

Definition in file command-signature.hpp.

#include "lib/meta/function.hpp"
#include "lib/meta/typelist.hpp"
#include "lib/meta/typelist-manip.hpp"
#include "lib/meta/typeseq-util.hpp"
#include <functional>

Classes

struct  UndoSignature< SIG >::Case< RET, ARG >
 Case1: defining the Undo-Capture function. More...
 
struct  UndoSignature< SIG >::Case< void, ARG >
 Case2: defining the actual Undo function. More...
 
class  CommandSignature< SIG, MEM >
 Metaprogramming helper for building Command function signatures. More...
 
class  UndoSignature< SIG >
 Type analysis helper template. More...
 

Namespaces

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

Class Documentation

struct proc::control::UndoSignature::Case
Class Members
typedef RET Memento
typedef typename Append< ARG,
Memento >::List
ExtendedArglist
typedef typename Types
< ExtendedArglist >::Seq
ExtendedArgs
typedef typename
FunctionTypedef< void, ARG >
::Sig
OperateSig
typedef typename
FunctionTypedef< Ret, ARG >
::Sig
CaptureSig
typedef typename
FunctionTypedef< void,
ExtendedArgs >::Sig
UndoOp_Sig
+ Collaboration diagram for UndoSignature< SIG >::Case< RET, ARG >:
struct proc::control::UndoSignature::Case< void, ARG >
Class Members
typedef typename List Args
typedef typename SplitLast
< Args >::Type
Memento
typedef typename SplitLast
< Args >::List
OperationArglist
typedef typename Types
< OperationArglist >::Seq
OperationArgs
typedef typename
FunctionTypedef< void,
OperationArgs >::Sig
OperateSig
typedef typename
FunctionTypedef< Ret,
OperationArgs >::Sig
CaptureSig
typedef typename
FunctionTypedef< void, ARG >
::Sig
UndoOp_Sig
+ Collaboration diagram for UndoSignature< SIG >::Case< void, ARG >: