#include <table_configurator.h>
Inheritance diagram for table_configurator:


Public Member Functions | |
| table_configurator (treatment_of_defaults behavior=AUTO_STORE) | |
| Constructor just needs to know what to do for missing items. | |
| table_configurator (const table_configurator &to_copy) | |
| virtual | ~table_configurator () |
| table_configurator & | operator= (const table_configurator &to_copy) |
| IMPLEMENT_CLASS_NAME ("table_configurator") | |
| virtual void | sections (string_array &list) |
| retrieves the section names into "list". | |
| void | reset () |
| virtual bool | get (const istring §ion, const istring &entry, istring &found) |
| implements the configurator retrieval function. | |
| virtual bool | put (const istring §ion, const istring &entry, const istring &to_store) |
| implements the configurator storage function. | |
| virtual bool | section_exists (const istring §ion) |
| true if the "section" is presently in the table config. | |
| virtual bool | delete_section (const istring §ion) |
| removes the entire "section" specified. | |
| virtual bool | delete_entry (const istring §ion, const istring &entry) |
| removes the entry specified by the "section" and "entry" name. | |
| virtual bool | get_section (const istring §ion, string_table &info) |
| reads the entire table held under "section" into a table called "info". | |
| virtual bool | put_section (const istring §ion, const string_table &info) |
| writes a table called "info" into the "section" held here. | |
Definition at line 28 of file table_configurator.h.
| table_configurator::table_configurator | ( | treatment_of_defaults | behavior = AUTO_STORE |
) |
Constructor just needs to know what to do for missing items.
Creates a table_configurator that loads and stores entries into the internal collection of tables. It will use the "behavior" regarding missing entries when load() is invoked.
Definition at line 36 of file table_configurator.cpp.
| table_configurator::table_configurator | ( | const table_configurator & | to_copy | ) |
Definition at line 41 of file table_configurator.cpp.
| table_configurator::~table_configurator | ( | ) | [virtual] |
| table_configurator & table_configurator::operator= | ( | const table_configurator & | to_copy | ) |
| table_configurator::IMPLEMENT_CLASS_NAME | ( | "table_configurator" | ) |
| void table_configurator::sections | ( | string_array & | list | ) | [virtual] |
retrieves the section names into "list".
Reimplemented from configurator.
Definition at line 74 of file table_configurator.cpp.
References array< contents >::reset().
Referenced by ini_parser::restate().
| void table_configurator::reset | ( | ) |
Definition at line 69 of file table_configurator.cpp.
Referenced by ini_parser::ini_parser(), config_watcher::rescan(), and ini_parser::reset().
| bool table_configurator::get | ( | const istring & | section, | |
| const istring & | entry, | |||
| istring & | found | |||
| ) | [virtual] |
implements the configurator retrieval function.
Implements configurator.
Definition at line 107 of file table_configurator.cpp.
References symbol_table< contents >::find().
Referenced by config_watcher::changed_items(), and ini_configurator::get().
| bool table_configurator::put | ( | const istring & | section, | |
| const istring & | entry, | |||
| const istring & | to_store | |||
| ) | [virtual] |
implements the configurator storage function.
Implements configurator.
Definition at line 92 of file table_configurator.cpp.
References symbol_table< contents >::add(), delete_entry(), delete_section(), and istring::length().
Referenced by ini_parser::merge_section(), and ini_configurator::put().
| bool table_configurator::section_exists | ( | const istring & | section | ) | [virtual] |
true if the "section" is presently in the table config.
Reimplemented from configurator.
Definition at line 71 of file table_configurator.cpp.
Referenced by ini_parser::merge_section(), and ini_configurator::section_exists().
| bool table_configurator::delete_section | ( | const istring & | section | ) | [virtual] |
removes the entire "section" specified.
Definition at line 81 of file table_configurator.cpp.
References common::OKAY.
Referenced by ini_configurator::delete_section(), and put().
removes the entry specified by the "section" and "entry" name.
Definition at line 84 of file table_configurator.cpp.
References common::OKAY, and symbol_table< contents >::whack().
Referenced by ini_configurator::delete_entry(), and put().
| bool table_configurator::get_section | ( | const istring & | section, | |
| string_table & | info | |||
| ) | [virtual] |
reads the entire table held under "section" into a table called "info".
Definition at line 169 of file table_configurator.cpp.
References symbol_table< contents >::add(), FUNCDEF, symbol_table< contents >::name(), symbol_table< contents >::reset(), and symbol_table< contents >::symbols().
Referenced by config_watcher::changed_items(), config_watcher::changed_sections(), config_watcher::deleted_items(), ini_configurator::get_section(), config_watcher::new_items(), and ini_parser::restate().
| bool table_configurator::put_section | ( | const istring & | section, | |
| const string_table & | info | |||
| ) | [virtual] |
writes a table called "info" into the "section" held here.
Definition at line 181 of file table_configurator.cpp.
References FUNCDEF.
Referenced by ini_parser::merge_section(), ini_configurator::put_section(), and config_watcher::rescan().
1.5.1