Lumiera  0.pre.03
»edit your freedom«
session-command-service.hpp
Go to the documentation of this file.
1 /*
2  SESSION-COMMAND-SERVICE.hpp - public service to invoke commands on the session
3 
4  Copyright (C) Lumiera.org
5  2016, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 */
22 
41 #ifndef STEAM_CONTROL_SESSION_COMMAND_SERVICE_H
42 #define STEAM_CONTROL_SESSION_COMMAND_SERVICE_H
43 
44 
49 #include "lib/diff/gen-node.hpp"
50 #include "lib/nocopy.hpp"
51 #include "lib/symbol.hpp"
52 
53 
54 
55 
56 namespace steam {
57 namespace control {
58 
59  using lib::diff::Rec;
60 
61 
62 
63  /***********************************************************/
80  : public SessionCommand
82  {
83  CommandDispatch& dispatcher_;
84  CommandInstanceManager instanceManager_;
85 
86 
87  /* === Interface Lifecycle === */
88 
89  using ServiceInstanceHandle = lumiera::InstanceHandle< LUMIERA_INTERFACE_INAME(lumieraorg_SessionCommand, 0)
91  >;
92  ServiceInstanceHandle serviceInstance_;
93 
94  public:
95  SessionCommandService (CommandDispatch& dispatcherLoopInterface);
96 
97 
98  /* === Implementation of the Facade Interface === */
99 
100  Symbol cycle (Symbol cmdID, string const& invocationID) override;
101  void trigger (Symbol cmdID, Rec const& args) override;
102  void bindArg (Symbol cmdID, Rec const& args) override;
103  void invoke (Symbol cmdID) override;
104  };
105 
106 
107 
108 }} // namespace steam::control
109 #endif /*STEAM_CONTROL_SESSION_COMMAND_SERVICE_H*/
Global access point to invoke commands and cause edit operations within the Session.
Symbol cycle(Symbol cmdID, string const &invocationID) override
start next command cycle and "open" a new anonymous command instance
Interface to abstract the SteamDispatcher&#39;s ability to handle command messages.
Any copy and copy construction prohibited.
Definition: nocopy.hpp:46
Maintain a current command instance for parametrisation.
Service to support forming and invocation of command instances for use by the UI. ...
Actual implementation of the SessionCommand service within the Lumiera Session subsystem.
Steam-Layer implementation namespace root.
Token or Atom with distinct identity.
Definition: symbol.hpp:126
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Marker types to indicate a literal string and a Symbol.
Interface of a service to perform Commands on the session.
Generic building block for tree shaped (meta)data structures.
SessionCommandService(CommandDispatch &dispatcherLoopInterface)
#define LUMIERA_INTERFACE_INAME(name, version)
Construct a type identifier for an interface.
Definition: interface.h:102
A handle template for automatically dealing with interface and plugin registration and deregistration...
object-like record of data.
Definition: record.hpp:150
Major public Interface to the Session subsystem of Lumiera GUI.
void bindArg(Symbol cmdID, Rec const &args) override
void trigger(Symbol cmdID, Rec const &args) override