type generic TGenericStructList<T> = class(TFPSList)
Description
Generic list of types that are compared by CompareByte.
This is equivalent to TFPGList, except it doesn't override IndexOf, so your type doesn't need to have a "=" operator built-in inside FPC. When calling IndexOf or Remove, it will simply compare values using CompareByte, this is what TFPSList.IndexOf uses. This way it works to create lists of records, vectors (constant size arrays), old-style TP objects, and also is suitable to create a list of methods (since for methods, the "=" is broken, for Delphi compatibility, see http://bugs.freepascal.org/view.php?id=9228).
We also add some trivial helper methods like Add and L.
Pointer to items. Exactly like List, but this points to a single item, which means you can access particular item by L[I] instead of Listˆ[I] in FPC objfpc mode.
This is just trivial shortcut, but we use direct access a lot for structures. Reasons: using Items[] default property means copying the structures, which is
very dangerous (you can trivially easy modify a temporary result)
slow (important for us, since these are used for vector arrays that are crucial for renderer and various processing).
function Add: PT;
Increase Count and return pointer to new item. Comfortable and efficient way to add a new item that you want to immediately initialize.
Properties
property Items[Index:Integer]: T read Get write Put;