CSet Class


The CSet class manages a collection of objects including numbers, strings, tables, classes, etc. Methods are provided for manipulating the collection. Pbjects must exist independent of the set, and adding or removing them from the collection does not create or delete them.

Usage

Construction

Object = CSet:new()

Destruction

Object:delete()

Construction

new

Creates a new instance of the CSet class

delete

Deletes the instance of the CSet object.

Copy

Copies this CSet to a new CSet

Operations

Add

Appends the end of the list with a new member.

Count

Returns the number of members actually initialized.

GetMember

Returns the member at an index.

GetIndex

Returns the index of a set member.

Insert

Inserts a new member into the list.

RemoveAt

Removes the member at an index.

RemoveFirst

Removes the member at the head of the list.

RemoveLast

Removes the member at the tail of the list.

Remove

Removes the member by matching its value.

Related Topics

CArray

Script Classes