#include <uasettingssection.h>
List of all members.
|
Public Member Functions |
| UaSettingsSection (const UaUniString &sGroup) |
| ~UaSettingsSection () |
bool | removeKey (const UaUniString &sKey) |
void | setValue (const UaUniString &sKey, const UaUniString &sValue) |
UaUniString | getValue (const UaUniString &sKey, const UaUniString &sDefaultValue) |
UaSettingsSection * | findSettingsSection (const UaUniString &sGroup) |
void | addSettingsSubSection (const UaUniString &sGroup, UaSettingsSection *pSubSection) |
void | setParentSection (UaSettingsSection *pParent) |
UaSettingsSection * | getParentSection () |
void | getAllSubSections (UaUniStringList *sList, int *index, UaUniString sPrefix) |
void | getAllSubKeys (UaUniStringList *sList, int *index, UaUniString sPrefix) |
void | getAllKeyValueStrings (UaUniStringList *sList, int *index, UaUniString sPrefix) |
void | getKeyValuePairs (UaUniStringList *sList, int *index, UaUniString sPrefix) |
UaUniString | getGroup () |
Detailed Description
The
UaSettingsSection class provides persistent platform-independent application settings.
UaSettingsSection is a classical helper class to create the information needed for the class
UaSettings. This class looks after the correct handling of the (sub) sections, keys and values needed to create an ini file. All information which will be written to the file is holded in the memory during runtime and will be written into a file when the object will be destroyed.
Constructor & Destructor Documentation
UaSettingsSection::UaSettingsSection |
( |
const UaUniString & |
sGroup |
) |
|
Construction with value
- Parameters:
-
| sGroup | the name of a section to write into the map. |
UaSettingsSection::~UaSettingsSection |
( |
|
) |
|
Member Function Documentation
bool UaSettingsSection::removeKey |
( |
const UaUniString & |
sKey |
) |
|
This method removes a given key sKey from the map.
- Parameters:
-
- Returns:
- true if the key was successfully removed, false if not.
Writes a new value sValue with the given key sKey into the map. It is not allowed to write the same key more than one time in the same section into the map.
- Parameters:
-
| sKey | the key to write into the map. |
| sValue | the value of the given key to write into the map. |
This method iterates over all key/value pairs in the map and searches for the wanted value of the given key sKey.
- Parameters:
-
| sKey | the key to search its value for. |
| sDefaultValue | the default value to return if the wanted value was not found. |
- Returns:
- Either the found value or the default value if the wanted value was not found. If there is no default value set, a default value will be generated (= "OPCUA_NULL") and returned.
This method will return the actual section of the map. If there is no section found NULL will be returned.
- Parameters:
-
| sGroup | the section to find in the map. |
- Returns:
- NULL if the wanted section sGroup was not found, otherwise the found section sGroup.
Add s a new sub section to the map. This sub section is another child of the actual section set in the map of the UaSettings class.
- Parameters:
-
| sGroup | the actual group / section where the subsection should be added. |
| sSubSection | the actual subsection of the primary section. |
Sets the parent section to remember it, if there is a sub section.
- Parameters:
-
| pParent | the pointer to the parent section. |
Getter method for the parent section. Needed to get the parent of a sub section.
- Returns:
- a pointer to the parent section.
Get the sub sections (if available) for all sections of the ini file.
- Parameters:
-
| sList | [out] the list where to write all sub sections in. |
| index | [out] the index for writting in the correct area. |
| prefix | [in] the prefix "/" to separate the subsections from the key - value pair. |
Get the sub sections (if available) for all sections of the ini file. After getting the actual sub section - get its key - value pairs (if available).
- Parameters:
-
| sList | [out] the list where to write all sub sections in. |
| index | [out] the index for writting in the correct area. |
| prefix | [in] the prefix "/" to separate the subsections from the key - value pair. |
Get the "key" and "value" for the ini file. These keys and values also represent the key and value structure in a map.
- Parameters:
-
[out] | the | list where to write all key values of in. |
[out] | the | index for writting in the correct area. |
[in] | the | prefix "/" to separate the subsections from the key - value pair. |
Getter method for the actual group / section. Needed to get the actual section name.
- Returns:
- the actual section name.
The documentation for this class was generated from the following files:
- src/uabase/uabasecpp/uasettingssection.h
- src/uabase/uabasecpp/uasettingssection.cpp