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

Go to the source code of this file.

Description

Service to support forming and invocation of command instances for use by the UI.

A Proc-Layer command is a functor, which can be parametrised with concrete arguments. Typically, these arguments are to be picked up from the actual usage context in the GUI. This creates the specific twist that possible command instances for invocation can and will be formed during an extended time period, non-deterministically – since the actual context depends on the user interactions. Within the UI, there is a dedicated mechanism to form such command invocations similar to forming sentences of a language (with subject, predication and possibly some further objects). The UI manages several InteractionState instances to observe and pick up contextual state, finally leading to a complete parametrisation of a command. The CommandInstanceManager is a service to support this process; it prepares command instances and provides dedicated instance IDs, which can be stored in the UI and later used to retrieve those instances for invocation. These IDs are created by decorating a base command ID, allowing for several competing invocations to exist at the same time. When finally a given invocation is about to happen, a corresponding registration handle is transfered to the ProcDispatcher, where it is enqueued for execution.

lifecycle
There CommandInstanceManager is maintained by the SessionCommandService, which in turn is installed and removed by the implementation within ProcDispatcher. Its lifecycle is thus tied to the opening / closing of the Proc-Layer interface, as dictated by the Session lifecycle. When the current session is closed, all command instances "underway" will thus be discarded.
See also
command-setup.cpp service implementation
command.hpp
command-def.hpp
command-setup.hpp
session-command-service.hpp
CommandInstanceManager_test

Definition in file command-instance-manager.hpp.

#include "lib/error.hpp"
#include "lib/nocopy.hpp"
#include "proc/control/command.hpp"
#include "proc/control/command-dispatch.hpp"
#include "lib/diff/gen-node.hpp"
#include "lib/symbol.hpp"
#include <unordered_map>
#include <string>

Classes

class  CommandInstanceManager
 Maintain a current command instance for parametrisation. More...
 

Namespaces

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