About
The MAXON API ALIASES provides various array templates. These array types should be used instead of simple C-arrays to store data.
PointerArray
A maxon::PointerArray is optimized to store C++ pointers and owns the pointed objects.
- Note
- In general it is recommended to manage the lifetime of an object using references, see References.
{
storage.Disconnect();
}
SortedArray
A sorted array automatically sorts the stored elements on first read access.
class ExampleClassSortedArray :
public maxon::SortedArray<ExampleClassSortedArray, maxon::BaseArray<ExampleClass>>
{
public:
{
return a.GetValue() < b.GetValue();
}
{
return a.GetValue() == b.GetValue();
}
};
ExampleClassSortedArray sortedArray;
ExampleClass* const object = sortedArray.GetFirst();
if (object)
{
}
Utility
These generic array types are used to define functions that can be used with various array types:
Further Reading