Type of map of strings to objects of type cVariant.
More...
|
tVariantMap | m_Map |
| The variant map.
|
|
Type of map of strings to objects of type cVariant.
Variant map class.
Definition at line 28 of file variantmap.h.
◆ cVariantMap()
Constructor that duplicates an existing variant map.
- Parameters
-
Map | [in] Map object to be copied. |
◆ Clear()
This function cleans up the map and frees all allocated memory blocks.
- Returns
- tVoid
◆ Copy()
This function assigns an existing variant map the cVariantMap object.
- Parameters
-
Map | [in] Map object to be copied. |
- Return values
-
ERR_NOERROR,if | everything was ok |
◆ Delete()
This function removes one item from the map.
- Parameters
-
sKey | [in] Key of map entry to be deleted. |
- Returns
- Returns true, if the item specified by sKey was found and removed, otherwise false.
◆ Get() [1/2]
This function retrieves a string value from the list.
- Parameters
-
sKey | [in] Key value of string to be fetched. |
vDefault | [in] Default value that is returned if the element was not found (default is an empty string). |
- Returns
- The function creates a cString object that is initialized with the contents of the referenced map item.
◆ Get() [2/2]
This function retrieves both the key and the string value from the list.
- Parameters
-
nIdx | [in] Zero-based index of map item. |
sKey | [out] Buffer for key value to be fetched. |
vValue | [out] Buffer for variant value to be fetched. |
- Returns
- Returns true, if the item was found, otherwise false.
◆ GetItemCount()
tSize GetItemCount |
( |
| ) |
const |
This function returns the number of items the map contains.
- Returns
- Returns the number of map items.
- This method is real-time safe.\nSee @ref page_real_time_safe.\n
◆ GetRef() [1/2]
This function retrieves a variant value reference from the list.
- Parameters
-
sKey | [in] Key value of string to be fetched. |
- Returns
- The function returns a reference to the map item.
- This method is real-time safe.\nSee @ref page_real_time_safe.\n
◆ GetRef() [2/2]
This function retrieves a variant value reference from the list.
- Parameters
-
nIdx | [in] Index of value to be fetched. |
- Returns
- The function returns a reference to the map item.
- This method is real-time safe.\nSee @ref page_real_time_safe.\n
◆ Initialize()
◆ IsEmpty()
Check if map is empty.
- Returns
- Returns true, if the map is empty.
- This method is real-time safe.\nSee @ref page_real_time_safe.\n
◆ operator=()
The cVariantMap assignment (=) operator reinitializes existing variant maps with an existing object.
- Parameters
-
Map | [in] Map object to be copied. |
- Returns
- Reference to cVariantMap object.
◆ operator[]() [1/2]
This function retrieves a variant value from the list.
- Parameters
-
sKey | [in] Key value of string to be fetched. |
- Returns
- The function creates a cVariant object that is initialized with the contents of the referenced map item.
- This method is real-time safe.\nSee @ref page_real_time_safe.\n
◆ operator[]() [2/2]
This function retrieves a variant value from the list.
- Parameters
-
nIdx | [in] Index of value to be fetched. |
- Returns
- The function creates a cVariant object that is initialized with the contents of the referenced map item.
- This method is real-time safe.\nSee @ref page_real_time_safe.\n
◆ Set()
This function stores a string value to the map.
- Parameters
-
sKey | [in] Key value of the element to be written to. |
vVariant | [in] Value that is to be written to the map. |
- Returns
- The function returns true, if the operation succeeded, and false otherwise.