The Conroy & Conroy Subroutine Library (2021.3 edition)

TCollection
What: class
File: Collect
Layer: 0
Platforms: C++, C#, Javascript, Pascal (All), PHP, Python

This class provides a collection of generic pointers (IntPtr in C#). For languages without strict typing (Javascript, PHP, Python, etc) This class stores collections of any data desired. The items in the collection are referenced by indexes (0 is the first).

At
void* At( int Index )
function At( Index : integer ) : pointer
Returns the item at the specified index.

AtDelete
void AtDelete( int Item )
procedure AtDelete( Index : integer )
Deletes the item at the specified index.

AtInsert
void AtInsert( int Index, void* Item )
procedure AtInsert( Index : integer ; Item : pointer )
Inserts the specified item at the specified index. The item previously at that index and all items above it are moved up one index.

AtPut
void AtPut( int Index, void* Value )
procedure AtPut( Index : integer ; Value : pointer )
Sets the value at a specific index.

Count
int Count()
function Count : integer
Returns the count of items in the collection.

Delete
void Delete( void* Item )
procedure Delete( Item : pointer )
Deletes the items matching the passed items.

DeleteAll
void DeleteAll()
procedure DeleteAll
Deletes all items in the collection.

IndexOf
int IndexOf( void* Item )
function IndexOf( Item : pointer ) : integer
Returns the index of the first item matching the passed value.

Insert
void Insert( void* Item )
procedure Insert( Item : pointer )
Adds the passed item to the end of the collection.

Limit
int Limit()
function Limit : integer
Returns the current capacity for the collection.

SetLimit
void SetLimit( int ALimit )
procedure SetLimit( ALimit : integer )
Sets the total capacity of the collection to the passed value.