#include <config_watcher.h>
Collaboration diagram for config_watcher:

Public Member Functions | |
| config_watcher (configurator &to_watch) | |
| watches the configurator for changes and tracks them. | |
| virtual | ~config_watcher () |
| IMPLEMENT_CLASS_NAME ("config_watcher") | |
| bool | rescan () |
| updates the configurator snapshot and enables the comparison methods. | |
| string_set | new_sections () const |
| string_set | deleted_sections () const |
| string_set | changed_sections () const |
| string_set | new_items (const istring §ion_name) |
| string_set | deleted_items (const istring §ion_name) |
| string_set | changed_items (const istring §ion_name) |
when given a configurator object to check, this will initially build an exact copy of the contents seen. when asked to look for changes to the configurator, the previous version is compared with the current state and any changed sections are reported.
Definition at line 35 of file config_watcher.h.
| config_watcher::config_watcher | ( | configurator & | to_watch | ) |
watches the configurator for changes and tracks them.
"to_watch" must exist for lifetime of this class.
Definition at line 22 of file config_watcher.cpp.
References rescan().
| config_watcher::~config_watcher | ( | ) | [virtual] |
| config_watcher::IMPLEMENT_CLASS_NAME | ( | "config_watcher" | ) |
| bool config_watcher::rescan | ( | ) |
updates the configurator snapshot and enables the comparison methods.
call this before testing the changed() method.
Definition at line 36 of file config_watcher.cpp.
References configurator::get_section(), array< contents >::length(), table_configurator::put_section(), table_configurator::reset(), and configurator::section_set().
Referenced by config_watcher().
| string_set config_watcher::new_sections | ( | ) | const |
| string_set config_watcher::deleted_sections | ( | ) | const |
| string_set config_watcher::changed_sections | ( | ) | const |
Definition at line 75 of file config_watcher.cpp.
References basis::set< contents >::elements(), table_configurator::get_section(), basis::set< contents >::intersection(), and configurator::section_set().
| string_set config_watcher::new_items | ( | const istring & | section_name | ) |
Definition at line 108 of file config_watcher.cpp.
References table_configurator::get_section(), and symbol_table< contents >::names().
| string_set config_watcher::deleted_items | ( | const istring & | section_name | ) |
Definition at line 95 of file config_watcher.cpp.
References table_configurator::get_section(), and symbol_table< contents >::names().
| string_set config_watcher::changed_items | ( | const istring & | section_name | ) |
Definition at line 121 of file config_watcher.cpp.
References basis::set< contents >::elements(), table_configurator::get(), table_configurator::get_section(), basis::set< contents >::intersection(), and symbol_table< contents >::names().
1.5.1