#include <Configuration.h>
Inheritance diagram for ACE_Configuration
Public Types | |
enum | VALUETYPE { STRING, INTEGER, BINARY, INVALID } |
Enumeration for the various types of values we can store. More... | |
Public Methods | |
virtual | ~ACE_Configuration (void) |
destructor. | |
virtual const ACE_Configuration_Section_Key& | root_section (void) const |
Returns the root section of this configuration. | |
virtual int | open_section (const ACE_Configuration_Section_Key &base, const ACE_TCHAR *sub_section, int create, ACE_Configuration_Section_Key& result) = 0 |
virtual int | remove_section (const ACE_Configuration_Section_Key &key, const ACE_TCHAR *sub_section, int recursive) = 0 |
Removes the <sub_section> from <key>. If recursive is non zero, any subkeys below <sub_section> are remove as well. | |
virtual int | enumerate_values (const ACE_Configuration_Section_Key& key, int index, ACE_TString& name, VALUETYPE& type) = 0 |
virtual int | enumerate_sections (const ACE_Configuration_Section_Key& key, int index, ACE_TString& name) = 0 |
virtual int | set_string_value (const ACE_Configuration_Section_Key& key, const ACE_TCHAR* name, const ACE_TString& value) = 0 |
sets the value in <key> with <name> to a string of <value>. | |
virtual int | set_integer_value (const ACE_Configuration_Section_Key& key, const ACE_TCHAR* name, u_int value) = 0 |
sets the value in <key> with <name> to an integer of <value>. | |
virtual int | set_binary_value (const ACE_Configuration_Section_Key& key, const ACE_TCHAR* name, const void* data, u_int length) = 0 |
sets the value in <key> with <name> to binary data of <data> with <length>. | |
virtual int | get_string_value (const ACE_Configuration_Section_Key& key, const ACE_TCHAR* name, ACE_TString& value) = 0 |
gets the string value of <name> from <key> and places it in <value>. Returns non zero on error (if value is not a string). | |
virtual int | get_integer_value (const ACE_Configuration_Section_Key& key, const ACE_TCHAR* name, u_int& value) = 0 |
gets the integer value of <name> from <key> and places it in <value>. Returns non zero on error (if value is not an integer). | |
virtual int | get_binary_value (const ACE_Configuration_Section_Key& key, const ACE_TCHAR* name, void*& data, u_int& length) = 0 |
virtual int | find_value (const ACE_Configuration_Section_Key& key, const ACE_TCHAR* name, VALUETYPE& type) = 0 |
virtual int | remove_value (const ACE_Configuration_Section_Key& key, const ACE_TCHAR* name) = 0 |
Removes the the value <name> from <key>. returns non zero on error. | |
int | expand_path (const ACE_Configuration_Section_Key& key, const ACE_TString& path_in, ACE_Configuration_Section_Key& key_out, int create = 1) |
int | export_config (const ACE_TCHAR* filename) |
int | import_config (const ACE_TCHAR* filename) |
int | operator== (const ACE_Configuration& rhs) const |
int | operator!= (const ACE_Configuration& rhs) const |
Protected Methods | |
ACE_Configuration (void) | |
Default ctor. | |
ACE_Section_Key_Internal* | get_internal_key (const ACE_Configuration_Section_Key& key) |
resolves the internal key from a section key. | |
int | validate_name (const ACE_TCHAR* name) |
ACE_Configuration (const ACE_Configuration& rhs) | |
ACE_Configuration& | operator= (const ACE_Configuration& rhs) |
Protected Attributes | |
ACE_Configuration_Section_Key | root_ |
This class provides an interface for configuration databases.
|
Enumeration for the various types of values we can store.
|
|
destructor.
|
|
Default ctor.
|
|
|
|
method to enumerate through the <name> subsections in <key>. To begin iteration, <index> must zero. to continue iteration, invoke enumerate_sections again while incrementing index. Each iteration will return the <name> of the sub section. This method returns 0 on success, <0 on error and 1 when there are no more subsections to iterate through. Note - you may not delete or add values while enumerating. If you need to do this, you start the enumeration over again. Reimplemented in ACE_Configuration_Win32Registry, and ACE_Configuration_Heap. |
|
method to enumerate through the <name> and <type> of values in a <key>. To begin iteration, <index> must be zero. to continue iteration, invoke enumerate_values again while incrementing index. Each iteration will return the <name> of the value and its <type>. This method returns 0 on success, <0 on error and 1 when there are no more values to iterate through. Note - you may not delete or add values while enumerating. If you need to do this, you start the enumeration over again. Reimplemented in ACE_Configuration_Win32Registry, and ACE_Configuration_Heap. |
|
Expands <path_in> to <key_out> from <key>. If create is true, the subsections are created. Returns 0 on success, non zero on error The path consists of sections separated by the backslash '\' or forward slash '/'. Returns 0 on success, -1 if <create) is 0 and the path refers a nonexistant section |
|
Exports the configuration database to filename. If <filename> is already present, it is overwritten. This function is deprecated and will be removed in a future version of ACE. Please use either ACE_Registry_ImpExp or ACE_Ini_ImpExp instead. |
|
checks to see if an entry of <name> is in <key> and places the data type in <type>. Returns 0 on success (entry is found), -1 on error Reimplemented in ACE_Configuration_Win32Registry, and ACE_Configuration_Heap. |
|
gets the binary value of <name> from <key> and places a copy in <data> and sets <length> to the length of the data. caller is responsible for deleting <data>. Returns non zero on error (if value is not binary). Reimplemented in ACE_Configuration_Win32Registry, and ACE_Configuration_Heap. |
|
gets the integer value of <name> from <key> and places it in <value>. Returns non zero on error (if value is not an integer).
Reimplemented in ACE_Configuration_Win32Registry, and ACE_Configuration_Heap. |
|
resolves the internal key from a section key.
|
|
gets the string value of <name> from <key> and places it in <value>. Returns non zero on error (if value is not a string).
Reimplemented in ACE_Configuration_Win32Registry, and ACE_Configuration_Heap. |
|
Imports the configuration database from filename. Any existing data is not removed. This function is deprecated and will be removed in a future version of ACE. Please use ACE_Registry_ImpExp or ACE_Ini_ImpExp instead. |
|
Finds a <sub_section> in <base> and places the resulting key in <result>. If create is non zero, the sub_section will be created if it doesn't exist Reimplemented in ACE_Configuration_Win32Registry, and ACE_Configuration_Heap. |
|
Determine if the contents of this object are different from the contents of the object on the right hand side. Returns 0 (False) if they are equal and 1 (True) if they are not equal |
|
|
|
Determine if the contents of this object is the same as the contents of the object on the right hand side. Returns 1 (True) if they are equal and 0 (False) if they are not equal |
|
Removes the <sub_section> from <key>. If recursive is non zero, any subkeys below <sub_section> are remove as well.
Reimplemented in ACE_Configuration_Win32Registry, and ACE_Configuration_Heap. |
|
Removes the the value <name> from <key>. returns non zero on error.
Reimplemented in ACE_Configuration_Win32Registry, and ACE_Configuration_Heap. |
|
Returns the root section of this configuration.
|
|
sets the value in <key> with <name> to binary data of <data> with <length>.
Reimplemented in ACE_Configuration_Win32Registry, and ACE_Configuration_Heap. |
|
sets the value in <key> with <name> to an integer of <value>.
Reimplemented in ACE_Configuration_Win32Registry, and ACE_Configuration_Heap. |
|
sets the value in <key> with <name> to a string of <value>.
Reimplemented in ACE_Configuration_Win32Registry, and ACE_Configuration_Heap. |
|
tests to see if <name> is valid. <name> must be < 255 characters and not contain the path separator '\', brackets [] or = (maybe just restrict to alphanumeric?) returns non zero if name is not valid |
|
|