#include <registry_config.h>
Inheritance diagram for registry_configurator:


Public Types | |
| enum | registry_hives { hkey_classes_root, hkey_current_user, hkey_local_machine, hkey_users, hkey_current_config, HKCR = hkey_classes_root, HKCU = hkey_current_user, HKLM = hkey_local_machine, HKU = hkey_users, HKCC = hkey_current_config } |
| the hives are major partitions of the registry. More... | |
Public Member Functions | |
| registry_configurator (registry_hives hive, treatment_of_defaults behavior) | |
| creates a registry_configurator that stores entries into the "hive". | |
| virtual | ~registry_configurator () |
| IMPLEMENT_CLASS_NAME ("registry_configurator") | |
| virtual bool | get (const istring §ion, const istring &entry, istring &found) |
| implements the configurator retrieval function. | |
| virtual bool | section_exists (const istring §ion) |
| returns true if the "section" was found in the file. | |
| virtual bool | put (const istring §ion, const istring &entry, const istring &to_store) |
| implements the configurator storage function. | |
| 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 "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" in the INI file. | |
| void * | translate_hive (registry_hives hive) |
| translates from our enum to the windows specific type for hives. | |
| istring | fix_section (const istring §ion) |
| repairs malformed section names. | |
Definition at line 29 of file registry_config.h.
the hives are major partitions of the registry.
| hkey_classes_root | |
| hkey_current_user | |
| hkey_local_machine | |
| hkey_users | |
| hkey_current_config | |
| HKCR | |
| HKCU | |
| HKLM | |
| HKU | |
| HKCC |
Definition at line 33 of file registry_config.h.
| registry_configurator::registry_configurator | ( | registry_hives | hive, | |
| treatment_of_defaults | behavior | |||
| ) |
creates a registry_configurator that stores entries into the "hive".
applies the "behavior" to items that are not found.
| virtual registry_configurator::~registry_configurator | ( | ) | [virtual] |
| registry_configurator::IMPLEMENT_CLASS_NAME | ( | "registry_configurator" | ) |
| virtual bool registry_configurator::get | ( | const istring & | section, | |
| const istring & | entry, | |||
| istring & | found | |||
| ) | [virtual] |
implements the configurator retrieval function.
note that for registry based retrieval, an empty "entry" is allowed, and that specifies the default item in the "section".
Implements configurator.
| virtual bool registry_configurator::section_exists | ( | const istring & | section | ) | [virtual] |
returns true if the "section" was found in the file.
Reimplemented from configurator.
Referenced by main().
| virtual bool registry_configurator::put | ( | const istring & | section, | |
| const istring & | entry, | |||
| const istring & | to_store | |||
| ) | [virtual] |
implements the configurator storage function.
put interprets an empty string for "entry" as pointing at the default item in the "section".
Implements configurator.
| virtual bool registry_configurator::delete_section | ( | const istring & | section | ) | [virtual] |
| virtual bool registry_configurator::get_section | ( | const istring & | section, | |
| string_table & | info | |||
| ) | [virtual] |
reads the entire "section" into a table called "info".
on win-9x, this will fail if the section's data exceeds 32K.
| virtual bool registry_configurator::put_section | ( | const istring & | section, | |
| const string_table & | info | |||
| ) | [virtual] |
writes a table called "info" into the "section" in the INI file.
any existing data for that section is wiped out. on win-9x, this will fail if the section's data exceeds 32K.
| void* registry_configurator::translate_hive | ( | registry_hives | hive | ) |
translates from our enum to the windows specific type for hives.
repairs malformed section names.
translates a section name that might use forward slashes into the form required for windows that uses backslashes.
1.5.1