maxon.DataDictionaryObjectInterface

Description

Class to store and find any maxon.Data type under any type of key.

Warning

This function is only there to expose a C++ Object to Python.
As a Python developer you normally don’t have to deal with this function.

Inheritance diagram

Inheritance

Parent Class:

Children Classes:

Methods Signature

EraseData(key) Remove a data entry from the dictionary.
Get(key[, defaultValue])
Get data stored under a specific key. If the key is not found an error will be returned.
GetData(key) Get data stored under a specific id.
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.
SetData(key, value) Set maxon.Data under a specific id.

Methods Definition

DataDictionaryObjectInterface.EraseData(key)

Remove a data entry from the dictionary.

Warning

This function doesn’t check if the dictionary contained the key.

Parameters:key (maxon.Id) – maxon.Id under which the data is stored.
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:
  1. Using an FId “dict.Get(maxon.MAXCHINEINFO.COMPUTERNAME)”.

  2. 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:key (maxon.Id) – maxon.Id under which the data is stored.
Returns:maxon.Data as maxon.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:
  1. Using an FId dict.Set(maxon.MAXCHINEINFO.COMPUTERNAME, “data”).
  2. 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: