Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
core-service.hpp
Go to the documentation of this file.
1/*
2 CORE-SERVICE.hpp - service to address the application core from the UI
3
4 Copyright (C)
5 2015, Hermann Vosseler <Ichthyostega@web.de>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12*/
13
14
75#ifndef STAGE_CTRL_CORE_SERVICE_H
76#define STAGE_CTRL_CORE_SERVICE_H
77
78
79#include "lib/error.hpp"
80#include "lib/nocopy.hpp"
81#include "lib/idi/entry-id.hpp"
82#include "lib/diff/gen-node.hpp"
86#include "stage/ctrl/nexus.hpp"
87
88
89namespace stage {
90namespace ctrl{
91
93 using lib::diff::Rec;
94
95
106 : public BusTerm
108 {
109
112
113
114 virtual void
115 act (GenNode const& command) override
116 {
117 SessionCommand::facade().trigger (command.idi.getSym(), command.data.get<Rec>());
118 }
119
120
121 virtual void
122 note (ID subject, GenNode const& stateMark) override
123 {
124 stateRecorder_.recordState (subject, stateMark);
125 }
126
127
128 public:
129 explicit
131 : BusTerm(identity, uiBusBackbone_)
132 , uiBusBackbone_{*this}
133 , stateRecorder_{*this}
134 {
135 INFO (stage, "UI-Backbone operative.");
136 }
137
138 ~CoreService();
139
140
143 {
144 return stateRecorder_;
145 }
146 };
147
148
149
150}} // namespace stage::ctrl
151#endif /*STAGE_CTRL_CORE_SERVICE_H*/
Attachment point to the UI-Bus.
object-like record of data.
Definition record.hpp:142
string const & getSym() const
Definition entry-id.hpp:169
connection point at the UI-Bus.
Definition bus-term.hpp:98
EntryID const & ID
Definition bus-term.hpp:107
Attachment point to »central services« within the UI-Bus.
CoreService(ID identity=lib::idi::EntryID< CoreService >())
virtual void act(GenNode const &command) override
prepare or trigger invocation of a command.
virtual void note(ID subject, GenNode const &stateMark) override
capture and record a "state mark" for later replay for restoring UI state.
StateManager & getStateManager()
Central hub of the UI-Bus.
Definition nexus.hpp:70
Interface: handling of persistent interface state.
Simple map based implementation of the PresentationStateManager interface.
void recordState(ID uiElm, StateMark stateMark)
Interface for the operating facility (CoreService) to feed state mark messages to be remembered.
Global access point to invoke commands and cause edit operations within the Session.
static lib::Depend< SessionCommand > facade
static storage for the facade access front-end
Any copy and copy construction prohibited.
Definition nocopy.hpp:38
Bare symbolic and hash ID used for accounting of asset like entries.
Lumiera error handling (C++ interface).
Generic building block for tree shaped (meta)data structures.
Lumiera GTK UI implementation root.
Definition guifacade.cpp:37
Core hub and routing table of the UI-Bus.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Major public Interface to the Session subsystem of Lumiera GUI.
Implementation of the PresentationStateManager interface through associative (key-value) store.
generic data element node within a tree
Definition gen-node.hpp:224
typed symbolic and hash ID for asset-like position accounting.
Definition entry-id.hpp:219