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

#include "stage/ctrl/state-recorder.hpp"

Description

Simple map based implementation of the PresentationStateManager interface.

Requires a permanent connection to the UI-Bus, which is given as reference at construction. The intention is to use such an implementation embedded within the stage::ctrl::CoreService, which in turn then manages the lifecycle of this UI-Bus connection. Besides, a derived mock implementation is available through the test::Nexus

See also
StateMapGroupingStorage storage implementation

Definition at line 92 of file state-recorder.hpp.

Public Member Functions

 StateRecorder (BusTerm &busConnection)
 
void recordState (ID uiElm, StateMark stateMark)
 Interface for the operating facility (CoreService) to feed state mark messages to be remembered. More...
 

Private Types

using Record = Storage::Record const &
 
using Storage = StateMapGroupingStorage
 

Private Member Functions

virtual void clearState () override
 
virtual StateMark currentState (ID uiElm, string propertyKey) const override
 
virtual void replayAllProperties (ID uiElm) override
 replay all captured state from the given element. More...
 
virtual void replayAllState () override
 
virtual void replayAllState (string propertyKey) override
 replay all captured state from any element, but captured especially for the given property
 
void replayPropertiesOf (Record entry)
 
virtual void replayState (ID uiElm, string propertyKey) override
 

Private Attributes

Storage storage_
 
BusTermuiBus_
 

Additional Inherited Members

- Protected Types inherited from StateManager
using ID = lib::idi::BareEntryID const &
 
using StateMark = lib::diff::GenNode const &
 
- Protected Member Functions inherited from StateManager
virtual ~StateManager ()
 this is an interface
 

Member Function Documentation

◆ replayAllProperties()

virtual void replayAllProperties ( ID  uiElm)
inlineoverrideprivatevirtual

replay all captured state from the given element.

Implements StateManager.

Definition at line 146 of file state-recorder.hpp.

References steam::mobject::session::query::anonymous_namespace{fake-configrules.cpp}::entry(), and StateRecorder::replayPropertiesOf().

+ Here is the call graph for this function:

◆ recordState()

void recordState ( ID  uiElm,
StateMark  stateMark 
)
inline

Interface for the operating facility (CoreService) to feed state mark messages to be remembered.

Parameters
uiElmoriginator of the state notification
stateMarkstate information to record
Note
special handling of a "reset" state mark: in that case, discard any captured state for this element, since it goes back to default.

Definition at line 176 of file state-recorder.hpp.

References StateMapGroupingStorage::clearProperty(), StateMapGroupingStorage::clearState(), and StateMapGroupingStorage::record().

Referenced by CoreService::note().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ replayPropertiesOf()

void replayPropertiesOf ( Record  entry)
inlineprivate
Remarks
depending on the response of the notified element, this might lead to a reentrant record() call, because the element might chose to send a note message immediately, to record a state change, since it can not know this is already the replay of a stored state note. However, this reentrant call is harmless, it just updates the existing entry with identical content.

Definition at line 200 of file state-recorder.hpp.

References BusTerm::mark().

Referenced by StateRecorder::replayAllProperties().

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

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