Declaration¶
Source position: fgl.pp line 49
type
TFPSList = class(TObject)
public
constructor Create;
destructor Destroy;
class function ItemIsManaged : Boolean;
function Add : Integer;
procedure Clear;
procedure Delete;
procedure DeleteRange;
class procedure Error;
procedure Exchange;
function Expand : TFPSList;
procedure Extract;
function IndexOf : Integer;
procedure Insert(Index: Integer; Item: Pointer);
function Insert(Index: Integer) : Pointer;
function InsertRange : pointer;
procedure Move;
procedure Assign;
procedure AddList;
function Remove : Integer;
procedure Pack;
procedure Sort(Compare: TFPSListCompareFunc);
procedure Sort(Compare: TFPSListCompareFunc;
SortingAlgorithm: PSortingAlgorithm);
procedure SortRange(aStartIndex: Integer; aEndIndex: Integer;
aCompare: TFPSListCompareFunc);
procedure SortRange(aStartIndex: Integer; aEndIndex: Integer;
aCompare: TFPSListCompareFunc;
aSortingAlgorithm: PSortingAlgorithm);
property Capacity: Integer; {rw}
property Count: Integer; {rw}
property Items[Index : Integer]: Pointer; {rw}
property ItemSize: Integer; {r}
property List: PByte; {r}
property First: Pointer; {rw}
property Last: Pointer; {rw}
end;
Description¶
TFPSList can be seen as the generalized equivalent of the classes unit TFPList list. It is used as a base class for the TFPGList, TFPGMap, TFPGObjectList, TFPGInterfacedObjectList and TFPGMapInterfacedObjectData generic classes.
This list is not meant to be used directly, it is an auxiliary class for the actual generic list classes.
Properties¶
| Member | Visibility | Description |
|---|---|---|
| Capacity | public | Current capacity of the list. |
| Count | public | Current element count. |
| First | public | Pointer to first non-empty item in the list. |
| Items | public | Items in the list. |
| ItemSize read only | public | Size of the items in the list. |
| Last | public | Pointer to last non-empty item in the list. |
| List read only | public | Internal list pointer. |
Methods¶
| Member | Visibility | Description |
|---|---|---|
| Add | public | Add a new item to the list. |
| AddList | public | Adds the elements from another list. |
| Assign | public | Copy one list to another. |
| Clear | public | Clear the list. |
| Create | public | Create a new instance of TFPSList. |
| Delete | public | Delete an item from the list. |
| DeleteRange | public | Delete a range of elements. |
| Destroy | public | Destroy the list instance. |
| Error | public | Raise an EListError exception. |
| Exchange | public | Exchange two items in the list. |
| Expand | public | Expand the capacity of the list. |
| Extract | public | delete an element from the list. |
| IndexOf | public | Search an item in the list. |
| Insert | public | Insert a new item in the list. |
| InsertRange | public | |
| ItemIsManaged | public | Indicates whether the list item is a managed type or not. |
| Move | public | Moves an item from one position in the list to another. |
| Pack | public | Remove empty items from the list. |
| Remove | public | Remove the item from the list. |
| Sort | public | Sort the list. |
| SortRange | public |
See also¶
| Name | Description |
|---|---|
| classes.TFPList | Class to manage collections of pointers. |
| TFPGMap | Generic map. |
| TFPGObjectList | Generic object list. |
| TFPGInterfacedObjectList | Generic interfaced object list. |
| TFPGMapInterfacedObjectData | Generic map for reference counted objects. |