registry_configurator Class Reference

Supports the configurator class interface on the windows registry. More...

#include <registry_config.h>

Inheritance diagram for registry_configurator:

Inheritance graph
[legend]
Collaboration diagram for registry_configurator:

Collaboration graph
[legend]
List of all members.

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 &section, const istring &entry, istring &found)
 implements the configurator retrieval function.
virtual bool section_exists (const istring &section)
 returns true if the "section" was found in the file.
virtual bool put (const istring &section, const istring &entry, const istring &to_store)
 implements the configurator storage function.
virtual bool delete_section (const istring &section)
 removes the entire "section" specified.
virtual bool delete_entry (const istring &section, const istring &entry)
 removes the entry specified by the "section" and "entry" name.
virtual bool get_section (const istring &section, string_table &info)
 reads the entire "section" into a table called "info".
virtual bool put_section (const istring &section, 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 &section)
 repairs malformed section names.

Detailed Description

Supports the configurator class interface on the windows registry.

Definition at line 29 of file registry_config.h.


Member Enumeration Documentation

enum registry_configurator::registry_hives

the hives are major partitions of the registry.

Enumerator:
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.


Constructor & Destructor Documentation

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]


Member Function Documentation

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]

removes the entire "section" specified.

Referenced by main().

virtual bool registry_configurator::delete_entry ( const istring section,
const istring entry 
) [virtual]

removes the entry specified by the "section" and "entry" name.

Referenced by main().

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.

istring registry_configurator::fix_section ( const istring section  ) 

repairs malformed section names.

translates a section name that might use forward slashes into the form required for windows that uses backslashes.


The documentation for this class was generated from the following file:
Generated on Fri Nov 28 04:30:56 2008 for HOOPLE Libraries by  doxygen 1.5.1