Lumiera  0.pre.03
»edit your freedom«
CoreService Class Reference

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

Description

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 Steam-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 stage::UiBus front-end.

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

Public Member Functions

 CoreService (ID identity=lib::idi::EntryID< CoreService >())
 
StateManagergetStateManager ()
 
- Public Member Functions inherited from BusTerm
 BusTerm (BusTerm &&)=default
 may be moved, but not copied, due to the embedded identity
 
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
 
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 (NonCopyable const &)=delete
 
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 = stage::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_
 
BusTermtheBus_
 

Member Function Documentation

◆ act()

virtual void act ( GenNode const &  command)
inlineoverrideprivatevirtual

prepare or trigger invocation of a command.

Parameters
commanda GenNode either holding command parameters
Remarks
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 stage::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 steam dispatcher.
Note
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
stage::model::Tangible::issueCommand()
steam::control::SessionCommand

Reimplemented from BusTerm.

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

References SessionCommand::facade.

◆ note()

virtual void note ( ID  subject,
GenNode const &  mark 
)
inlineoverrideprivatevirtual

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

Parameters
subjectthe endpoint-ID of the emitting element
markthe actual state update or notification message to be remembered
Remarks
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 BusTerm::BusTerm(), and StateRecorder::recordState().

+ Here is the call graph for this function:
+ Inheritance diagram for CoreService:
+ Collaboration diagram for CoreService:

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