About
A maxon::DataDictionary is a data container that stores arbitrary Maxon API data filed under a given key. The base interface is maxon::DataDictionaryInterface.
- Note
- For custom interfaces inheriting maxon::DataDictionary functionality use maxon::DataDictionaryObjectInterface.
Creation
A new maxon::DataDictionary object can be created on the stack:
maxon::DataDictionary dataDict;
int32_t Int32
32 bit signed integer datatype.
Definition: apibase.h:175
#define iferr_return
Definition: resultbase.h:1531
Keys and Values
A DataDictionary stores data for one or many keys. Both the stored data and the key must be a registered Maxon API data type (see MAXON Data Type).
- Note
- To access data with a defined type one can use resource IDs, see Resource IDs.
Definition: datatypebase.h:1747
Definition: datatypebase.h:1235
#define DiagnosticOutput(formatString,...)
Definition: debugdiagnostics.h:170
The data stored in the DataDictionary can be inspected and deleted with:
if (dataDict.Contains(key))
{
}
if (!dataDict.Contains(key))
Int64 Int
signed 32/64 bit int, size depends on the platform
Definition: apibase.h:187
Iterator
Using an iterator it is simple to loop through all elements stored in the DataDictionary.
for (const auto& data : dataDict)
{
}
const DataType & GetType() const
Definition: datatypebase.h:1288
Definition: datatypebase.h:770
Result< Data > GetCopy() const
Returns a copy of the data.
Definition: datatype.h:1234
Utility
Further utility functions are:
Definition: string.h:1287
UInt64 UInt
unsigned 32/64 bit int, size depends on the platform
Definition: apibase.h:188
Further Reading