Lumiera
0.pre.03
»edit your freedom«
|
fake interface backbone and unit test rig for simulated command and presentation state handling. This implementation embodies the routing functionality as found in the real nexus, and additionally also implements the handler functions of the [stage::ctrl::CoreService]. The latter allows us to intercept command invocations and presentation state messages
Definition at line 101 of file test-nexus.cpp.
Public Member Functions | |
EventLog & | getLog () |
void | installCommandHandler (CommandHandler newHandler=CommandHandler()) |
void | installStateMarkHandler (StateMarkHandler newHandler=StateMarkHandler()) |
Public Member Functions inherited from Nexus | |
Nexus (BusTerm &uplink_to_CoreService, ID identity=lib::idi::EntryID< Nexus >()) | |
size_t | size () const |
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... | |
ID | getID () const |
void | note (GenNode const &mark) |
record state mark from this subject | |
Private Types | |
using | CommandHandler = test::Nexus::CommandHandler |
using | StateMarkHandler = test::Nexus::StateMarkHandler |
Private Member Functions | |
virtual void | act (GenNode const &command) |
prepare or trigger invocation of a command. More... | |
virtual bool | change (ID subject, MutationMessage &&diff) override |
direct a mutation message towards the indicated Tangible. More... | |
virtual bool | mark (ID subject, GenNode const &mark) override |
route mark messages down to the individual Tangible. More... | |
virtual size_t | markAll (GenNode const &mark) override |
broadcast a notification to all connected terminal nodes. More... | |
virtual void | note (ID subject, GenNode const &mark) override |
capture and record a "state mark" for later replay for restoring UI state. More... | |
virtual | operator string () const |
virtual BusTerm & | routeAdd (ID identity, Tangible &newNode) override |
add a new down-link connection to the routing table More... | |
virtual void | routeDetach (ID node) noexcept override |
deactivate and remove a down-link route. More... | |
Private Attributes | |
CommandHandler | commandHandler_ |
EventLog | log_ {this} |
StateMarkHandler | stateMarkHandler_ |
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 |
Protected Attributes inherited from BusTerm | |
EntryID | endpointID_ |
BusTerm & | theBus_ |
|
inlineprivatevirtual |
prepare or trigger invocation of a command.
command | a GenNode either holding command parameters |
Reimplemented from BusTerm.
Definition at line 115 of file test-nexus.cpp.
|
inlineoverrideprivatevirtual |
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 from BusTerm.
Definition at line 125 of file test-nexus.cpp.
|
inlineoverrideprivatevirtual |
route mark messages down to the individual Tangible.
Reimplemented from Nexus.
Definition at line 133 of file test-nexus.cpp.
|
inlineoverrideprivatevirtual |
broadcast a notification to all connected terminal nodes.
Reimplemented from Nexus.
Definition at line 149 of file test-nexus.cpp.
|
inlineoverrideprivatevirtual |
direct a mutation message towards the indicated Tangible.
Reimplemented from Nexus.
Definition at line 159 of file test-nexus.cpp.
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 Nexus.
Definition at line 176 of file test-nexus.cpp.
References lib::idi::instanceTypeID().
|
inlineoverrideprivatevirtualnoexcept |
deactivate and remove a down-link route.
Reimplemented from Nexus.
Definition at line 188 of file test-nexus.cpp.