Elements within arrays are identified by their logical position within the array.
Elements can also be accessed by key.
For all of the arrays except: RArray<class T>
, RPointerArray<class T>
and any of their specialisations, the key structure is defined independently of the array itself, using:
a TKeyArrayFix
object for arrays of same length elements.
a TKeyArrayVar
object for arrays of variable length elements.
a TKeyArrayPak
object for arrays of packed (variable length) elements.
Accessing an element by key requires the appropriate TKeyArrayFix
, TKeyArrayVar
or TKeyArrayPak
object to be constructed and passed to the appropriate array class member function.
For the: RArray<class T>
, RPointerArray<class T>
arrays, keys are part of the array itself. These arrays also use the classes:
TLinearOrder<class T>
to define the ordering of two objects.
TIdentityRelation<class T>
to define the comparison of two objects.