| Description | Hierarchy | Fields | Methods | Properties |
type TDynArray_11 = class(TDynArrayBase)
![]() |
constructor Create; overload; |
![]() |
constructor Create(InitialLength: Integer); overload; |
![]() |
procedure AppendItem(const Item: TDynArrayItem_11); |
![]() |
procedure AppendArray(const NewItems: array of TDynArrayItem_11); overload; |
![]() |
procedure AppendArray(const NewItems: array of TDynArrayItem_11; NewItemsAddCount: integer); overload; |
![]() |
procedure AppendDynArray(Arr: TDynArray_11); |
![]() |
procedure Assign(Source: TDynArray_11); |
![]() |
procedure AssignArray(const NewItems: array of TDynArrayItem_11); |
![]() |
function EqualItems(const Item1, Item2: TDynArrayItem_11): boolean; |
![]() |
function Equal(DynArr: TDynArray_11): boolean; overload; |
![]() |
function Equal(const Arr: array of TDynArrayItem_11): boolean; overload; |
![]() |
function Equal(const Arr: array of TDynArrayItem_11; ArrCount: Integer): boolean; overload; |
![]() |
function IndexOf(const Item: TDynArrayItem_11): Integer; |
![]() |
function IndexInRange(const Item: TDynArrayItem_11; BeginIndex, EndIndex: Integer): Integer; |
![]() |
procedure DeleteFirstEqual(const Value: TDynArrayItem_11); |
![]() |
procedure DeleteAllEqual(const Value: TDynArrayItem_11); |
![]() |
procedure Delete(Index, DelCount: integer); |
![]() |
procedure Insert(Index: integer; const Item: TDynArrayItem_11); |
![]() |
procedure SetAll(const Item: TDynArrayItem_11); |
![]() |
procedure Sort(IsSmallerFunc: TDynArrayItemIsSmallerFunc_11; CountToUseSimpleSort: Integer = DefaultCountToUseSimpleSort); overload; |
![]() |
procedure Sort(IsSmallerFunc: TDynArrayItemIsSmallerFunc_11; FirstIndex, LastIndex: integer; CountToUseSimpleSort: Integer = DefaultCountToUseSimpleSort); overload; |
![]() |
procedure SortByObject(IsSmallerFunc: TDynArrayItemIsSmallerFuncByObject_11; CountToUseSimpleSort: Integer = DefaultCountToUseSimpleSort); overload; |
![]() |
procedure SortByObject(IsSmallerFunc: TDynArrayItemIsSmallerFuncByObject_11; FirstIndex, LastIndex: integer; CountToUseSimpleSort: Integer = DefaultCountToUseSimpleSort); overload; |
![]() |
property Items: PInfiniteArray_11 read GetItems; |
![]() |
property ItemsArray: PInfiniteArray_11 read GetItemsArray; |
![]() |
property Pointers[ItemNum: integer]: PDynArrayItem_11 read GetPointers; |
![]() |
property Values[ItemNum: integer]: TDynArrayItem_11
read GetValues write SetValues; |
![]() |
constructor Create; overload; |
![]() |
constructor Create(InitialLength: Integer); overload; |
![]() |
procedure AppendItem(const Item: TDynArrayItem_11); |
|
| |
![]() |
procedure AppendArray(const NewItems: array of TDynArrayItem_11); overload; |
![]() |
procedure AppendArray(const NewItems: array of TDynArrayItem_11; NewItemsAddCount: integer); overload; |
![]() |
procedure AppendDynArray(Arr: TDynArray_11); |
![]() |
procedure Assign(Source: TDynArray_11); |
|
Copies contents of Source to this object. This is equivalent to doing Remember that this is *not* a so-called deep copy, because if Source contains some pointers we're simply copying these pointers (not duplicating their content constructing new objects or something like that). This is just a simple copy of memory contents (well, with proper Initialize/Finalize in case DYNARRAY_11_IS_INIT_FINI_TYPE). | |
![]() |
procedure AssignArray(const NewItems: array of TDynArrayItem_11); |
|
This is equivalent to | |
![]() |
function EqualItems(const Item1, Item2: TDynArrayItem_11): boolean; |
![]() |
function Equal(DynArr: TDynArray_11): boolean; overload; |
![]() |
function Equal(const Arr: array of TDynArrayItem_11): boolean; overload; |
![]() |
function Equal(const Arr: array of TDynArrayItem_11; ArrCount: Integer): boolean; overload; |
![]() |
function IndexOf(const Item: TDynArrayItem_11): Integer; |
|
Returns -1 if not found | |
![]() |
function IndexInRange(const Item: TDynArrayItem_11; BeginIndex, EndIndex: Integer): Integer; |
|
Returns -1 if not found, searches within Items[BeginIndex] .. Items[EndIndex]. BeginIndex may be < 0 and EndIndex may be > High, it doesn't matter, the range will be "clamped" as it should. | |
![]() |
procedure DeleteFirstEqual(const Value: TDynArrayItem_11); |
|
Searches for and deletes first item equal to Value. | |
![]() |
procedure DeleteAllEqual(const Value: TDynArrayItem_11); |
|
Searches for and deletes all items equal to Value. | |
![]() |
procedure Delete(Index, DelCount: integer); |
|
Just like Note that Index and DelCount parameters will be checked for correctness and eventually corrected. So if Index is >= Count then nothing will be removed. And if DelCount items from Index would be larger than Count then DelCount will be corrected to be smaller. | |
![]() |
procedure Insert(Index: integer; const Item: TDynArrayItem_11); |
|
Inserts Item at position Index into array. Index must be in range 0 .. Count (yes, we can insert element at the end of the array). After insertion array has Count increased by 1, Items[Index] = Item and all items that were on positions [Index..old High] are now at [Index+1..new High]. | |
![]() |
procedure SetAll(const Item: TDynArrayItem_11); |
![]() |
procedure Sort(IsSmallerFunc: TDynArrayItemIsSmallerFunc_11; CountToUseSimpleSort: Integer = DefaultCountToUseSimpleSort); overload; |
|
Sorts items. All you have to do is to pass some IsSmallerFunc – see KambiUtils.Sort for specification what it should do, but note that TDynArrayItemIsSmallerFunc_11 here gets parameter types already casted to TDynArrayItem_11, instead of dirty pointers (like IsSmallerFunc that must be passed to KambiUtils.Sort). If you don't give First/LastIndex it assumes FirstIndex = 0 and LastIndex = High, so the whole array will be sorted. | |
![]() |
procedure Sort(IsSmallerFunc: TDynArrayItemIsSmallerFunc_11; FirstIndex, LastIndex: integer; CountToUseSimpleSort: Integer = DefaultCountToUseSimpleSort); overload; |
![]() |
procedure SortByObject(IsSmallerFunc: TDynArrayItemIsSmallerFuncByObject_11; CountToUseSimpleSort: Integer = DefaultCountToUseSimpleSort); overload; |
![]() |
procedure SortByObject(IsSmallerFunc: TDynArrayItemIsSmallerFuncByObject_11; FirstIndex, LastIndex: integer; CountToUseSimpleSort: Integer = DefaultCountToUseSimpleSort); overload; |
![]() |
property Items: PInfiniteArray_11 read GetItems; |
|
This is a comfortable Items property, that allows you to both read and write items in this array. Note that it has different types: for Delphi (and FPC Delphi mode) it has PInfiniteArray_11 type, for ObjFpc mode is has PDynArrayItem_11. This way you can always access items like | |
![]() |
property ItemsArray: PInfiniteArray_11 read GetItemsArray; |
|
This is like Items, but it has always (both for FPC ObjFpc mode and Delphi) type PInfiniteArray_11. This means that you can always read/write items like | |
![]() |
property Pointers[ItemNum: integer]: PDynArrayItem_11 read GetPointers; |
![]() |
property Values[ItemNum: integer]: TDynArrayItem_11
read GetValues write SetValues; |