From 398d1878c6c02f2e3d96ddd775d3c952fc509cd0 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 20 Feb 2018 13:22:08 +0100 Subject: tools.pas: tDateienMitDaten.sortiert ro exportiert --- tools.pas | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/tools.pas b/tools.pas index 3078e43..9bde238 100644 --- a/tools.pas +++ b/tools.pas @@ -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 ******************************************************* -- cgit v1.2.3-54-g00ecf