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

Description

a defunct interface backbone. All UI-Bus operations are implemented NOP, but warning on STDRR and logging the invocation to the internal log of [TestNexus]. This allows to set up deceased entities within a test rigged UI.

Definition at line 259 of file test-nexus.cpp.

Public Member Functions

 ZombieNexus (string formerID, BusTerm &homeland)
 fabricate a "dead terminal", marked as deceased, viciously connected to itself. More...
 
- 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 Member Functions

virtual void act (GenNode const &command)
 prepare or trigger invocation of a command. More...
 
virtual bool change (ID subject, MutationMessage &&diff) override
 alter and reshape the designated subject by applying the given diff message. More...
 
EventLoglog ()
 
virtual bool mark (ID subject, GenNode const &mark) override
 route a state update or notification to the given subject. More...
 
virtual size_t markAll (GenNode const &mark) override
 broadcast a notification message to all currently connected bus terminals. 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 BusTermrouteAdd (ID identity, Tangible &newNode) override
 
virtual void routeDetach (ID node) noexcept override
 

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_
 
BusTermtheBus_
 

Constructor & Destructor Documentation

◆ ZombieNexus()

ZombieNexus ( string  formerID,
BusTerm homeland 
)
inline

fabricate a "dead terminal", marked as deceased, viciously connected to itself.

Note
intentionally to be sliced right after generation. All operations on this object are defunct.

Definition at line 346 of file test-nexus.cpp.

Member Function Documentation

◆ act()

virtual void act ( GenNode const &  command)
inlineprivatevirtual

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 274 of file test-nexus.cpp.

◆ 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 282 of file test-nexus.cpp.

◆ mark()

virtual bool mark ( ID  subject,
GenNode const &  mark 
)
inlineoverrideprivatevirtual

route a state update or notification to the given subject.

Parameters
subjectthe endpoint-ID of the element to address
markthe actual state update or notification message to be delivered
Remarks
each addressed "subject" is a stage::model::Tangible, and as such holds a BusTerm of its own, which in turn ensures a registration and connection from the central routing hub down to the element. Thus, the default implementation is just to pass the given state mark "up", assuming that it will reach the hub eventually, which in turn knows how to reach the element, and invoke the Tangible::mark() operation.
Returns
true if the target was known and the mark operation dispatched.
Note
messages to unreachable elements will be dropped.

Reimplemented from BusTerm.

Definition at line 292 of file test-nexus.cpp.

◆ markAll()

virtual size_t markAll ( GenNode const &  mark)
inlineoverrideprivatevirtual

broadcast a notification message to all currently connected bus terminals.

Parameters
markthe actual state update or notification message to be delivered
Returns
number of notified terminals.
Remarks
this call assumes that "somewhere" within the UI-Bus a distribution node or hub is installed, with the ability to find all currently connected terminals. In the standard configuration this is implemented by the ctrl::Nexus

Reimplemented from BusTerm.

Definition at line 301 of file test-nexus.cpp.

◆ change()

virtual bool change ( ID  subject,
MutationMessage &&  diff 
)
inlineoverrideprivatevirtual

alter and reshape the designated subject by applying the given diff message.

Parameters
diffencapsulated representation of a concrete diff sequence for the target.
Returns
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.
Exceptions
lumiera::error::Statewhen diff application fails due to the target's shape or state being different than implicitly assumed by the given diff.
Remarks
each tangible offers to build a custom TreeMutator, which is appropriately wired to receive diff messages targeted towards this specific element. The standard implementation within the Nexus uses this ability to create a DiffApplicator<DiffMutable>, finally to feed the given diff to the target, which consequently will reshape and remould itself accordingly.

Reimplemented from BusTerm.

Definition at line 310 of file test-nexus.cpp.

◆ routeAdd()

virtual BusTerm& routeAdd ( ID  identity,
Tangible node 
)
inlineoverrideprivatevirtual

establish new down-link connection form UI-Bus

Parameters
nodereference to the [Tangible] to be connected.
Returns
corresponding up-link for the initiating node to use

Reimplemented from BusTerm.

Definition at line 319 of file test-nexus.cpp.

◆ routeDetach()

virtual void routeDetach ( ID  node)
inlineoverrideprivatevirtualnoexcept

disable down-link connection

Remarks
corresponding node is about to go away.

Reimplemented from BusTerm.

Definition at line 328 of file test-nexus.cpp.

+ Inheritance diagram for ZombieNexus:
+ Collaboration diagram for ZombieNexus:

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