maxon.DataDictionaryObjectInterface¶
Description¶
Class to store and find any maxon.Data
type under any type of key.
Warning
Methods Signature¶
|
Remove a data entry from the dictionary. |
|
Get data stored under a specific key. If the key is not found an error will be returned.
|
|
Get data stored under a specific id. |
|
Checks if the dictionary is empty. |
|
Frees the entire dictionary. |
|
Set data under a specific id. this function is template to allow implicit Set calls for each data type.
|
|
Set |
Methods Definition¶
-
DataDictionaryObjectInterface.
EraseData
(key)¶ Remove a data entry from the dictionary.
Warning
This function doesn’t check if the dictionary contained the key.
-
DataDictionaryObjectInterface.
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(maxon.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.
-
DataDictionaryObjectInterface.
GetData
(key)¶ Get data stored under a specific id.
- Parameters
- Returns
maxon.Data
asmaxon.Data
class.- Return type
Any
maxon.Data
-
DataDictionaryObjectInterface.
IsEmpty
()¶ Checks if the dictionary is empty.
- Returns
True if the dictionary does not contain any elements.
- Return type
bool
-
DataDictionaryObjectInterface.
Reset
()¶ Frees the entire dictionary. After this call the DataDictionary is empty.
-
DataDictionaryObjectInterface.
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.
-
DataDictionaryObjectInterface.
SetData
(key, value)¶ Set
maxon.Data
under a specific id.- Parameters
value (Any
maxon.Data
) – Move reference to the data.