Fawkes API Fawkes Development Version
|
Tool to watch and output config changes. More...
Public Member Functions | |
ConfigChangeWatcherTool (Configuration *config, FawkesNetworkClient *c) | |
Constructor. More... | |
virtual void | handle_signal (int signal) |
Signal hanlding method. More... | |
virtual void | config_tag_changed (const char *new_tag) |
Called whenever the tag has changed. More... | |
virtual void | config_value_changed (const Configuration::ValueIterator *v) |
Called whenever a watched value has changed. More... | |
virtual void | config_comment_changed (const Configuration::ValueIterator *v) |
Called whenever a comment of a watched value has changed. More... | |
virtual void | config_value_erased (const char *path) |
Called whenever a value has been erased from the config. More... | |
void | run () |
Run. More... | |
![]() | |
ConfigurationChangeHandler (const char *path_prefix) | |
Constructor. More... | |
virtual | ~ConfigurationChangeHandler () |
Destructor. More... | |
virtual void | config_tag_changed (const char *new_tag)=0 |
Called whenever the tag has changed. More... | |
virtual void | config_value_changed (const Configuration::ValueIterator *v)=0 |
Called whenever a watched value has changed. More... | |
virtual void | config_comment_changed (const Configuration::ValueIterator *v)=0 |
Called whenever a comment of a watched value has changed. More... | |
virtual void | config_value_erased (const char *path)=0 |
Called whenever a value has been erased from the config. More... | |
const char * | config_monitor_prefix () |
Which path prefix shall be monitored. More... | |
![]() | |
virtual | ~SignalHandler () |
Virtual destructor. More... | |
virtual void | handle_signal (int signal)=0 |
Signal hanlding method. More... | |
|
inline |
Constructor.
config | Configuration to watch |
c | network client, thread is cancelled on signal |
Definition at line 49 of file main.cpp.
References fawkes::Configuration::add_change_handler().
|
inlinevirtual |
Called whenever a comment of a watched value has changed.
v | value iterator for the specific value |
Implements fawkes::ConfigurationChangeHandler.
Definition at line 82 of file main.cpp.
References fawkes::Configuration::ValueIterator::get_comment(), fawkes::Configuration::ValueIterator::is_default(), and fawkes::Configuration::ValueIterator::path().
|
inlinevirtual |
Called whenever the tag has changed.
This function can be used to detect when data from another tag has been loaded.
new_tag | new tag |
Implements fawkes::ConfigurationChangeHandler.
|
inlinevirtual |
Called whenever a watched value has changed.
v | value iterator for the specific value |
Implements fawkes::ConfigurationChangeHandler.
Definition at line 72 of file main.cpp.
References fawkes::Configuration::ValueIterator::get_as_string(), fawkes::Configuration::ValueIterator::is_default(), fawkes::Configuration::ValueIterator::path(), and fawkes::Configuration::ValueIterator::type().
|
inlinevirtual |
Called whenever a value has been erased from the config.
path | path of value |
Implements fawkes::ConfigurationChangeHandler.
|
inlinevirtual |
Signal hanlding method.
Implement this method with the action you want to perform on the registered signals.
signum | signal number of triggered signal |
Implements fawkes::SignalHandler.
Definition at line 59 of file main.cpp.
References fawkes::Configuration::rem_change_handler().
|
inline |
Run.
This joins the network thread.
Definition at line 97 of file main.cpp.
References fawkes::FawkesNetworkClient::wait().