Lumiera
0.pre.03
»edit your freedom«
|
#include "stage/ctrl/bus-term.hpp"
connection point at the UI-Bus.
The UI-Bus is a star shaped network of terminal points, where each tangible UI element holds a BusTerm serving access point. The BusTerm interface exposes the basic "verbs" available for communication within the UI
Definition at line 105 of file bus-term.hpp.
Public Types | |
using | ID = EntryID const & |
Public Member Functions | |
BusTerm (BusTerm &&)=default | |
may be moved, but not copied, due to the embedded identity | |
virtual | ~BusTerm () |
this is an interface More... | |
virtual void | act (GenNode const &command) |
prepare or trigger invocation of a command. 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... | |
virtual void | note (ID subject, GenNode const &mark) |
capture and record a "state mark" for later replay for restoring UI state. More... | |
void | note (GenNode const &mark) |
record state mark from this subject | |
virtual | operator string () const |
Protected Types | |
using | EntryID = lib::idi::BareEntryID |
using | Tangible = stage::model::Tangible |
Protected Member Functions | |
BusTerm (ID identity, BusTerm &attached_to) | |
bool | isShortCircuit (ID) const noexcept |
virtual BusTerm & | routeAdd (ID, Tangible &) |
virtual void | routeDetach (ID) noexcept |
Protected Attributes | |
EntryID | endpointID_ |
BusTerm & | theBus_ |
Additional Inherited Members | |
Private Member Functions inherited from MoveOnly | |
MoveOnly (MoveOnly &&)=default | |
MoveOnly (MoveOnly const &)=delete | |
MoveOnly & | operator= (MoveOnly &&)=delete |
MoveOnly & | operator= (MoveOnly const &)=delete |
|
virtual |
this is an interface
Definition at line 92 of file ui-bus.cpp.
Referenced by Nexus::zombificate().
identity | used for routing towards this BusTerm |
attached_to | the "upstream" connection to the Bus |
Definition at line 149 of file bus-term.hpp.
|
virtual |
prepare or trigger invocation of a command.
command | a GenNode either holding command parameters |
Reimplemented in ZombieNexus, CoreService, and TestNexus.
Definition at line 139 of file ui-bus.cpp.
References BusTerm::act().
Referenced by BusTerm::act(), and Tangible::invoke().
|
virtual |
capture and record a "state mark" for later replay for restoring UI state.
subject | the endpoint-ID of the emitting element |
mark | the actual state update or notification message to be remembered |
Reimplemented in ZombieNexus, CoreService, and TestNexus.
Definition at line 158 of file ui-bus.cpp.
Referenced by Tangible::clearErr(), Tangible::clearMsg(), Tangible::doMark(), Tangible::markErr(), Tangible::markMsg(), Tangible::reset(), Tangible::slotCollapse(), and Tangible::slotExpand().
|
virtual |
route a state update or notification to the given subject.
subject | the endpoint-ID of the element to address |
mark | the actual state update or notification message to be delivered |
true
if the target was known and the mark operation dispatched. Reimplemented in ZombieNexus, TestNexus, and Nexus.
Definition at line 177 of file ui-bus.cpp.
Referenced by BusTerm_test::attachNewBusTerm(), NotificationService::dispatchMsg(), StateRecorder::replayAllState(), and StateRecorder::replayPropertiesOf().
|
virtual |
broadcast a notification message to all currently connected bus terminals.
mark | the actual state update or notification message to be delivered |
Reimplemented in ZombieNexus, TestNexus, and Nexus.
Definition at line 192 of file ui-bus.cpp.
|
virtual |
alter and reshape the designated subject by applying the given diff message.
diff | encapsulated representation of a concrete diff sequence for the target. |
true
if the target was known and the diff was applied without accident, false
if no diff was applied because the desired target is unconnected. lumiera::error::State | when diff application fails due to the target's shape or state being different than implicitly assumed by the given diff. |
Reimplemented in ZombieNexus, TestNexus, and Nexus.
Definition at line 211 of file ui-bus.cpp.
Builder function: establish and wire a new BusTerm.
newNode | the UI-Element corresponding to and using the new BusTerm |
mark
messages addressed to the new node's ID. It is expected that the Tangible in turn will use the returned BusTerm for any up-link communication. Thus, on destruction, the new BusTerm will detach this UI-Bus connection altogether. Definition at line 112 of file ui-bus.cpp.
establish new down-link connection form UI-Bus
node | reference to the [Tangible] to be connected. |
Reimplemented in ZombieNexus, TestNexus, and Nexus.
Definition at line 223 of file ui-bus.cpp.
|
protectedvirtualnoexcept |
disable down-link connection
Reimplemented in ZombieNexus, TestNexus, and Nexus.
Definition at line 234 of file ui-bus.cpp.
|
inlineprotectednoexcept |
circuit breaker, relevant for Nexus shutdown
Definition at line 172 of file bus-term.hpp.