Class TmwSMSort (unit mwSMSort)

Inherits from

TObject

Constructors


constructor Create;

Create the list with default values


Functions

Procedure Add(item: String);

insert Line after current item, make newLine current

Procedure Delete(aLine: PLine);

Delete a given Line

Procedure DeleteEmptyLines;

Delete empty Lines

destructor Destroy;

Destroy the whole list, Line by Line

Function Getkey : string;

Retrive key of current Line.

Procedure LoadFromFile(FileName: String);


Procedure MoveFirst;

make first value in list current

Procedure MoveNext;

make next value in list current

Procedure SaveToFile(FileName: String);


Procedure Sort;

Start sorting

Function CompareLines(la, lb : PLine) : Integer;

Compare the key of two Lines

Function CreateLine(n:PLine; item:String):PLine;

Create a Line with given values

Function Merge(a0, lastA, PrevTodoNext : PLine): PLine;


Function MergeSort(lines : PLine; Count : Integer) : PLine;


Properties

property IgnoreCase : boolean


property Sorted : boolean


property Count : integer


Events

Variables

current : PLine;


FIgnore : boolean;


FSize : Integer;


FSorted : boolean;


head : PLine;


Line : PLine;



Constructors


constructor Create;

Create the list with default values


Functions


Procedure Add(item: String);

insert Line after current item, make newLine current


Procedure Delete(aLine: PLine);

Delete a given Line


Procedure DeleteEmptyLines;

Delete empty Lines


destructor Destroy;

Destroy the whole list, Line by Line


Function Getkey : string;

Retrive key of current Line.


Procedure LoadFromFile(FileName: String);


Procedure MoveFirst;

make first value in list current


Procedure MoveNext;

make next value in list current


Procedure SaveToFile(FileName: String);


Procedure Sort;

Start sorting


Function CompareLines(la, lb : PLine) : Integer;

Compare the key of two Lines


Function CreateLine(n:PLine; item:String):PLine;

Create a Line with given values


Function Merge(a0, lastA, PrevTodoNext : PLine): PLine;


Function MergeSort(lines : PLine; Count : Integer) : PLine;


Properties


property IgnoreCase : boolean


property Sorted : boolean


property Count : integer


Events


Variables


current : PLine;


FIgnore : boolean;


FSize : Integer;


FSorted : boolean;


head : PLine;


Line : PLine;