ConfigurationReader Class Reference

DEPRECATED A class that supports reading configuration maps from the registry on Windows, an INI file on *nix, or a property list (.plist) file in an Apple-style framework. More...

List of all members.

Public Member Functions

 ConfigurationReader (bool in_caseSensitiveKeys=true)
 Constructor.
void LoadConfiguration (ConfigMap &io_configMap, const simba_wstring &in_path, const simba_wstring &in_name, const simba_wstring *in_sectionFilter=NULL)
 Loads a configuration map from the registry (Windows), an INI file (*nix), or a property list (.plist) file in an Apple-style framework.
void LoadConfiguration (SectionConfigMap &io_configMap, const simba_wstring &in_path, const simba_wstring &in_name, const simba_wstring *in_sectionFilter=NULL, bool in_returnDriver=false)
 Loads a configuration map from the registry (Windows), an INI file (*nix), or a property list (.plist) file in an Apple-style framework.
virtual ~ConfigurationReader ()
 Destructor.

Detailed Description

DEPRECATED A class that supports reading configuration maps from the registry on Windows, an INI file on *nix, or a property list (.plist) file in an Apple-style framework.


Constructor & Destructor Documentation

ConfigurationReader ( bool  in_caseSensitiveKeys = true  ) 

Constructor.

Parameters:
in_caseSensitiveKeys Should key names be case sensitive (default is true). If false, all configuration key names will be converted to uppercase. Section names are always converted to uppercase despite this.
virtual ~ConfigurationReader (  )  [virtual]

Destructor.


Member Function Documentation

void LoadConfiguration ( ConfigMap io_configMap,
const simba_wstring in_path,
const simba_wstring in_name,
const simba_wstring in_sectionFilter = NULL 
)

Loads a configuration map from the registry (Windows), an INI file (*nix), or a property list (.plist) file in an Apple-style framework.

Two levels of configuration are loaded.

Parameters:
io_configMap Configuration map to fill. Structure: io_configMap[SectionName][KeyName] = KeyValue Section names are converted to uppercase. Key names are case sensitive.
in_path Root path to look for the configuration in. Only for Windows and nix: If the configuration is not found there, the defaults will be searched. Use an empty string to skip this step.

  • Windows: + accepted values: "HKEY_CURRENT_USER", "HKEY_LOCAL_MACHINE" + search order: + in_path\in_name, + HKEY_CURRENT_USER\in_name, + HKEY_LOCAL_MACHINE\in_name
  • *nix: + accepted values: any filesystem path + search order: + in_path/in_name, + $HOME/.in_name, + /etc/in_name
  • plist: + accepted values: only provide valid bundle paths + search order: only in_path/in_name
in_name Name of the file/registry key to open.

  • Windows: Full name of a registry key under HKCU or HKLM
  • *nix: File name only
  • plist: File name only
in_sectionFilter Restrict reading of the config to only one particular section. Pass NULL for no filter. Pass an empty string to filter for keys that are not in a subsection.

  • Windows: + Only reads keys from the in_sectionFilter subkey beneath the in_name key.
  • *nix: + Only reads the key/value pairs from the [in_sectionFilter] section.
  • plist: + Only reads the key/value pairs from the in_sectionFilter section.
void LoadConfiguration ( SectionConfigMap io_configMap,
const simba_wstring in_path,
const simba_wstring in_name,
const simba_wstring in_sectionFilter = NULL,
bool  in_returnDriver = false 
)

Loads a configuration map from the registry (Windows), an INI file (*nix), or a property list (.plist) file in an Apple-style framework.

Only one level of configuration is loaded: The base section if in_sectionFilter is NULL, or a specific subsection if in_sectionFilter is specified.

Parameters:
io_configMap Configuration map to fill.

  • Structure: io_configMap[KeyName] = KeyValue
  • Keys names are case sensitive.
in_path Root path to look for the configuration in. Only for Windows and nix: If the configuration is not found there, the defaults will be searched. Use an empty string to skip this step.

  • Windows: + accepted values: "HKEY_CURRENT_USER", "HKEY_LOCAL_MACHINE" + search order: + in_path\in_name, + HKEY_CURRENT_USER\in_name, + HKEY_LOCAL_MACHINE\in_name
  • *nix: + accepted values: any filesystem path + search order: + in_path/in_name, + $HOME/.in_name, + /etc/in_name
  • plist: + accepted values: only provide valid bundle paths + search order: only in_path/in_name
in_name Name of the file/registry key to open.

  • Windows: Full name of a registry key under HKCU or HKLM
  • *nix: File name only
  • plist: File name only
in_sectionFilter Restrict reading of the config to only one particular section. Pass NULL for no filter. Pass an empty string to filter for keys that are not in a subsection.

  • Windows: + Only reads keys from the in_sectionFilter subkey beneath the in_name key.
  • *nix: + Only reads the key/value pairs from the [in_sectionFilter] section.
  • plist: + Only reads the key/value pairs from the in_sectionFilter section.
in_returnDriver Flag to indicate that DRIVER keyword should be returned.

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

Generated on Wed May 17 14:21:18 2017 for SimbaEngine 10.1.3.1011 by simba