![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "stage/ctrl/nexus.hpp"
Central hub of the UI-Bus.
This special implementation of the [BusTerm] interface maintains a routing table and manages the connections to individual UI-Elements. The nexus relies on a dedicated (up)link to the [CoreService] to handle command invocation and presentation state. This is implemented by wiring the aforementioned CoreService terminal as "up-link", while actually defining special handling overrides for all other kinds of messages. The purpose of the Nexus is to route all these other kinds of messages.
Thus, the "uplink", which is in fact the CoreService, is left to handle
act* messages (command invocation)the *note* messages (upstream state change notification)
Public Member Functions | |
| size_t | size () const |
| Nexus (BusTerm &uplink_to_CoreService, ID identity=lib::idi::EntryID< Nexus >()) | |
| ~Nexus () | |
Public Member Functions inherited from BusTerm | |
| virtual | ~BusTerm () |
| this is an interface | |
| virtual void | act (GenNode const &command) |
| prepare or trigger invocation of a command. | |
| virtual void | note (ID subject, GenNode const &mark) |
| capture and record a "state mark" for later replay for restoring UI state. | |
| void | note (GenNode const &mark) |
| record state mark from this subject | |
| ID | getID () const |
| BusTerm | attach (ID, Tangible &newNode) |
| Builder function: establish and wire a new BusTerm. | |
| BusTerm (BusTerm &&)=default | |
| may be moved, but not copied, due to the embedded identity | |
Protected Member Functions | |
| virtual bool | mark (ID subject, GenNode const &mark) override |
| route mark messages down to the individual Tangible. | |
| virtual size_t | markAll (GenNode const &mark) override |
| broadcast a notification to all connected terminal nodes. | |
| virtual bool | change (ID subject, MutationMessage &&diff) override |
| direct a mutation message towards the indicated Tangible. | |
| virtual BusTerm & | routeAdd (ID identity, Tangible &newNode) override |
| add a new down-link connection to the routing table | |
| virtual void | routeDetach (ID node) noexcept override |
| deactivate and remove a down-link route. | |
| virtual | operator string () const |
Protected Member Functions inherited from BusTerm | |
| BusTerm (ID identity, BusTerm &attached_to) | |
| bool | isShortCircuit (ID) const noexcept |
Private Types | |
| using | RoutingTable = std::unordered_map< EntryID, Tangible *, EntryID::UseEmbeddedHash > |
Private Attributes | |
| RoutingTable | routingTable_ |
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 Attributes inherited from BusTerm | |
| EntryID | endpointID_ |
| BusTerm & | theBus_ |
Private Member Functions inherited from NonCopyable | |
| ~NonCopyable ()=default | |
| NonCopyable ()=default | |
| NonCopyable (NonCopyable const &)=delete | |
| NonCopyable & | operator= (NonCopyable const &)=delete |
|
inlineexplicit |
|
inline |
Definition at line 177 of file nexus.hpp.
References Nexus::size().
Here is the call graph for this function:
|
private |
route mark messages down to the individual Tangible.
Reimplemented from BusTerm.
Reimplemented in TestNexus.
Definition at line 83 of file nexus.hpp.
References Nexus::mark(), and Nexus::routingTable_.
Referenced by Nexus::mark(), and Nexus::markAll().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineoverrideprotectedvirtual |
broadcast a notification to all connected terminal nodes.
Reimplemented from BusTerm.
Reimplemented in TestNexus.
Definition at line 99 of file nexus.hpp.
References Nexus::mark(), and Nexus::routingTable_.
Here is the call graph for this function:
|
inlineoverrideprotectedvirtual |
direct a mutation message towards the indicated Tangible.
Reimplemented from BusTerm.
Reimplemented in TestNexus.
Definition at line 116 of file nexus.hpp.
References Nexus::routingTable_.
add a new down-link connection to the routing table
| identity | the endpoint-ID used to address the new element to be connected to the bus. |
| newNode | to add the address (!) into the routing table |
Reimplemented from BusTerm.
Reimplemented in TestNexus.
Definition at line 142 of file nexus.hpp.
References Nexus::routingTable_.
|
inlineoverrideprotectedvirtualnoexcept |
|
inlineprotectedvirtual |
Reimplemented from BusTerm.
Reimplemented in TestNexus.
Definition at line 159 of file nexus.hpp.
References lib::idi::instanceTypeID().
Here is the call graph for this function:
|
inline |
Definition at line 167 of file nexus.hpp.
References Nexus::routingTable_.
Referenced by Nexus::~Nexus().
Here is the caller graph for this function:
|
private |
Definition at line 73 of file nexus.hpp.
Referenced by Nexus::change(), Nexus::mark(), Nexus::markAll(), Nexus::routeAdd(), Nexus::routeDetach(), and Nexus::size().
Inheritance diagram for Nexus:
Collaboration diagram for Nexus: