| Class TSortList (unit SortList) |
TObject
This it the sorted list class
| Constructors |
constructor Create;Active record number (starting from 1
| Functions |
procedure Append;*OK* Clear record
procedure Cancel;Find the perfect place
procedure Define(var NonIndex,EndMark);
procedure Delete;Append where last was deleted
destructor Destroy;
procedure Edit;*OK* Append one record
procedure EmptyTable;
function FindKey(const Values: array of const):boolean;Start searching .
procedure First;*OK* Edit record
procedure Last;*OK* To first record
procedure Move(a:integer);*OK* Move one back
procedure Next;*OK* To last record
procedure Post;*OK* Write record (from vars to table
procedure Prior;*OK* Move one forward
procedure ClearRecord;*OK* Destroy indexed table
function Find(const s:ShortString):boolean;*OK* Make table Empty
function GoToNearest:boolean;Move Higher
procedure InsertRecord;*OK* Cancel editing data
procedure ReadRecord;*OK* Move in any direction
procedure WriteRecord;*OK* Read record (from table to vars
| Properties |
property BOF : boolean
property EOF : boolean
property RecNo : integer
property RecordCount : integer| Events |
| Variables |
FBoF : boolean;
FData : TDataPtr;
FEoF : boolean;
FIndex : TListDataPtr;
FISize : byte;
FISize2 : byte;
FPtr : pointer;
FRecNo : integer;
FRecordCount : integer;
FSize : integer;
FSize2 : integer;
MaxRecordCount : integer;
Temp : integer;| Constructors |
constructor Create;Find best match
Active record number (starting from 1
| Functions |
procedure Append;Make table Empty
*OK* Clear record
procedure Cancel;Save data to memory table
Find the perfect place
procedure Define(var NonIndex,EndMark);NonIndex = First non-indexed field in the record definition. If all fields are indexed, send the End-mark field here EndMark = byte (or boolean) end-mark field, put it after the last record field. (doesn't belong to record definition, isn't memorized
procedure Delete;Start editing data
Append where last was deleted
destructor Destroy;Prepare empty record
procedure Edit;Append one record
*OK* Append one record
procedure EmptyTable;No more records ?
function FindKey(const Values: array of const):boolean;Cancel editing or appending
Start searching ...
procedure First;Delete this record
*OK* Edit record
procedure Last;To first record
*OK* To first record
procedure Move(a:integer);Move one back
*OK* Move one back
procedure Next;To last record
*OK* To last record
procedure Post;Move in any direction
*OK* Write record (from vars to table
procedure Prior;Move one forward
*OK* Move one forward
procedure ClearRecord;Record fields size (in bytes -> includes index size
*OK* Destroy indexed table
function Find(const s:ShortString):boolean;Go to nearest record (matching index fields only), return TRUE if exact found
*OK* Make table Empty
function GoToNearest:boolean;Insert one empty record (before this one
Move Higher
procedure InsertRecord;Write data to memory
*OK* Cancel editing data
procedure ReadRecord;Clear all data - empty table
*OK* Move in any direction
procedure WriteRecord;Read data from memory
*OK* Read record (from table to vars
| Properties |
property BOF : booleanSearch for a specific record (all key fields have to match
property EOF : booleanTried to pass the begining of "File" ?
property RecNo : integerNumber of records in a list
property RecordCount : integerTried to pass the end of "File" ?
| Events |
| Variables |
FBoF : boolean;Pointer to data table
FData : TDataPtr;Pointer to index table
FEoF : boolean;
FIndex : TListDataPtr;Points to active record
FISize : byte;at Begining Of File, at End Of File ?
FISize2 : byte;
FPtr : pointer;
FRecNo : integer;Real table record count
FRecordCount : integer;Last known maximal record count (allocated memory
FSize : integer;Size with additional index-length byte (for index comparisson
FSize2 : integer;Index fields size (in bytes), deleted record mark
MaxRecordCount : integer;Points to the first variable
Temp : integer;