Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
ConfigUpdateService Class Referenceabstract

Virtual interface for the config update listeners to register themselves for receiving configuration updates. More...

#include <ConfigUpdateService.hxx>

Inheritance diagram for ConfigUpdateService:
Singleton< ConfigUpdateService > openlcb::ConfigUpdateFlow

Public Member Functions

virtual void register_update_listener (ConfigUpdateListener *listener)=0
 Adds a config update listener to be called upon configuration updates.
 
virtual void unregister_update_listener (ConfigUpdateListener *listener)=0
 Removes a config update listener.
 
virtual void trigger_update ()=0
 Executes an update in response to the configuration having changed.
 

Additional Inherited Members

- Static Public Member Functions inherited from Singleton< ConfigUpdateService >
static ConfigUpdateServiceinstance ()
 
static bool exists ()
 

Detailed Description

Virtual interface for the config update listeners to register themselves for receiving configuration updates.

Definition at line 44 of file ConfigUpdateService.hxx.

Member Function Documentation

◆ register_update_listener()

virtual void ConfigUpdateService::register_update_listener ( ConfigUpdateListener listener)
pure virtual

Adds a config update listener to be called upon configuration updates.

Should be called before the startup of the stack in order to ensure that the initial load will be successful.

Parameters
listenerpointer to the implementation that needs to listen to config updates.

Implemented in openlcb::ConfigUpdateFlow.

◆ trigger_update()

virtual void ConfigUpdateService::trigger_update ( )
pure virtual

Executes an update in response to the configuration having changed.

Implemented in openlcb::ConfigUpdateFlow.

◆ unregister_update_listener()

virtual void ConfigUpdateService::unregister_update_listener ( ConfigUpdateListener listener)
pure virtual

Removes a config update listener.

Requires: the listener has been inserted before using register_update_listener.

Parameters
listenerpointer to the implementation that needs to be removed.

Implemented in openlcb::ConfigUpdateFlow.


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