Lumiera  0.pre.03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
CoreService Class Reference

#include "gui/ctrl/core-service.hpp"


Attachment point to »central services« within the UI-Bus.

This special implementation of the [BusTerm] interface receives and handles those messages to be processed by centralised services:

  • commands need to be sent down to Proc-Layer
  • presentation state messages need to be recorded and acted upon.

Definition at line 107 of file core-service.hpp.

Public Member Functions

 CoreService (ID identity=lib::idi::EntryID< CoreService >())
 ~CoreService ()
StateManagergetStateManager ()
- Public Member Functions inherited from BusTerm
 BusTerm (BusTerm &&)=default
 may be moved, but not copied, due to the embedded identity More...
virtual ~BusTerm ()
 this is an interface More...
BusTerm attach (ID, Tangible &newNode)
 Builder function: establish and wire a new BusTerm. More...
virtual bool change (ID subject, MutationMessage &&diff)
 alter and reshape the designated subject by applying the given diff message. More...
ID getID () const
virtual bool mark (ID subject, GenNode const &mark)
 route a state update or notification to the given subject. More...
virtual size_t markAll (GenNode const &mark)
 broadcast a notification message to all currently connected bus terminals. More...
void note (GenNode const &mark)
 record state mark from this subject More...
virtual operator string () const

Private Member Functions

virtual void act (GenNode const &command) override
 prepare or trigger invocation of a command. More...
virtual void note (ID subject, GenNode const &stateMark) override
 capture and record a "state mark" for later replay for restoring UI state. More...
- Private Member Functions inherited from NonCopyable
 NonCopyable ()=default
 NonCopyable (NonCopyable const &)=delete
 ~NonCopyable ()=default
NonCopyableoperator= (NonCopyable const &)=delete

Private Attributes

StateRecorder stateRecorder_
Nexus uiBusBackbone_

Additional Inherited Members

- Public Types inherited from BusTerm
using ID = EntryID const &
- Protected Types inherited from BusTerm
using EntryID = lib::idi::BareEntryID
using Tangible = gui::model::Tangible
- Protected Member Functions inherited from BusTerm
 BusTerm (ID identity, BusTerm &attached_to)
bool isShortCircuit (ID) const noexcept
virtual BusTermrouteAdd (ID, Tangible &)
virtual void routeDetach (ID) noexcept
- Protected Attributes inherited from BusTerm
EntryID endpointID_

Constructor & Destructor Documentation

CoreService ( ID  identity = lib::idi::EntryID<CoreService>())

Definition at line 132 of file core-service.hpp.

Definition at line 88 of file ui-bus.cpp.

Member Function Documentation

virtual void act ( GenNode const &  command)

prepare or trigger invocation of a command.

commanda GenNode either holding command parameters
some commands can simply be invoked right away, but in the general case, a command needs to be prepared with suitable arguments prior to being invoked, which can be a multi-step process. The gui::interact::InteractionState is used to conduct this argument binding process from within the UI. Here, at the UI-Bus interface, we're just interested in the fact that some command is to be bound and invoked. This information is forwarded to the command receiver service, which in turn talks to the proc dispatcher.
no information regarding the origin of this command invocation is captured. If a command needs a subject, this has to be bound as an command argument beforehand.
See also

Reimplemented from BusTerm.

Definition at line 117 of file core-service.hpp.

References GenNode::data, SessionCommand::facade, DataCap::get(), BareEntryID::getSym(), and GenNode::idi.

+ Here is the call graph for this function:

virtual void note ( ID  subject,
GenNode const &  mark 

capture and record a "state mark" for later replay for restoring UI state.

subjectthe [endpoint-ID](BusTerm::endpointID_) of the emitting element
markthe actual state update or notification message to be remembered
relevant changes to presentation state, which are to be recalled and restored later, are emitted from the place they occur, packaged as "state mark" messages. This assumes the presence of some dedicated presentation state manager, attached and listening somewhere at a core service location. Such a core presentation state service has additional shared understanding of the state mark's meaning; it is assumed to track cumulated state, which will be replayed later when it comes to restoring some presentation state.

Reimplemented from BusTerm.

Definition at line 124 of file core-service.hpp.

References StateRecorder::recordState().

+ Here is the call graph for this function:

StateManager& getStateManager ( )

Definition at line 144 of file core-service.hpp.

References CoreService::stateRecorder_.

Member Data Documentation

Nexus uiBusBackbone_

Definition at line 112 of file core-service.hpp.

StateRecorder stateRecorder_

Definition at line 113 of file core-service.hpp.

Referenced by CoreService::getStateManager().

+ Inheritance diagram for CoreService:
+ Collaboration diagram for CoreService:

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