Fawkes API
Fawkes Development Version
|
Tool to watch and output config changes. More...
Public Member Functions | |
ConfigChangeWatcherTool (Configuration *config, FawkesNetworkClient *c) | |
Constructor. | |
virtual void | handle_signal (int signal) |
Signal hanlding method. | |
virtual void | config_tag_changed (const char *new_tag) |
Called whenever the tag has changed. | |
virtual void | config_value_changed (const Configuration::ValueIterator *v) |
Called whenever a watched value has changed. | |
virtual void | config_comment_changed (const Configuration::ValueIterator *v) |
Called whenever a comment of a watched value has changed. | |
virtual void | config_value_erased (const char *path) |
Called whenever a value has been erased from the config. | |
void | run () |
Run. |
Tool to watch and output config changes.
ConfigChangeWatcherTool::ConfigChangeWatcherTool | ( | Configuration * | config, |
FawkesNetworkClient * | c | ||
) | [inline] |
Constructor.
config | Configuration to watch |
c | network client, thread is cancelled on signal |
Definition at line 47 of file main.cpp.
References fawkes::Configuration::add_change_handler().
virtual void ConfigChangeWatcherTool::config_comment_changed | ( | const Configuration::ValueIterator * | v | ) | [inline, virtual] |
Called whenever a comment of a watched value has changed.
v | value iterator for the specific value |
Implements fawkes::ConfigurationChangeHandler.
Definition at line 73 of file main.cpp.
References fawkes::Configuration::ValueIterator::is_default(), fawkes::Configuration::ValueIterator::path(), and fawkes::Configuration::ValueIterator::get_comment().
virtual void ConfigChangeWatcherTool::config_tag_changed | ( | const char * | new_tag | ) | [inline, virtual] |
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.
virtual void ConfigChangeWatcherTool::config_value_changed | ( | const Configuration::ValueIterator * | v | ) | [inline, virtual] |
Called whenever a watched value has changed.
v | value iterator for the specific value |
Implements fawkes::ConfigurationChangeHandler.
Definition at line 67 of file main.cpp.
References fawkes::Configuration::ValueIterator::is_default(), fawkes::Configuration::ValueIterator::path(), fawkes::Configuration::ValueIterator::type(), and fawkes::Configuration::ValueIterator::get_as_string().
virtual void ConfigChangeWatcherTool::config_value_erased | ( | const char * | path | ) | [inline, virtual] |
Called whenever a value has been erased from the config.
path | path of value |
Implements fawkes::ConfigurationChangeHandler.
virtual void ConfigChangeWatcherTool::handle_signal | ( | int | signum | ) | [inline, virtual] |
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 56 of file main.cpp.
References fawkes::Configuration::rem_change_handler().
void ConfigChangeWatcherTool::run | ( | ) | [inline] |