maxon.DataDictionaryInterface¶
Description¶
Class to store and find any data type under any type of key.
Methods Signature¶
Get (key[, defaultValue]) |
Get data stored under a specific key. If the key is not found an error will be returned.
|
InitIterator (end) |
Helper functions for initialize an iterator. |
IsEmpty () |
Checks if the dictionary is empty. |
Reset () |
Frees the entire dictionary. |
Set (key, value) |
Set data under a specific id. this function is template to allow implicit Set calls for each data type.
|
Methods Definition¶
-
DataDictionaryInterface.
Get
(key, defaultValue=None)¶ - Get data stored under a specific key. If the key is not found an error will be returned.This functions offers 2 possible calls:
Using an FId “dict.Get(MAXCHINEINFO::COMPUTERNAME)”.
- Using any type directly together with the result type “dict.Get<String>(Int32(5))”.The data type needs to be registered.
Parameters: - key (Any) – Key under which the data is stored.
- defaultValue (Any.) – Default value which should be returned if the key cannot be found.
Returns: maxon.Data
converted to the right type if found in the dictionary,otherwise the default value.
-
DataDictionaryInterface.
InitIterator
(end)¶ Helper functions for initialize an iterator.
-
DataDictionaryInterface.
IsEmpty
()¶ Checks if the dictionary is empty.
Returns: True if the dictionary does not contain any elements. Return type: bool
-
DataDictionaryInterface.
Reset
()¶ Frees the entire dictionary. After this call the DataDictionary is empty.
-
DataDictionaryInterface.
Set
(key, value)¶ - Set data under a specific id. this function is template to allow implicit Set calls for each data type.This functions offers 2 possible calls:
- Using an FId dict.Set(maxon.MAXCHINEINFO.COMPUTERNAME, “data”).
- Using any type directly dict.Set(maxon.Int32(5), “data”). The data type needs to be registered.
Parameters: - key (Any) –
maxon.Id
under which the data is stored. - value (Any) – Move reference to the data.