Lumiera  0.pre.03
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. As an object, CoreService encases the heart of the UI-Bus, the Nexus, and acts as "PImpl" for the gui::UiBus front-end.

Definition at line 114 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()

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

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

References CoreService::~CoreService().

+ Here is the call graph for this function:

◆ ~CoreService()

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

Referenced by CoreService::CoreService().

+ Here is the caller graph for this function:

Member Function Documentation

◆ act()

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 124 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:

◆ note()

virtual void note ( ID  subject,
GenNode const &  mark 

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

subjectthe endpoint-ID 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 131 of file core-service.hpp.

References StateRecorder::recordState().

+ Here is the call graph for this function:

◆ getStateManager()

StateManager& getStateManager ( )

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

References CoreService::stateRecorder_.

Member Data Documentation

◆ uiBusBackbone_

Nexus uiBusBackbone_

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

◆ stateRecorder_

StateRecorder stateRecorder_

Definition at line 120 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: