Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
StateRecorder Class Reference

#include "gui/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 gui::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 91 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 More...
 
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 More...
 

Member Typedef Documentation

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

using Record = Storage::Record const&
private

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

Constructor & Destructor Documentation

StateRecorder ( BusTerm busConnection)
inline

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

Member Function Documentation

virtual StateMark currentState ( ID  uiElm,
string  propertyKey 
) const
inlineoverrideprivatevirtual

Implements StateManager.

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

References StateMapGroupingStorage::retrieve().

+ Here is the call graph for this function:

virtual void replayState ( ID  uiElm,
string  propertyKey 
)
inlineoverrideprivatevirtual

Implements StateManager.

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

References BusTerm::mark(), Ref::NO, and StateMapGroupingStorage::retrieve().

+ Here is the call graph for this function:

virtual void replayAllState ( )
inlineoverrideprivatevirtual

Implements StateManager.

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

References StateRecorder::replayPropertiesOf().

+ Here is the call graph for this function:

virtual void replayAllState ( string  propertyKey)
inlineoverrideprivatevirtual

replay all captured state from any element, but captured especially for the given property

Implements StateManager.

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

References StateMapGroupingStorage::getID(), StateMapGroupingStorage::getState(), BusTerm::mark(), and Ref::NO.

+ Here is the call graph for this function:

virtual void replayAllProperties ( ID  uiElm)
inlineoverrideprivatevirtual

replay all captured state from the given element.

Implements StateManager.

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

References StateMapGroupingStorage::end(), StateMapGroupingStorage::find(), and StateRecorder::replayPropertiesOf().

+ Here is the call graph for this function:

virtual void clearState ( )
inlineoverrideprivatevirtual

Implements StateManager.

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

References StateMapGroupingStorage::clear().

+ Here is the call graph for this function:

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 175 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:

void replayPropertiesOf ( Record  entry)
inlineprivate

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

References StateMapGroupingStorage::getID(), StateMapGroupingStorage::getState(), and BusTerm::mark().

Referenced by StateRecorder::replayAllProperties(), and StateRecorder::replayAllState().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

BusTerm& uiBus_
private

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

Storage storage_
private

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

+ Inheritance diagram for StateRecorder:
+ Collaboration diagram for StateRecorder:

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