Lumiera  0.pre.03
»edit your freedom«
SessionCommand Class Referenceabstract

#include "include/session-command-facade.h"

Description

Global access point to invoke commands and cause edit operations within the Session.

Any changes to the session are effected by prepared functors bound into a steam::control::Command registration. A command instance will first be outfitted with suitable parameters to define the target and to qualify and elaborate the action, before it can be actually triggered. Commands then go through a queue to be invoked one by one.

The service exposed through this facade offers dedicated support for the standard command cycle, as is typically performed from the UI. Such a usage cycle starts with cycleopening"" a local anonymous clone copy from the global command definition, which is then used in further calls to be outfitted with actual arguments and finally to be handed over to the dispatcher for execution.

Warning
this standard command cycle is intended for single-threaded use from the UI. It is not threadsafe. To the contrary, all operations with globally registered commands are threadsafe.
Remarks
This is a layer separation facade interface. Clients should use the embedded facade factory, which yields a proxy to route any calls through the lumieraorg_SessionCommand interface
Exceptions
lumiera::error::Statewhen interface is not opened
Todo:
as of 2/2021 only the trigger operation is used; if no case for an elaborated command cycle with binding step and deferred invocation shows up, we may consider dropping the other operations
See also
Command system
SessionCommandFunction_test

Definition at line 96 of file session-command-facade.h.

Public Member Functions

virtual void bindArg (Symbol cmdID, lib::diff::Rec const &args)=0
 prepare command invocation: bind the command's arguments
 
virtual Symbol cycle (Symbol cmdID, string const &invocationID)=0
 start next command cycle and "open" a new anonymous command instance
 
virtual void invoke (Symbol cmdID)=0
 trigger invocation of a prepared command
 
virtual void trigger (Symbol cmdID, lib::diff::Rec const &args)=0
 bind the command's arguments and trigger command invocation immediately
 

Static Public Attributes

static lib::Depend< SessionCommandfacade
 static storage for the facade access front-end
 

Friends

class lib::DependencyFactory< SessionCommand >
 

Protected Member Functions

virtual ~SessionCommand ()
 this is an interface
 
+ Inheritance diagram for SessionCommand:
+ Collaboration diagram for SessionCommand:

The documentation for this class was generated from the following files: