Public Member Functions

ConfigChangeWatcherTool Class Reference

Tool to watch and output config changes. More...

Inheritance diagram for ConfigChangeWatcherTool:
Inheritance graph
[legend]

List of all members.

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 char *path, bool is_default, int value)
 Called whenever an int value has changed.
virtual void config_value_changed (const char *path, bool is_default, unsigned int value)
 Called whenever an unsigned int value has changed.
virtual void config_value_changed (const char *path, bool is_default, float value)
 Called whenever an float value has changed.
virtual void config_value_changed (const char *path, bool is_default, bool value)
 Called whenever an boolean value has changed.
virtual void config_value_changed (const char *path, bool is_default, const char *value)
 Called whenever a string value has changed.
virtual void config_comment_changed (const char *path, bool is_default, const char *comment)
 Called whenever a comment has changed.
virtual void config_value_erased (const char *path, bool is_default)
 Called whenever a value has been erased from the config.
void run ()
 Run.

Detailed Description

Tool to watch and output config changes.

Definition at line 37 of file main.cpp.


Constructor & Destructor Documentation

ConfigChangeWatcherTool::ConfigChangeWatcherTool ( Configuration config,
FawkesNetworkClient c 
) [inline]

Constructor.

Parameters:
config Configuration to watch
c network client, thread is cancelled on signal

Definition at line 45 of file main.cpp.

References fawkes::Configuration::add_change_handler().


Member Function Documentation

virtual void ConfigChangeWatcherTool::config_comment_changed ( const char *  path,
bool  is_default,
const char *  comment 
) [inline, virtual]

Called whenever a comment has changed.

Parameters:
path path of value
is_default true if modified comment is of a default value, false otherwise
comment new comment

Implements fawkes::ConfigurationChangeHandler.

Definition at line 89 of file main.cpp.

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.

Parameters:
new_tag new tag

Implements fawkes::ConfigurationChangeHandler.

Definition at line 59 of file main.cpp.

virtual void ConfigChangeWatcherTool::config_value_changed ( const char *  path,
bool  is_default,
unsigned int  value 
) [inline, virtual]

Called whenever an unsigned int value has changed.

Parameters:
path path of value
is_default true if modified value is a default value, false otherwise
value new value

Implements fawkes::ConfigurationChangeHandler.

Definition at line 69 of file main.cpp.

virtual void ConfigChangeWatcherTool::config_value_changed ( const char *  path,
bool  is_default,
float  value 
) [inline, virtual]

Called whenever an float value has changed.

Parameters:
path path of value
is_default true if modified value is a default value, false otherwise
value new value

Implements fawkes::ConfigurationChangeHandler.

Definition at line 74 of file main.cpp.

virtual void ConfigChangeWatcherTool::config_value_changed ( const char *  path,
bool  is_default,
const char *  value 
) [inline, virtual]

Called whenever a string value has changed.

Parameters:
path path of value
is_default true if modified value is a default value, false otherwise
value new value

Implements fawkes::ConfigurationChangeHandler.

Definition at line 84 of file main.cpp.

virtual void ConfigChangeWatcherTool::config_value_changed ( const char *  path,
bool  is_default,
bool  value 
) [inline, virtual]

Called whenever an boolean value has changed.

Parameters:
path path of value
is_default true if modified value is a default value, false otherwise
value new value

Implements fawkes::ConfigurationChangeHandler.

Definition at line 79 of file main.cpp.

virtual void ConfigChangeWatcherTool::config_value_changed ( const char *  path,
bool  is_default,
int  value 
) [inline, virtual]

Called whenever an int value has changed.

Parameters:
path path of value
is_default true if modified value is a default value, false otherwise
value new value

Implements fawkes::ConfigurationChangeHandler.

Definition at line 64 of file main.cpp.

virtual void ConfigChangeWatcherTool::config_value_erased ( const char *  path,
bool  is_default 
) [inline, virtual]

Called whenever a value has been erased from the config.

Parameters:
path path of value
is_default true if erased value was a default value, false otherwise

Implements fawkes::ConfigurationChangeHandler.

Definition at line 94 of file main.cpp.

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.

Parameters:
signum signal number of triggered signal
Author:
Tim Niemueller

Implements fawkes::SignalHandler.

Definition at line 53 of file main.cpp.

void ConfigChangeWatcherTool::run (  )  [inline]

Run.

This joins the network thread.

Definition at line 104 of file main.cpp.


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