diff options
-rw-r--r-- | tools.pas | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -26,8 +26,8 @@ type end; tDateienMitDaten = class(tFPList) private - sortiert: tLongintArray; - istSortiert: boolean; + sortiert: tLongintArray; + _istSortiert: boolean; procedure sortiereNachNamen; inline; procedure quickSort(li,re,ungeradheit: longint); function rItem(idx: longint): tDateiMitDatum; inline; @@ -40,6 +40,8 @@ type write wItem; default; property sItems[idx: longint]: tDateiMitDatum read rSItem; + property istSortiert: boolean + read _istSortiert; constructor create; destructor destroy; override; procedure mrProper; @@ -94,7 +96,7 @@ constructor tDateienMitDaten.create; begin inherited create; setLength(sortiert,0); - istSortiert:=true; + _istSortiert:=true; end; destructor tDateienMitDaten.destroy; @@ -113,7 +115,7 @@ begin for i:=0 to length(sortiert)-1 do sortiert[i]:=i; quickSort(0,count-1,0); - istSortiert:=true; + _istSortiert:=true; end; procedure tDateienMitDaten.quickSort(li,re,ungeradheit: longint); @@ -161,7 +163,7 @@ procedure tDateienMitDaten.wItem(idx: longint; neu: tDateiMitDatum); begin assert(neu.name<>'','wItem: Dateiname darf nicht leer sein!'); put(idx,neu); - istSortiert:=false; + _istSortiert:=false; end; function tDateienMitDaten.rSItem(idx: longint): tDateiMitDatum; inline; @@ -188,14 +190,14 @@ begin items[i].free; clear; setLength(sortiert,0); - istSortiert:=true; + _istSortiert:=true; end; function tDateienMitDaten.add(neu: tDateiMitDatum): longint; begin assert(neu.name<>'','add: Dateiname darf nicht leer sein!'); result:=inherited add(neu); - istSortiert:=false; + _istSortiert:=false; end; function tDateienMitDaten.gleicheNamenWie(dmd: tDateienMitDaten): boolean; @@ -269,7 +271,7 @@ begin for j:=length(sortiert)-1 downto i+1 do sortiert[j]:=sortiert[j-1]; sortiert[i]:=count-1; - istSortiert:=true; + _istSortiert:=true; end; istNeu:=true; result:=tDateiMitDatum(last); @@ -330,7 +332,7 @@ end; procedure tDateienMitDaten.delete(idx: longint); begin inherited delete(idx); - istSortiert:=false; + _istSortiert:=false; end; // allgemeine Funktionen ******************************************************* |