You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(20) |
May
(48) |
Jun
(8) |
Jul
(23) |
Aug
(41) |
Sep
(42) |
Oct
(22) |
Nov
(17) |
Dec
(36) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(43) |
Feb
(42) |
Mar
(17) |
Apr
(39) |
May
(16) |
Jun
(35) |
Jul
(37) |
Aug
(47) |
Sep
(49) |
Oct
(9) |
Nov
(52) |
Dec
(37) |
| 2008 |
Jan
(48) |
Feb
(21) |
Mar
(7) |
Apr
(2) |
May
(5) |
Jun
(17) |
Jul
(17) |
Aug
(40) |
Sep
(58) |
Oct
(38) |
Nov
(19) |
Dec
(32) |
| 2009 |
Jan
(67) |
Feb
(46) |
Mar
(54) |
Apr
(34) |
May
(37) |
Jun
(52) |
Jul
(67) |
Aug
(72) |
Sep
(48) |
Oct
(35) |
Nov
(27) |
Dec
(12) |
| 2010 |
Jan
(56) |
Feb
(46) |
Mar
(19) |
Apr
(14) |
May
(21) |
Jun
(3) |
Jul
(13) |
Aug
(48) |
Sep
(34) |
Oct
(51) |
Nov
(16) |
Dec
(32) |
| 2011 |
Jan
(36) |
Feb
(14) |
Mar
(12) |
Apr
(3) |
May
(5) |
Jun
(24) |
Jul
(15) |
Aug
(30) |
Sep
(21) |
Oct
(4) |
Nov
(25) |
Dec
(23) |
| 2012 |
Jan
(45) |
Feb
(42) |
Mar
(19) |
Apr
(14) |
May
(13) |
Jun
(7) |
Jul
(3) |
Aug
(46) |
Sep
(21) |
Oct
(10) |
Nov
(2) |
Dec
|
| 2013 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <ou...@us...> - 2007-12-02 15:46:30
|
Revision: 2262
http://jcl.svn.sourceforge.net/jcl/?rev=2262&view=rev
Author: outchy
Date: 2007-12-02 07:46:23 -0800 (Sun, 02 Dec 2007)
Log Message:
-----------
reworked threadsafe support (lock delegates now inlined)
introduction of ReadOnly and ThreadSafe properties to containers
Modified Paths:
--------------
trunk/jcl/source/common/JclAbstractContainers.pas
trunk/jcl/source/common/JclArrayLists.pas
trunk/jcl/source/common/JclArraySets.pas
trunk/jcl/source/common/JclBinaryTrees.pas
trunk/jcl/source/common/JclContainerIntf.pas
trunk/jcl/source/common/JclHashMaps.pas
trunk/jcl/source/common/JclHashSets.pas
trunk/jcl/source/common/JclLinkedLists.pas
trunk/jcl/source/common/JclQueues.pas
trunk/jcl/source/common/JclResources.pas
trunk/jcl/source/common/JclSortedMaps.pas
trunk/jcl/source/common/JclStacks.pas
trunk/jcl/source/common/JclTrees.pas
trunk/jcl/source/common/JclVectors.pas
trunk/jcl/source/prototypes/JclArrayLists.pas
trunk/jcl/source/prototypes/JclArraySets.pas
trunk/jcl/source/prototypes/JclBinaryTrees.pas
trunk/jcl/source/prototypes/JclHashMaps.pas
trunk/jcl/source/prototypes/JclHashSets.pas
trunk/jcl/source/prototypes/JclLinkedLists.pas
trunk/jcl/source/prototypes/JclQueues.pas
trunk/jcl/source/prototypes/JclSortedMaps.pas
trunk/jcl/source/prototypes/JclStacks.pas
trunk/jcl/source/prototypes/JclTrees.pas
trunk/jcl/source/prototypes/JclVectors.pas
trunk/jcl/source/prototypes/Makefile.mak
trunk/jcl/source/prototypes/containers/JclArrayLists.imp
trunk/jcl/source/prototypes/containers/JclArraySets.imp
trunk/jcl/source/prototypes/containers/JclBinaryTrees.imp
trunk/jcl/source/prototypes/containers/JclHashMaps.imp
trunk/jcl/source/prototypes/containers/JclHashSets.imp
trunk/jcl/source/prototypes/containers/JclLinkedLists.imp
trunk/jcl/source/prototypes/containers/JclQueues.imp
trunk/jcl/source/prototypes/containers/JclSortedMaps.imp
trunk/jcl/source/prototypes/containers/JclStacks.imp
trunk/jcl/source/prototypes/containers/JclTrees.imp
trunk/jcl/source/prototypes/containers/JclVectors.imp
Added Paths:
-----------
trunk/jcl/source/prototypes/containers/JclContainerCommon.imp
Modified: trunk/jcl/source/common/JclAbstractContainers.pas
===================================================================
--- trunk/jcl/source/common/JclAbstractContainers.pas 2007-12-01 17:45:12 UTC (rev 2261)
+++ trunk/jcl/source/common/JclAbstractContainers.pas 2007-12-02 15:46:23 UTC (rev 2262)
@@ -64,7 +64,7 @@
TJclAbstractLockable = class(TInterfacedObject {$IFDEF THREADSAFE}, IJclLockable {$ENDIF THREADSAFE})
{$IFDEF THREADSAFE}
private
- FLockDelegate: IJclLockable;
+ FThreadSafe: Boolean;
{$IFDEF CLR}
FReaderWriterLock: ReaderWriterLock;
FUpgradedWrite: Boolean;
@@ -80,8 +80,7 @@
public
destructor Destroy; override;
{$ENDIF THREADSAFE}
- public
- constructor Create(const ALockDelegate: IInterface);
+ constructor Create;
end;
TJclAbstractContainerBase = class(TJclAbstractLockable, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
@@ -91,6 +90,7 @@
FDuplicates: TDuplicates;
FRemoveSingleElement: Boolean;
FReturnDefaultElements: Boolean;
+ FReadOnly: Boolean;
FCapacity: Integer;
FSize: Integer;
FAutoGrowParameter: Integer;
@@ -109,12 +109,16 @@
function GetAllowDefaultElements: Boolean; virtual;
function GetContainerReference: TObject;
function GetDuplicates: TDuplicates; virtual;
+ function GetReadOnly: Boolean; virtual;
function GetRemoveSingleElement: Boolean; virtual;
function GetReturnDefaultElements: Boolean; virtual;
+ function GetThreadSafe: Boolean; virtual;
procedure SetAllowDefaultElements(Value: Boolean); virtual;
procedure SetDuplicates(Value: TDuplicates); virtual;
+ procedure SetReadOnly(Value: Boolean); virtual;
procedure SetRemoveSingleElement(Value: Boolean); virtual;
procedure SetReturnDefaultElements(Value: Boolean); virtual;
+ procedure SetThreadSafe(Value: Boolean); virtual;
{ IJclCloneable }
function Clone: TObject;
{ IJclIntfCloneable }
@@ -139,11 +143,13 @@
procedure SetAutoPackStrategy(Value: TJclAutoPackStrategy); virtual;
procedure SetCapacity(Value: Integer); virtual;
public
- constructor Create(const ALockDelegate: IInterface);
+ constructor Create;
property AllowDefaultElements: Boolean read GetAllowDefaultElements write SetAllowDefaultElements;
property Duplicates: TDuplicates read GetDuplicates write SetDuplicates;
+ property ReadOnly: Boolean read GetReadOnly write SetReadOnly;
property RemoveSingleElement: Boolean read GetRemoveSingleElement write SetRemoveSingleElement;
property ReturnDefaultElements: Boolean read GetReturnDefaultElements write SetReturnDefaultElements;
+ property ThreadSafe: Boolean read GetThreadSafe write SetThreadSafe;
property AutoGrowParameter: Integer read GetAutoGrowParameter write SetAutoGrowParameter;
property AutoGrowStrategy: TJclAutoGrowStrategy read GetAutoGrowStrategy write SetAutoGrowStrategy;
property AutoPackParameter: Integer read GetAutoPackParameter write SetAutoPackParameter;
@@ -168,7 +174,7 @@
function IntfClone: IInterface;
function IJclIntfCloneable.Clone = IntfClone;
public
- constructor Create(const ALockDelegate: IInterface; AValid: Boolean);
+ constructor Create(AValid: Boolean);
property Valid: Boolean read FValid write FValid;
end;
@@ -528,7 +534,7 @@
procedure SetHashConvert(Value: THashConvert); virtual;
function Hash(AObject: TObject): Integer; virtual;
public
- constructor Create(const ALockDelegate: IInterface; AOwnsObjects: Boolean);
+ constructor Create(AOwnsObjects: Boolean);
property OwnsObjects: Boolean read FOwnsObjects;
property EqualityCompare: TEqualityCompare read GetEqualityCompare write SetEqualityCompare;
property Compare: TCompare read GetCompare write SetCompare;
@@ -563,7 +569,7 @@
procedure SetHashConvert(Value: THashConvert<T>); virtual;
function Hash(const AItem: T): Integer; virtual;
public
- constructor Create(const ALockDelegate: IInterface; AOwnsItems: Boolean);
+ constructor Create(AOwnsItems: Boolean);
property OwnsItems: Boolean read FOwnsItems;
property EqualityCompare: TEqualityCompare<T> read GetEqualityCompare write SetEqualityCompare;
property Compare: TCompare<T> read GetCompare write SetCompare;
@@ -652,17 +658,16 @@
//=== { TJclAbstractLockable } ===============================================
-constructor TJclAbstractLockable.Create(const ALockDelegate: IInterface);
+constructor TJclAbstractLockable.Create;
begin
inherited Create;
{$IFDEF THREADSAFE}
- FLockDelegate := ALockDelegate as IJclLockable;
- if FLockDelegate = nil then
- {$IFDEF CLR}
- FReaderWriterLock := ReaderWriterLock.Create;
- {$ELSE ~CLR}
- FCriticalSection := TCriticalSection.Create;
- {$ENDIF ~CLR}
+ {$IFDEF CLR}
+ FReaderWriterLock := ReaderWriterLock.Create;
+ {$ELSE ~CLR}
+ FCriticalSection := TCriticalSection.Create;
+ {$ENDIF ~CLR}
+ FThreadSafe := True;
{$ENDIF THREADSAFE}
end;
@@ -674,15 +679,13 @@
{$ELSE ~CLR}
FCriticalSection.Free;
{$ENDIF ~CLR}
- FLockDelegate := nil;
inherited Destroy;
end;
procedure TJclAbstractLockable.ReadLock;
begin
- if FLockDelegate <> nil then
- FLockDelegate.ReadLock
- else
+ if FThreadSafe then
+ begin
{$IFDEF CLR}
// if current thread has write access, no need to request a read access
if not FReaderWriterLock.IsWriterLockHeld then
@@ -690,13 +693,13 @@
{$ELSE ~CLR}
FCriticalSection.Acquire;
{$ENDIF ~CLR}
+ end;
end;
procedure TJclAbstractLockable.ReadUnlock;
begin
- if FLockDelegate <> nil then
- FLockDelegate.ReadUnlock
- else
+ if FThreadSafe then
+ begin
{$IFDEF CLR}
// if current thread has write access, no need to release read access
if not FReaderWriterLock.IsWriterLockHeld then
@@ -704,13 +707,13 @@
{$ELSE ~CLR}
FCriticalSection.Release;
{$ENDIF ~CLR}
+ end;
end;
procedure TJclAbstractLockable.WriteLock;
begin
- if FLockDelegate <> nil then
- FLockDelegate.WriteLock
- else
+ if FThreadSafe then
+ begin
{$IFDEF CLR}
if FReaderWriterLock.IsReaderLockHeld then
begin
@@ -722,13 +725,13 @@
{$ELSE ~CLR}
FCriticalSection.Acquire;
{$ENDIF ~CLR}
+ end;
end;
procedure TJclAbstractLockable.WriteUnlock;
begin
- if FLockDelegate <> nil then
- FLockDelegate.WriteUnlock
- else
+ if FThreadSafe then
+ begin
{$IFDEF CLR}
if FUpgradedWrite then
begin
@@ -740,14 +743,15 @@
{$ELSE ~CLR}
FCriticalSection.Release;
{$ENDIF ~CLR}
+ end;
end;
{$ENDIF THREADSAFE}
//=== { TJclAbstractContainerBase } ==========================================
-constructor TJclAbstractContainerBase.Create(const ALockDelegate: IInterface);
+constructor TJclAbstractContainerBase.Create;
begin
- inherited Create(ALockDelegate);
+ inherited Create;
FAllowDefaultElements := True;
FDuplicates := dupAccept;
@@ -767,6 +771,8 @@
procedure TJclAbstractContainerBase.AssignDataTo(Dest: TJclAbstractContainerBase);
begin
// override to customize
+ if Dest.ReadOnly then
+ raise EJclReadOnlyError.Create;
end;
procedure TJclAbstractContainerBase.AssignPropertiesTo(Dest: TJclAbstractContainerBase);
@@ -925,6 +931,11 @@
Result := FDuplicates;
end;
+function TJclAbstractContainerBase.GetReadOnly: Boolean;
+begin
+ Result := FReadOnly;
+end;
+
function TJclAbstractContainerBase.GetRemoveSingleElement: Boolean;
begin
Result := FRemoveSingleElement;
@@ -935,6 +946,15 @@
Result := FReturnDefaultElements;
end;
+function TJclAbstractContainerBase.GetThreadSafe: Boolean;
+begin
+ {$IFDEF THREADSAFE}
+ Result := FThreadSafe;
+ {$ELSE ~THREADSAFE}
+ Result := False;
+ {$ENDIF ~THREADSAFE}
+end;
+
procedure TJclAbstractContainerBase.Grow;
begin
// override to customize
@@ -1000,6 +1020,11 @@
FDuplicates := Value;
end;
+procedure TJclAbstractContainerBase.SetReadOnly(Value: Boolean);
+begin
+ FReadOnly := Value;
+end;
+
procedure TJclAbstractContainerBase.SetRemoveSingleElement(Value: Boolean);
begin
FRemoveSingleElement := Value;
@@ -1010,11 +1035,21 @@
FReturnDefaultElements := Value;
end;
+procedure TJclAbstractContainerBase.SetThreadSafe(Value: Boolean);
+begin
+ {$IFDEF THREADSAFE}
+ FThreadSafe := Value;
+ {$ELSE ~THREADSAFE}
+ if Value then
+ raise EJclOperationNotSupportedError.Create;
+ {$ENDIF ~THREADSAFE}
+end;
+
//=== { TJclAbstractIterator } ===============================================
-constructor TJclAbstractIterator.Create(const ALockDelegate: IInterface; AValid: Boolean);
+constructor TJclAbstractIterator.Create(AValid: Boolean);
begin
- inherited Create(ALockDelegate);
+ inherited Create;
FValid := AValid;
end;
@@ -2077,9 +2112,9 @@
//=== { TJclAbstractContainer } ==============================================
-constructor TJclAbstractContainer.Create(const ALockDelegate: IInterface; AOwnsObjects: Boolean);
+constructor TJclAbstractContainer.Create(AOwnsObjects: Boolean);
begin
- inherited Create(ALockDelegate);
+ inherited Create;
FOwnsObjects := AOwnsObjects;
end;
@@ -2182,9 +2217,9 @@
{$IFDEF SUPPORTS_GENERICS}
//=== { TJclAbstractContainer<T> } ===========================================
-constructor TJclAbstractContainer<T>.Create(const ALockDelegate: IInterface; AOwnsItems: Boolean);
+constructor TJclAbstractContainer<T>.Create(AOwnsItems: Boolean);
begin
- inherited Create(ALockDelegate);
+ inherited Create;
FOwnsItems := AOwnsItems;
end;
Modified: trunk/jcl/source/common/JclArrayLists.pas
===================================================================
--- trunk/jcl/source/common/JclArrayLists.pas 2007-12-01 17:45:12 UTC (rev 2261)
+++ trunk/jcl/source/common/JclArrayLists.pas 2007-12-02 15:46:23 UTC (rev 2262)
@@ -716,7 +716,7 @@
constructor TIntfItr.Create(const AOwnList: IJclIntfList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
- inherited Create(AOwnList, AValid);
+ inherited Create(AValid);
FOwnList := AOwnList;
FStart := AStart;
FCursor := ACursor;
@@ -897,7 +897,7 @@
constructor TAnsiStrItr.Create(const AOwnList: IJclAnsiStrList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
- inherited Create(AOwnList, AValid);
+ inherited Create(AValid);
FOwnList := AOwnList;
FStart := AStart;
FCursor := ACursor;
@@ -1078,7 +1078,7 @@
constructor TWideStrItr.Create(const AOwnList: IJclWideStrList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
- inherited Create(AOwnList, AValid);
+ inherited Create(AValid);
FOwnList := AOwnList;
FStart := AStart;
FCursor := ACursor;
@@ -1259,7 +1259,7 @@
constructor TSingleItr.Create(const AOwnList: IJclSingleList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
- inherited Create(AOwnList, AValid);
+ inherited Create(AValid);
FOwnList := AOwnList;
FStart := AStart;
FCursor := ACursor;
@@ -1440,7 +1440,7 @@
constructor TDoubleItr.Create(const AOwnList: IJclDoubleList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
- inherited Create(AOwnList, AValid);
+ inherited Create(AValid);
FOwnList := AOwnList;
FStart := AStart;
FCursor := ACursor;
@@ -1621,7 +1621,7 @@
constructor TExtendedItr.Create(const AOwnList: IJclExtendedList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
- inherited Create(AOwnList, AValid);
+ inherited Create(AValid);
FOwnList := AOwnList;
FStart := AStart;
FCursor := ACursor;
@@ -1802,7 +1802,7 @@
constructor TIntegerItr.Create(const AOwnList: IJclIntegerList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
- inherited Create(AOwnList, AValid);
+ inherited Create(AValid);
FOwnList := AOwnList;
FStart := AStart;
FCursor := ACursor;
@@ -1983,7 +1983,7 @@
constructor TCardinalItr.Create(const AOwnList: IJclCardinalList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
- inherited Create(AOwnList, AValid);
+ inherited Create(AValid);
FOwnList := AOwnList;
FStart := AStart;
FCursor := ACursor;
@@ -2164,7 +2164,7 @@
constructor TInt64Itr.Create(const AOwnList: IJclInt64List; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
- inherited Create(AOwnList, AValid);
+ inherited Create(AValid);
FOwnList := AOwnList;
FStart := AStart;
FCursor := ACursor;
@@ -2346,7 +2346,7 @@
constructor TPtrItr.Create(const AOwnList: IJclPtrList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
- inherited Create(AOwnList, AValid);
+ inherited Create(AValid);
FOwnList := AOwnList;
FStart := AStart;
FCursor := ACursor;
@@ -2528,7 +2528,7 @@
constructor TItr.Create(const AOwnList: IJclList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
- inherited Create(AOwnList, AValid);
+ inherited Create(AValid);
FOwnList := AOwnList;
FStart := AStart;
FCursor := ACursor;
@@ -2711,7 +2711,7 @@
constructor TItr<T>.Create(const AOwnList: IJclList<T>; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
- inherited Create(AOwnList, AValid);
+ inherited Create(AValid);
FOwnList := AOwnList;
FStart := AStart;
FCursor := ACursor;
@@ -2860,7 +2860,7 @@
constructor TJclIntfArrayList.Create(ACapacity: Integer);
begin
- inherited Create(nil);
+ inherited Create();
FSize := 0;
if ACapacity < 0 then
FCapacity := 0
@@ -2875,12 +2875,16 @@
// inherited Create;
if ACollection = nil then
raise EJclNoCollectionError.Create;
- Create(ACollection.Size);
+ Create();
+ FSize := 0;
+ FCapacity := ACollection.Size;
+ SetLength(FElementData, FCapacity);
AddAll(ACollection);
end;
destructor TJclIntfArrayList.Destroy;
begin
+ FReadOnly := False;
Clear;
inherited Destroy;
end;
@@ -2889,6 +2893,8 @@
var
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -2930,6 +2936,8 @@
AddItem: Boolean;
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -2998,6 +3006,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3065,6 +3075,8 @@
function TJclIntfArrayList.Delete(Index: Integer): IInterface;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3170,6 +3182,8 @@
function TJclIntfArrayList.Insert(Index: Integer; const AInterface: IInterface): Boolean;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3214,6 +3228,8 @@
var
It: IJclIntfIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3271,6 +3287,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3299,6 +3317,8 @@
var
It: IJclIntfIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3321,6 +3341,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3341,6 +3363,8 @@
procedure TJclIntfArrayList.SetCapacity(Value: Integer);
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3364,6 +3388,8 @@
ReplaceItem: Boolean;
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3427,7 +3453,7 @@
constructor TJclAnsiStrArrayList.Create(ACapacity: Integer);
begin
- inherited Create(nil);
+ inherited Create();
FSize := 0;
if ACapacity < 0 then
FCapacity := 0
@@ -3442,12 +3468,16 @@
// inherited Create;
if ACollection = nil then
raise EJclNoCollectionError.Create;
- Create(ACollection.Size);
+ Create();
+ FSize := 0;
+ FCapacity := ACollection.Size;
+ SetLength(FElementData, FCapacity);
AddAll(ACollection);
end;
destructor TJclAnsiStrArrayList.Destroy;
begin
+ FReadOnly := False;
Clear;
inherited Destroy;
end;
@@ -3456,6 +3486,8 @@
var
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3497,6 +3529,8 @@
AddItem: Boolean;
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3565,6 +3599,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3632,6 +3668,8 @@
function TJclAnsiStrArrayList.Delete(Index: Integer): AnsiString;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3737,6 +3775,8 @@
function TJclAnsiStrArrayList.Insert(Index: Integer; const AString: AnsiString): Boolean;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3781,6 +3821,8 @@
var
It: IJclAnsiStrIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3838,6 +3880,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3866,6 +3910,8 @@
var
It: IJclAnsiStrIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3888,6 +3934,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3908,6 +3956,8 @@
procedure TJclAnsiStrArrayList.SetCapacity(Value: Integer);
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3931,6 +3981,8 @@
ReplaceItem: Boolean;
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -3994,7 +4046,7 @@
constructor TJclWideStrArrayList.Create(ACapacity: Integer);
begin
- inherited Create(nil);
+ inherited Create();
FSize := 0;
if ACapacity < 0 then
FCapacity := 0
@@ -4009,12 +4061,16 @@
// inherited Create;
if ACollection = nil then
raise EJclNoCollectionError.Create;
- Create(ACollection.Size);
+ Create();
+ FSize := 0;
+ FCapacity := ACollection.Size;
+ SetLength(FElementData, FCapacity);
AddAll(ACollection);
end;
destructor TJclWideStrArrayList.Destroy;
begin
+ FReadOnly := False;
Clear;
inherited Destroy;
end;
@@ -4023,6 +4079,8 @@
var
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -4064,6 +4122,8 @@
AddItem: Boolean;
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -4132,6 +4192,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -4199,6 +4261,8 @@
function TJclWideStrArrayList.Delete(Index: Integer): WideString;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -4304,6 +4368,8 @@
function TJclWideStrArrayList.Insert(Index: Integer; const AString: WideString): Boolean;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -4348,6 +4414,8 @@
var
It: IJclWideStrIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -4405,6 +4473,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -4433,6 +4503,8 @@
var
It: IJclWideStrIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -4455,6 +4527,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -4475,6 +4549,8 @@
procedure TJclWideStrArrayList.SetCapacity(Value: Integer);
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -4498,6 +4574,8 @@
ReplaceItem: Boolean;
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -4561,7 +4639,7 @@
constructor TJclSingleArrayList.Create(ACapacity: Integer);
begin
- inherited Create(nil);
+ inherited Create();
FSize := 0;
if ACapacity < 0 then
FCapacity := 0
@@ -4576,12 +4654,16 @@
// inherited Create;
if ACollection = nil then
raise EJclNoCollectionError.Create;
- Create(ACollection.Size);
+ Create();
+ FSize := 0;
+ FCapacity := ACollection.Size;
+ SetLength(FElementData, FCapacity);
AddAll(ACollection);
end;
destructor TJclSingleArrayList.Destroy;
begin
+ FReadOnly := False;
Clear;
inherited Destroy;
end;
@@ -4590,6 +4672,8 @@
var
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -4631,6 +4715,8 @@
AddItem: Boolean;
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -4699,6 +4785,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -4766,6 +4854,8 @@
function TJclSingleArrayList.Delete(Index: Integer): Single;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -4871,6 +4961,8 @@
function TJclSingleArrayList.Insert(Index: Integer; const AValue: Single): Boolean;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -4915,6 +5007,8 @@
var
It: IJclSingleIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -4972,6 +5066,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -5000,6 +5096,8 @@
var
It: IJclSingleIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -5022,6 +5120,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -5042,6 +5142,8 @@
procedure TJclSingleArrayList.SetCapacity(Value: Integer);
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -5065,6 +5167,8 @@
ReplaceItem: Boolean;
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -5128,7 +5232,7 @@
constructor TJclDoubleArrayList.Create(ACapacity: Integer);
begin
- inherited Create(nil);
+ inherited Create();
FSize := 0;
if ACapacity < 0 then
FCapacity := 0
@@ -5143,12 +5247,16 @@
// inherited Create;
if ACollection = nil then
raise EJclNoCollectionError.Create;
- Create(ACollection.Size);
+ Create();
+ FSize := 0;
+ FCapacity := ACollection.Size;
+ SetLength(FElementData, FCapacity);
AddAll(ACollection);
end;
destructor TJclDoubleArrayList.Destroy;
begin
+ FReadOnly := False;
Clear;
inherited Destroy;
end;
@@ -5157,6 +5265,8 @@
var
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -5198,6 +5308,8 @@
AddItem: Boolean;
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -5266,6 +5378,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -5333,6 +5447,8 @@
function TJclDoubleArrayList.Delete(Index: Integer): Double;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -5438,6 +5554,8 @@
function TJclDoubleArrayList.Insert(Index: Integer; const AValue: Double): Boolean;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -5482,6 +5600,8 @@
var
It: IJclDoubleIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -5539,6 +5659,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -5567,6 +5689,8 @@
var
It: IJclDoubleIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -5589,6 +5713,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -5609,6 +5735,8 @@
procedure TJclDoubleArrayList.SetCapacity(Value: Integer);
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -5632,6 +5760,8 @@
ReplaceItem: Boolean;
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -5695,7 +5825,7 @@
constructor TJclExtendedArrayList.Create(ACapacity: Integer);
begin
- inherited Create(nil);
+ inherited Create();
FSize := 0;
if ACapacity < 0 then
FCapacity := 0
@@ -5710,12 +5840,16 @@
// inherited Create;
if ACollection = nil then
raise EJclNoCollectionError.Create;
- Create(ACollection.Size);
+ Create();
+ FSize := 0;
+ FCapacity := ACollection.Size;
+ SetLength(FElementData, FCapacity);
AddAll(ACollection);
end;
destructor TJclExtendedArrayList.Destroy;
begin
+ FReadOnly := False;
Clear;
inherited Destroy;
end;
@@ -5724,6 +5858,8 @@
var
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -5765,6 +5901,8 @@
AddItem: Boolean;
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -5833,6 +5971,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -5900,6 +6040,8 @@
function TJclExtendedArrayList.Delete(Index: Integer): Extended;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6005,6 +6147,8 @@
function TJclExtendedArrayList.Insert(Index: Integer; const AValue: Extended): Boolean;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6049,6 +6193,8 @@
var
It: IJclExtendedIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6106,6 +6252,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6134,6 +6282,8 @@
var
It: IJclExtendedIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6156,6 +6306,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6176,6 +6328,8 @@
procedure TJclExtendedArrayList.SetCapacity(Value: Integer);
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6199,6 +6353,8 @@
ReplaceItem: Boolean;
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6262,7 +6418,7 @@
constructor TJclIntegerArrayList.Create(ACapacity: Integer);
begin
- inherited Create(nil);
+ inherited Create();
FSize := 0;
if ACapacity < 0 then
FCapacity := 0
@@ -6277,12 +6433,16 @@
// inherited Create;
if ACollection = nil then
raise EJclNoCollectionError.Create;
- Create(ACollection.Size);
+ Create();
+ FSize := 0;
+ FCapacity := ACollection.Size;
+ SetLength(FElementData, FCapacity);
AddAll(ACollection);
end;
destructor TJclIntegerArrayList.Destroy;
begin
+ FReadOnly := False;
Clear;
inherited Destroy;
end;
@@ -6291,6 +6451,8 @@
var
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6332,6 +6494,8 @@
AddItem: Boolean;
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6400,6 +6564,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6467,6 +6633,8 @@
function TJclIntegerArrayList.Delete(Index: Integer): Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6572,6 +6740,8 @@
function TJclIntegerArrayList.Insert(Index: Integer; AValue: Integer): Boolean;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6616,6 +6786,8 @@
var
It: IJclIntegerIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6673,6 +6845,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6701,6 +6875,8 @@
var
It: IJclIntegerIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6723,6 +6899,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6743,6 +6921,8 @@
procedure TJclIntegerArrayList.SetCapacity(Value: Integer);
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6766,6 +6946,8 @@
ReplaceItem: Boolean;
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6829,7 +7011,7 @@
constructor TJclCardinalArrayList.Create(ACapacity: Integer);
begin
- inherited Create(nil);
+ inherited Create();
FSize := 0;
if ACapacity < 0 then
FCapacity := 0
@@ -6844,12 +7026,16 @@
// inherited Create;
if ACollection = nil then
raise EJclNoCollectionError.Create;
- Create(ACollection.Size);
+ Create();
+ FSize := 0;
+ FCapacity := ACollection.Size;
+ SetLength(FElementData, FCapacity);
AddAll(ACollection);
end;
destructor TJclCardinalArrayList.Destroy;
begin
+ FReadOnly := False;
Clear;
inherited Destroy;
end;
@@ -6858,6 +7044,8 @@
var
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6899,6 +7087,8 @@
AddItem: Boolean;
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -6967,6 +7157,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7034,6 +7226,8 @@
function TJclCardinalArrayList.Delete(Index: Integer): Cardinal;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7139,6 +7333,8 @@
function TJclCardinalArrayList.Insert(Index: Integer; AValue: Cardinal): Boolean;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7183,6 +7379,8 @@
var
It: IJclCardinalIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7240,6 +7438,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7268,6 +7468,8 @@
var
It: IJclCardinalIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7290,6 +7492,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7310,6 +7514,8 @@
procedure TJclCardinalArrayList.SetCapacity(Value: Integer);
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7333,6 +7539,8 @@
ReplaceItem: Boolean;
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7396,7 +7604,7 @@
constructor TJclInt64ArrayList.Create(ACapacity: Integer);
begin
- inherited Create(nil);
+ inherited Create();
FSize := 0;
if ACapacity < 0 then
FCapacity := 0
@@ -7411,12 +7619,16 @@
// inherited Create;
if ACollection = nil then
raise EJclNoCollectionError.Create;
- Create(ACollection.Size);
+ Create();
+ FSize := 0;
+ FCapacity := ACollection.Size;
+ SetLength(FElementData, FCapacity);
AddAll(ACollection);
end;
destructor TJclInt64ArrayList.Destroy;
begin
+ FReadOnly := False;
Clear;
inherited Destroy;
end;
@@ -7425,6 +7637,8 @@
var
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7466,6 +7680,8 @@
AddItem: Boolean;
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7534,6 +7750,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7601,6 +7819,8 @@
function TJclInt64ArrayList.Delete(Index: Integer): Int64;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7706,6 +7926,8 @@
function TJclInt64ArrayList.Insert(Index: Integer; const AValue: Int64): Boolean;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7750,6 +7972,8 @@
var
It: IJclInt64Iterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7807,6 +8031,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7835,6 +8061,8 @@
var
It: IJclInt64Iterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7857,6 +8085,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7877,6 +8107,8 @@
procedure TJclInt64ArrayList.SetCapacity(Value: Integer);
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7900,6 +8132,8 @@
ReplaceItem: Boolean;
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -7964,7 +8198,7 @@
constructor TJclPtrArrayList.Create(ACapacity: Integer);
begin
- inherited Create(nil);
+ inherited Create();
FSize := 0;
if ACapacity < 0 then
FCapacity := 0
@@ -7979,12 +8213,16 @@
// inherited Create;
if ACollection = nil then
raise EJclNoCollectionError.Create;
- Create(ACollection.Size);
+ Create();
+ FSize := 0;
+ FCapacity := ACollection.Size;
+ SetLength(FElementData, FCapacity);
AddAll(ACollection);
end;
destructor TJclPtrArrayList.Destroy;
begin
+ FReadOnly := False;
Clear;
inherited Destroy;
end;
@@ -7993,6 +8231,8 @@
var
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -8034,6 +8274,8 @@
AddItem: Boolean;
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -8102,6 +8344,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -8169,6 +8413,8 @@
function TJclPtrArrayList.Delete(Index: Integer): Pointer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -8274,6 +8520,8 @@
function TJclPtrArrayList.Insert(Index: Integer; APtr: Pointer): Boolean;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -8318,6 +8566,8 @@
var
It: IJclPtrIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -8375,6 +8625,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -8403,6 +8655,8 @@
var
It: IJclPtrIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -8425,6 +8679,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -8445,6 +8701,8 @@
procedure TJclPtrArrayList.SetCapacity(Value: Integer);
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -8468,6 +8726,8 @@
ReplaceItem: Boolean;
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -8532,7 +8792,7 @@
constructor TJclArrayList.Create(ACapacity: Integer; AOwnsObjects: Boolean);
begin
- inherited Create(nil, AOwnsObjects);
+ inherited Create(AOwnsObjects);
FSize := 0;
if ACapacity < 0 then
FCapacity := 0
@@ -8547,12 +8807,16 @@
// inherited Create;
if ACollection = nil then
raise EJclNoCollectionError.Create;
- Create(ACollection.Size, AOwnsObjects);
+ Create(AOwnsObjects);
+ FSize := 0;
+ FCapacity := ACollection.Size;
+ SetLength(FElementData, FCapacity);
AddAll(ACollection);
end;
destructor TJclArrayList.Destroy;
begin
+ FReadOnly := False;
Clear;
inherited Destroy;
end;
@@ -8561,6 +8825,8 @@
var
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -8602,6 +8868,8 @@
AddItem: Boolean;
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -8670,6 +8938,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -8737,6 +9007,8 @@
function TJclArrayList.Delete(Index: Integer): TObject;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -8842,6 +9114,8 @@
function TJclArrayList.Insert(Index: Integer; AObject: TObject): Boolean;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -8886,6 +9160,8 @@
var
It: IJclIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -8943,6 +9219,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -8971,6 +9249,8 @@
var
It: IJclIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -8993,6 +9273,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -9013,6 +9295,8 @@
procedure TJclArrayList.SetCapacity(Value: Integer);
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -9036,6 +9320,8 @@
ReplaceItem: Boolean;
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -9100,7 +9386,7 @@
constructor TJclArrayList<T>.Create(ACapacity: Integer; AOwnsItems: Boolean);
begin
- inherited Create(nil, AOwnsItems);
+ inherited Create(AOwnsItems);
FSize := 0;
if ACapacity < 0 then
FCapacity := 0
@@ -9115,12 +9401,16 @@
// inherited Create;
if ACollection = nil then
raise EJclNoCollectionError.Create;
- Create(ACollection.Size, AOwnsItems);
+ Create(AOwnsItems);
+ FSize := 0;
+ FCapacity := ACollection.Size;
+ SetLength(FElementData, FCapacity);
AddAll(ACollection);
end;
destructor TJclArrayList<T>.Destroy;
begin
+ FReadOnly := False;
Clear;
inherited Destroy;
end;
@@ -9129,6 +9419,8 @@
var
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -9170,6 +9462,8 @@
AddItem: Boolean;
Index: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -9238,6 +9532,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -9300,6 +9596,8 @@
function TJclArrayList<T>.Delete(Index: Integer): T;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -9405,6 +9703,8 @@
function TJclArrayList<T>.Insert(Index: Integer; const AItem: T): Boolean;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -9449,6 +9749,8 @@
var
It: IJclIterator<T>;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -9506,6 +9808,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -9534,6 +9838,8 @@
var
It: IJclIterator<T>;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -9556,6 +9862,8 @@
var
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -9576,6 +9884,8 @@
procedure TJclArrayList<T>.SetCapacity(Value: Integer);
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -9599,6 +9909,8 @@
ReplaceItem: Boolean;
I: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
Modified: trunk/jcl/source/common/JclArraySets.pas
===================================================================
--- trunk/jcl/source/common/JclArraySets.pas 2007-12-01 17:45:12 UTC (rev 2261)
+++ trunk/jcl/source/common/JclArraySets.pas 2007-12-02 15:46:23 UTC (rev 2262)
@@ -418,6 +418,8 @@
var
Idx: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -444,6 +446,8 @@
var
It: IJclIntfIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -549,6 +553,8 @@
var
Idx: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -575,6 +581,8 @@
var
It: IJclAnsiStrIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -680,6 +688,8 @@
var
Idx: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -706,6 +716,8 @@
var
It: IJclWideStrIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -811,6 +823,8 @@
var
Idx: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -837,6 +851,8 @@
var
It: IJclSingleIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -942,6 +958,8 @@
var
Idx: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -968,6 +986,8 @@
var
It: IJclDoubleIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -1073,6 +1093,8 @@
var
Idx: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -1099,6 +1121,8 @@
var
It: IJclExtendedIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -1204,6 +1228,8 @@
var
Idx: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -1230,6 +1256,8 @@
var
It: IJclIntegerIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -1335,6 +1363,8 @@
var
Idx: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -1361,6 +1391,8 @@
var
It: IJclCardinalIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -1466,6 +1498,8 @@
var
Idx: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -1492,6 +1526,8 @@
var
It: IJclInt64Iterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -1598,6 +1634,8 @@
var
Idx: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -1624,6 +1662,8 @@
var
It: IJclPtrIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -1730,6 +1770,8 @@
var
Idx: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -1756,6 +1798,8 @@
var
It: IJclIterator;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -1862,6 +1906,8 @@
var
Idx: Integer;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -1888,6 +1934,8 @@
var
It: IJclIterator<T>;
begin
+ if ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
WriteLock;
try
@@ -1960,7 +2008,6 @@
{$ENDIF THREADSAFE}
end;
-
procedure TJclArraySet<T>.Insert(Index: Integer; const AItem: T);
begin
raise EJclOperationNotSupportedError.Create;
Modified: trunk/jcl/source/common/JclBinaryTrees.pas
===================================================================
--- trunk/jcl/source/common/JclBinaryTrees.pas 2007-12-01 17:45:12 UTC (rev 2261)
+++ trunk/jcl/source/common/JclBinaryTrees.pas 2007-12-02 15:46:23 UTC (rev 2262)
@@ -794,7 +794,7 @@
protected
FCursor: TJclIntfBinaryNode;
FStart: TItrStart;
- FOwnList: IJclIntfCollection;
+ FOwnTree: IJclIntfCollection;
FEqualityComparer: IJclIntfEqualityComparer;
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
function GetNextCursor: TJclIntfBinaryNode; virtual; abstract;
@@ -835,21 +835,21 @@
function Left: IInterface;
function Right: IInterface;
public
- constructor Create(const OwnList: IJclIntfCollection; ACursor: TJclIntfBinaryNode; AValid: Boolean; AStart: TItrStart);
+ constructor Create(const AOwnTree: IJclIntfCollection; ACursor: TJclIntfBinaryNode; AValid: Boolean; AStart: TItrStart);
end;
-constructor TIntfItr.Create(const OwnList: IJclIntfCollection; ACursor: TJclIntfBinaryNode; AValid: Boolean; AStart: TItrStart);
+constructor TIntfItr.Create(const AOwnTree: IJclIntfCollection; ACursor: TJclIntfBinaryNode; AValid: Boolean; AStart: TItrStart);
begin
- inherited Create(OwnList, AValid);
+ inherited Create(AValid);
FCursor := ACursor;
FStart := AStart;
- FOwnList := OwnList;
- FEqualityComparer := FOwnList as IJclIntfEqualityComparer;
+ FOwnTree := AOwnTree;
+ FEqualityComparer := AOwnTree as IJclIntfEqualityComparer;
end;
function TIntfItr.Add(const AInterface: IInterface): Boolean;
begin
- Result := FOwnList.Add(AInterface);
+ Result := FOwnTree.Add(AInterface);
end;
function TIntfItr.AddChild(const AInterface: IInterface): Boolean;
@@ -866,7 +866,7 @@
begin
ADest := TIntfItr(Dest);
ADest.FCursor := FCursor;
- ADest.FOwnList := FOwnList;
+ ADest.FOwnTree := FOwnTree;
ADest.FEqualityComparer := FEqualityComparer;
ADest.FStart := FStart;
end;
@@ -875,7 +875,7 @@
function TIntfItr.ChildrenCount: Integer;
begin
{$IFDEF THREADSAFE}
- ReadLock;
+ FOwnTree.ReadLock;
try
{$ENDIF THREADSAFE}
Result := 0;
@@ -888,7 +888,7 @@
end;
{$IFDEF THREADSAFE}
finally
- ReadUnlock;
+ FOwnTree.ReadUnlock;
end;
{$ENDIF THREADSAFE}
end;
@@ -915,14 +915,14 @@
if Obj is TIntfItr then
begin
ItrObj := TIntfItr(Obj);
- Result := (FOwnList = ItrObj.FOwnList) and (FCursor = ItrObj.FCursor) and (Valid = ItrObj.Valid);
+ Result := (FOwnTree = ItrObj.FOwnTree) and (FCursor = ItrObj.FCursor) and (Valid = ItrObj.Valid);
end;
end;
function TIntfItr.GetChild(Index: Integer): IInterface;
begin
{$IFDEF THREADSAFE}
- ReadLock;
+ FOwnTree.ReadLock;
try
{$ENDIF THREADSAFE}
Result := nil;
@@ -939,11 +939,11 @@
if FCursor <> nil then
Result := FCursor.Value
else
- if not FOwnList.ReturnDefaultElements then
+ if not FOwnTree.ReturnDefaultElements then
raise EJclNoSuchElementError.Create('');
{$IFDEF THREADSAFE}
finally
- ReadUnlock;
+ FOwnTree.ReadUnlock;
end;
{$ENDIF THREADSAFE}
end;
@@ -951,7 +951,7 @@
function TIntfItr.GetObject: IInterface;
begin
{$IFDEF THREADSAFE}
- ReadLock;
+ FOwnTree.ReadLock;
try
{$ENDIF THREADSAFE}
CheckValid;
@@ -959,11 +959,11 @@
if FCursor <> nil then
Result := FCursor.Value
else
- if not FOwnList.ReturnDefaultElements then
+ if not FOwnTree.ReturnDefaultElements then
raise EJclNoSuchElementError.Create('');
{$IFDEF THREADSAFE}
finally
- ReadUnlock;
+ FOwnTree.ReadUnlock;
end;
{$ENDIF THREADSAFE}
end;
@@ -971,7 +971,7 @@
function TIntfItr.HasChild(Index: Integer): Boolean;
begin
{$IFDEF THREADSAFE}
- ReadLock;
+ FOwnTree.ReadLock;
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index = 0) then
@@ -983,7 +983,7 @@
Result := False;
{$IFDEF THREADSAFE}
finally
- ReadUnlock;
+ FOwnTree.ReadUnlock;
end;
{$ENDIF THREADSAFE}
end;
@@ -991,13 +991,13 @@
function TIntfItr.HasLeft: Boolean;
begin
{$IFDEF THREADSAFE}
- ReadLock;
+ FOwnTree.ReadLock;
try
{$ENDIF THREADSAFE}
Result := (FCursor <> nil) and (FCursor.Left <> nil);
{$IFDEF THREADSAFE}
finally
- ReadUnlock;
+ FOwnTree.ReadUnlock;
end;
{$ENDIF THREADSAFE}
end;
@@ -1005,7 +1005,7 @@
function TIntfItr.HasNext: Boolean;
begin
{$IFDEF THREADSAFE}
- ReadLock;
+ FOwnTree.ReadLock;
try
{$ENDIF THREADSAFE}
if Valid then
@@ -1014,7 +1014,7 @@
Result := FCursor <> nil;
{$IFDEF THREADSAFE}
finally
- ReadUnlock;
+ FOwnTree.ReadUnlock;
end;
{$ENDIF THREADSAFE}
end;
@@ -1022,13 +1022,13 @@
function TIntfItr.HasParent: Boolean;
begin
{$IFDEF THREADSAFE}
- ReadLock;
+ FOwnTree.ReadLock;
try
{$ENDIF THREADSAFE}
Result := (FCursor <> nil) and (FCursor.Parent <> nil);
{$IFDEF THREADSAFE}
finally
- ReadUnlock;
+ FOwnTree.ReadUnlock;
end;
{$ENDIF THREADSAFE}
end;
@@ -1036,7 +1036,7 @@
function TIntfItr.HasPrevious: Boolean;
begin
{$IFDEF THREADSAFE}
- ReadLock;
+ FOwnTree.ReadLock;
try
{$ENDIF THREADSAFE}
if Valid then
@@ -1045,7 +1045,7 @@
Result := FCursor <> nil;
{$IFDEF THREADSAFE}
finally
- ReadUnlock;
+ FOwnTree.ReadUnlock;
end;
{$ENDIF THREADSAFE}
end;
@@ -1053,13 +1053,13 @@
function TIntfItr.HasRight: Boolean;
begin
{$IFDEF THREADSAFE}
- ReadLock;
+ FOwnTree.ReadLock;
try
{$ENDIF THREADSAFE}
Result := (FCursor <> nil) and (FCursor.Right <> nil);
{$IFDEF THREADSAFE}
finally
- ReadUnlock;
+ FOwnTree.ReadUnlock;
end;
{$ENDIF THREADSAFE}
end;
@@ -1067,7 +1067,7 @@
function TIntfItr.IndexOfChild(const AInterface: IInterface): Integer;
begin
{$IFDEF THREADSAFE}
- ReadLock;
+ FOwnTree.ReadLock;
try
{$ENDIF THREADSAFE}
Result := -1;
@@ -1087,7 +1087,7 @@
end;
{$IFDEF THREADSAFE}
finally
- ReadUnlock;
+ FOwnTree.ReadUnlock;
end;
{$ENDIF THREADSAFE}
end;
@@ -1105,7 +1105,7 @@
function TIntfItr.Left: IInterface;
begin
{$IFDEF THREADSAFE}
- ReadLock;
+ FOwnTree.ReadLock;
try
{$ENDIF THREADSAFE}
Result := nil;
@@ -1114,11 +1114,11 @@
if FCursor <> nil then
Result := FCursor.Value
else
- if not FOwnList.ReturnDefaultElements then
+ if not FOwnTree.ReturnDefaultElements then
raise EJclNoSuchElementError.Create('');
{$IFDEF THREADSAFE}
finally
- ReadUnlock;
+ FOwnTree.ReadUnlock;
end;
{$ENDIF THREADSAFE}
end;
@@ -1127,7 +1127,7 @@
function TIntfItr.MoveNext: Boolean;
begin
{$IFDEF THREADSAFE}
- ReadLock;
+ FOwnTree.ReadLock;
try
{$ENDIF THREADSAFE}
if Valid then
@@ -1137,7 +1137,7 @@
Result := FCursor <> nil;
{$IFDEF THREADSAFE}
finally
- ReadUnlock;
+ FOwnTree.ReadUnlock;
end;
{$ENDIF THREADSAFE}
end;
@@ -1146,7 +1146,7 @@
function TIntfItr.Next: IInterface;
begin
{$IFDEF THREADSAFE}
- ReadLock;
+ FOwnTree.ReadLock;
try
{$ENDIF THREADSAFE}
if Valid then
@@ -1157,11 +1157,11 @@
if FCursor <> nil then
Result := FCursor.Value
else
- if not FOwnList.ReturnDefaultElements then
+ if not FOwnTree.ReturnDefaultElements then
raise EJclNoSuchElementError.Create('');
{$IFDEF THREADSAFE}
finally
- ReadUnlock;
+ FOwnTree.ReadUnlock;
end;
{$ENDIF THREADSAFE}
end;
@@ -1175,7 +1175,7 @@
function TIntfItr.Parent: IInterface;
begin
{$IFDEF THREADSAFE}
- ReadLock;
+ FOwnTree.ReadLock;
try
{$ENDIF THREADSAFE}
Result := nil;
@@ -1184,11 +1184,11 @@
if FCursor <> nil then
Result := FCursor.Value
else
- if not FOwnList.ReturnDefaultElements then
+ if not FOwnTree.ReturnDefaultElements then
raise EJclNoSuchElementError.Create('');
{$IFDEF THREADSAFE}
finally
- ReadUnlock;
+ FOwnTree.ReadUnlock;
end;
{$ENDIF THREADSAFE}
end;
@@ -1196,7 +1196,7 @@
function TIntfItr.Previous: IInterface;
begin
{$IFDEF THREADSAFE}
- ReadLock;
+ FOwnTree.ReadLock;
try
{$ENDIF THREADSAFE}
if Valid then
@@ -1207,11 +1207,11 @@
if FCursor <> nil then
Result := FCursor.Value
else
- if not FOwnList.ReturnDefaultElements then
+ if not FOwnTree.ReturnDefaultElements then
raise EJclNoSuchElementError.Create('');
{$IFDEF THREADSAFE}
finally
- ReadUnlock;
+ FOwnTree.ReadUnlock;
end;
{$ENDIF THREADSAFE}
end;
@@ -1226,8 +1226,10 @@
var
OldCursor: TJclIntfBinaryNode;
begin
+ if FOwnTree.ReadOnly then
+ raise EJclReadOnlyError.Create;
{$IFDEF THREADSAFE}
- WriteLock;
+ FOwnTree.WriteLock;
try
{$ENDIF THREADSAFE}
CheckValid;
@@ -1237,13 +1239,13 @@
begin
repeat
FCursor := GetNextCursor;
- until (FCursor = nil) or FOwnList.RemoveSingleElement
+ until (FCursor = nil) or FOwnTree.RemoveSingleElement
or (not FEqualityComparer.ItemsEqual(OldCursor.Value, FCursor.Value));
- FOwnList.Remove(OldCursor.Value);
+ FOwnTree.Remove(OldCursor.Value);
end;
{$IFDEF THREADSAFE}
finally
- WriteUnlock;
+ FOwnTree.WriteUnlock;
end;
{$ENDIF THREADSAFE}
end;
@@ -1253,7 +1255,7 @@
NewCursor: TJclIntfBinaryNode;
begin
{$IFDEF THREADSAFE}
- ReadLock;
+ FOwnTree.ReadLock;
try
{$ENDIF THREADSAFE}
Valid := False;
@@ -1286,7 +1288,7 @@
end;
{$IFDEF THREADSAFE}
finally
- ReadUnlock;
+ FOwnTree.ReadUnlock;
end;
{$ENDIF THREADSAFE}
end;
@@ -1294,7 +1296,7 @@
function TIntfItr.Right: IInterface;
begin
{$IFDEF THREADSAFE}
- ReadLock;
+ FOwnTree.ReadLock;
try
{$ENDIF THREADSAFE}
Result := nil;
@@ -1303,11 +1305,11 @@
if FCursor <> nil then
Result := FCursor.Value
else
- if not FOwnList.ReturnDefaultElements then
+ if not FOwnTree.ReturnDefaultElements then
raise EJclNoSuchElementError.Create('');
{$IFDEF THREADSAFE}
finally
- ReadUnlock;
+ FOwnTree.ReadUnlock;
end;
{$ENDIF THREADSAFE}
end;
@@ -1337,7 +1339,7 @@
function TPreOrderIntfItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TPreOrderIntfItr.Create(FOwnList, FCursor, Valid, FStart);
+ Result := TPreOrderIntfItr.Create(FOwnTree, FCursor, Valid, FStart);
end;
function TPreOrderIntfItr.GetNextCursor: TJclIntfBinaryNode;
@@ -1404,7 +1406,7 @@
function TInOrderIntfItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TInOrderIntfItr.Create(FOwnList, FCursor, Valid, FStart);
+ Result := TInOrderIntfItr.Create(FOwnTree, FCursor, Valid, FStart);
end;
function TInOrderIntfItr.GetNextCursor: TJclIntfBinaryNode;
@@ -1472,7 +1474,7 @@
function TPostOrderIntfItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TPostOrderIntfItr.Create(FOwnList, FCursor, Valid, FStart);
+ Result := TPostOrderIntfItr.Create(FOwnTree, FCursor, Valid, FStart);
end;
function TPostOrderIntfItr.GetNextCursor: TJclIntfBinaryNode;
@@ -1530,7 +1532,7 @@
protected
FCursor: TJclAnsiStrBinaryNode;
FStart: TItrStart;
- FOwnList: IJclAnsiStrCollection;
+ FOwnTree: IJclAnsiStrCollection;
FEqualityComparer: IJclAnsiStrEqualityComparer;
procedure AssignPropertiesTo(Dest: ...
[truncated message content] |
|
From: <jed...@us...> - 2007-12-01 17:45:17
|
Revision: 2261
http://jcl.svn.sourceforge.net/jcl/?rev=2261&view=rev
Author: jedi_mbe
Date: 2007-12-01 09:45:12 -0800 (Sat, 01 Dec 2007)
Log Message:
-----------
Should compile now for D7 and below
Modified Paths:
--------------
trunk/jcl/source/common/JclStrings.pas
Modified: trunk/jcl/source/common/JclStrings.pas
===================================================================
--- trunk/jcl/source/common/JclStrings.pas 2007-12-01 16:21:22 UTC (rev 2260)
+++ trunk/jcl/source/common/JclStrings.pas 2007-12-01 17:45:12 UTC (rev 2261)
@@ -534,7 +534,7 @@
// Properties
property ActualTabWidth: Integer read InternalTabWidth;
property Count: Integer read GetCount;
- property TabStops[&Index: Integer]: Integer read GetStops write SetStops; default;
+ property TabStops[Index: Integer]: Integer read GetStops write SetStops; default;
property TabWidth: Integer read GetTabWidth write SetTabWidth;
property ZeroBased: Boolean read GetZeroBased write SetZeroBased;
end;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ah...@us...> - 2007-12-01 16:21:53
|
Revision: 2260
http://jcl.svn.sourceforge.net/jcl/?rev=2260&view=rev
Author: ahuser
Date: 2007-12-01 08:21:22 -0800 (Sat, 01 Dec 2007)
Log Message:
-----------
Fixed wrong prename
Modified Paths:
--------------
trunk/jcl/source/common/JclStrings.pas
Modified: trunk/jcl/source/common/JclStrings.pas
===================================================================
--- trunk/jcl/source/common/JclStrings.pas 2007-12-01 16:02:26 UTC (rev 2259)
+++ trunk/jcl/source/common/JclStrings.pas 2007-12-01 16:21:22 UTC (rev 2260)
@@ -26,7 +26,7 @@
{ Jean-Fabien Connault (cycocrew) }
{ John C Molyneux }
{ Leonard Wennekers }
-{ Martin Bestebroer }
+{ Marcel Bestebroer }
{ Martin Kimmings }
{ Martin Kubecka }
{ Massimo Maria Ghisalberti }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jed...@us...> - 2007-12-01 16:02:40
|
Revision: 2259
http://jcl.svn.sourceforge.net/jcl/?rev=2259&view=rev
Author: jedi_mbe
Date: 2007-12-01 08:02:26 -0800 (Sat, 01 Dec 2007)
Log Message:
-----------
Added unit tests on TJclTabSet
Modified Paths:
--------------
trunk/qa/automated/dunit/units/TestJclStrings.pas
Modified: trunk/qa/automated/dunit/units/TestJclStrings.pas
===================================================================
--- trunk/qa/automated/dunit/units/TestJclStrings.pas 2007-12-01 15:55:44 UTC (rev 2258)
+++ trunk/qa/automated/dunit/units/TestJclStrings.pas 2007-12-01 16:02:26 UTC (rev 2259)
@@ -152,6 +152,24 @@
procedure _StrRestOf;
end;
+ { TJclStringTabSet }
+ TJclStringTabSet = class(TTestCase)
+ published
+ procedure _CalculatedTabWidth;
+ procedure _Expand;
+ procedure _FromString;
+ procedure _NilSet;
+ procedure _OptimalFill;
+ procedure _Optimize;
+ procedure _TabFrom;
+ procedure _TabStopAdding;
+ procedure _TabStopDeleting;
+ procedure _TabStopModifying;
+ procedure _ToString;
+ procedure _UpdatePosition;
+ procedure _ZeroBased;
+end;
+
implementation
{$IFDEF LINUX}
@@ -2124,12 +2142,411 @@
*)
+//==================================================================================================
+// TabSet
+//==================================================================================================
+
+procedure TJclStringTabSet._CalculatedTabWidth;
+var
+ tabs1: TJclTabSet;
+ tabs2: TJclTabSet;
+begin
+ tabs1 := TJclTabSet.Create([4,8], True);
+ try
+ CheckEquals(0, tabs1.TabWidth, 'tabs1.TabWidth');
+ CheckEquals(4, tabs1.ActualTabWidth, 'tabs1.ActualTabWidth');
+ finally
+ FreeAndNil(tabs1);
+ end;
+
+ tabs2 := TJclTabSet.Create([4,7], False, -1);
+ try
+ CheckEquals(-1, tabs2.TabWidth, 'tabs2.TabWidth');
+ CheckEquals(3, tabs2.ActualTabWidth, 'tabs2.ActualTabWidth');
+ finally
+ FreeAndNil(tabs2);
+ end;
+end;
+
+//------------------------------------------------------------------------------
+
+procedure TJclStringTabSet._Expand;
+var
+ tabs: TJclTabSet;
+ inp: string;
+ exp: string;
+begin
+ tabs := TJclTabSet.Create([17, 22, 32], False, 4);
+ try
+ inp := 'Test:'#9'LD'#9'A,(HL)'#9'; Read from memory'#13#10+
+ #9'LD'#9'B, 100'#13#10 +
+ #9'CALL'#9'Test2'#13#10+
+ #9#9#9'; another comment';
+ exp := 'Test: LD A,(HL) ; Read from memory'#13#10 +
+ ' LD B, 100'#13#10 +
+ ' CALL Test2'#13#10+
+ ' ; another comment';
+ CheckEqualsString(exp, tabs.Expand(inp));
+ finally
+ FreeAndNil(tabs);
+ end;
+end;
+
+//------------------------------------------------------------------------------
+
+procedure TJclStringTabSet._FromString;
+var
+ tabs: TJclTabSet;
+begin
+ // just a tab width
+ tabs := TJclTabSet.FromString('+4');
+ try
+ CheckEquals(0, tabs.Count, 'FromString(''+4'').Count');
+ CheckEquals(False, tabs.ZeroBased, 'FromString(''+4'').ZeroBased');
+ CheckEquals(4, tabs.ActualTabWidth, 'FromString(''+4'').ActualTabWidth');
+ CheckEquals(4, tabs.TabWidth, 'FromString(''+4'').TabWidth');
+ finally
+ FreeAndNil(tabs);
+ end;
+
+ // stops and tab width; with excessive whitespace, including tab
+ tabs := TJclTabSet.FromString('4, 7 ' + #9 + '+4');
+ try
+ CheckEquals(2, tabs.Count, 'FromString(''4, 7 '' + #9 + ''+4'').Count');
+ CheckEquals(4, tabs[0], 'FromString(''4, 7 '' + #9 + ''+4'').tabs[0]');
+ CheckEquals(7, tabs[1], 'FromString(''4, 7 '' + #9 + ''+4'').tabs[1]');
+ CheckEquals(False, tabs.ZeroBased, 'FromString(''4, 7 '' + #9 + ''+4'').ZeroBased');
+ CheckEquals(4, tabs.ActualTabWidth, 'FromString(''4, 7 '' + #9 + ''+4'').ActualTabWidth');
+ CheckEquals(4, tabs.TabWidth, 'FromString(''4, 7 '' + #9 + ''+4'').TabWidth');
+ finally
+ FreeAndNil(tabs);
+ end;
+
+ // zero-based, bracketed stops, auto width
+ tabs := TJclTabSet.FromString('0[4,7]');
+ try
+ CheckEquals(2, tabs.Count, 'FromString(''0[4,7]'').Count');
+ CheckEquals(4, tabs[0], 'FromString(''0[4,7]'').tabs[0]');
+ CheckEquals(7, tabs[1], 'FromString(''0[4,7]'').tabs[1]');
+ CheckEquals(True, tabs.ZeroBased, 'FromString(''0[4,7]'').ZeroBased');
+ CheckEquals(3, tabs.ActualTabWidth, 'FromString(''0[4,7]'').ActualTabWidth');
+ CheckTrue(tabs.TabWidth < 1, 'FromString(''0[4,7]'').TabWidth');
+ finally
+ FreeAndNil(tabs);
+ end;
+end;
+
+//------------------------------------------------------------------------------
+
+procedure TJclStringTabSet._NilSet;
+var
+ tabs: TJclTabSet;
+begin
+ // simplify nil tabset access
+ tabs := nil;
+
+ // nil tabset should be zero based
+ CheckTrue(tabs.ZeroBased, 'Nil tabset.ZeroBased');
+
+ // nil tabset should have no tab stops
+ CheckEquals(0, tabs.Count, 'Nil tabset.Count');
+
+ // nil tabset should have an actual tabwidth of 2
+ CheckEquals(2, tabs.ActualTabWidth, 'Nil tabset.ActualTabWidth');
+
+ // nil tabset should have a set tabwidth of <1 or 2
+ CheckTrue((tabs.TabWidth = 2) or (tabs.TabWidth < 1), 'Nil tabset.TabWidth');
+
+ // nil tabset expand test
+ CheckEquals('A bc de', tabs.Expand('A'#9'bc'#9'de'), 'Nil tabset.Expand')
+end;
+
+//------------------------------------------------------------------------------
+
+procedure TJclStringTabSet._OptimalFill;
+var
+ tabs: TJclTabSet;
+ tabCount: Integer;
+ spaceCount: Integer;
+begin
+ tabs := TJclTabSet.Create([17, 22, 32], False, 4);
+ try
+ // test 1: tabs and spaces to get from column 1 to column 17
+ tabs.OptimalFillInfo(1, 17, tabCount, spaceCount);
+ CheckEquals(1, tabCount, 'tabCount for column 1->17');
+ CheckEquals(0, spaceCount, 'spaceCount for column 1->17');
+
+ // test 2: tabs and spaces to get from column 1 to column 4
+ tabs.OptimalFillInfo(1, 4, tabCount, spaceCount);
+ CheckEquals(0, tabCount, 'tabCount for column 1->4');
+ CheckEquals(3, spaceCount, 'spaceCount for column 1->4');
+
+ // test 3: tabs and spaces to get from column 1 to column 34
+ tabs.OptimalFillInfo(1, 34, tabCount, spaceCount);
+ CheckEquals(3, tabCount, 'tabCount for column 1->34');
+ CheckEquals(2, spaceCount, 'spaceCount for column 1->34');
+ finally
+ FreeAndNil(tabs);
+ end;
+end;
+
+//------------------------------------------------------------------------------
+
+procedure TJclStringTabSet._Optimize;
+var
+ tabs: TJclTabSet;
+ inp: string;
+ exp: string;
+begin
+ tabs := TJclTabSet.Create([17, 22, 32], False, 4);
+ try
+ inp := ' '#9' test second';
+ exp := #9' test'#9#9#9#9#9' second';
+ CheckEquals(exp, tabs.Optimize(inp));
+ finally
+ FreeAndNil(tabs);
+ end;
+end;
+
+//------------------------------------------------------------------------------
+
+procedure TJclStringTabSet._TabFrom;
+var
+ tabs: TJclTabSet;
+ idx: Integer;
+begin
+ tabs := TJclTabSet.Create([15, 20, 30], True, 2);
+ try
+ // test first fixed stop
+ // columns 0 through 14 will tab to column 15
+ for idx := 0 to 14 do
+ CheckEquals(15, tabs.TabFrom(idx), 'set=[15,20,30]+2; TabFrom(' + IntToStr(idx) + ')');
+
+ // test second fixed stop
+ // columns 15 through 19 will tab to column 20
+ for idx := 15 to 19 do
+ CheckEquals(20, tabs.TabFrom(idx), 'set=[15,20,30]+2; TabFrom(' + IntToStr(idx) + ')');
+
+ // test third and final fixed stop
+ // columns 20 through 29 will tab to column 30
+ for idx := 20 to 29 do
+ CheckEquals(30, tabs.TabFrom(idx), 'set=[15,20,30]+2; TabFrom(' + IntToStr(idx) + ')');
+
+ // test tab width beyond fixed positions
+ // columns 30 through 39 will tab to column 32 (30-31), 34 (32-33), 36 (34-35), 38 (36-37) or 40 (38-39)
+ for idx := 30 to 39 do
+ CheckEquals(2 * Succ(idx div 2), tabs.TabFrom(idx), 'set=[15,20,30]+2; TabFrom(' + IntToStr(idx) + ')');
+ finally
+ FreeAndNil(tabs);
+ end;
+end;
+
+//------------------------------------------------------------------------------
+
+procedure TJclStringTabSet._TabStopAdding;
+var
+ tabs: TJclTabSet;
+ x: Integer;
+ failed: Boolean;
+begin
+ tabs := TJclTabSet.Create([15, 30], True);
+ try
+ // Add column 20 and check if the index=1
+ CheckEquals(1, tabs.Add(20), 'Index of Add(20)');
+ // We should have three stops
+ CheckEquals(3, tabs.Count, 'Count after Add(20)');
+ // The first should be 15
+ CheckEquals(15, tabs[0], 'tabs[0]');
+ // The second should be 20
+ CheckEquals(20, tabs[1], 'tabs[1]');
+ // The third should be 30
+ CheckEquals(30, tabs[2], 'tabs[2]');
+ // Adding a duplicate should fail...
+ begin
+ try
+ x := tabs.Add(30);
+ failed := True;
+ except
+ failed := False;
+ x := 0; // make compiler happy
+ end;
+ if failed then
+ Fail('tabs.Add(30) returned ' + IntToStr(x) + '; should''ve resulted in an exception.');
+ end;
+ // Adding anything less than StartColumn should fail...
+ begin
+ try
+ x := tabs.Add(tabs.StartColumn - 1);
+ failed := True;
+ except
+ failed := False;
+ x := 0;
+ end;
+ if failed then
+ Fail('tabs.Add(' + IntToStr(tabs.StartColumn - 1) + ') returned ' + IntToStr(x) + '; should''ve resulted in an exception.');
+ end;
+ finally
+ FreeAndNil(tabs);
+ end;
+end;
+
+//------------------------------------------------------------------------------
+
+procedure TJclStringTabSet._TabStopDeleting;
+var
+ tabs: TJclTabSet;
+ x: Integer;
+begin
+ tabs := TJclTabSet.Create([15, 17, 20, 30], True, 2);
+ try
+ CheckEquals(1, tabs.Delete(17), 'Index of Delete(17)');
+ // We should have three stops
+ CheckEquals(3, tabs.Count, 'Count after Add(20)');
+ // The first should be 15
+ CheckEquals(15, tabs[0], 'tabs[0]');
+ // The second should be 20
+ CheckEquals(20, tabs[1], 'tabs[1]');
+ // The third should be 30
+ CheckEquals(30, tabs[2], 'tabs[2]');
+ // Deleting a non-existing tab stop should result in a negative value
+ x := tabs.Delete(24);
+ CheckTrue(x < 0, 'tabs.Delete(24) returned ' + IntToStr(x) + '; should''ve returned a negative value.');
+ finally
+ FreeAndNil(tabs);
+ end;
+end;
+
+//------------------------------------------------------------------------------
+
+procedure TJclStringTabSet._TabStopModifying;
+var
+ tabs: TJclTabSet;
+begin
+ tabs := TJclTabSet.Create([15, 17, 2, 30], True, 2);
+ try
+ // check tabs array before overwriting the first tab stop...
+ CheckEquals(2, tabs[0], 'tabs[0] before modify.');
+ CheckEquals(15, tabs[1], 'tabs[1] before modify.');
+ CheckEquals(17, tabs[2], 'tabs[2] before modify.');
+ CheckEquals(30, tabs[3], 'tabs[3] before modify.');
+ // overwrite the first tab stop
+ tabs[0] := 20;
+ // check tabs array after overwriting the first tab stop...
+ CheckEquals(15, tabs[0], 'tabs[0] after modify.');
+ CheckEquals(17, tabs[1], 'tabs[1] after modify.');
+ CheckEquals(20, tabs[2], 'tabs[2] after modify.');
+ CheckEquals(30, tabs[3], 'tabs[3] after modify.');
+ finally
+ FreeAndNil(tabs);
+ end;
+end;
+
+//------------------------------------------------------------------------------
+
+procedure TJclStringTabSet._ToString;
+var
+ tabs: TJclTabSet;
+begin
+ tabs := nil;
+ CheckEquals('0 [] +2', tabs.ToString, 'nil-set, full');
+ CheckEquals('0', tabs.ToString(TabSetFormatting_Default), 'nil-set, default');
+
+ tabs := TJclTabSet.Create([15, 17, 20, 30], True, 4);
+ try
+ CheckEquals('0 [15,17,20,30] +4', tabs.ToString, 'zero-based, full');
+ CheckEquals('0 15,17,20,30 +4', tabs.ToString(TabSetFormatting_Default), 'zero-based, default');
+ tabs.ZeroBased := False;
+ CheckEquals('[16,18,21,31] +4', tabs.ToString, 'one-based, full');
+ CheckEquals('16,18,21,31 +4', tabs.ToString(TabSetFormatting_Default), 'one-based, default');
+ finally
+ tabs.Free;
+ end;
+end;
+
+//------------------------------------------------------------------------------
+
+procedure TJclStringTabSet._UpdatePosition;
+var
+ tabs: TJclTabSet;
+ column: Integer;
+ line: Integer;
+begin
+ tabs := TJclTabSet.Create([17, 22, 32], False, 4);
+ try
+ column := tabs.StartColumn;
+ line := 1;
+ tabs.UpdatePosition(
+ 'Label1:'#9'LD'#9'A,0'#9'; init A'#13#10+
+ #9'LD'#9'B, 100'#9'; loop counter'#13#10+
+ #13#10+
+ 'lp1:'#9'ADD'#9'(HL)'#9'; add data'#13+
+ #9'JR'#9'NC,nxt'#9'; no carry=>skip to nxt'#13+
+ #13+
+ #9'RRCA'#10+
+ #10+
+ 'nxt:'#9'INC'#9'H'#9'; next scanline'#13#10+
+ #9'DJNZ'#9'lp1', column, line);
+ CheckEquals(10, line, 'line');
+ CheckEquals(25, column, 'column');
+ finally
+ tabs.Free;
+ end;
+end;
+
+//------------------------------------------------------------------------------
+
+procedure TJclStringTabSet._ZeroBased;
+var
+ tabs: TJclTabSet;
+ x: Integer;
+ failed: Boolean;
+begin
+ tabs := TJclTabSet.Create([15, 20, 30], True, 2);
+ try
+ // make sure it's actually zero-based
+ CheckTrue(tabs.ZeroBased, 'tabset should be zero based.');
+ // can we tab from column 0?
+ CheckEquals(15, tabs.TabFrom(0), 'tabs.TabFrom(0) in zero-based mode.');
+ // we should have three stops
+ CheckEquals(3, tabs.Count, 'tabs.Count (zero-based)');
+ // are they 15, 20 and 30 respectively?
+ CheckEquals(15, tabs[0], 'tabs[0] (zero-based)');
+ CheckEquals(20, tabs[1], 'tabs[1] (zero-based)');
+ CheckEquals(30, tabs[2], 'tabs[2] (zero-based)');
+
+ // switch to not zero-based
+ tabs.ZeroBased := False;
+ // make sure it's no longer zero-based
+ CheckFalse(tabs.ZeroBased, 'tabset shouldn''t be zero based.');
+ // we still should have three stops
+ CheckEquals(3, tabs.Count, 'tabs.Count (not zero-based)');
+ // are they 16, 21 and 31 respectively?
+ CheckEquals(16, tabs[0], 'tabs[0] (not zero-based)');
+ CheckEquals(21, tabs[1], 'tabs[1] (not zero-based)');
+ CheckEquals(31, tabs[2], 'tabs[2] (not zero-based)');
+ // we shouldn't be able to tab from column 0?
+ try
+ x := tabs.TabFrom(0);
+ failed := False;
+ except
+ // swallow exception
+ failed := True;
+ x := 0; // make compiler happy
+ end;
+ if not failed then
+ Fail('tab.TabFrom(0) resulted in ' + IntToStr(x) + '; should''ve resulted in an exception when not in zero-based mode.');
+ finally
+ FreeAndNil(tabs);
+ end;
+end;
+
initialization
RegisterTest('JCLStrings', TJclStringTransormation.Suite);
RegisterTest('JCLStrings', TJclStringManagment.Suite);
RegisterTest('JCLStrings', TJclStringSearchandReplace.Suite);
RegisterTest('JCLStrings', TJclStringCharacterTestRoutines.Suite);
RegisterTest('JCLStrings', TJclStringExtraction.Suite);
+ RegisterTest('JCLStrings', TJclStringTabSet.Suite);
// History:
//
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jed...@us...> - 2007-12-01 15:56:07
|
Revision: 2258
http://jcl.svn.sourceforge.net/jcl/?rev=2258&view=rev
Author: jedi_mbe
Date: 2007-12-01 07:55:44 -0800 (Sat, 01 Dec 2007)
Log Message:
-----------
Added documentation on TJclTabSet and support routines
Modified Paths:
--------------
trunk/help/Strings.dtx
Modified: trunk/help/Strings.dtx
===================================================================
--- trunk/help/Strings.dtx 2007-12-01 15:51:06 UTC (rev 2257)
+++ trunk/help/Strings.dtx 2007-12-01 15:55:44 UTC (rev 2258)
@@ -53,6 +53,11 @@
<TITLE String Transformation Routines>
<TOPICORDER 1100>
--------------------------------------------------------------------------------
+@@StringManipulation.Tabulation
+<GROUP StringManipulation>
+<TITLE Tabulation>
+<TOPICORDER 1150>
+--------------------------------------------------------------------------------
@@StringManipulation.TStringsManipulation
<GROUP StringManipulation>
<TITLE TStrings Manipulation>
@@ -2770,3 +2775,1018 @@
Windows 95/98: Requires Windows 95 or later.
Donator:
Jean-Fabien Connault
+--------------------------------------------------------------------------------
+@@StrExpandTabs@string
+<GROUP StringManipulation.Tabulation>
+Summary:
+ Expands tabs to spaces in the provided string.
+Description:
+ StrExpandTabs expands tab characters in the provided string into sequences of
+ spaces while preserving the formatting. StrExpandTabs will assume a tab width
+ of 2.
+
+ Multi-line strings, ie. strings containing one or more newline sequences (eg.
+ CrLf, but also single Cr of Lf characters are treated as newlines), are
+ handled properly.
+
+ The reverse operation (collapse sequences of spaces into tab characters) can
+ be achieved by the <LINK StrOptimizeTabs@string, StrOptimizeTabs> method.
+Parameters:
+ S - The string to expand tabs in.
+Result:
+ If S contains tabs, they will have been converted to 1 or more space characters,
+ depending on the column the tab character is in. Otherwise, the string is
+ unmodified.
+Example:
+ <code>x := StrExpandTabs('Abc'#9'de'#9'fg');</code>
+ The above call will result in <i>x</i> containing the string (\xB7 represents a
+ space character): <c>Abc\xB7\xB7\xB7\xB7\xB7de\xB7\xB7\xB7\xB7\xB7\xB7fg</c>. In this case the first tab
+ character (ASCII code 9) was transformed into a single space and the second
+ tab character into two spaces.
+See also:
+ TJclTabSet
+ StrExpandTabs@string@Integer
+ StrExpandTabs@string@TJclTabSet
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@StrExpandTabs@string@Integer
+<GROUP StringManipulation.Tabulation>
+Summary:
+ Expands tabs to spaces in the provided string.
+Description:
+ StrExpandTabs expands tab characters in the provided string into sequences of
+ spaces while preserving the formatting. StrExpandTabs will use the provided
+ tab width.
+
+ Multi-line strings, ie. strings containing one or more newline sequences (eg.
+ CrLf, but also single Cr of Lf characters are treated as newlines), are
+ handled properly.
+
+ The reverse operation (collapse sequences of spaces into tab characters) can
+ be achieved by the <LINK StrOptimizeTabs@string@Integer, StrOptimizeTabs>
+ method.
+Parameters:
+ S - The string to expand tabs in.
+ TabWidth - The width of each tab.
+Result:
+ If S contains tabs, they will have been converted to 1 or more space characters,
+ depending on the column the tab character is in. Otherwise, the string is
+ unmodified.
+Example:
+ <code>x := StrExpandTabs('Abc'#9'de'#9'fg', 8);</code>
+ The above call will result in <i>x</i> containing the string (\xB7 represents a
+ space character): <c>Abc\xB7\xB7\xB7\xB7\xB7de\xB7\xB7\xB7\xB7\xB7\xB7fg</c>. In this case the first tab
+ character (ASCII code 9) was transformed into five spaces and the second tab
+ character into six spaces.
+See also:
+ TJclTabSet
+ StrExpandTabs@string
+ StrExpandTabs@string@TJclTabSet
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@StrExpandTabs@string@TJclTabSet
+<GROUP StringManipulation.Tabulation>
+Summary:
+ Expands tabs to spaces in the provided string.
+Description:
+ StrExpandTabs expands tab characters in the provided string into sequences of
+ spaces while preserving the formatting. StrExpandTabs will use the provided
+ tab set.
+
+ Multi-line strings, ie. strings containing one or more newline sequences (eg.
+ CrLf, but also single Cr of Lf characters are treated as newlines), are
+ handled properly.
+
+ The reverse operation (collapse sequences of spaces into tab characters) can
+ be achieved by the <LINK StrOptimizeTabs@string@TJclTabSet, StrOptimizeTabs>
+ method.
+Parameters:
+ S - The string to expand tabs in.
+ TabSet - The tab set to use.
+Result:
+ If S contains tabs, they will have been converted to 1 or more space characters,
+ depending on the column the tab character is in. Otherwise, the string is
+ unmodified.
+Example:
+<code>
+ <i>// initiate a tab set with (zero-based) stops at 15, 20 and 30, and a tab width of 2 for
+ // tabs beyond the column 30</i>
+ tabs := TJclTabSet.Create([15, 20, 30], True, 2);
+ <b>try</b>
+ x := StrExpandTabs('MyLabel:'#9'LD'#9'A,(HL)'#9'; Initialize A register', tabs);
+ <b>finally</b>
+ tabs.Free;
+ <b>end</b>;
+</code>
+ The above snippet will result in <i>x</i> containing the string (\xB7 represents a
+ space character): <c>MyLabel:\xB7\xB7\xB7\xB7\xB7\xB7\xB7LD\xB7\xB7\xB7A,(HL)\xB7\xB7\xB7\xB7;\xB7Initialize\xB7A\xB7register</c>.
+ In this case the first tab character (ASCII code 9) was transformed into seven
+ spaces, the second tab character into three spaces and the third tab character
+ into four spaces.
+See also:
+ TJclTabSet
+ StrExpandTabs@string
+ StrExpandTabs@string@Integer
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@StrOptimizeTabs@string
+<GROUP StringManipulation.Tabulation>
+Summary:
+ Collapses a string to the optimal tab and space character sequences.
+Description:
+ StrOptimizeTabs reduces tab and space character sequences in the provided
+ string into an optimized (shortest) sequences of tab and space characters
+ while preserving the formatting. A tab width of 2 is assumed.
+
+ Multi-line strings, ie. strings containing one or more newline sequences (eg.
+ CrLf, but also single Cr of Lf characters are treated as newlines), are
+ handled properly.
+
+ The reverse operation (expand sequences of tab characters into spaces) can
+ be achieved by the <LINK StrExpandTabs@string, StrExpandTabs> method.
+Parameters:
+ S - The string to collapse tabs and spaces in.
+Result:
+ Any tab and/or space character sequences in S will have been reduced to their
+ shortest form; no other item in the string is modified.
+See also:
+ TJclTabSet
+ StrOptimizeTabs@string@Integer
+ StrOptimizeTabs@string@TJclTabSet
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@StrOptimizeTabs@string@Integer
+<GROUP StringManipulation.Tabulation>
+Summary:
+ Collapses a string to the optimal tab and space character sequences.
+Description:
+ StrOptimizeTabs reduces tab and space character sequences in the provided
+ string into an optimized (shortest) sequences of tab and space characters
+ while preserving the formatting. The provided tab width is used.
+
+ Multi-line strings, ie. strings containing one or more newline sequences (eg.
+ CrLf, but also single Cr of Lf characters are treated as newlines), are
+ handled properly.
+
+ The reverse operation (expand sequences of tab characters into spaces) can
+ be achieved by the <LINK StrExpandTabs@string@Integer, StrExpandTabs> method.
+Parameters:
+ S - The string to collapse tabs and spaces in.
+ TabWidth - The tab width to use
+Result:
+ Any tab and/or space character sequences in S will have been reduced to their
+ shortest form; no other item in the string is modified.
+See also:
+ TJclTabSet
+ StrOptimizeTabs@string
+ StrOptimizeTabs@string@TJclTabSet
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@StrOptimizeTabs@string@TJclTabSet
+<GROUP StringManipulation.Tabulation>
+Summary:
+ Collapses a string to the optimal tab and space character sequences.
+Description:
+ StrOptimizeTabs reduces tab and space character sequences in the provided
+ string into an optimized (shortest) sequences of tab and space characters
+ while preserving the formatting. The provided tab width is used.
+
+ Multi-line strings, ie. strings containing one or more newline sequences (eg.
+ CrLf, but also single Cr of Lf characters are treated as newlines), are
+ handled properly.
+
+ The reverse operation (expand sequences of tab characters into spaces) can
+ be achieved by the <LINK StrExpandTabs@string@TJclTabSet, StrExpandTabs>
+ method.
+Parameters:
+ S - The string to collapse tabs and spaces in.
+ TabSet - The tab set to use
+Result:
+ Any tab and/or space character sequences in S will have been reduced to their
+ shortest form; no other item in the string is modified.
+See also:
+ TJclTabSet
+ StrOptimizeTabs@string
+ StrOptimizeTabs@string@Integer
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TabSetFormattingOptions
+<GROUP StringManipulation.Tabulation>
+<TITLE TJclTabSet string formatting options>
+<ALIASOF TabSetFormatting_SurroundStopsWithBrackets,TabSetFormatting_EmptyBracketsIfNoStops>
+<ALIASOF TabSetFormatting_NoTabStops,TabSetFormatting_NoTabWidth,TabSetFormatting_AlwaysUseBrackets>
+<ALIASOF TabSetFormatting_Default,TabSetFormatting_StopsWithoutBracketsAndTabWidth>
+<ALIASOF TabSetFormatting_StopsOnly,TabSetFormatting_TabWidthOnly>
+<ALIASOF TabSetFormatting_Full,TabSetFormatting_AutoTabWidth>
+Summary:
+ Available formatting options for the
+ <LINK TJclTabSet.ToString@Integer, TJclTabSet.ToString> method.
+Description
+ The <LINK TJclTabSet.ToString@Integer, TJclTabSet.ToString@Integer> method
+ allows for a number of formatting options to be specified. Options can be
+ or'd with each other to specify exact formatting. Below is the list of
+ available formatting options:
+
+ <TABLE>
+ Constant Meaning
+ -------- -------
+ TabSetFormatting_SurroundStopsWithBrackets The fixed tabulation positions are surrounded with brackets
+ TabSetFormatting_EmptyBracketsIfNoStops If no fixed tabulation positions are specified, but the
+ TabSetFormatting_SurroundStopsWithBrackets option is specified,
+ output the opening and closing brackets anyway.
+ TabSetFormatting_NoTabStops Do not output the fixed tabulation positions.
+ TabSetFormatting_NoTabWidth Do not output the additional tab width.
+ TabSetFormatting_AutoTabWidth Include tab width even if its determined by the tabulation
+ positions.
+ \xA0
+ TabSetFormatting_AlwaysUseBrackets Combines the TabSetFormatting_SurroundStopsWithBrackets and
+ TabSetFormatting_EmptyBracketsIfNoStops options.
+ TabSetFormatting_Default Specifies none of the formatting options.
+ TabSetFormatting_Full Combines the TabSetFormatting_SurroundStopsWithBrackets,
+ TabSetFormatting_EmptyBracketsIfNoStops and
+ TabSetFormatting_AutoTabWidth options.
+ \xA0
+ TabSetFormatting_StopsWithoutBracketsAndTabWidth An alias for the TabSetFormatting_Default option.
+ TabSetFormatting_StopsOnly An alias for the TabSetFormatting_NoTabWidth option.
+ TabSetFormatting_TabWidthOnly An alias for the TabSetFormatting_NoTabStops option.
+ </TABLE>
+--------------------------------------------------------------------------------
+@@TJclTabSet
+<GROUP StringManipulation.Tabulation>
+Summary:
+ Represents a tab set that can be used to expand tabs to spaces, or vice versa.
+Description:
+ The TJclTabSet class represents tabulation information. Each instance can
+ specify:
+ * Whether the column positions are <LINK TJclTabSet.ZeroBased, zero-based>
+ * Individual <LINK TJclTabSet.TabStops, tabulation positions>
+ * <LINK TJclTabSet.TabWidth, Tabulation width> for columns beyond those
+ specified by the individual tabulation positions.
+
+ The class then provides functionality to:
+ * Determine the <LINK TJclTabSet.TabFrom, next tabulation position> from a
+ given starting column
+ * Determine the
+ <LINK TJclTabSet.OptimalFillInfo, optimal tab and space characters needed>
+ to get from one column to another
+ * <LINK TJclTabSet.Expand@string, Expand> tab characters into a sequence of
+ spaces, optionally
+ <LINK TJclTabSet.Expand@string@Integer, starting at an arbitrary column>
+ * <LINK TJclTabSet.Optimize@string, Collapse> a sequence of space and tab
+ characters into an optimized sequence of tab and space characters,
+ optionally
+ <LINK TJclTabSet.Optimize@string@Integer, starting at an arbitrary column>
+
+ The class contains logic to allow automatic tab width determination by setting
+ the <LINK TJclTabSet.TabWidth, tabulation width> to zero or a negative value;
+ in this case the tab width is determined by the provided
+ <LINK TJclTabSet.TabStops, tabulation positions> in the following manner:
+
+ <TABLE>
+ Situation ActualTabWidth
+ ---------- --------------------------
+ No tabulation positions defined 2
+ One tabulation position defined the defined tabulation position
+ Two or more tabulation positions defined the distance between the last
+ two tabulation positions
+ </TABLE>
+
+* nil - safety *
+ The public methods and properties that do not modify the tab set are
+ <i><b>nil</b>-safe</i>, meaning they will work when used on a <b>nil</b>
+ reference. A <b>nil</b> tab set will behave as if explicitly set to:
+
+ * assume <LINK TJclTabSet.ZeroBased, zero-based> column positions
+ * no defined <LINK TJclTabSet.TabStops, tabulation positions>
+ * a <LINK TJclTabSet.TabWidth, tabulation width> of 2
+
+ Note that reading any of the public properties on a <b>nil</b> instance will
+ work properly.
+Example:
+<code>
+ <i>// initiate a tab set with (zero-based) stops at 15, 20 and 30, and a tab width of 2 for
+ // tabs beyond the column 30</i>
+ tabs := TJclTabSet.Create([15, 20, 30], True, 2);
+ <b>try</b>
+ x := tabs.Expand('MyLabel:'#9'LD'#9'A,(HL)'#9'; Initialize A register');
+ <b>finally</b>
+ tabs.Free;
+ <b>end;</b>
+</code>
+ The above snippet will result in <i>x</i> containing the string (\xB7 represents a
+ space character): <c>MyLabel:\xB7\xB7\xB7\xB7\xB7\xB7\xB7LD\xB7\xB7\xB7A,(HL)\xB7\xB7\xB7\xB7;\xB7Initialize\xB7A\xB7register</c>.
+ In this case the first tab character (ASCII code 9) was transformed into seven
+ spaces, the second tab character into three spaces and the third tab character
+ into four spaces.
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.ActualTabWidth
+Summary:
+ Indicates the actual tabulation width being used.
+Description:
+ ActualTabWidth indicates the actual tabulation width being used for columns
+ beyond those specified by the <LINK TJclTabSet.TabStops, TabStops> property.
+
+ If the <LINK TJclTabSet.TabWidth, TabWidth> property is set to a positive,
+ non-zero value, ActualTabWidth will hold the same value as TabWidth; otherwise
+ it will hold a value calculated according to the following table:
+
+ <TABLE>
+ Situation ActualWidthActualTabWidth
+ ---------- --------------------------
+ No tabulation positions defined 2
+ One tabulation position defined the defined tabulation position
+ Two or more tabulation positions defined the distance between the last
+ two tabulation positions
+ </TABLE>
+Notes:
+ This property is <i><b>nil</b>-safe</i>; when read from on a
+ <b>nil</b>-reference, this property will return 2.
+See also:
+ TJclTabSet.Count
+ TJclTabSet.TabStops
+ TJclTabSet.TabWidth
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.Add@Integer
+Summary:
+ Adds a fixed tabulation position.
+Description:
+ Add will add a fixed tabulation position to the tab set. The provided
+ tabulation position is inserted at the correct index in the TabStops array.
+
+ Duplicate tabulation positions are not allowed and will result in an
+ EJclStringError.
+Parameters:
+ Column - The column to add to the tab set.
+Result:
+ The index at which the tabulation position was inserted into the TabStops
+ array
+Exceptions:
+ <TABLE>
+ NullReferenceException Add was called on a <b>nil</b>-reference.
+ EJclStringError The specified Column already existed in the TabStops
+ array.
+ </TABLE>
+See also:
+ TJclTabSet
+ TJclTabSet.Delete
+ TJclTabSet.TabStops
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.Count
+Summary:
+ Indicates the number of tabulation positions specified.
+Description:
+ Count indicates the number of <LINK TJclTabSet.TabStops, tabulation positions>
+ that are defined on this instance.
+Notes:
+ This property is <i><b>nil</b>-safe</i>. When read from on a
+ <b>nil</b>-reference, this property will return 0.
+See also:
+ TJclTabSet.TabStops
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.Create
+Summary:
+ Initializes a new, empty tab set instance.
+Description:
+ The constructor initializes a new instance of the TJclTabSet class. The
+ parameterless overload simply initializes it to a zero-based tab set, with
+ automatic tab width calculation.
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.Create@Integer
+Summary:
+ Initializes a new tab set instance with the specified tab width.
+Description:
+ The constructor initializes a new instance of the TJclTabSet class, setting the
+ TabWidth property to the specified tab width.
+Parameters:
+ \TabWidth - The value to initialize the TabWidth property to.
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.Create@array of Integer@Boolean
+Summary:
+ Initializes a new tab set instance with the specified fixed tabulation
+ positions and automatic tab width calculation.
+Description:
+ The constructor initializes a new instance of the TJclTabSet class, adding the
+ specified tab stops to the TabStops array.
+Parameters:
+ \Tabstops - The fixed tabulation position(s) to initialize the tab set to.
+ \ZeroBased - The value to initialize the ZeroBased property to.
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.Create@array of Integer@Boolean@Integer
+Summary:
+ Initializes a new tab set instance with the specified fixed tabulation
+ positions and tab width.
+Description:
+ The constructor initializes a new instance of the TJclTabSet class, adding the
+ specified tab stops to the TabStops array and setting the TabWidth property to
+ the specified tab width.
+Parameters:
+ \Tabstops - The fixed tabulation position(s) to initialize the tab set to.
+ \ZeroBased - The value to initialize the ZeroBased property to.
+ \TabWidth - The value to initialize the TabWidth property to.
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.Delete@Integer
+Summary:
+ Removes a fixed tabulation position.
+Description:
+ Delete will remove the specified column from the list of fixed tabulation
+ positions.
+Parameters:
+ Column - The column to remove from the tab set.
+Result:
+ The index from which the tabulation position was removed from the TabStops
+ array<p>
+ \xA0<i>- or -</i><p>
+ A negative value if the tabulation position was not found
+Exceptions:
+ <TABLE>
+ NullReferenceException Delete was called on a <b>nil</b>-reference.
+ </TABLE>
+See also:
+ TJclTabSet
+ TJclTabSet.Add
+ TJclTabSet.TabStops
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.Expand@string
+Summary:
+ Expands tabs to spaces in the provided string.
+Description:
+ Expand expands tab characters in the provided string into sequences of
+ spaces while preserving the formatting. Expand will assume the string starts
+ at column 0 (<LINK TJclTabSet.ZeroBased, zero-based> set to <c>True</c>) or 1
+ (<LINK TJclTabSet.ZeroBased, zero-based> set to <c>False</c>).
+
+ Multi-line strings, ie. strings containing one or more newline sequences (eg.
+ CrLf, but also single Cr of Lf characters are treated as newlines), are
+ handled properly, with each line starting at column 0
+ (<LINK TJclTabSet.ZeroBased, zero-based> set to <c>True</c>) or 1
+ (<LINK TJclTabSet.ZeroBased, zero-based> set to <c>False</c>).
+
+ The reverse operation (collapse sequences of spaces into tab characters) can
+ be achieved by the <LINK TJclTabSet.Optimize@string, Optimize> method.
+Parameters:
+ S - The string to expand tabs in.
+Result:
+ If S contains tabs, they will have been converted to 1 or more space characters,
+ depending on the column the tab character is in. Otherwise, the string is
+ unmodified.
+Notes:
+ This method is <i><b>nil</b>-safe</i>; when invoked on a
+ <b>nil</b>-reference, this method will assume a tab width of two on a
+ zero-based tab set.
+Example:
+ See the <LINK TJclTabSet, TJclTabSet> help for an example.
+See also:
+ TJclTabSet
+ TJclTabSet.Expand@string@Integer
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.Expand@string@Integer
+Summary:
+ Expands tabs to spaces in the provided string.
+Description:
+ Expand expands tab characters in the provided string into sequences of
+ spaces while preserving the formatting. Expand will assume the string starts
+ at the provided column.
+
+ Multi-line strings, ie. strings containing one or more newline sequences (eg.
+ CrLf, but also single Cr of Lf characters are treated as newlines), are
+ handled properly, with all but the first line starting at column 0
+ (<LINK TJclTabSet.ZeroBased, zero-based> set to <c>True</c>) or 1
+ (<LINK TJclTabSet.ZeroBased, zero-based> set to <c>False</c>).
+
+ The reverse operation (collapse sequences of spaces into tab characters) can
+ be achieved by the <LINK TJclTabSet.Optimize@string@Integer, Optimize> method.
+Parameters:
+ S - The string to expand tabs in.
+ Column - The starting column to use when expanding the tabs.
+Result:
+ If S contains tab character, they will have been converted to 1 or more space
+ characters, depending on the column the tab character is in. Otherwise, the
+ string is unmodified.
+Notes:
+ This method is <i><b>nil</b>-safe</i>; when invoked on a
+ <b>nil</b>-reference, this method will assume a tab width of two on a
+ zero-based tab set.
+Example:
+ See the <LINK TJclTabSet, TJclTabSet> help for an example.
+See also:
+ TJclTabSet
+ TJclTabSet.Expand@string
+ TJclTabSet.TabFrom
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.FindStop
+Summary:
+ Locates a tabulation position in the TabStops array.
+Description:
+ FindStop returns the index in the TabStops array of the specified column. If
+ the specified column does not exist the 2-complement of the index at which
+ it should've been found will be returned, resulting in a negative value. You
+ could use the <b>not</b>-operator to determine the actual index.
+Parameters:
+ Column - The tabulation column to locate.
+Returns:
+ The index of the column specified by the <i>Column</i> parameter in the
+ TabStops array<p>
+ \xA0<i>- or -</i><p>
+ <b>A negative value</b> if the specified column could not be found. Use the
+ <b>not</b>-operator to retrieve the index at which it should've been found.
+Exceptions:
+ <TABLE>
+ ArgumentOutOfRangeException The <i>Column</i> parameter is less than
+ 0 (<LINK TJclTabSet.ZeroBased, zero-based>)
+ or 1 (not zero-based).
+ </TABLE>
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.FromString
+Summary
+ Converts a string into a tab set.
+Description
+ The FromString class method returns a tab set setup according to the provided
+ string represention.
+
+ The string should be formatted according to the same rules as outlined in the
+ <LINK TJclTabSet.ToString, ToString> method documentation:
+ <TABLE>
+ '0' Optional: flag to set the tab set to
+ zero-based mode.
+ '[' Optional: opening bracket for the fixed
+ tabulation positions. When present, the
+ closing bracket must be present or an
+ exception will be raised.
+ comma-separated list of Optional: The individual fixed tabulation
+ tabulation positions positions of this tab set. <b>Note:</b>
+ if the zero-based flag is present but no
+ opening bracket, an exception will be
+ raised.
+ ']' Closing bracket for the fixed tabulation
+ positions. Required if an opening bracket
+ is present earlier.
+ '+' Optional: indicates the following number as
+ the tab width property.
+ tab width Optional: the tab width property. Required if
+ the plus character is present.
+ </TABLE>
+Parameters
+ S - A string describing the tab set. It should be formatted according to the
+ rules outlined in the <LINK TJclTabSet.ToString, ToString>
+ documentation.
+Returns:
+ A TJclTabSet representated by the string parameter.
+--------------------------------------------------------------------------------
+@@TJclTabSet.InternalTabStops
+Summary:
+ Provides <b>nil</b>-safe access to the tab stops array.
+Description:
+ InternalTabStops provides <b>nil</b>-safe access to the actual tab stops
+ array.
+Returns:
+ A TDynIntegerArray holding each individual tab position<p>
+ \xA0<i>- or -</i><p>
+ <b>nil</b> if the method is called on a <b>nil</b>-reference
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.InternalTabWidth
+Summary:
+ Provides <b>nil</b>-safe access to the specified tab width.
+Description:
+ InternalTabWidth provides <b>nil</b>-safe access to the specified tab width
+ (not to be confused with the actual tab width).
+Returns:
+ The value of the TabWidth property<p>
+ \xA0<i>- or -</i><p>
+ <b>2</b> if the method is called on a <b>nil</b>-reference
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.OptimalFillInfo
+Summary:
+ Determines the optimal number of tab and space characters needed to fill the
+ room between two columns.
+Description:
+ OptimalFillInfo will determine the ideal amount of tab characters and/or
+ space characters required to get from the first provided column to the second.
+Parameters:
+ \StartColumn - The starting column to use.
+ TargetColumn - The required column to end at.
+ TabsNeeded - Will hold the amount of tab characters needed to get to the
+ destination column.
+ SpacesNeeded - Will hold the amount of space characters needed to get to the
+ destination column.
+Exceptions:
+ <TABLE>
+ ArgumentOutOfRangeException The <i>\StartColumn</i> parameter is less than
+ 0 (<LINK TJclTabSet.ZeroBased, zero-based>)
+ or 1 (not zero-based).<p>
+ <i>\xA0- or -</i><p>
+ The <i>TargetColumn</i> parameter is less
+ than the <i>\StartColumn</i> parameter.
+ </TABLE>
+Example:
+ <b>Note:</b>This example assumes a tab set instance set up as in the example
+ given in the <LINK TJclTabSet, TJclTabSet> help.
+
+<CODE>
+ tabs.OptimalFillInfo(5, 21, TabsNeeded, SpacesNeeded);
+ <i>// TabsNeeded will be 2 (taking us only to column 20), SpacesNeeded will be 1.</i>
+</CODE>
+See also:
+ TJclTabSet
+ TJclTabSet.Optimize@string
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.Optimize@string
+Summary:
+ Collapses a string to the optimal tab and space character sequences.
+Description:
+ Optimize reduces tab and space character sequences in the provided string into
+ an optimized (shortest) sequences of tab and space characters while preserving
+ the formatting. Optimize will assume the string starts at column 0
+ (<LINK TJclTabSet.ZeroBased, zero-based> set to <c>True</c>) or 1
+ (<LINK TJclTabSet.ZeroBased, zero-based> set to <c>False</c>).
+
+ Multi-line strings, ie. strings containing one or more newline sequences (eg.
+ CrLf, but also single Cr of Lf characters are treated as newlines), are
+ handled properly, with each line starting at column 0
+ (<LINK TJclTabSet.ZeroBased, zero-based> set to <c>True</c>) or 1
+ (<LINK TJclTabSet.ZeroBased, zero-based> set to <c>False</c>).
+
+ The reverse operation (expand sequences of tab characters into spaces) can
+ be achieved by the <LINK TJclTabSet.Expand@string, Expand> method.
+Parameters:
+ S - The string to collapse tabs and spaces in.
+Result:
+ Any tab and/or space character sequences in S will have been reduced to their
+ shortest form; no other item in the string is modified.
+Notes:
+ This method is <i><b>nil</b>-safe</i>; when invoked on a
+ <b>nil</b>-reference, this method will assume a tab width of two on a
+ zero-based tab set.
+See also:
+ TJclTabSet
+ TJclTabSet.OptimalFillInfo
+ TJclTabSet.Optimize@string@Integer
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.Optimize@string@Integer
+Summary:
+ Expands tabs to spaces in the provided string.
+Description:
+ Optimize reduces tab and space character sequences in the provided string into
+ an optimized (shortest) sequences of tab and space characters while preserving
+ the formatting. Optimize will assume the string starts at the provided column.
+
+ Multi-line strings, ie. strings containing one or more newline sequences (eg.
+ CrLf, but also single Cr of Lf characters are treated as newlines), are
+ handled properly, with all but the first line starting at column 0
+ (<LINK TJclTabSet.ZeroBased, zero-based> set to <c>True</c>) or 1
+ (<LINK TJclTabSet.ZeroBased, zero-based> set to <c>False</c>).
+
+ The reverse operation (expand sequences of tab characters into spaces) can
+ be achieved by the <LINK TJclTabSet.Expand@string@Integer, Expand> method.
+Parameters:
+ S - The string to expand tabs in.
+ Column - The starting column to use when expanding the tabs.
+Result:
+ Any tab and/or space character sequences in S will have been reduced to their
+ shortest form; no other item in the string is modified.
+Notes:
+ This method is <i><b>nil</b>-safe</i>; when invoked on a
+ <b>nil</b>-reference, this method will assume a tab width of two on a
+ zero-based tab set.
+See also:
+ TJclTabSet
+ TJclTabSet.OptimalFillInfo
+ TJclTabSet.Optimize@string
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.StartColumn
+Summary:
+ Indicates the starting column used when none is specified.
+Description:
+ StartColumn indicates which column is used as the start of a line.
+Returns:
+ <b>0</b> if ZeroBased is set to <c>True</c> or if this method is called on a
+ <b>nil</b>-reference
+ \xA0<i>- or -</i><p>
+ <b>1</b> if ZeroBased is set to <c>False</c>
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.TabFrom
+Summary:
+ Determines the next column when tabbing from the specified column.
+Description:
+ TabFrom will determine the next column if a tab character would occur at the
+ specified column.
+Parameters:
+ Column - The starting column to use when determine the next column.
+Result:
+ An Integer representing the next tabulation position.
+Exceptions:
+ <TABLE>
+ ArgumentOutOfRangeException The <i>Column</i> parameter is less than
+ 0 (<LINK TJclTabSet.ZeroBased, zero-based>)
+ or 1 (not zero-based).
+ </TABLE>
+Example:
+ <b>Note:</b>This example assumes a tab set instance set up as in the example
+ given in the <LINK TJclTabSet, TJclTabSet> help.
+
+<CODE>
+ a := tabs.TabFrom(0); <i>// a will be 15</i>
+ b := tabs.TabFrom(24); <i>// b will be 30</i>
+ c := tabs.TabFrom(34); <i>// c will be 36</i>
+ d := tabs.TabFrom(35); <i>// d will be 36</i>
+</CODE>
+See also:
+ TJclTabSet
+ TJclTabSet.Expand@string
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.TabStops
+Summary:
+ Specifies the tabulation positions to use.
+Description:
+ TabStops indicates which fixed tabulation positions this set will use. The
+ array is guaranteed in column order, with the smallest tabulation position
+ being at index 0. As a consequence, writing a new value at any index of the
+ array is internally handled as a <LINK TJclTabSet.Delete, delete>, followed
+ by an <TLINK TJclTabSet.Add, add> operation, to preserve this ordered
+ property.
+Notes:
+ This property is <i><b>nil</b>-safe</i>. However, since a <b>nil</b> tab set
+ has no fixed tabulation positions, any read or write operation will result in
+ an EJclStringError (argument out of range).
+See also:
+ TJclTabSet.ActualTabWidth
+ TJclTabSet.Count
+ TJclTabSet.TabStops
+ TJclTabSet.TabWidth
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.TabWidth
+Summary:
+ Specifies the tabulation width this instance will use.
+Description:
+ TabWidth indicates the tabulation width to use for columns beyond those
+ specified by the <LINK TJclTabSet.TabStops, TabStops> property.
+
+ If this property is set to zero or a negative value, the instance will
+ calculate the <LINK TJclTabSet.ActualTabWidth, actual tabulation width> to use
+ according to the following table:
+
+ <TABLE>
+ Situation ActualTabWidth
+ ---------- --------------------------
+ No tabulation positions defined 2
+ One tabulation position defined the defined tabulation position
+ Two or more tabulation positions defined the distance between the last
+ two tabulation positions
+ </TABLE>
+Notes:
+ This property is <i><b>nil</b>-safe</i>. When read from on a
+ <b>nil</b>-reference, this property will return 2. When written to on a
+ <b>nil</b>-reference, a NullReferenceException will be raised.
+See also:
+ TJclTabSet.ActualTabWidth
+ TJclTabSet.Count
+ TJclTabSet.TabStops
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.ToString
+Summary
+ Converts the tab set into its string representation.
+Description
+ The ToString method returns a string representing this tab set, containing
+ each individual tabulation position and the tab width used beyond those
+ fixed positions.
+
+ Using this overload is the same as using the one with the
+ <LINK TJclTabSet.ToString@Integer, formatting options>, specifying the
+ TabSetFormatting_Full option.
+
+ The resulting string will be composed of the following items:
+ <TABLE>
+ '0' Outputted only when the tabset is zero-based.
+ 0 or more whitespaces Used to separate the zero-based flag from
+ the tabulation positions; at least one
+ whitespace is used if no opening bracket is
+ used.
+ '[' Opening bracket for the fixed tabulation
+ positions.
+ comma-separated list of The individual fixed tabulation positions of
+ tabulation positions this tab set.
+ ']' Closing bracket for the fixed tabulation
+ positions.
+ 0 or more whitespaces Used to separate the zero-based flag and/or
+ tabulation positions from the tab width.
+ '+' Outputted to mark the tab width property.
+ Value of ActualTabWidth The tab width.
+ </TABLE>
+Returns:
+ A string representation of this tab set.
+Notes:
+ This method is <i><b>nil</b>-safe</i>.
+--------------------------------------------------------------------------------
+@@TJclTabSet.ToString@Integer
+Summary
+ Converts the tab set into its string representation using the specified
+ formatting.
+Description
+ The ToString method returns a string representing this tab set, containing
+ each individual tabulation position and the tab width used beyond those
+ fixed positions.
+
+ The FormattingOptions parameter indicates whether and how the tabulation
+ positions are handled and whether the tab width will be in the string.
+
+ The resulting string will be composed of the following items:
+ <TABLE>
+ '0' Outputted only when the tabset is zero-based.
+ 0 or more whitespaces Used to separate the zero-based flag from
+ the tabulation positions; at least one
+ whitespace is used if no opening bracket is
+ used.
+ '[' Opening bracket for the fixed tabulation
+ positions, outputted when the formatting
+ options specify it.
+ comma-separated list of The individual fixed tabulation positions of
+ tabulation positions this tab set, outputted when tab stops are
+ not disabled by the options.
+ ']' Closing bracket for the fixed tabulation
+ positions, outputted when the formatting
+ options specify it.
+ 0 or more whitespaces Used to separate the zero-based flag and/or
+ tabulation positions from the tab width.
+ '+' Outputted to mark the tab width property.
+ Value of ActualTabWidth The tab width.
+ </TABLE>
+Parameters:
+ FormattingOptions - the formatting options to use. See
+ <LINK TabSetFormattingOptions, TJclTabSet formatting options> for the
+ available options.
+Returns:
+ A string representation of this tab set, formatted according to the provided
+ formatting options.
+Notes:
+ This method is <i><b>nil</b>-safe</i>.
+--------------------------------------------------------------------------------
+@@TJclTabSet.UpdatePosition@string
+Summary:
+ Calculates the ending column after expanding tabs in the provided
+ string.
+Description:
+ Calculate will simulate the Expand method, calculating the ending column
+ only.
+
+ Multi-line strings, ie. strings containing one or more newline sequences (eg.
+ CrLf, but also single Cr of Lf characters are treated as newlines), are
+ handled properly, with all but the first line starting at column 0
+ (<LINK TJclTabSet.ZeroBased, zero-based> set to <c>True</c>) or 1
+ (<LINK TJclTabSet.ZeroBased, zero-based> set to <c>False</c>).
+Parameters:
+ S - The string to expand tabs in.
+Result:
+ The ending column after expanding tabs in the provided string.
+Notes:
+ This method is <i><b>nil</b>-safe</i>; when invoked on a
+ <b>nil</b>-reference, this method will assume a tab width of two on a
+ zero-based tab set.
+Example:
+ See the <LINK TJclTabSet, TJclTabSet> help for an example.
+See also:
+ TJclTabSet
+ TJclTabSet.Expand@string@Integer
+ TJclTabSet.TabFrom
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.UpdatePosition@string@Integer
+Summary:
+ Calculates the ending column after expanding tabs in the provided
+ string.
+Description:
+ Calculate will simulate the Expand method, calculating the ending column
+ only.
+
+ Multi-line strings, ie. strings containing one or more newline sequences (eg.
+ CrLf, but also single Cr of Lf characters are treated as newlines), are
+ handled properly, with all but the first line starting at column 0
+ (<LINK TJclTabSet.ZeroBased, zero-based> set to <c>True</c>) or 1
+ (<LINK TJclTabSet.ZeroBased, zero-based> set to <c>False</c>).
+Parameters:
+ S - The string to expand tabs in.
+ Column - The starting column to use when expanding the tabs.
+Result:
+ The ending column after expanding tabs in the provided string.
+Notes:
+ This method is <i><b>nil</b>-safe</i>; when invoked on a
+ <b>nil</b>-reference, this method will assume a tab width of two on a
+ zero-based tab set.
+Example:
+ See the <LINK TJclTabSet, TJclTabSet> help for an example.
+See also:
+ TJclTabSet
+ TJclTabSet.Expand@string@Integer
+ TJclTabSet.TabFrom
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.UpdatePosition@string@Integer@Integer
+Summary:
+ Calculates the ending line and column after expanding tabs in the provided
+ string.
+Description:
+ Calculate will simulate the Expand method, updating the line and column
+ variables only. For convenience, the ending column is also the method's result
+ value.
+
+ Multi-line strings, ie. strings containing one or more newline sequences (eg.
+ CrLf, but also single Cr of Lf characters are treated as newlines), are
+ handled properly, with all but the first line starting at column 0
+ (<LINK TJclTabSet.ZeroBased, zero-based> set to <c>True</c>) or 1
+ (<LINK TJclTabSet.ZeroBased, zero-based> set to <c>False</c>).
+Parameters:
+ S - The string to expand tabs in.
+ Column - On entry: The starting column to use when expanding the tabs.
+ On return: The ending column after expanding the tabs.
+ Line - On entry: The starting line to use when expanding the tabs.
+ On return: The ending line after expanding the tabs.
+Result:
+ The ending column after expanding tabs in the provided string.
+Notes:
+ This method is <i><b>nil</b>-safe</i>; when invoked on a
+ <b>nil</b>-reference, this method will assume a tab width of two on a
+ zero-based tab set.
+Example:
+ See the <LINK TJclTabSet, TJclTabSet> help for an example.
+See also:
+ TJclTabSet
+ TJclTabSet.Expand@string@Integer
+ TJclTabSet.TabFrom
+Donator:
+ Marcel Bestebroer
+--------------------------------------------------------------------------------
+@@TJclTabSet.ZeroBased
+Summary:
+ Specifies whether the columns are zero-based.
+Description:
+ ZeroBased indicates whether specified
+ <LINK TJclTabSet.TabStops, tabulation positions> and other column references
+ are zero based.
+
+ If this property is set to <c>True</c>, all columns are considered to be
+ zero-based (the first column index is zero); otherwise columns references are
+ one-based (the first column index is one).
+
+ If this flag is toggled, any stored
+ <LINK TJclTabSet.TabStops, tabulation positions> are automatically converted
+ to the new state (ie. values are incremented when setting to <c>False</c> or
+ decremented when setting to <c>True</c>).
+Notes:
+ This property is <i><b>nil</b>-safe</i>. When read from on a
+ <b>nil</b>-reference, this property will return <c>True</c>. When written to
+ on a <b>nil</b>-reference, a NullReferenceException will be raised.
+See also:
+ TJclTabSet.Expand@string@Integer
+ TJclTabSet.TabStops
+ TJclTabSet.TabFrom
+Donator:
+ Marcel Bestebroer
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jed...@us...> - 2007-12-01 15:51:15
|
Revision: 2257
http://jcl.svn.sourceforge.net/jcl/?rev=2257&view=rev
Author: jedi_mbe
Date: 2007-12-01 07:51:06 -0800 (Sat, 01 Dec 2007)
Log Message:
-----------
Added TJclTabSet and support routines
Modified Paths:
--------------
trunk/jcl/source/common/JclResources.pas
trunk/jcl/source/common/JclStrings.pas
Modified: trunk/jcl/source/common/JclResources.pas
===================================================================
--- trunk/jcl/source/common/JclResources.pas 2007-12-01 13:28:55 UTC (rev 2256)
+++ trunk/jcl/source/common/JclResources.pas 2007-12-01 15:51:06 UTC (rev 2257)
@@ -1700,6 +1700,14 @@
RsArgumentIsNull = 'Argument %d is null';
RsDotNetFormatArgumentNotSupported = 'Argument type of %d is not supported';
RsArgumentOutOfRange = 'Argument out of range';
+ RsTabs_DuplicatesNotAllowed = 'Duplicate tab stops are not allowed.';
+ RsTabs_StopExpected = 'A tab stop was expected but not found.';
+ RsTabs_CloseBracketExpected = 'Closing bracket expected.';
+ RsTabs_TabWidthExpected = 'Tab width expected.';
+{$IFNDEF CLR}
+ // Default text for the NullReferenceException in .NET
+ RsArg_NullReferenceException = 'Object reference not set to an instance of an object.';
+{$ENDIF ~CLR}
//=== JclStructStorage =======================================================
resourcestring
Modified: trunk/jcl/source/common/JclStrings.pas
===================================================================
--- trunk/jcl/source/common/JclStrings.pas 2007-12-01 13:28:55 UTC (rev 2256)
+++ trunk/jcl/source/common/JclStrings.pas 2007-12-01 15:51:06 UTC (rev 2257)
@@ -26,6 +26,7 @@
{ Jean-Fabien Connault (cycocrew) }
{ John C Molyneux }
{ Leonard Wennekers }
+{ Martin Bestebroer }
{ Martin Kimmings }
{ Martin Kubecka }
{ Massimo Maria Ghisalberti }
@@ -482,6 +483,97 @@
{$ENDIF CLR}
+// TJclTabSet
+type
+ TJclTabSet = class {$IFNDEF CLR}(TInterfacedObject, IToString){$ENDIF}
+ private
+ FStops: TDynIntegerArray;
+ FRealWidth: Integer;
+ FWidth: Integer;
+ FZeroBased: Boolean;
+ procedure CalcRealWidth;
+ function GetCount: Integer;
+ function GetStops(Index: Integer): Integer;
+ function GetTabWidth: Integer;
+ function GetZeroBased: Boolean;
+ procedure SetStops(Index, Value: Integer);
+ procedure SetTabWidth(Value: Integer);
+ procedure SetZeroBased(Value: Boolean);
+ protected
+ function FindStop(Column: Integer): Integer;
+ function InternalTabStops: TDynIntegerArray;
+ function InternalTabWidth: Integer;
+ procedure RemoveAt(Index: Integer);
+ public
+ constructor Create; overload;
+ constructor Create(TabWidth: Integer); overload;
+ constructor Create(Tabstops: array of Integer; ZeroBased: Boolean); overload;
+ constructor Create(Tabstops: array of Integer; ZeroBased: Boolean; TabWidth: Integer); overload;
+
+ // Tab stops manipulation
+ function Add(Column: Integer): Integer;
+ function Delete(Column: Integer): Integer;
+
+ // Usage
+ function Expand(S: string): string; overload;
+ function Expand(S: string; Column: Integer): string; overload;
+ procedure OptimalFillInfo(StartColumn, TargetColumn: Integer; out TabsNeeded, SpacesNeeded: Integer);
+ function Optimize(S: string): string; overload;
+ function Optimize(S: string; Column: Integer): string; overload;
+ function StartColumn: Integer;
+ function TabFrom(Column: Integer): Integer;
+ function UpdatePosition(S: string): Integer; overload;
+ function UpdatePosition(S: string; Column: Integer): Integer; overload;
+ function UpdatePosition(S: string; var Column, Line: Integer): Integer; overload;
+
+ // Conversions
+ class function FromString(S: string): TJclTabSet; {$IFDEF SUPPORTS_STATIC}static; {$ENDIF}
+ function ToString: string; {$IFDEF CLR}override; {$ENDIF}overload;
+ function ToString(FormattingOptions: Integer): string; overload;
+
+ // Properties
+ property ActualTabWidth: Integer read InternalTabWidth;
+ property Count: Integer read GetCount;
+ property TabStops[&Index: Integer]: Integer read GetStops write SetStops; default;
+ property TabWidth: Integer read GetTabWidth write SetTabWidth;
+ property ZeroBased: Boolean read GetZeroBased write SetZeroBased;
+ end;
+
+// Formatting constants
+const
+ TabSetFormatting_SurroundStopsWithBrackets = 1;
+ TabSetFormatting_EmptyBracketsIfNoStops = 2;
+ TabSetFormatting_NoTabStops = 4;
+ TabSetFormatting_NoTabWidth = 8;
+ TabSetFormatting_AutoTabWidth = 16;
+ // common combinations
+ TabSetFormatting_Default = 0;
+ TabSetFormatting_AlwaysUseBrackets = TabSetFormatting_SurroundStopsWithBrackets or
+ TabSetFormatting_EmptyBracketsIfNoStops;
+ TabSetFormatting_Full = TabSetFormatting_AlwaysUseBrackets or TabSetFormatting_AutoTabWidth;
+ // aliases
+ TabSetFormatting_StopsOnly = TabSetFormatting_NoTabWidth;
+ TabSetFormatting_TabWidthOnly = TabSetFormatting_NoTabStops;
+ TabSetFormatting_StopsWithoutBracketsAndTabWidth = TabSetFormatting_Default;
+
+// Tab expansion routines
+function StrExpandTabs(S: string): string; {$IFDEF SUPPORTS_INLINE}inline; {$ENDIF}overload;
+function StrExpandTabs(S: string; TabWidth: Integer): string; {$IFDEF SUPPORTS_INLINE}inline; {$ENDIF}overload;
+function StrExpandTabs(S: string; TabSet: TJclTabSet): string; {$IFDEF SUPPORTS_INLINE}inline; {$ENDIF}overload;
+// Tab optimization routines
+function StrOptimizeTabs(S: string): string; {$IFDEF SUPPORTS_INLINE}inline; {$ENDIF}overload;
+function StrOptimizeTabs(S: string; TabWidth: Integer): string; {$IFDEF SUPPORTS_INLINE}inline; {$ENDIF}overload;
+function StrOptimizeTabs(S: string; TabSet: TJclTabSet): string; {$IFDEF SUPPORTS_INLINE}inline; {$ENDIF}overload;
+
+{$IFNDEF CLR}
+// move to JclBase?
+type
+ NullReferenceException = class (EJclError)
+ public
+ constructor Create; overload;
+ end;
+{$ENDIF ~CLR}
+
// Exceptions
type
EJclStringError = EJclError;
@@ -5023,6 +5115,728 @@
end;
{$ENDIF CLR}
+function StrExpandTabs(S: string): string;
+begin
+ // use an empty tab set, which will default to a tab width of 2
+ Result := TJclTabSet(nil).Expand(s);
+end;
+
+function StrExpandTabs(S: string; TabWidth: Integer): string;
+var
+ TabSet: TJclTabSet;
+begin
+ // create a tab set with no tab stops and the given tab width
+ TabSet := TJclTabSet.Create(TabWidth);
+ try
+ Result := TabSet.Expand(S);
+ finally
+ TabSet.Free;
+ end;
+end;
+
+function StrExpandTabs(S: string; TabSet: TJclTabSet): string;
+begin
+ // use the provided tab set to perform the expansion
+ Result := TabSet.Expand(S);
+end;
+
+function StrOptimizeTabs(S: string): string;
+begin
+ // use an empty tab set, which will default to a tab width of 2
+ Result := TJclTabSet(nil).Optimize(s);
+end;
+
+function StrOptimizeTabs(S: string; TabWidth: Integer): string;
+var
+ TabSet: TJclTabSet;
+begin
+ // create a tab set with no tab stops and the given tab width
+ TabSet := TJclTabSet.Create(TabWidth);
+ try
+ Result := TabSet.Optimize(S);
+ finally
+ TabSet.Free;
+ end;
+end;
+
+function StrOptimizeTabs(S: string; TabSet: TJclTabSet): string;
+begin
+ // use the provided tab set to perform the optimization
+ Result := TabSet.Optimize(S);
+end;
+
+//=== { TJclTabSet } =====================================================
+
+constructor TJclTabSet.Create;
+begin
+ // no tab stops, tab width set to auto
+ Create([], True, 0);
+end;
+
+constructor TJclTabSet.Create(TabWidth: Integer);
+begin
+ // no tab stops, specified tab width
+ Create([], True, TabWidth);
+end;
+
+constructor TJclTabSet.Create(Tabstops: array of Integer; ZeroBased: Boolean);
+begin
+ // specified tab stops, tab width equal to distance between last two tab stops
+ Create(Tabstops, ZeroBased, 0);
+end;
+
+constructor TJclTabSet.Create(Tabstops: array of Integer; ZeroBased: Boolean; TabWidth: Integer);
+var
+ idx: Integer;
+begin
+ inherited Create;
+ for idx := 0 to High(Tabstops) do
+ Add(Tabstops[idx]);
+ FWidth := TabWidth;
+ FZeroBased := ZeroBased;
+ CalcRealWidth;
+end;
+
+function TJclTabSet.Add(Column: Integer): Integer;
+begin
+ if Self = nil then
+ raise NullReferenceException.Create;
+ if Column < StartColumn then
+ raise ArgumentOutOfRangeException.Create('Column');
+ Result := FindStop(Column);
+ if Result < 0 then
+ begin
+ // the column doesn't exist; invert the result of FindStop to get the correct index position
+ Result := not Result;
+ // increase the tab stop array
+ SetLength(FStops, Length(FStops) + 1);
+ // make room at the insert position
+ MoveArray(FStops, Result, Result + 1, High(FStops) - Result);
+ // add the tab stop at the correct location
+ FStops[Result] := Column;
+ CalcRealWidth;
+ end
+ else
+ begin
+ {$IFDEF CLR}
+ raise EJclStringError.Create(RsTabs_DuplicatesNotAllowed);
+ {$ELSE}
+ raise EJclStringError.CreateRes(@RsTabs_DuplicatesNotAllowed);
+ {$ENDIF}
+ end;
+end;
+
+procedure TJclTabSet.CalcRealWidth;
+begin
+ if FWidth < 1 then
+ begin
+ if Length(FStops) > 1 then
+ FRealWidth := FStops[High(FStops)] - FStops[Pred(High(FStops))]
+ else
+ if Length(FStops) = 1 then
+ FRealWidth := FStops[0]
+ else
+ FRealWidth := 2;
+ end
+ else
+ FRealWidth := FWidth;
+end;
+
+function TJclTabSet.Delete(Column: Integer): Integer;
+begin
+ Result := FindStop(Column);
+ if Result >= 0 then
+ RemoveAt(Result);
+end;
+
+function TJclTabSet.Expand(S: string): string;
+begin
+ Result := Expand(s, StartColumn);
+end;
+
+function TJclTabSet.Expand(S: string; Column: Integer): string;
+var
+ sb: TStringBuilder;
+ head: PChar;
+ cur: PChar;
+begin
+ if Column < StartColumn then
+ raise ArgumentOutOfRangeException.Create('Column');
+ sb := TStringBuilder.Create(Length(S));
+ try
+ cur := PChar(S);
+ while cur^ <> #0 do
+ begin
+ head := cur;
+ while (cur^<> #0) and (cur^ <> #9) do
+ begin
+ if cur^ in [#10, #13] then
+ Column := StartColumn
+ else
+ Inc(Column);
+ Inc(cur);
+ end;
+ if cur > head then
+ sb.Append(head, 0, cur - head);
+ if cur^ = #9 then
+ begin
+ sb.Append(' ', TabFrom(Column) - Column);
+ Column := TabFrom(Column);
+ Inc(cur);
+ end;
+ end;
+ Result := sb.ToString;
+ finally
+ sb.Free;
+ end;
+end;
+
+function TJclTabSet.FindStop(Column: Integer): Integer;
+begin
+ if Self <> nil then
+ begin
+ Result := High(FStops);
+ while (Result >= 0) and (FStops[Result] > Column) do
+ Dec(Result);
+ if (Result >= 0) and (FStops[Result] <> Column) then
+ Result := not Succ(Result);
+ end
+ else
+ Result := -1;
+end;
+
+class function TJclTabSet.FromString(S: string): TJclTabSet;
+var
+ cur: PChar;
+
+ procedure SkipWhiteSpace;
+ begin
+ while CharIsWhiteSpace(cur^) do
+ Inc(cur);
+ end;
+
+ function ParseNumber: Integer;
+ var
+ head: PChar;
+ begin
+ SkipWhiteSpace;
+ head := cur;
+ while cur^ in ['0'..'9'] do
+ Inc(cur);
+ if (cur <= head) or not TryStrToInt(Copy(head, 1, cur - head), Result) then
+ Result := -1;
+ end;
+
+ procedure ParseStops;
+ var
+ openBracket: Boolean;
+ num: Integer;
+ hadComma: Boolean;
+ begin
+ SkipWhiteSpace;
+ openBracket := cur^ = '[';
+ hadComma := False;
+ if openBracket then
+ Inc(cur);
+ repeat
+ num := ParseNumber;
+ if (num < 0) and hadComma then
+ {$IFDEF CLR}
+ raise EJclStringError.Create(RsTabs_StopExpected)
+ {$ELSE}
+ raise EJclStringError.CreateRes(@RsTabs_StopExpected)
+ {$ENDIF}
+ else
+ if num >= 0 then
+ Result.Add(num);
+ SkipWhiteSpace;
+ hadComma := cur^ = ',';
+ if hadComma then
+ Inc(cur);
+ until (cur^ in [#0, '+', ']']);
+ if hadComma then
+ {$IFDEF CLR}
+ raise EJclStringError.Create(RsTabs_StopExpected)
+ {$ELSE}
+ raise EJclStringError.CreateRes(@RsTabs_StopExpected)
+ {$ENDIF}
+ else
+ if openBracket and (cur^ <> ']') then
+ {$IFDEF CLR}
+ raise EJclStringError.Create(RsTabs_CloseBracketExpected)
+ {$ELSE}
+ raise EJclStringError.CreateRes(@RsTabs_CloseBracketExpected)
+ {$ENDIF}
+ end;
+
+ procedure ParseTabWidth;
+ var
+ num: Integer;
+ begin
+ SkipWhiteSpace;
+ if cur^ = '+' then
+ begin
+ Inc(cur);
+ SkipWhiteSpace;
+ num := ParseNumber;
+ if (num < 0) then
+ {$IFDEF CLR}
+ raise EJclStringError.Create(RsTabs_TabWidthExpected)
+ {$ELSE}
+ raise EJclStringError.CreateRes(@RsTabs_TabWidthExpected)
+ {$ENDIF}
+ else
+ Result.TabWidth := num;
+ end;
+ end;
+
+ procedure ParseZeroBasedFlag;
+ begin
+ SkipWhiteSpace;
+ if cur^ = '0' then
+ begin
+ Inc(cur);
+ if CharIsWhiteSpace(cur^) or (cur^ in [#0, '[']) then
+ begin
+ Result.ZeroBased := True;
+ SkipWhiteSpace;
+ end
+ else
+ Dec(cur);
+ end;
+ end;
+
+begin
+ Result := TJclTabSet.Create;
+ try
+ Result.ZeroBased := False;
+ cur := PChar(S);
+ ParseZeroBasedFlag;
+ ParseStops;
+ ParseTabWidth;
+ except
+ // clean up the partially complete instance (to avoid memory leaks)...
+ Result.Free;
+ // ... and re-raise the exception
+ raise;
+ end;
+end;
+
+function TJclTabSet.GetCount: Integer;
+begin
+ if Self <> nil then
+ Result := Length(FStops)
+ else
+ Result := 0;
+end;
+
+function TJclTabSet.GetStops(Index: Integer): Integer;
+begin
+ if Self <> nil then
+ begin
+ if (Index < 0) or (Index >= Length(FStops)) then
+ begin
+ {$IFDEF CLR}
+ raise EJclStringError.Create(RsArgumentOutOfRange);
+ {$ELSE}
+ raise EJclStringError.CreateRes(@RsArgumentOutOfRange);
+ {$ENDIF CLR}
+ end
+ else
+ Result := FStops[Index]
+ end
+ else
+ begin
+ {$IFDEF CLR}
+ raise EJclStringError.Create(RsArgumentOutOfRange);
+ {$ELSE}
+ raise EJclStringError.CreateRes(@RsArgumentOutOfRange);
+ {$ENDIF CLR}
+ end;
+end;
+
+function TJclTabSet.GetTabWidth: Integer;
+begin
+ if Self <> nil then
+ Result := FWidth
+ else
+ Result := 0;
+end;
+
+function TJclTabSet.GetZeroBased: Boolean;
+begin
+ Result := (Self = nil) or FZeroBased;
+end;
+
+procedure TJclTabSet.OptimalFillInfo(StartColumn, TargetColumn: Integer; out TabsNeeded, SpacesNeeded: Integer);
+var
+ nextTab: Integer;
+begin
+ if StartColumn < Self.StartColumn then // starting column less than 1 or 0 (depending on ZeroBased state)
+ raise ArgumentOutOfRangeException.Create('StartColumn');
+ if (TargetColumn < StartColumn) then // target lies before the starting column
+ raise ArgumentOutOfRangeException.Create('TargetColumn');
+ TabsNeeded := 0;
+ repeat
+ nextTab := TabFrom(StartColumn);
+ if nextTab <= TargetColumn then
+ begin
+ Inc(TabsNeeded);
+ StartColumn := nextTab;
+ end;
+ until nextTab > TargetColumn;
+ SpacesNeeded := TargetColumn - StartColumn;
+end;
+
+function TJclTabSet.Optimize(S: string): string;
+begin
+ Result := Optimize(S, StartColumn);
+end;
+
+function TJclTabSet.Optimize(S: string; Column: Integer): string;
+var
+ sb: TStringBuilder;
+ head: PChar;
+ cur: PChar;
+ tgt: Integer;
+
+ procedure AppendOptimalWhiteSpace(Target: Integer);
+ var
+ tabCount: Integer;
+ spaceCount: Integer;
+ begin
+ if cur > head then
+ begin
+ OptimalFillInfo(Column, Target, tabCount, spaceCount);
+ if tabCount > 0 then
+ sb.Append(#9, tabCount);
+ if spaceCount > 0 then
+ sb.Append(' ', spaceCount);
+ end;
+ end;
+
+begin
+ if Column < StartColumn then
+ raise ArgumentOutOfRangeException.Create('Column');
+ sb := TStringBuilder.Create(Length(S));
+ try
+ cur := PChar(s);
+ while cur^<> #0 do
+ begin
+ // locate first whitespace character
+ head := cur;
+ while (cur^ <> #0) and not CharIsWhiteSpace(cur^) do
+ Inc(cur);
+ // output non whitespace characters
+ if cur > head then
+ sb.Append(head, 0, cur - head);
+ // advance column
+ Inc(Column, cur - head);
+ // initialize target column indexer
+ tgt := Column;
+ // locate end of whitespace sequence
+ while CharIsWhiteSpace(cur^) do
+ begin
+ if cur^ in [AnsiLineFeed, AnsiCarriageReturn] then
+ begin
+ // append optimized whitespace sequence...
+ AppendOptimalWhiteSpace(tgt);
+ // ...set the column back to the start of the line...
+ Column := StartColumn;
+ // ...reset target column indexer...
+ tgt := Column;
+ // ...add the line break character...
+ sb.Append(cur^);
+ end
+ else
+ if cur^ = #9 then
+ tgt := TabFrom(tgt) // expand the tab
+ else
+ Inc(tgt); // a normal whitespace; taking up 1 column
+ Inc(cur);
+ end;
+ AppendOptimalWhiteSpace(tgt); // append optimized whitespace sequence...
+ Column := tgt; // ...and memorize the column for the next iteration
+ end;
+ Result := sb.ToString; // convert result to a string
+ finally
+ sb.Free;
+ end;
+end;
+
+procedure TJclTabSet.RemoveAt(Index: Integer);
+begin
+ if Self <> nil then
+ begin
+ MoveArray(FStops, Succ(Index), Index, High(FStops) - Index);
+ SetLength(FStops, High(FStops));
+ CalcRealWidth;
+ end
+ else
+ raise NullReferenceException.Create;
+end;
+
+procedure TJclTabSet.SetStops(Index, Value: Integer);
+var
+ temp: Integer;
+begin
+ if Self <> nil then
+ begin
+ if (Index < 0) or (Index >= Length(FStops)) then
+ begin
+ {$IFDEF CLR}
+ raise ArgumentOutOfRangeException.Create;
+ {$ELSE}
+ raise ArgumentOutOfRangeException.CreateRes(@RsArgumentOutOfRange);
+ {$ENDIF CLR}
+ end
+ else
+ begin
+ temp := FindStop(Value);
+ if temp < 0 then
+ begin
+ // remove existing tab stop...
+ RemoveAt(Index);
+ // now add the new tab stop
+ Add(Value);
+ end
+ else
+ if temp <> Index then
+ begin
+ // new tab stop already present at another index
+ {$IFDEF CLR}
+ raise EJclStringError.Create(RsTabs_DuplicatesNotAllowed);
+ {$ELSE}
+ raise EJclStringError.CreateRes(@RsTabs_DuplicatesNotAllowed);
+ {$ENDIF}
+ end;
+ end;
+ end
+ else
+ raise NullReferenceException.Create;
+end;
+
+procedure TJclTabSet.SetTabWidth(Value: Integer);
+begin
+ if Self <> nil then
+ begin
+ FWidth := Value;
+ CalcRealWidth;
+ end
+ else
+ raise NullReferenceException.Create;
+end;
+
+procedure TJclTabSet.SetZeroBased(Value: Boolean);
+var
+ shift: Integer;
+ idx: Integer;
+begin
+ if Self <> nil then
+ begin
+ if Value <> FZeroBased then
+ begin
+ FZeroBased := Value;
+ if Value then
+ shift := -1
+ else
+ shift := 1;
+ for idx := 0 to High(FStops) do
+ FStops[idx] := FStops[idx] + shift;
+ end;
+ end
+ else
+ raise NullReferenceException.Create;
+end;
+
+function TJclTabSet.InternalTabStops: TDynIntegerArray;
+begin
+ if Self <> nil then
+ Result := FStops
+ else
+ Result := nil;
+end;
+
+function TJclTabSet.InternalTabWidth: Integer;
+begin
+ if Self <> nil then
+ Result := FRealWidth
+ else
+ Result := 2;
+end;
+
+function TJclTabSet.StartColumn: Integer;
+begin
+ if GetZeroBased then
+ Result := 0
+ else
+ Result := 1;
+end;
+
+function TJclTabSet.TabFrom(Column: Integer): Integer;
+begin
+ if Column < StartColumn then
+ raise ArgumentOutOfRangeException.Create('Column');
+ Result := FindStop(Column);
+ if Result < 0 then
+ Result := not Result
+ else
+ Inc(Result);
+ if Result >= GetCount then
+ begin
+ if GetCount > 0 then
+ Result := FStops[High(FStops)]
+ else
+ Result := StartColumn;
+ while Result <= Column do
+ Inc(Result, ActualTabWidth);
+ end
+ else
+ Result := FStops[Result];
+end;
+
+function TJclTabSet.ToString: string;
+begin
+ Result := ToString(TabSetFormatting_Full);
+end;
+
+function TJclTabSet.ToString(FormattingOptions: Integer): string;
+var
+ sb: TStringBuilder;
+ idx: Integer;
+
+ function WantBrackets: Boolean;
+ begin
+ Result := (TabSetFormatting_SurroundStopsWithBrackets and FormattingOptions) <> 0;
+ end;
+
+ function EmptyBrackets: Boolean;
+ begin
+ Result := (TabSetFormatting_EmptyBracketsIfNoStops and FormattingOptions) <> 0;
+ end;
+
+ function IncludeAutoWidth: Boolean;
+ begin
+ Result := (TabSetFormatting_AutoTabWidth and FormattingOptions) <> 0;
+ end;
+
+ function IncludeTabWidth: Boolean;
+ begin
+ Result := (TabSetFormatting_NoTabWidth and FormattingOptions) = 0;
+ end;
+
+ function IncludeStops: Boolean;
+ begin
+ Result := (TabSetFormatting_NoTabStops and FormattingOptions) = 0;
+ end;
+
+begin
+ sb := TStringBuilder.Create;
+ try
+ // output the fixed tabulation positions if requested...
+ if IncludeStops then
+ begin
+ // output each individual tabulation position
+ for idx := 0 to GetCount - 1 do
+ begin
+ sb.Append(TabStops[idx]);
+ sb.Append(',');
+ end;
+ // remove the final comma if any tabulation positions where outputted
+ if sb.Length <> 0 then
+ sb.Remove(sb.Length - 1, 1);
+ // bracket the tabulation positions if requested
+ if WantBrackets and (EmptyBrackets or (sb.Length > 0)) then
+ begin
+ sb.Insert(0, '[');
+ sb.Append(']');
+ end;
+ end;
+ // output the tab width if requested....
+ if IncludeTabWidth and (IncludeAutoWidth or (TabWidth > 0)) then
+ begin
+ // separate the tab width from any outputted tabulation positions with a whitespace
+ if sb.Length > 0 then
+ sb.Append(' ');
+ // flag tab width
+ sb.Append('+');
+ // finally, output the tab width
+ sb.Append(ActualTabWidth);
+ end;
+ // flag zero-based tabset by outputting a 0 (zero) as the first character.
+ if ZeroBased then
+ sb.Insert(0, '0 ');
+ Result := StrTrimCharRight(sb.ToString, ' ');
+ finally
+ sb.Free;
+ end;
+end;
+
+function TJclTabSet.UpdatePosition(S: string): Integer;
+var
+ lines: Integer;
+begin
+ Result := StartColumn;
+ UpdatePosition(S, Result, lines);
+end;
+
+function TJclTabSet.UpdatePosition(S: string; Column: Integer): Integer;
+var
+ lines: Integer;
+begin
+ if Column < StartColumn then
+ raise ArgumentOutOfRangeException.Create('Column');
+ Result := Column;
+ UpdatePosition(S, Result, lines);
+end;
+
+function TJclTabSet.UpdatePosition(S: string; var Column, Line: Integer): Integer;
+var
+ prevChar: Char;
+ cur: PChar;
+begin
+ if Column < StartColumn then
+ raise ArgumentOutOfRangeException.Create('Column');
+ // initialize loop
+ cur := PChar(S);
+ // iterate until end of string (the Null-character)
+ while cur^ <> #0 do
+ begin
+ // check for line-breaking characters
+ if cur^ in [#10, #13] then
+ begin
+ // Column moves back all the way to the left
+ Column := StartColumn;
+ // If this is the first line-break character or the same line-break character, increment the Line parameter
+ Inc(Line);
+ // check if it's the first of a two-character line-break
+ prevChar := cur^;
+ Inc(cur);
+ // if it isn't a two-character line-break, undo the previous advancement
+ if not (cur^ in [#10, #13]) or (cur^ = prevChar) then
+ Dec(cur);
+ end
+ else // check for tab character and expand it
+ if cur^ = #9 then
+ Column := TabFrom(Column)
+ else // a normal character; increment column
+ Inc(Column);
+ // advance pointer
+ Inc(cur);
+ end;
+ // set the result to the newly calculated column
+ Result := Column;
+end;
+
+{$IFNDEF CLR}
+{ NullReferenceException }
+
+constructor NullReferenceException.Create;
+begin
+ CreateRes(@RsArg_NullReferenceException);
+end;
+{$ENDIF ~CLR}
+
{$IFDEF CLR}
{$IFDEF UNITVERSIONING}
initialization
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2007-12-01 13:28:59
|
Revision: 2256
http://jcl.svn.sourceforge.net/jcl/?rev=2256&view=rev
Author: outchy
Date: 2007-12-01 05:28:55 -0800 (Sat, 01 Dec 2007)
Log Message:
-----------
Added Reset method to iterators
Modified Paths:
--------------
trunk/jcl/source/common/JclArrayLists.pas
trunk/jcl/source/common/JclBinaryTrees.pas
trunk/jcl/source/common/JclContainerIntf.pas
trunk/jcl/source/common/JclLinkedLists.pas
trunk/jcl/source/common/JclTrees.pas
trunk/jcl/source/common/JclVectors.pas
trunk/jcl/source/prototypes/JclArrayLists.pas
trunk/jcl/source/prototypes/JclBinaryTrees.pas
trunk/jcl/source/prototypes/JclLinkedLists.pas
trunk/jcl/source/prototypes/JclTrees.pas
trunk/jcl/source/prototypes/JclVectors.pas
trunk/jcl/source/prototypes/containers/JclArrayLists.imp
trunk/jcl/source/prototypes/containers/JclBinaryTrees.imp
trunk/jcl/source/prototypes/containers/JclLinkedLists.imp
trunk/jcl/source/prototypes/containers/JclTrees.imp
trunk/jcl/source/prototypes/containers/JclVectors.imp
Modified: trunk/jcl/source/common/JclArrayLists.pas
===================================================================
--- trunk/jcl/source/common/JclArrayLists.pas 2007-12-01 11:59:43 UTC (rev 2255)
+++ trunk/jcl/source/common/JclArrayLists.pas 2007-12-01 13:28:55 UTC (rev 2256)
@@ -674,7 +674,10 @@
uses
SysUtils;
+type
+ TItrStart = (isFirst, isLast);
+
//=== { TIntfItr } ===============================================================
type
@@ -682,6 +685,7 @@
IJclIntfCloneable, IJclCloneable)
private
FCursor: Integer;
+ FStart: TItrStart;
FOwnList: IJclIntfList;
protected
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -700,19 +704,21 @@
function Previous: IInterface;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetObject(const AInterface: IInterface);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
property Current: IInterface read GetObject;
{$ENDIF SUPPORTS_FOR_IN}
public
- constructor Create(const AOwnList: IJclIntfList; ACursor: Integer; AValid: Boolean);
+ constructor Create(const AOwnList: IJclIntfList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
end;
-constructor TIntfItr.Create(const AOwnList: IJclIntfList; ACursor: Integer; AValid: Boolean);
+constructor TIntfItr.Create(const AOwnList: IJclIntfList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(AOwnList, AValid);
FOwnList := AOwnList;
+ FStart := AStart;
FCursor := ACursor;
end;
@@ -731,12 +737,13 @@
ADest := TIntfItr(Dest);
ADest.FOwnList := FOwnList;
ADest.FCursor := FCursor;
+ ADest.FStart := FStart;
end;
end;
function TIntfItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TIntfItr.Create(FOwnList, FCursor, Valid);
+ Result := TIntfItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TIntfItr.Equals(const AIterator: IJclIntfIterator): Boolean;
@@ -835,6 +842,17 @@
FOwnList.Delete(FCursor);
end;
+procedure TIntfItr.Reset;
+begin
+ Valid := False;
+ case FStart of
+ isFirst:
+ FCursor := 0;
+ isLast:
+ FCursor := FOwnList.Size - 1;
+ end;
+end;
+
procedure TIntfItr.SetObject(const AInterface: IInterface);
begin
CheckValid;
@@ -848,6 +866,7 @@
IJclIntfCloneable, IJclCloneable)
private
FCursor: Integer;
+ FStart: TItrStart;
FOwnList: IJclAnsiStrList;
protected
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -866,19 +885,21 @@
function Previous: AnsiString;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetString(const AString: AnsiString);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
property Current: AnsiString read GetString;
{$ENDIF SUPPORTS_FOR_IN}
public
- constructor Create(const AOwnList: IJclAnsiStrList; ACursor: Integer; AValid: Boolean);
+ constructor Create(const AOwnList: IJclAnsiStrList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
end;
-constructor TAnsiStrItr.Create(const AOwnList: IJclAnsiStrList; ACursor: Integer; AValid: Boolean);
+constructor TAnsiStrItr.Create(const AOwnList: IJclAnsiStrList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(AOwnList, AValid);
FOwnList := AOwnList;
+ FStart := AStart;
FCursor := ACursor;
end;
@@ -897,12 +918,13 @@
ADest := TAnsiStrItr(Dest);
ADest.FOwnList := FOwnList;
ADest.FCursor := FCursor;
+ ADest.FStart := FStart;
end;
end;
function TAnsiStrItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TAnsiStrItr.Create(FOwnList, FCursor, Valid);
+ Result := TAnsiStrItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TAnsiStrItr.Equals(const AIterator: IJclAnsiStrIterator): Boolean;
@@ -1001,6 +1023,17 @@
FOwnList.Delete(FCursor);
end;
+procedure TAnsiStrItr.Reset;
+begin
+ Valid := False;
+ case FStart of
+ isFirst:
+ FCursor := 0;
+ isLast:
+ FCursor := FOwnList.Size - 1;
+ end;
+end;
+
procedure TAnsiStrItr.SetString(const AString: AnsiString);
begin
CheckValid;
@@ -1014,6 +1047,7 @@
IJclIntfCloneable, IJclCloneable)
private
FCursor: Integer;
+ FStart: TItrStart;
FOwnList: IJclWideStrList;
protected
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -1032,19 +1066,21 @@
function Previous: WideString;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetString(const AString: WideString);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
property Current: WideString read GetString;
{$ENDIF SUPPORTS_FOR_IN}
public
- constructor Create(const AOwnList: IJclWideStrList; ACursor: Integer; AValid: Boolean);
+ constructor Create(const AOwnList: IJclWideStrList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
end;
-constructor TWideStrItr.Create(const AOwnList: IJclWideStrList; ACursor: Integer; AValid: Boolean);
+constructor TWideStrItr.Create(const AOwnList: IJclWideStrList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(AOwnList, AValid);
FOwnList := AOwnList;
+ FStart := AStart;
FCursor := ACursor;
end;
@@ -1063,12 +1099,13 @@
ADest := TWideStrItr(Dest);
ADest.FOwnList := FOwnList;
ADest.FCursor := FCursor;
+ ADest.FStart := FStart;
end;
end;
function TWideStrItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TWideStrItr.Create(FOwnList, FCursor, Valid);
+ Result := TWideStrItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TWideStrItr.Equals(const AIterator: IJclWideStrIterator): Boolean;
@@ -1167,6 +1204,17 @@
FOwnList.Delete(FCursor);
end;
+procedure TWideStrItr.Reset;
+begin
+ Valid := False;
+ case FStart of
+ isFirst:
+ FCursor := 0;
+ isLast:
+ FCursor := FOwnList.Size - 1;
+ end;
+end;
+
procedure TWideStrItr.SetString(const AString: WideString);
begin
CheckValid;
@@ -1180,6 +1228,7 @@
IJclIntfCloneable, IJclCloneable)
private
FCursor: Integer;
+ FStart: TItrStart;
FOwnList: IJclSingleList;
protected
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -1198,19 +1247,21 @@
function Previous: Single;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetValue(const AValue: Single);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
property Current: Single read GetValue;
{$ENDIF SUPPORTS_FOR_IN}
public
- constructor Create(const AOwnList: IJclSingleList; ACursor: Integer; AValid: Boolean);
+ constructor Create(const AOwnList: IJclSingleList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
end;
-constructor TSingleItr.Create(const AOwnList: IJclSingleList; ACursor: Integer; AValid: Boolean);
+constructor TSingleItr.Create(const AOwnList: IJclSingleList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(AOwnList, AValid);
FOwnList := AOwnList;
+ FStart := AStart;
FCursor := ACursor;
end;
@@ -1229,12 +1280,13 @@
ADest := TSingleItr(Dest);
ADest.FOwnList := FOwnList;
ADest.FCursor := FCursor;
+ ADest.FStart := FStart;
end;
end;
function TSingleItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TSingleItr.Create(FOwnList, FCursor, Valid);
+ Result := TSingleItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TSingleItr.Equals(const AIterator: IJclSingleIterator): Boolean;
@@ -1333,6 +1385,17 @@
FOwnList.Delete(FCursor);
end;
+procedure TSingleItr.Reset;
+begin
+ Valid := False;
+ case FStart of
+ isFirst:
+ FCursor := 0;
+ isLast:
+ FCursor := FOwnList.Size - 1;
+ end;
+end;
+
procedure TSingleItr.SetValue(const AValue: Single);
begin
CheckValid;
@@ -1346,6 +1409,7 @@
IJclIntfCloneable, IJclCloneable)
private
FCursor: Integer;
+ FStart: TItrStart;
FOwnList: IJclDoubleList;
protected
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -1364,19 +1428,21 @@
function Previous: Double;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetValue(const AValue: Double);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
property Current: Double read GetValue;
{$ENDIF SUPPORTS_FOR_IN}
public
- constructor Create(const AOwnList: IJclDoubleList; ACursor: Integer; AValid: Boolean);
+ constructor Create(const AOwnList: IJclDoubleList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
end;
-constructor TDoubleItr.Create(const AOwnList: IJclDoubleList; ACursor: Integer; AValid: Boolean);
+constructor TDoubleItr.Create(const AOwnList: IJclDoubleList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(AOwnList, AValid);
FOwnList := AOwnList;
+ FStart := AStart;
FCursor := ACursor;
end;
@@ -1395,12 +1461,13 @@
ADest := TDoubleItr(Dest);
ADest.FOwnList := FOwnList;
ADest.FCursor := FCursor;
+ ADest.FStart := FStart;
end;
end;
function TDoubleItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TDoubleItr.Create(FOwnList, FCursor, Valid);
+ Result := TDoubleItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TDoubleItr.Equals(const AIterator: IJclDoubleIterator): Boolean;
@@ -1499,6 +1566,17 @@
FOwnList.Delete(FCursor);
end;
+procedure TDoubleItr.Reset;
+begin
+ Valid := False;
+ case FStart of
+ isFirst:
+ FCursor := 0;
+ isLast:
+ FCursor := FOwnList.Size - 1;
+ end;
+end;
+
procedure TDoubleItr.SetValue(const AValue: Double);
begin
CheckValid;
@@ -1512,6 +1590,7 @@
IJclIntfCloneable, IJclCloneable)
private
FCursor: Integer;
+ FStart: TItrStart;
FOwnList: IJclExtendedList;
protected
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -1530,19 +1609,21 @@
function Previous: Extended;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetValue(const AValue: Extended);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
property Current: Extended read GetValue;
{$ENDIF SUPPORTS_FOR_IN}
public
- constructor Create(const AOwnList: IJclExtendedList; ACursor: Integer; AValid: Boolean);
+ constructor Create(const AOwnList: IJclExtendedList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
end;
-constructor TExtendedItr.Create(const AOwnList: IJclExtendedList; ACursor: Integer; AValid: Boolean);
+constructor TExtendedItr.Create(const AOwnList: IJclExtendedList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(AOwnList, AValid);
FOwnList := AOwnList;
+ FStart := AStart;
FCursor := ACursor;
end;
@@ -1561,12 +1642,13 @@
ADest := TExtendedItr(Dest);
ADest.FOwnList := FOwnList;
ADest.FCursor := FCursor;
+ ADest.FStart := FStart;
end;
end;
function TExtendedItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TExtendedItr.Create(FOwnList, FCursor, Valid);
+ Result := TExtendedItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TExtendedItr.Equals(const AIterator: IJclExtendedIterator): Boolean;
@@ -1665,6 +1747,17 @@
FOwnList.Delete(FCursor);
end;
+procedure TExtendedItr.Reset;
+begin
+ Valid := False;
+ case FStart of
+ isFirst:
+ FCursor := 0;
+ isLast:
+ FCursor := FOwnList.Size - 1;
+ end;
+end;
+
procedure TExtendedItr.SetValue(const AValue: Extended);
begin
CheckValid;
@@ -1678,6 +1771,7 @@
IJclIntfCloneable, IJclCloneable)
private
FCursor: Integer;
+ FStart: TItrStart;
FOwnList: IJclIntegerList;
protected
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -1696,19 +1790,21 @@
function Previous: Integer;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetValue(AValue: Integer);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
property Current: Integer read GetValue;
{$ENDIF SUPPORTS_FOR_IN}
public
- constructor Create(const AOwnList: IJclIntegerList; ACursor: Integer; AValid: Boolean);
+ constructor Create(const AOwnList: IJclIntegerList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
end;
-constructor TIntegerItr.Create(const AOwnList: IJclIntegerList; ACursor: Integer; AValid: Boolean);
+constructor TIntegerItr.Create(const AOwnList: IJclIntegerList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(AOwnList, AValid);
FOwnList := AOwnList;
+ FStart := AStart;
FCursor := ACursor;
end;
@@ -1727,12 +1823,13 @@
ADest := TIntegerItr(Dest);
ADest.FOwnList := FOwnList;
ADest.FCursor := FCursor;
+ ADest.FStart := FStart;
end;
end;
function TIntegerItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TIntegerItr.Create(FOwnList, FCursor, Valid);
+ Result := TIntegerItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TIntegerItr.Equals(const AIterator: IJclIntegerIterator): Boolean;
@@ -1831,6 +1928,17 @@
FOwnList.Delete(FCursor);
end;
+procedure TIntegerItr.Reset;
+begin
+ Valid := False;
+ case FStart of
+ isFirst:
+ FCursor := 0;
+ isLast:
+ FCursor := FOwnList.Size - 1;
+ end;
+end;
+
procedure TIntegerItr.SetValue(AValue: Integer);
begin
CheckValid;
@@ -1844,6 +1952,7 @@
IJclIntfCloneable, IJclCloneable)
private
FCursor: Integer;
+ FStart: TItrStart;
FOwnList: IJclCardinalList;
protected
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -1862,19 +1971,21 @@
function Previous: Cardinal;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetValue(AValue: Cardinal);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
property Current: Cardinal read GetValue;
{$ENDIF SUPPORTS_FOR_IN}
public
- constructor Create(const AOwnList: IJclCardinalList; ACursor: Integer; AValid: Boolean);
+ constructor Create(const AOwnList: IJclCardinalList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
end;
-constructor TCardinalItr.Create(const AOwnList: IJclCardinalList; ACursor: Integer; AValid: Boolean);
+constructor TCardinalItr.Create(const AOwnList: IJclCardinalList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(AOwnList, AValid);
FOwnList := AOwnList;
+ FStart := AStart;
FCursor := ACursor;
end;
@@ -1893,12 +2004,13 @@
ADest := TCardinalItr(Dest);
ADest.FOwnList := FOwnList;
ADest.FCursor := FCursor;
+ ADest.FStart := FStart;
end;
end;
function TCardinalItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TCardinalItr.Create(FOwnList, FCursor, Valid);
+ Result := TCardinalItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TCardinalItr.Equals(const AIterator: IJclCardinalIterator): Boolean;
@@ -1997,6 +2109,17 @@
FOwnList.Delete(FCursor);
end;
+procedure TCardinalItr.Reset;
+begin
+ Valid := False;
+ case FStart of
+ isFirst:
+ FCursor := 0;
+ isLast:
+ FCursor := FOwnList.Size - 1;
+ end;
+end;
+
procedure TCardinalItr.SetValue(AValue: Cardinal);
begin
CheckValid;
@@ -2010,6 +2133,7 @@
IJclIntfCloneable, IJclCloneable)
private
FCursor: Integer;
+ FStart: TItrStart;
FOwnList: IJclInt64List;
protected
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -2028,19 +2152,21 @@
function Previous: Int64;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetValue(const AValue: Int64);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
property Current: Int64 read GetValue;
{$ENDIF SUPPORTS_FOR_IN}
public
- constructor Create(const AOwnList: IJclInt64List; ACursor: Integer; AValid: Boolean);
+ constructor Create(const AOwnList: IJclInt64List; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
end;
-constructor TInt64Itr.Create(const AOwnList: IJclInt64List; ACursor: Integer; AValid: Boolean);
+constructor TInt64Itr.Create(const AOwnList: IJclInt64List; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(AOwnList, AValid);
FOwnList := AOwnList;
+ FStart := AStart;
FCursor := ACursor;
end;
@@ -2059,12 +2185,13 @@
ADest := TInt64Itr(Dest);
ADest.FOwnList := FOwnList;
ADest.FCursor := FCursor;
+ ADest.FStart := FStart;
end;
end;
function TInt64Itr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TInt64Itr.Create(FOwnList, FCursor, Valid);
+ Result := TInt64Itr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TInt64Itr.Equals(const AIterator: IJclInt64Iterator): Boolean;
@@ -2163,6 +2290,17 @@
FOwnList.Delete(FCursor);
end;
+procedure TInt64Itr.Reset;
+begin
+ Valid := False;
+ case FStart of
+ isFirst:
+ FCursor := 0;
+ isLast:
+ FCursor := FOwnList.Size - 1;
+ end;
+end;
+
procedure TInt64Itr.SetValue(const AValue: Int64);
begin
CheckValid;
@@ -2177,6 +2315,7 @@
IJclIntfCloneable, IJclCloneable)
private
FCursor: Integer;
+ FStart: TItrStart;
FOwnList: IJclPtrList;
protected
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -2195,19 +2334,21 @@
function Previous: Pointer;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetPtr(APtr: Pointer);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
property Current: Pointer read GetPtr;
{$ENDIF SUPPORTS_FOR_IN}
public
- constructor Create(const AOwnList: IJclPtrList; ACursor: Integer; AValid: Boolean);
+ constructor Create(const AOwnList: IJclPtrList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
end;
-constructor TPtrItr.Create(const AOwnList: IJclPtrList; ACursor: Integer; AValid: Boolean);
+constructor TPtrItr.Create(const AOwnList: IJclPtrList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(AOwnList, AValid);
FOwnList := AOwnList;
+ FStart := AStart;
FCursor := ACursor;
end;
@@ -2226,12 +2367,13 @@
ADest := TPtrItr(Dest);
ADest.FOwnList := FOwnList;
ADest.FCursor := FCursor;
+ ADest.FStart := FStart;
end;
end;
function TPtrItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TPtrItr.Create(FOwnList, FCursor, Valid);
+ Result := TPtrItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TPtrItr.Equals(const AIterator: IJclPtrIterator): Boolean;
@@ -2330,6 +2472,17 @@
FOwnList.Delete(FCursor);
end;
+procedure TPtrItr.Reset;
+begin
+ Valid := False;
+ case FStart of
+ isFirst:
+ FCursor := 0;
+ isLast:
+ FCursor := FOwnList.Size - 1;
+ end;
+end;
+
procedure TPtrItr.SetPtr(APtr: Pointer);
begin
CheckValid;
@@ -2344,6 +2497,7 @@
IJclIntfCloneable, IJclCloneable)
private
FCursor: Integer;
+ FStart: TItrStart;
FOwnList: IJclList;
protected
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -2362,19 +2516,21 @@
function Previous: TObject;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetObject(AObject: TObject);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
property Current: TObject read GetObject;
{$ENDIF SUPPORTS_FOR_IN}
public
- constructor Create(const AOwnList: IJclList; ACursor: Integer; AValid: Boolean);
+ constructor Create(const AOwnList: IJclList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
end;
-constructor TItr.Create(const AOwnList: IJclList; ACursor: Integer; AValid: Boolean);
+constructor TItr.Create(const AOwnList: IJclList; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(AOwnList, AValid);
FOwnList := AOwnList;
+ FStart := AStart;
FCursor := ACursor;
end;
@@ -2393,12 +2549,13 @@
ADest := TItr(Dest);
ADest.FOwnList := FOwnList;
ADest.FCursor := FCursor;
+ ADest.FStart := FStart;
end;
end;
function TItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TItr.Create(FOwnList, FCursor, Valid);
+ Result := TItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TItr.Equals(const AIterator: IJclIterator): Boolean;
@@ -2497,6 +2654,17 @@
FOwnList.Delete(FCursor);
end;
+procedure TItr.Reset;
+begin
+ Valid := False;
+ case FStart of
+ isFirst:
+ FCursor := 0;
+ isLast:
+ FCursor := FOwnList.Size - 1;
+ end;
+end;
+
procedure TItr.SetObject(AObject: TObject);
begin
CheckValid;
@@ -2512,6 +2680,7 @@
IJclIntfCloneable, IJclCloneable)
private
FCursor: Integer;
+ FStart: TItrStart;
FOwnList: IJclList<T>;
protected
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -2530,19 +2699,21 @@
function Previous: T;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetItem(const AItem: T);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
property Current: T read GetItem;
{$ENDIF SUPPORTS_FOR_IN}
public
- constructor Create(const AOwnList: IJclList<T>; ACursor: Integer; AValid: Boolean);
+ constructor Create(const AOwnList: IJclList<T>; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
end;
-constructor TItr<T>.Create(const AOwnList: IJclList<T>; ACursor: Integer; AValid: Boolean);
+constructor TItr<T>.Create(const AOwnList: IJclList<T>; ACursor: Integer; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(AOwnList, AValid);
FOwnList := AOwnList;
+ FStart := AStart;
FCursor := ACursor;
end;
@@ -2561,12 +2732,13 @@
ADest := TItr<T>(Dest);
ADest.FOwnList := FOwnList;
ADest.FCursor := FCursor;
+ ADest.FStart := FStart;
end;
end;
function TItr<T>.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TItr<T>.Create(FOwnList, FCursor, Valid);
+ Result := TItr<T>.Create(FOwnList, FCursor, Valid, FStart);
end;
function TItr<T>.Equals(const AIterator: IJclIterator<T>): Boolean;
@@ -2665,6 +2837,17 @@
FOwnList.Delete(FCursor);
end;
+procedure TItr<T>.Reset;
+begin
+ Valid := False;
+ case FStart of
+ isFirst:
+ FCursor := 0;
+ isLast:
+ FCursor := FOwnList.Size - 1;
+ end;
+end;
+
procedure TItr<T>.SetItem(const AItem: T);
begin
CheckValid;
@@ -2934,13 +3117,13 @@
function TJclIntfArrayList.First: IJclIntfIterator;
begin
- Result := TIntfItr.Create(Self, 0, False);
+ Result := TIntfItr.Create(Self, 0, False, isFirst);
end;
{$IFDEF SUPPORTS_FOR_IN}
function TJclIntfArrayList.GetEnumerator: IJclIntfIterator;
begin
- Result := TIntfItr.Create(Self, 0, False);
+ Result := TIntfItr.Create(Self, 0, False, isFirst);
end;
{$ENDIF SUPPORTS_FOR_IN}
@@ -3059,7 +3242,7 @@
function TJclIntfArrayList.Last: IJclIntfIterator;
begin
- Result := TIntfItr.Create(Self, FSize - 1, False);
+ Result := TIntfItr.Create(Self, FSize - 1, False, isLast);
end;
function TJclIntfArrayList.LastIndexOf(const AInterface: IInterface): Integer;
@@ -3501,13 +3684,13 @@
function TJclAnsiStrArrayList.First: IJclAnsiStrIterator;
begin
- Result := TAnsiStrItr.Create(Self, 0, False);
+ Result := TAnsiStrItr.Create(Self, 0, False, isFirst);
end;
{$IFDEF SUPPORTS_FOR_IN}
function TJclAnsiStrArrayList.GetEnumerator: IJclAnsiStrIterator;
begin
- Result := TAnsiStrItr.Create(Self, 0, False);
+ Result := TAnsiStrItr.Create(Self, 0, False, isFirst);
end;
{$ENDIF SUPPORTS_FOR_IN}
@@ -3626,7 +3809,7 @@
function TJclAnsiStrArrayList.Last: IJclAnsiStrIterator;
begin
- Result := TAnsiStrItr.Create(Self, FSize - 1, False);
+ Result := TAnsiStrItr.Create(Self, FSize - 1, False, isLast);
end;
function TJclAnsiStrArrayList.LastIndexOf(const AString: AnsiString): Integer;
@@ -4068,13 +4251,13 @@
function TJclWideStrArrayList.First: IJclWideStrIterator;
begin
- Result := TWideStrItr.Create(Self, 0, False);
+ Result := TWideStrItr.Create(Self, 0, False, isFirst);
end;
{$IFDEF SUPPORTS_FOR_IN}
function TJclWideStrArrayList.GetEnumerator: IJclWideStrIterator;
begin
- Result := TWideStrItr.Create(Self, 0, False);
+ Result := TWideStrItr.Create(Self, 0, False, isFirst);
end;
{$ENDIF SUPPORTS_FOR_IN}
@@ -4193,7 +4376,7 @@
function TJclWideStrArrayList.Last: IJclWideStrIterator;
begin
- Result := TWideStrItr.Create(Self, FSize - 1, False);
+ Result := TWideStrItr.Create(Self, FSize - 1, False, isLast);
end;
function TJclWideStrArrayList.LastIndexOf(const AString: WideString): Integer;
@@ -4635,13 +4818,13 @@
function TJclSingleArrayList.First: IJclSingleIterator;
begin
- Result := TSingleItr.Create(Self, 0, False);
+ Result := TSingleItr.Create(Self, 0, False, isFirst);
end;
{$IFDEF SUPPORTS_FOR_IN}
function TJclSingleArrayList.GetEnumerator: IJclSingleIterator;
begin
- Result := TSingleItr.Create(Self, 0, False);
+ Result := TSingleItr.Create(Self, 0, False, isFirst);
end;
{$ENDIF SUPPORTS_FOR_IN}
@@ -4760,7 +4943,7 @@
function TJclSingleArrayList.Last: IJclSingleIterator;
begin
- Result := TSingleItr.Create(Self, FSize - 1, False);
+ Result := TSingleItr.Create(Self, FSize - 1, False, isLast);
end;
function TJclSingleArrayList.LastIndexOf(const AValue: Single): Integer;
@@ -5202,13 +5385,13 @@
function TJclDoubleArrayList.First: IJclDoubleIterator;
begin
- Result := TDoubleItr.Create(Self, 0, False);
+ Result := TDoubleItr.Create(Self, 0, False, isFirst);
end;
{$IFDEF SUPPORTS_FOR_IN}
function TJclDoubleArrayList.GetEnumerator: IJclDoubleIterator;
begin
- Result := TDoubleItr.Create(Self, 0, False);
+ Result := TDoubleItr.Create(Self, 0, False, isFirst);
end;
{$ENDIF SUPPORTS_FOR_IN}
@@ -5327,7 +5510,7 @@
function TJclDoubleArrayList.Last: IJclDoubleIterator;
begin
- Result := TDoubleItr.Create(Self, FSize - 1, False);
+ Result := TDoubleItr.Create(Self, FSize - 1, False, isLast);
end;
function TJclDoubleArrayList.LastIndexOf(const AValue: Double): Integer;
@@ -5769,13 +5952,13 @@
function TJclExtendedArrayList.First: IJclExtendedIterator;
begin
- Result := TExtendedItr.Create(Self, 0, False);
+ Result := TExtendedItr.Create(Self, 0, False, isFirst);
end;
{$IFDEF SUPPORTS_FOR_IN}
function TJclExtendedArrayList.GetEnumerator: IJclExtendedIterator;
begin
- Result := TExtendedItr.Create(Self, 0, False);
+ Result := TExtendedItr.Create(Self, 0, False, isFirst);
end;
{$ENDIF SUPPORTS_FOR_IN}
@@ -5894,7 +6077,7 @@
function TJclExtendedArrayList.Last: IJclExtendedIterator;
begin
- Result := TExtendedItr.Create(Self, FSize - 1, False);
+ Result := TExtendedItr.Create(Self, FSize - 1, False, isLast);
end;
function TJclExtendedArrayList.LastIndexOf(const AValue: Extended): Integer;
@@ -6336,13 +6519,13 @@
function TJclIntegerArrayList.First: IJclIntegerIterator;
begin
- Result := TIntegerItr.Create(Self, 0, False);
+ Result := TIntegerItr.Create(Self, 0, False, isFirst);
end;
{$IFDEF SUPPORTS_FOR_IN}
function TJclIntegerArrayList.GetEnumerator: IJclIntegerIterator;
begin
- Result := TIntegerItr.Create(Self, 0, False);
+ Result := TIntegerItr.Create(Self, 0, False, isFirst);
end;
{$ENDIF SUPPORTS_FOR_IN}
@@ -6461,7 +6644,7 @@
function TJclIntegerArrayList.Last: IJclIntegerIterator;
begin
- Result := TIntegerItr.Create(Self, FSize - 1, False);
+ Result := TIntegerItr.Create(Self, FSize - 1, False, isLast);
end;
function TJclIntegerArrayList.LastIndexOf(AValue: Integer): Integer;
@@ -6903,13 +7086,13 @@
function TJclCardinalArrayList.First: IJclCardinalIterator;
begin
- Result := TCardinalItr.Create(Self, 0, False);
+ Result := TCardinalItr.Create(Self, 0, False, isFirst);
end;
{$IFDEF SUPPORTS_FOR_IN}
function TJclCardinalArrayList.GetEnumerator: IJclCardinalIterator;
begin
- Result := TCardinalItr.Create(Self, 0, False);
+ Result := TCardinalItr.Create(Self, 0, False, isFirst);
end;
{$ENDIF SUPPORTS_FOR_IN}
@@ -7028,7 +7211,7 @@
function TJclCardinalArrayList.Last: IJclCardinalIterator;
begin
- Result := TCardinalItr.Create(Self, FSize - 1, False);
+ Result := TCardinalItr.Create(Self, FSize - 1, False, isLast);
end;
function TJclCardinalArrayList.LastIndexOf(AValue: Cardinal): Integer;
@@ -7470,13 +7653,13 @@
function TJclInt64ArrayList.First: IJclInt64Iterator;
begin
- Result := TInt64Itr.Create(Self, 0, False);
+ Result := TInt64Itr.Create(Self, 0, False, isFirst);
end;
{$IFDEF SUPPORTS_FOR_IN}
function TJclInt64ArrayList.GetEnumerator: IJclInt64Iterator;
begin
- Result := TInt64Itr.Create(Self, 0, False);
+ Result := TInt64Itr.Create(Self, 0, False, isFirst);
end;
{$ENDIF SUPPORTS_FOR_IN}
@@ -7595,7 +7778,7 @@
function TJclInt64ArrayList.Last: IJclInt64Iterator;
begin
- Result := TInt64Itr.Create(Self, FSize - 1, False);
+ Result := TInt64Itr.Create(Self, FSize - 1, False, isLast);
end;
function TJclInt64ArrayList.LastIndexOf(const AValue: Int64): Integer;
@@ -8038,13 +8221,13 @@
function TJclPtrArrayList.First: IJclPtrIterator;
begin
- Result := TPtrItr.Create(Self, 0, False);
+ Result := TPtrItr.Create(Self, 0, False, isFirst);
end;
{$IFDEF SUPPORTS_FOR_IN}
function TJclPtrArrayList.GetEnumerator: IJclPtrIterator;
begin
- Result := TPtrItr.Create(Self, 0, False);
+ Result := TPtrItr.Create(Self, 0, False, isFirst);
end;
{$ENDIF SUPPORTS_FOR_IN}
@@ -8163,7 +8346,7 @@
function TJclPtrArrayList.Last: IJclPtrIterator;
begin
- Result := TPtrItr.Create(Self, FSize - 1, False);
+ Result := TPtrItr.Create(Self, FSize - 1, False, isLast);
end;
function TJclPtrArrayList.LastIndexOf(APtr: Pointer): Integer;
@@ -8606,13 +8789,13 @@
function TJclArrayList.First: IJclIterator;
begin
- Result := TItr.Create(Self, 0, False);
+ Result := TItr.Create(Self, 0, False, isFirst);
end;
{$IFDEF SUPPORTS_FOR_IN}
function TJclArrayList.GetEnumerator: IJclIterator;
begin
- Result := TItr.Create(Self, 0, False);
+ Result := TItr.Create(Self, 0, False, isFirst);
end;
{$ENDIF SUPPORTS_FOR_IN}
@@ -8731,7 +8914,7 @@
function TJclArrayList.Last: IJclIterator;
begin
- Result := TItr.Create(Self, FSize - 1, False);
+ Result := TItr.Create(Self, FSize - 1, False, isLast);
end;
function TJclArrayList.LastIndexOf(AObject: TObject): Integer;
@@ -9169,13 +9352,13 @@
function TJclArrayList<T>.First: IJclIterator<T>;
begin
- Result := TItr<T>.Create(Self, 0, False);
+ Result := TItr<T>.Create(Self, 0, False, isFirst);
end;
{$IFDEF SUPPORTS_FOR_IN}
function TJclArrayList<T>.GetEnumerator: IJclIterator<T>;
begin
- Result := TItr<T>.Create(Self, 0, False);
+ Result := TItr<T>.Create(Self, 0, False, isFirst);
end;
{$ENDIF SUPPORTS_FOR_IN}
@@ -9294,7 +9477,7 @@
function TJclArrayList<T>.Last: IJclIterator<T>;
begin
- Result := TItr<T>.Create(Self, FSize - 1, False);
+ Result := TItr<T>.Create(Self, FSize - 1, False, isLast);
end;
function TJclArrayList<T>.LastIndexOf(const AItem: T): Integer;
Modified: trunk/jcl/source/common/JclBinaryTrees.pas
===================================================================
--- trunk/jcl/source/common/JclBinaryTrees.pas 2007-12-01 11:59:43 UTC (rev 2255)
+++ trunk/jcl/source/common/JclBinaryTrees.pas 2007-12-01 13:28:55 UTC (rev 2256)
@@ -783,13 +783,17 @@
uses
SysUtils;
+type
+ TItrStart = (isFirst, isLast, isRoot);
+
//=== { TIntfItr } ===========================================================
type
TIntfItr = class(TJclAbstractIterator, IJclIntfIterator, IJclIntfTreeIterator, IJclIntfBinaryTreeIterator)
protected
FCursor: TJclIntfBinaryNode;
+ FStart: TItrStart;
FOwnList: IJclIntfCollection;
FEqualityComparer: IJclIntfEqualityComparer;
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -807,6 +811,7 @@
function Previous: IInterface;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetObject(const AInterface: IInterface);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
@@ -830,13 +835,14 @@
function Left: IInterface;
function Right: IInterface;
public
- constructor Create(const OwnList: IJclIntfCollection; Start: TJclIntfBinaryNode; AValid: Boolean);
+ constructor Create(const OwnList: IJclIntfCollection; ACursor: TJclIntfBinaryNode; AValid: Boolean; AStart: TItrStart);
end;
-constructor TIntfItr.Create(const OwnList: IJclIntfCollection; Start: TJclIntfBinaryNode; AValid: Boolean);
+constructor TIntfItr.Create(const OwnList: IJclIntfCollection; ACursor: TJclIntfBinaryNode; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(OwnList, AValid);
- FCursor := Start;
+ FCursor := ACursor;
+ FStart := AStart;
FOwnList := OwnList;
FEqualityComparer := FOwnList as IJclIntfEqualityComparer;
end;
@@ -862,6 +868,7 @@
ADest.FCursor := FCursor;
ADest.FOwnList := FOwnList;
ADest.FEqualityComparer := FEqualityComparer;
+ ADest.FStart := FStart;
end;
end;
@@ -1241,6 +1248,49 @@
{$ENDIF THREADSAFE}
end;
+procedure TIntfItr.Reset;
+var
+ NewCursor: TJclIntfBinaryNode;
+begin
+ {$IFDEF THREADSAFE}
+ ReadLock;
+ try
+ {$ENDIF THREADSAFE}
+ Valid := False;
+ case FStart of
+ isFirst:
+ begin
+ NewCursor := FCursor;
+ while NewCursor <> nil do
+ begin
+ NewCursor := GetPreviousCursor;
+ if NewCursor <> nil then
+ FCursor := NewCursor;
+ end;
+ end;
+ isLast:
+ begin
+ NewCursor := FCursor;
+ while NewCursor <> nil do
+ begin
+ NewCursor := GetNextCursor;
+ if NewCursor <> nil then
+ FCursor := NewCursor;
+ end;
+ end;
+ isRoot:
+ begin
+ while (FCursor <> nil) and (FCursor.Parent <> nil) do
+ FCursor := FCursor.Parent;
+ end;
+ end;
+ {$IFDEF THREADSAFE}
+ finally
+ ReadUnlock;
+ end;
+ {$ENDIF THREADSAFE}
+end;
+
function TIntfItr.Right: IInterface;
begin
{$IFDEF THREADSAFE}
@@ -1287,7 +1337,7 @@
function TPreOrderIntfItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TPreOrderIntfItr.Create(FOwnList, FCursor, Valid);
+ Result := TPreOrderIntfItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TPreOrderIntfItr.GetNextCursor: TJclIntfBinaryNode;
@@ -1354,7 +1404,7 @@
function TInOrderIntfItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TInOrderIntfItr.Create(FOwnList, FCursor, Valid);
+ Result := TInOrderIntfItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TInOrderIntfItr.GetNextCursor: TJclIntfBinaryNode;
@@ -1422,7 +1472,7 @@
function TPostOrderIntfItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TPostOrderIntfItr.Create(FOwnList, FCursor, Valid);
+ Result := TPostOrderIntfItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TPostOrderIntfItr.GetNextCursor: TJclIntfBinaryNode;
@@ -1479,6 +1529,7 @@
TAnsiStrItr = class(TJclAbstractIterator, IJclAnsiStrIterator, IJclAnsiStrTreeIterator, IJclAnsiStrBinaryTreeIterator)
protected
FCursor: TJclAnsiStrBinaryNode;
+ FStart: TItrStart;
FOwnList: IJclAnsiStrCollection;
FEqualityComparer: IJclAnsiStrEqualityComparer;
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -1496,6 +1547,7 @@
function Previous: AnsiString;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetString(const AString: AnsiString);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
@@ -1519,13 +1571,14 @@
function Left: AnsiString;
function Right: AnsiString;
public
- constructor Create(const OwnList: IJclAnsiStrCollection; Start: TJclAnsiStrBinaryNode; AValid: Boolean);
+ constructor Create(const OwnList: IJclAnsiStrCollection; ACursor: TJclAnsiStrBinaryNode; AValid: Boolean; AStart: TItrStart);
end;
-constructor TAnsiStrItr.Create(const OwnList: IJclAnsiStrCollection; Start: TJclAnsiStrBinaryNode; AValid: Boolean);
+constructor TAnsiStrItr.Create(const OwnList: IJclAnsiStrCollection; ACursor: TJclAnsiStrBinaryNode; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(OwnList, AValid);
- FCursor := Start;
+ FCursor := ACursor;
+ FStart := AStart;
FOwnList := OwnList;
FEqualityComparer := FOwnList as IJclAnsiStrEqualityComparer;
end;
@@ -1551,6 +1604,7 @@
ADest.FCursor := FCursor;
ADest.FOwnList := FOwnList;
ADest.FEqualityComparer := FEqualityComparer;
+ ADest.FStart := FStart;
end;
end;
@@ -1930,6 +1984,49 @@
{$ENDIF THREADSAFE}
end;
+procedure TAnsiStrItr.Reset;
+var
+ NewCursor: TJclAnsiStrBinaryNode;
+begin
+ {$IFDEF THREADSAFE}
+ ReadLock;
+ try
+ {$ENDIF THREADSAFE}
+ Valid := False;
+ case FStart of
+ isFirst:
+ begin
+ NewCursor := FCursor;
+ while NewCursor <> nil do
+ begin
+ NewCursor := GetPreviousCursor;
+ if NewCursor <> nil then
+ FCursor := NewCursor;
+ end;
+ end;
+ isLast:
+ begin
+ NewCursor := FCursor;
+ while NewCursor <> nil do
+ begin
+ NewCursor := GetNextCursor;
+ if NewCursor <> nil then
+ FCursor := NewCursor;
+ end;
+ end;
+ isRoot:
+ begin
+ while (FCursor <> nil) and (FCursor.Parent <> nil) do
+ FCursor := FCursor.Parent;
+ end;
+ end;
+ {$IFDEF THREADSAFE}
+ finally
+ ReadUnlock;
+ end;
+ {$ENDIF THREADSAFE}
+end;
+
function TAnsiStrItr.Right: AnsiString;
begin
{$IFDEF THREADSAFE}
@@ -1976,7 +2073,7 @@
function TPreOrderAnsiStrItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TPreOrderAnsiStrItr.Create(FOwnList, FCursor, Valid);
+ Result := TPreOrderAnsiStrItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TPreOrderAnsiStrItr.GetNextCursor: TJclAnsiStrBinaryNode;
@@ -2043,7 +2140,7 @@
function TInOrderAnsiStrItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TInOrderAnsiStrItr.Create(FOwnList, FCursor, Valid);
+ Result := TInOrderAnsiStrItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TInOrderAnsiStrItr.GetNextCursor: TJclAnsiStrBinaryNode;
@@ -2111,7 +2208,7 @@
function TPostOrderAnsiStrItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TPostOrderAnsiStrItr.Create(FOwnList, FCursor, Valid);
+ Result := TPostOrderAnsiStrItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TPostOrderAnsiStrItr.GetNextCursor: TJclAnsiStrBinaryNode;
@@ -2168,6 +2265,7 @@
TWideStrItr = class(TJclAbstractIterator, IJclWideStrIterator, IJclWideStrTreeIterator, IJclWideStrBinaryTreeIterator)
protected
FCursor: TJclWideStrBinaryNode;
+ FStart: TItrStart;
FOwnList: IJclWideStrCollection;
FEqualityComparer: IJclWideStrEqualityComparer;
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -2185,6 +2283,7 @@
function Previous: WideString;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetString(const AString: WideString);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
@@ -2208,13 +2307,14 @@
function Left: WideString;
function Right: WideString;
public
- constructor Create(const OwnList: IJclWideStrCollection; Start: TJclWideStrBinaryNode; AValid: Boolean);
+ constructor Create(const OwnList: IJclWideStrCollection; ACursor: TJclWideStrBinaryNode; AValid: Boolean; AStart: TItrStart);
end;
-constructor TWideStrItr.Create(const OwnList: IJclWideStrCollection; Start: TJclWideStrBinaryNode; AValid: Boolean);
+constructor TWideStrItr.Create(const OwnList: IJclWideStrCollection; ACursor: TJclWideStrBinaryNode; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(OwnList, AValid);
- FCursor := Start;
+ FCursor := ACursor;
+ FStart := AStart;
FOwnList := OwnList;
FEqualityComparer := FOwnList as IJclWideStrEqualityComparer;
end;
@@ -2240,6 +2340,7 @@
ADest.FCursor := FCursor;
ADest.FOwnList := FOwnList;
ADest.FEqualityComparer := FEqualityComparer;
+ ADest.FStart := FStart;
end;
end;
@@ -2619,6 +2720,49 @@
{$ENDIF THREADSAFE}
end;
+procedure TWideStrItr.Reset;
+var
+ NewCursor: TJclWideStrBinaryNode;
+begin
+ {$IFDEF THREADSAFE}
+ ReadLock;
+ try
+ {$ENDIF THREADSAFE}
+ Valid := False;
+ case FStart of
+ isFirst:
+ begin
+ NewCursor := FCursor;
+ while NewCursor <> nil do
+ begin
+ NewCursor := GetPreviousCursor;
+ if NewCursor <> nil then
+ FCursor := NewCursor;
+ end;
+ end;
+ isLast:
+ begin
+ NewCursor := FCursor;
+ while NewCursor <> nil do
+ begin
+ NewCursor := GetNextCursor;
+ if NewCursor <> nil then
+ FCursor := NewCursor;
+ end;
+ end;
+ isRoot:
+ begin
+ while (FCursor <> nil) and (FCursor.Parent <> nil) do
+ FCursor := FCursor.Parent;
+ end;
+ end;
+ {$IFDEF THREADSAFE}
+ finally
+ ReadUnlock;
+ end;
+ {$ENDIF THREADSAFE}
+end;
+
function TWideStrItr.Right: WideString;
begin
{$IFDEF THREADSAFE}
@@ -2665,7 +2809,7 @@
function TPreOrderWideStrItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TPreOrderWideStrItr.Create(FOwnList, FCursor, Valid);
+ Result := TPreOrderWideStrItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TPreOrderWideStrItr.GetNextCursor: TJclWideStrBinaryNode;
@@ -2732,7 +2876,7 @@
function TInOrderWideStrItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TInOrderWideStrItr.Create(FOwnList, FCursor, Valid);
+ Result := TInOrderWideStrItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TInOrderWideStrItr.GetNextCursor: TJclWideStrBinaryNode;
@@ -2800,7 +2944,7 @@
function TPostOrderWideStrItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TPostOrderWideStrItr.Create(FOwnList, FCursor, Valid);
+ Result := TPostOrderWideStrItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TPostOrderWideStrItr.GetNextCursor: TJclWideStrBinaryNode;
@@ -2857,6 +3001,7 @@
TSingleItr = class(TJclAbstractIterator, IJclSingleIterator, IJclSingleTreeIterator, IJclSingleBinaryTreeIterator)
protected
FCursor: TJclSingleBinaryNode;
+ FStart: TItrStart;
FOwnList: IJclSingleCollection;
FEqualityComparer: IJclSingleEqualityComparer;
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -2874,6 +3019,7 @@
function Previous: Single;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetValue(const AValue: Single);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
@@ -2897,13 +3043,14 @@
function Left: Single;
function Right: Single;
public
- constructor Create(const OwnList: IJclSingleCollection; Start: TJclSingleBinaryNode; AValid: Boolean);
+ constructor Create(const OwnList: IJclSingleCollection; ACursor: TJclSingleBinaryNode; AValid: Boolean; AStart: TItrStart);
end;
-constructor TSingleItr.Create(const OwnList: IJclSingleCollection; Start: TJclSingleBinaryNode; AValid: Boolean);
+constructor TSingleItr.Create(const OwnList: IJclSingleCollection; ACursor: TJclSingleBinaryNode; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(OwnList, AValid);
- FCursor := Start;
+ FCursor := ACursor;
+ FStart := AStart;
FOwnList := OwnList;
FEqualityComparer := FOwnList as IJclSingleEqualityComparer;
end;
@@ -2929,6 +3076,7 @@
ADest.FCursor := FCursor;
ADest.FOwnList := FOwnList;
ADest.FEqualityComparer := FEqualityComparer;
+ ADest.FStart := FStart;
end;
end;
@@ -3308,6 +3456,49 @@
{$ENDIF THREADSAFE}
end;
+procedure TSingleItr.Reset;
+var
+ NewCursor: TJclSingleBinaryNode;
+begin
+ {$IFDEF THREADSAFE}
+ ReadLock;
+ try
+ {$ENDIF THREADSAFE}
+ Valid := False;
+ case FStart of
+ isFirst:
+ begin
+ NewCursor := FCursor;
+ while NewCursor <> nil do
+ begin
+ NewCursor := GetPreviousCursor;
+ if NewCursor <> nil then
+ FCursor := NewCursor;
+ end;
+ end;
+ isLast:
+ begin
+ NewCursor := FCursor;
+ while NewCursor <> nil do
+ begin
+ NewCursor := GetNextCursor;
+ if NewCursor <> nil then
+ FCursor := NewCursor;
+ end;
+ end;
+ isRoot:
+ begin
+ while (FCursor <> nil) and (FCursor.Parent <> nil) do
+ FCursor := FCursor.Parent;
+ end;
+ end;
+ {$IFDEF THREADSAFE}
+ finally
+ ReadUnlock;
+ end;
+ {$ENDIF THREADSAFE}
+end;
+
function TSingleItr.Right: Single;
begin
{$IFDEF THREADSAFE}
@@ -3354,7 +3545,7 @@
function TPreOrderSingleItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TPreOrderSingleItr.Create(FOwnList, FCursor, Valid);
+ Result := TPreOrderSingleItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TPreOrderSingleItr.GetNextCursor: TJclSingleBinaryNode;
@@ -3421,7 +3612,7 @@
function TInOrderSingleItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TInOrderSingleItr.Create(FOwnList, FCursor, Valid);
+ Result := TInOrderSingleItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TInOrderSingleItr.GetNextCursor: TJclSingleBinaryNode;
@@ -3489,7 +3680,7 @@
function TPostOrderSingleItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TPostOrderSingleItr.Create(FOwnList, FCursor, Valid);
+ Result := TPostOrderSingleItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TPostOrderSingleItr.GetNextCursor: TJclSingleBinaryNode;
@@ -3546,6 +3737,7 @@
TDoubleItr = class(TJclAbstractIterator, IJclDoubleIterator, IJclDoubleTreeIterator, IJclDoubleBinaryTreeIterator)
protected
FCursor: TJclDoubleBinaryNode;
+ FStart: TItrStart;
FOwnList: IJclDoubleCollection;
FEqualityComparer: IJclDoubleEqualityComparer;
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -3563,6 +3755,7 @@
function Previous: Double;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetValue(const AValue: Double);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
@@ -3586,13 +3779,14 @@
function Left: Double;
function Right: Double;
public
- constructor Create(const OwnList: IJclDoubleCollection; Start: TJclDoubleBinaryNode; AValid: Boolean);
+ constructor Create(const OwnList: IJclDoubleCollection; ACursor: TJclDoubleBinaryNode; AValid: Boolean; AStart: TItrStart);
end;
-constructor TDoubleItr.Create(const OwnList: IJclDoubleCollection; Start: TJclDoubleBinaryNode; AValid: Boolean);
+constructor TDoubleItr.Create(const OwnList: IJclDoubleCollection; ACursor: TJclDoubleBinaryNode; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(OwnList, AValid);
- FCursor := Start;
+ FCursor := ACursor;
+ FStart := AStart;
FOwnList := OwnList;
FEqualityComparer := FOwnList as IJclDoubleEqualityComparer;
end;
@@ -3618,6 +3812,7 @@
ADest.FCursor := FCursor;
ADest.FOwnList := FOwnList;
ADest.FEqualityComparer := FEqualityComparer;
+ ADest.FStart := FStart;
end;
end;
@@ -3997,6 +4192,49 @@
{$ENDIF THREADSAFE}
end;
+procedure TDoubleItr.Reset;
+var
+ NewCursor: TJclDoubleBinaryNode;
+begin
+ {$IFDEF THREADSAFE}
+ ReadLock;
+ try
+ {$ENDIF THREADSAFE}
+ Valid := False;
+ case FStart of
+ isFirst:
+ begin
+ NewCursor := FCursor;
+ while NewCursor <> nil do
+ begin
+ NewCursor := GetPreviousCursor;
+ if NewCursor <> nil then
+ FCursor := NewCursor;
+ end;
+ end;
+ isLast:
+ begin
+ NewCursor := FCursor;
+ while NewCursor <> nil do
+ begin
+ NewCursor := GetNextCursor;
+ if NewCursor <> nil then
+ FCursor := NewCursor;
+ end;
+ end;
+ isRoot:
+ begin
+ while (FCursor <> nil) and (FCursor.Parent <> nil) do
+ FCursor := FCursor.Parent;
+ end;
+ end;
+ {$IFDEF THREADSAFE}
+ finally
+ ReadUnlock;
+ end;
+ {$ENDIF THREADSAFE}
+end;
+
function TDoubleItr.Right: Double;
begin
{$IFDEF THREADSAFE}
@@ -4043,7 +4281,7 @@
function TPreOrderDoubleItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TPreOrderDoubleItr.Create(FOwnList, FCursor, Valid);
+ Result := TPreOrderDoubleItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TPreOrderDoubleItr.GetNextCursor: TJclDoubleBinaryNode;
@@ -4110,7 +4348,7 @@
function TInOrderDoubleItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TInOrderDoubleItr.Create(FOwnList, FCursor, Valid);
+ Result := TInOrderDoubleItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TInOrderDoubleItr.GetNextCursor: TJclDoubleBinaryNode;
@@ -4178,7 +4416,7 @@
function TPostOrderDoubleItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TPostOrderDoubleItr.Create(FOwnList, FCursor, Valid);
+ Result := TPostOrderDoubleItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TPostOrderDoubleItr.GetNextCursor: TJclDoubleBinaryNode;
@@ -4235,6 +4473,7 @@
TExtendedItr = class(TJclAbstractIterator, IJclExtendedIterator, IJclExtendedTreeIterator, IJclExtendedBinaryTreeIterator)
protected
FCursor: TJclExtendedBinaryNode;
+ FStart: TItrStart;
FOwnList: IJclExtendedCollection;
FEqualityComparer: IJclExtendedEqualityComparer;
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -4252,6 +4491,7 @@
function Previous: Extended;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetValue(const AValue: Extended);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
@@ -4275,13 +4515,14 @@
function Left: Extended;
function Right: Extended;
public
- constructor Create(const OwnList: IJclExtendedCollection; Start: TJclExtendedBinaryNode; AValid: Boolean);
+ constructor Create(const OwnList: IJclExtendedCollection; ACursor: TJclExtendedBinaryNode; AValid: Boolean; AStart: TItrStart);
end;
-constructor TExtendedItr.Create(const OwnList: IJclExtendedCollection; Start: TJclExtendedBinaryNode; AValid: Boolean);
+constructor TExtendedItr.Create(const OwnList: IJclExtendedCollection; ACursor: TJclExtendedBinaryNode; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(OwnList, AValid);
- FCursor := Start;
+ FCursor := ACursor;
+ FStart := AStart;
FOwnList := OwnList;
FEqualityComparer := FOwnList as IJclExtendedEqualityComparer;
end;
@@ -4307,6 +4548,7 @@
ADest.FCursor := FCursor;
ADest.FOwnList := FOwnList;
ADest.FEqualityComparer := FEqualityComparer;
+ ADest.FStart := FStart;
end;
end;
@@ -4686,6 +4928,49 @@
{$ENDIF THREADSAFE}
end;
+procedure TExtendedItr.Reset;
+var
+ NewCursor: TJclExtendedBinaryNode;
+begin
+ {$IFDEF THREADSAFE}
+ ReadLock;
+ try
+ {$ENDIF THREADSAFE}
+ Valid := False;
+ case FStart of
+ isFirst:
+ begin
+ NewCursor := FCursor;
+ while NewCursor <> nil do
+ begin
+ NewCursor := GetPreviousCursor;
+ if NewCursor <> nil then
+ FCursor := NewCursor;
+ end;
+ end;
+ isLast:
+ begin
+ NewCursor := FCursor;
+ while NewCursor <> nil do
+ begin
+ NewCursor := GetNextCursor;
+ if NewCursor <> nil then
+ FCursor := NewCursor;
+ end;
+ end;
+ isRoot:
+ begin
+ while (FCursor <> nil) and (FCursor.Parent <> nil) do
+ FCursor := FCursor.Parent;
+ end;
+ end;
+ {$IFDEF THREADSAFE}
+ finally
+ ReadUnlock;
+ end;
+ {$ENDIF THREADSAFE}
+end;
+
function TExtendedItr.Right: Extended;
begin
{$IFDEF THREADSAFE}
@@ -4732,7 +5017,7 @@
function TPreOrderExtendedItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TPreOrderExtendedItr.Create(FOwnList, FCursor, Valid);
+ Result := TPreOrderExtendedItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TPreOrderExtendedItr.GetNextCursor: TJclExtendedBinaryNode;
@@ -4799,7 +5084,7 @@
function TInOrderExtendedItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TInOrderExtendedItr.Create(FOwnList, FCursor, Valid);
+ Result := TInOrderExtendedItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TInOrderExtendedItr.GetNextCursor: TJclExtendedBinaryNode;
@@ -4867,7 +5152,7 @@
function TPostOrderExtendedItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TPostOrderExtendedItr.Create(FOwnList, FCursor, Valid);
+ Result := TPostOrderExtendedItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TPostOrderExtendedItr.GetNextCursor: TJclExtendedBinaryNode;
@@ -4924,6 +5209,7 @@
TIntegerItr = class(TJclAbstractIterator, IJclIntegerIterator, IJclIntegerTreeIterator, IJclIntegerBinaryTreeIterator)
protected
FCursor: TJclIntegerBinaryNode;
+ FStart: TItrStart;
FOwnList: IJclIntegerCollection;
FEqualityComparer: IJclIntegerEqualityComparer;
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -4941,6 +5227,7 @@
function Previous: Integer;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetValue(AValue: Integer);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
@@ -4964,13 +5251,14 @@
function Left: Integer;
function Right: Integer;
public
- constructor Create(const OwnList: IJclIntegerCollection; Start: TJclIntegerBinaryNode; AValid: Boolean);
+ constructor Create(const OwnList: IJclIntegerCollection; ACursor: TJclIntegerBinaryNode; AValid: Boolean; AStart: TItrStart);
end;
-constructor TIntegerItr.Create(const OwnList: IJclIntegerCollection; Start: TJclIntegerBinaryNode; AValid: Boolean);
+constructor TIntegerItr.Create(const OwnList: IJclIntegerCollection; ACursor: TJclIntegerBinaryNode; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(OwnList, AValid);
- FCursor := Start;
+ FCursor := ACursor;
+ FStart := AStart;
FOwnList := OwnList;
FEqualityComparer := FOwnList as IJclIntegerEqualityComparer;
end;
@@ -4996,6 +5284,7 @@
ADest.FCursor := FCursor;
ADest.FOwnList := FOwnList;
ADest.FEqualityComparer := FEqualityComparer;
+ ADest.FStart := FStart;
end;
end;
@@ -5375,6 +5664,49 @@
{$ENDIF THREADSAFE}
end;
+procedure TIntegerItr.Reset;
+var
+ NewCursor: TJclIntegerBinaryNode;
+begin
+ {$IFDEF THREADSAFE}
+ ReadLock;
+ try
+ {$ENDIF THREADSAFE}
+ Valid := False;
+ case FStart of
+ isFirst:
+ begin
+ NewCursor := FCursor;
+ while NewCursor <> nil do
+ begin
+ NewCursor := GetPreviousCursor;
+ if NewCursor <> nil then
+ FCursor := NewCursor;
+ end;
+ end;
+ isLast:
+ begin
+ NewCursor := FCursor;
+ while NewCursor <> nil do
+ begin
+ NewCursor := GetNextCursor;
+ if NewCursor <> nil then
+ FCursor := NewCursor;
+ end;
+ end;
+ isRoot:
+ begin
+ while (FCursor <> nil) and (FCursor.Parent <> nil) do
+ FCursor := FCursor.Parent;
+ end;
+ end;
+ {$IFDEF THREADSAFE}
+ finally
+ ReadUnlock;
+ end;
+ {$ENDIF THREADSAFE}
+end;
+
function TIntegerItr.Right: Integer;
begin
{$IFDEF THREADSAFE}
@@ -5421,7 +5753,7 @@
function TPreOrderIntegerItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TPreOrderIntegerItr.Create(FOwnList, FCursor, Valid);
+ Result := TPreOrderIntegerItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TPreOrderIntegerItr.GetNextCursor: TJclIntegerBinaryNode;
@@ -5488,7 +5820,7 @@
function TInOrderIntegerItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TInOrderIntegerItr.Create(FOwnList, FCursor, Valid);
+ Result := TInOrderIntegerItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TInOrderIntegerItr.GetNextCursor: TJclIntegerBinaryNode;
@@ -5556,7 +5888,7 @@
function TPostOrderIntegerItr.CreateEmptyIterator: TJclAbstractIterator;
begin
- Result := TPostOrderIntegerItr.Create(FOwnList, FCursor, Valid);
+ Result := TPostOrderIntegerItr.Create(FOwnList, FCursor, Valid, FStart);
end;
function TPostOrderIntegerItr.GetNextCursor: TJclIntegerBinaryNode;
@@ -5613,6 +5945,7 @@
TCardinalItr = class(TJclAbstractIterator, IJclCardinalIterator, IJclCardinalTreeIterator, IJclCardinalBinaryTreeIterator)
protected
FCursor: TJclCardinalBinaryNode;
+ FStart: TItrStart;
FOwnList: IJclCardinalCollection;
FEqualityComparer: IJclCardinalEqualityComparer;
procedure AssignPropertiesTo(Dest: TJclAbstractIterator); override;
@@ -5630,6 +5963,7 @@
function Previous: Cardinal;
function PreviousIndex: Integer;
procedure Remove;
+ procedure Reset;
procedure SetValue(AValue: Cardinal);
{$IFDEF SUPPORTS_FOR_IN}
function MoveNext: Boolean;
@@ -5653,13 +5987,14 @@
function Left: Cardinal;
function Right: Cardinal;
public
- constructor Create(const OwnList: IJclCardinalCollection; Start: TJclCardinalBinaryNode; AValid: Boolean);
+ constructor Create(const OwnList: IJclCardinalCollection; ACursor: TJclCardinalBinaryNode; AValid: Boolean; AStart: TItrStart);
end;
-constructor TCardinalItr.Create(const OwnList: IJclCardinalCollection; Start: TJclCardinalBinaryNode; AValid: Boolean);
+constructor TCardinalItr.Create(const OwnList: IJclCardinalCollection; ACursor: TJclCardinalBinaryNode; AValid: Boolean; AStart: TItrStart);
begin
inherited Create(OwnList, AValid);
- FCursor := Start;
+ FCursor := ACursor;
+ FStart := AStart;
FOwnList := OwnList;
FEqualityComparer := FOwnList as IJclCardinalEqualityComparer;
end;
@@ -5685,6 +6020,7 @@
ADest.FCursor := FCursor;
ADest.FOwnList := FOwnList;
ADest.FEqualityComparer := FEqualityComparer;
+ ADest.FStart := FStart;
end;
end;
@@ -6064,6 +6400,49 @@
{$ENDIF THREADSAFE}
end;
+procedure TCardinalItr.Reset;
+var
+ NewCursor: TJclCardinalBinaryNode;
+begin
+ {$IFDEF THREADSAFE}
+ ReadLock;
+ try
+ {$ENDIF THREADSAFE}
+ Valid := False;
+ case FStart of
+ isFirst:
+ begin
+ NewCursor := FCursor;
+ while NewCursor <> nil do
+ begin
+ NewCursor := GetPreviousCursor;
+ if NewCursor <> nil then
+ FCursor := NewCursor;
+ ...
[truncated message content] |
|
From: <ou...@us...> - 2007-12-01 11:59:46
|
Revision: 2255
http://jcl.svn.sourceforge.net/jcl/?rev=2255&view=rev
Author: outchy
Date: 2007-12-01 03:59:43 -0800 (Sat, 01 Dec 2007)
Log Message:
-----------
fixing some warnings
Modified Paths:
--------------
trunk/jcl/source/common/JclAnsiStrings.pas
trunk/jcl/source/common/JclArrayLists.pas
trunk/jcl/source/common/JclEDI.pas
trunk/jcl/source/common/JclEDISEF.pas
trunk/jcl/source/common/JclEDIXML.pas
trunk/jcl/source/common/JclEDI_ANSIX12.pas
trunk/jcl/source/common/JclEDI_UNEDIFACT.pas
trunk/jcl/source/common/JclSimpleXml.pas
trunk/jcl/source/common/JclStrings.pas
trunk/jcl/source/common/JclVectors.pas
trunk/jcl/source/prototypes/containers/JclArrayLists.imp
trunk/jcl/source/prototypes/containers/JclVectors.imp
Modified: trunk/jcl/source/common/JclAnsiStrings.pas
===================================================================
--- trunk/jcl/source/common/JclAnsiStrings.pas 2007-12-01 11:13:09 UTC (rev 2254)
+++ trunk/jcl/source/common/JclAnsiStrings.pas 2007-12-01 11:59:43 UTC (rev 2255)
@@ -68,6 +68,7 @@
Classes, SysUtils,
{$IFDEF CLR}
System.Text,
+ System.IO,
{$ELSE}
JclWideStrings,
{$ENDIF CLR}
Modified: trunk/jcl/source/common/JclArrayLists.pas
===================================================================
--- trunk/jcl/source/common/JclArrayLists.pas 2007-12-01 11:13:09 UTC (rev 2254)
+++ trunk/jcl/source/common/JclArrayLists.pas 2007-12-01 11:59:43 UTC (rev 2255)
@@ -2886,6 +2886,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := nil;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeObject(FElementData[Index]);
@@ -3450,6 +3453,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := '';
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeString(FElementData[Index]);
@@ -4014,6 +4020,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := '';
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeString(FElementData[Index]);
@@ -4578,6 +4587,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := 0.0;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeSingle(FElementData[Index]);
@@ -5142,6 +5154,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := 0.0;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeDouble(FElementData[Index]);
@@ -5706,6 +5721,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := 0.0;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeExtended(FElementData[Index]);
@@ -6270,6 +6288,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := 0;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeInteger(FElementData[Index]);
@@ -6834,6 +6855,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := 0;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeCardinal(FElementData[Index]);
@@ -7398,6 +7422,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := 0;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeInt64(FElementData[Index]);
@@ -7963,6 +7990,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := nil;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreePointer(FElementData[Index]);
@@ -8528,6 +8558,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := nil;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeObject(FElementData[Index]);
@@ -9088,6 +9121,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := Default(T);
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeItem(FElementData[Index]);
Modified: trunk/jcl/source/common/JclEDI.pas
===================================================================
--- trunk/jcl/source/common/JclEDI.pas 2007-12-01 11:13:09 UTC (rev 2254)
+++ trunk/jcl/source/common/JclEDI.pas 2007-12-01 11:59:43 UTC (rev 2255)
@@ -257,13 +257,13 @@
FCurrentItem: TEDIObjectListItem;
function GetEDIObject(Index: Integer): TEDIObject;
procedure SetEDIObject(Index: Integer; const Value: TEDIObject);
- function CreateListItem(PriorItem: TEDIObjectListItem;
- EDIObject: TEDIObject = nil): TEDIObjectListItem; virtual;
public
constructor Create(OwnsObjects: Boolean = True);
destructor Destroy; override;
procedure Add(Item: TEDIObjectListItem; Name: string = ''); overload;
function Add(EDIObject: TEDIObject; Name: string = ''): TEDIObjectListItem; overload;
+ function CreateListItem(PriorItem: TEDIObjectListItem;
+ EDIObject: TEDIObject = nil): TEDIObjectListItem; virtual;
function Find(Item: TEDIObjectListItem): TEDIObjectListItem; overload;
function Find(EDIObject: TEDIObject): TEDIObjectListItem; overload;
function FindEDIObject(EDIObject: TEDIObject): TEDIObject;
Modified: trunk/jcl/source/common/JclEDISEF.pas
===================================================================
--- trunk/jcl/source/common/JclEDISEF.pas 2007-12-01 11:13:09 UTC (rev 2254)
+++ trunk/jcl/source/common/JclEDISEF.pas 2007-12-01 11:59:43 UTC (rev 2255)
@@ -296,11 +296,11 @@
FText: string;
function GetData: string;
procedure SetData(const Value: string);
- function Assemble: string; virtual;
- procedure Disassemble; virtual;
public
constructor Create;
destructor Destroy; override;
+ function Assemble: string; virtual;
+ procedure Disassemble; virtual;
published
property Data: string read GetData write SetData;
property WhereLocation: TStrings read GetWhereLocation;
Modified: trunk/jcl/source/common/JclEDIXML.pas
===================================================================
--- trunk/jcl/source/common/JclEDIXML.pas 2007-12-01 11:13:09 UTC (rev 2254)
+++ trunk/jcl/source/common/JclEDIXML.pas 2007-12-01 11:59:43 UTC (rev 2255)
@@ -203,11 +203,12 @@
TEDIXMLElement = class(TEDIXMLDataObject)
private
FCData: Boolean;
- public
- constructor Create(Parent: TEDIXMLDataObject); reintroduce;
+ protected
function InternalAssignDelimiters: TEDIXMLDelimiters; virtual;
function Assemble: string; override;
procedure Disassemble; override;
+ public
+ constructor Create(Parent: TEDIXMLDataObject); reintroduce;
function GetIndexPositionFromParent: Integer;
published
property CData: Boolean read FCData write FCData;
@@ -254,14 +255,17 @@
FElements: TEDIXMLElementArray;
function GetElement(Index: Integer): TEDIXMLElement;
procedure SetElement(Index: Integer; Element: TEDIXMLElement);
+ protected
+ function InternalAssignDelimiters: TEDIXMLDelimiters; virtual;
+ function InternalCreateElement: TEDIXMLElement; virtual;
+ //
+ function Assemble: string; override;
+ procedure Disassemble; override;
public
constructor Create(Parent: TEDIXMLDataObject); reintroduce; overload;
constructor Create(Parent: TEDIXMLDataObject; ElementCount: Integer); reintroduce; overload;
destructor Destroy; override;
//
- function InternalAssignDelimiters: TEDIXMLDelimiters; virtual;
- function InternalCreateElement: TEDIXMLElement; virtual;
- //
function AddElement: Integer;
function AppendElement(Element: TEDIXMLElement): Integer;
function InsertElement(InsertIndex: Integer): Integer; overload;
@@ -277,8 +281,6 @@
procedure DeleteElements; overload;
procedure DeleteElements(Index, Count: Integer); overload;
//
- function Assemble: string; override;
- procedure Disassemble; override;
function GetIndexPositionFromParent: Integer;
property Element[Index: Integer]: TEDIXMLElement read GetElement write SetElement; default;
property Elements: TEDIXMLElementArray read FElements write FElements;
@@ -289,37 +291,41 @@
TEDIXMLSegmentArray = array of TEDIXMLSegment;
TEDIXMLTransactionSetSegment = class(TEDIXMLSegment)
+ protected
+ function InternalAssignDelimiters: TEDIXMLDelimiters; override;
public
constructor Create(Parent: TEDIXMLDataObject); reintroduce; overload;
constructor Create(Parent: TEDIXMLDataObject; ElementCount: Integer); reintroduce; overload;
- function InternalAssignDelimiters: TEDIXMLDelimiters; override;
end;
TEDIXMLFunctionalGroupSegment = class(TEDIXMLSegment)
+ protected
+ function InternalAssignDelimiters: TEDIXMLDelimiters; override;
public
constructor Create(Parent: TEDIXMLDataObject); reintroduce; overload;
constructor Create(Parent: TEDIXMLDataObject; ElementCount: Integer); reintroduce; overload;
- function InternalAssignDelimiters: TEDIXMLDelimiters; override;
end;
TEDIXMLInterchangeControlSegment = class(TEDIXMLSegment)
+ protected
+ function InternalAssignDelimiters: TEDIXMLDelimiters; override;
public
constructor Create(Parent: TEDIXMLDataObject); reintroduce; overload;
constructor Create(Parent: TEDIXMLDataObject; ElementCount: Integer); reintroduce; overload;
- function InternalAssignDelimiters: TEDIXMLDelimiters; override;
end;
// EDI Transaction Set Loop
TEDIXMLTransactionSetLoop = class(TEDIXMLDataObjectGroup)
private
FParentTransactionSet: TEDIXMLTransactionSet;
- public
- constructor Create(Parent: TEDIXMLDataObject); reintroduce;
- destructor Destroy; override;
+ protected
function InternalAssignDelimiters: TEDIXMLDelimiters; override;
function InternalCreateDataObjectGroup: TEDIXMLDataObjectGroup; override;
function Assemble: string; override;
procedure Disassemble; override;
+ public
+ constructor Create(Parent: TEDIXMLDataObject); reintroduce;
+ destructor Destroy; override;
published
property ParentTransactionSet: TEDIXMLTransactionSet read FParentTransactionSet
write FParentTransactionSet;
@@ -330,13 +336,14 @@
private
FSTSegment: TEDIXMLSegment;
FSESegment: TEDIXMLSegment;
- public
- constructor Create(Parent: TEDIXMLDataObject); reintroduce;
- destructor Destroy; override;
+ protected
function InternalAssignDelimiters: TEDIXMLDelimiters; override;
function InternalCreateDataObjectGroup: TEDIXMLDataObjectGroup; override;
function Assemble: string; override;
procedure Disassemble; override;
+ public
+ constructor Create(Parent: TEDIXMLDataObject); reintroduce;
+ destructor Destroy; override;
published
property SegmentST: TEDIXMLSegment read FSTSegment write FSTSegment;
property SegmentSE: TEDIXMLSegment read FSESegment write FSESegment;
@@ -347,13 +354,14 @@
private
FGSSegment: TEDIXMLSegment;
FGESegment: TEDIXMLSegment;
- public
- constructor Create(Parent: TEDIXMLDataObject); reintroduce;
- destructor Destroy; override;
+ protected
function InternalAssignDelimiters: TEDIXMLDelimiters; override;
function InternalCreateDataObjectGroup: TEDIXMLDataObjectGroup; override;
function Assemble: string; override;
procedure Disassemble; override;
+ public
+ constructor Create(Parent: TEDIXMLDataObject); reintroduce;
+ destructor Destroy; override;
published
property SegmentGS: TEDIXMLSegment read FGSSegment write FGSSegment;
property SegmentGE: TEDIXMLSegment read FGESegment write FGESegment;
@@ -364,13 +372,14 @@
private
FISASegment: TEDIXMLSegment;
FIEASegment: TEDIXMLSegment;
- public
- constructor Create(Parent: TEDIXMLDataObject); reintroduce;
- destructor Destroy; override;
+ protected
function InternalAssignDelimiters: TEDIXMLDelimiters; override;
function InternalCreateDataObjectGroup: TEDIXMLDataObjectGroup; override;
function Assemble: string; override;
procedure Disassemble; override;
+ public
+ constructor Create(Parent: TEDIXMLDataObject); reintroduce;
+ destructor Destroy; override;
published
property SegmentISA: TEDIXMLSegment read FISASegment write FISASegment;
property SegmentIEA: TEDIXMLSegment read FIEASegment write FIEASegment;
@@ -405,20 +414,19 @@
FFileName: string;
FEDIXMLFileHeader: TEDIXMLFileHeader;
procedure InternalLoadFromFile;
+ protected
+ function InternalAssignDelimiters: TEDIXMLDelimiters; override;
+ function InternalCreateDataObjectGroup: TEDIXMLDataObjectGroup; override;
+ function Assemble: string; override;
+ procedure Disassemble; override;
public
constructor Create(Parent: TEDIXMLDataObject); reintroduce;
destructor Destroy; override;
- function InternalAssignDelimiters: TEDIXMLDelimiters; override;
- function InternalCreateDataObjectGroup: TEDIXMLDataObjectGroup; override;
-
procedure LoadFromFile(const FileName: string);
procedure ReLoadFromFile;
procedure SaveToFile;
procedure SaveAsToFile(const FileName: string);
-
- function Assemble: string; override;
- procedure Disassemble; override;
published
property FileID: Integer read FFileID write FFileID;
property FileName: string read FFileName write FFileName;
Modified: trunk/jcl/source/common/JclEDI_ANSIX12.pas
===================================================================
--- trunk/jcl/source/common/JclEDI_ANSIX12.pas 2007-12-01 11:13:09 UTC (rev 2254)
+++ trunk/jcl/source/common/JclEDI_ANSIX12.pas 2007-12-01 11:59:43 UTC (rev 2255)
@@ -193,21 +193,24 @@
TEDISegmentArray = array of TEDISegment;
TEDITransactionSetSegment = class(TEDISegment)
+ protected
+ function InternalAssignDelimiters: TEDIDelimiters; override;
public
constructor Create(Parent: TEDIDataObject; ElementCount: Integer = 0); reintroduce;
- function InternalAssignDelimiters: TEDIDelimiters; override;
end;
TEDIFunctionalGroupSegment = class(TEDISegment)
+ protected
+ function InternalAssignDelimiters: TEDIDelimiters; override;
public
constructor Create(Parent: TEDIDataObject; ElementCount: Integer = 0); reintroduce;
- function InternalAssignDelimiters: TEDIDelimiters; override;
end;
TEDIInterchangeControlSegment = class(TEDISegment)
+ protected
+ function InternalAssignDelimiters: TEDIDelimiters; override;
public
constructor Create(Parent: TEDIDataObject; ElementCount: Integer = 0); reintroduce;
- function InternalAssignDelimiters: TEDIDelimiters; override;
end;
// EDI Segment Specification Classes
@@ -223,12 +226,13 @@
FOwnerLoopId: string;
FParentLoopId: string;
function GetReservedData: TStrings;
+ protected
+ function InternalCreateElement: TEDIElement; override;
public
constructor Create(Parent: TEDIDataObject; ElementCount: Integer = 0); reintroduce;
destructor Destroy; override;
procedure AssembleReservedData(ReservedData: TStrings); virtual;
procedure DisassembleReservedData(ReservedData: TStrings); virtual;
- function InternalCreateElement: TEDIElement; override;
function Assemble: string; override;
procedure Disassemble; override;
procedure ValidateElementIndexPositions;
@@ -246,9 +250,10 @@
end;
TEDITransactionSetSegmentSpec = class(TEDISegmentSpec)
+ protected
+ function InternalAssignDelimiters: TEDIDelimiters; override;
public
constructor Create(Parent: TEDIDataObject; ElementCount: Integer = 0); reintroduce;
- function InternalAssignDelimiters: TEDIDelimiters; override;
end;
TEDITransactionSetSegmentSTSpec = class(TEDITransactionSetSegmentSpec)
@@ -259,9 +264,10 @@
end;
TEDIFunctionalGroupSegmentSpec = class(TEDISegmentSpec)
+ protected
+ function InternalAssignDelimiters: TEDIDelimiters; override;
public
constructor Create(Parent: TEDIDataObject; ElementCount: Integer = 0); reintroduce;
- function InternalAssignDelimiters: TEDIDelimiters; override;
end;
TEDIFunctionalGroupSegmentGSSpec = class(TEDIFunctionalGroupSegmentSpec)
@@ -272,9 +278,10 @@
end;
TEDIInterchangeControlSegmentSpec = class(TEDISegmentSpec)
+ protected
+ function InternalAssignDelimiters: TEDIDelimiters; override;
public
constructor Create(Parent: TEDIDataObject; ElementCount: Integer = 0); reintroduce;
- function InternalAssignDelimiters: TEDIDelimiters; override;
end;
TEDIInterchangeControlSegmentISASpec = class(TEDIInterchangeControlSegmentSpec)
@@ -337,9 +344,10 @@
private
FTransactionSetId: string;
FTSDescription: string;
- public
+ protected
procedure InternalCreateHeaderTrailerSegments; override;
function InternalCreateSegment: TEDISegment; override;
+ public
procedure ValidateSegmentIndexPositions;
published
property Id: string read FTransactionSetId write FTransactionSetId;
@@ -472,9 +480,10 @@
FFGDescription: string;
FAgencyCodeId: string;
FVersionReleaseId: string;
- public
+ protected
procedure InternalCreateHeaderTrailerSegments; override;
function InternalCreateTransactionSet: TEDITransactionSet; override;
+ public
function FindTransactionSetSpec(TransactionSetId: string): TEDITransactionSetSpec;
published
property Id: string read FFunctionalGroupId write FFunctionalGroupId;
@@ -540,9 +549,10 @@
FStandardId: string;
FVersionId: string;
FICDescription: string;
- public
+ protected
procedure InternalCreateHeaderTrailerSegments; override;
function InternalCreateFunctionalGroup: TEDIFunctionalGroup; override;
+ public
function FindFunctionalGroupSpec(FunctionalGroupId, AgencyCodeId,
VersionReleaseId: string): TEDIFunctionalGroupSpec;
function FindTransactionSetSpec(FunctionalGroupId, AgencyCodeId, VersionReleaseId,
@@ -614,6 +624,9 @@
// EDI File Specification
TEDIFileSpec = class(TEDIFile)
+ protected
+ procedure InternalDelimitersDetection(StartPos: Integer); override;
+ function InternalCreateInterchangeControl: TEDIInterchangeControl; override;
public
constructor Create(Parent: TEDIDataObject; InterchangeCount: Integer = 0); reintroduce;
function FindTransactionSetSpec(StandardId, VersionId, FunctionalGroupId, AgencyCodeId,
@@ -621,8 +634,6 @@
function FindFunctionalGroupSpec(StandardId, VersionId, FunctionalGroupId, AgencyCodeId,
VersionReleaseId: string): TEDIFunctionalGroupSpec;
function FindInterchangeControlSpec(StandardId, VersionId: string): TEDIInterchangeControlSpec;
- procedure InternalDelimitersDetection(StartPos: Integer); override;
- function InternalCreateInterchangeControl: TEDIInterchangeControl; override;
end;
{$IFNDEF EDI_WEAK_PACKAGE_UNITS}
Modified: trunk/jcl/source/common/JclEDI_UNEDIFACT.pas
===================================================================
--- trunk/jcl/source/common/JclEDI_UNEDIFACT.pas 2007-12-01 11:13:09 UTC (rev 2254)
+++ trunk/jcl/source/common/JclEDI_UNEDIFACT.pas 2007-12-01 11:59:43 UTC (rev 2255)
@@ -182,21 +182,24 @@
TEDISegmentArray = array of TEDISegment;
TEDIMessageSegment = class(TEDISegment)
+ protected
+ function InternalAssignDelimiters: TEDIDelimiters; override;
public
constructor Create(Parent: TEDIDataObject; ElementCount: Integer = 0); reintroduce;
- function InternalAssignDelimiters: TEDIDelimiters; override;
end;
TEDIFunctionalGroupSegment = class(TEDISegment)
+ protected
+ function InternalAssignDelimiters: TEDIDelimiters; override;
public
constructor Create(Parent: TEDIDataObject; ElementCount: Integer = 0); reintroduce;
- function InternalAssignDelimiters: TEDIDelimiters; override;
end;
TEDIInterchangeControlSegment = class(TEDISegment)
+ protected
+ function InternalAssignDelimiters: TEDIDelimiters; override;
public
constructor Create(Parent: TEDIDataObject; ElementCount: Integer = 0); reintroduce;
- function InternalAssignDelimiters: TEDIDelimiters; override;
end;
// EDI Transaction Set Loop
Modified: trunk/jcl/source/common/JclSimpleXml.pas
===================================================================
--- trunk/jcl/source/common/JclSimpleXml.pas 2007-12-01 11:13:09 UTC (rev 2254)
+++ trunk/jcl/source/common/JclSimpleXml.pas 2007-12-01 11:59:43 UTC (rev 2255)
@@ -49,6 +49,7 @@
{$ENDIF MSWINDOWS}
{$IFDEF CLR}
System.Text,
+ System.IO,
{$ENDIF CLR}
SysUtils, Classes,
{$IFDEF HAS_UNIT_VARIANTS}
Modified: trunk/jcl/source/common/JclStrings.pas
===================================================================
--- trunk/jcl/source/common/JclStrings.pas 2007-12-01 11:13:09 UTC (rev 2254)
+++ trunk/jcl/source/common/JclStrings.pas 2007-12-01 11:59:43 UTC (rev 2255)
@@ -69,6 +69,7 @@
Classes, SysUtils,
{$IFDEF CLR}
System.Text,
+ System.IO,
{$ELSE}
JclWideStrings,
{$ENDIF CLR}
@@ -164,7 +165,9 @@
function StrIsAlpha(const S: string): Boolean;
function StrIsAlphaNum(const S: string): Boolean;
function StrIsAlphaNumUnderscore(const S: string): Boolean;
+{$IFNDEF CLR}
function StrContainsChars(const S: string; Chars: TSysCharSet; CheckAll: Boolean): Boolean;
+{$ENDIF ~CLR}
function StrConsistsOfNumberChars(const S: string): Boolean;
function StrIsDigit(const S: string): Boolean;
{$IFNDEF CLR}
@@ -861,6 +864,7 @@
end;
end;
+{$IFNDEF CLR}
function StrContainsChars(const S: string; Chars: TSysCharSet; CheckAll: Boolean): Boolean;
var
I: Integer;
@@ -894,6 +898,7 @@
end;
end;
end;
+{$ENDIF ~CLR}
function StrIsAlphaNumUnderscore(const S: string): Boolean;
var
Modified: trunk/jcl/source/common/JclVectors.pas
===================================================================
--- trunk/jcl/source/common/JclVectors.pas 2007-12-01 11:13:09 UTC (rev 2254)
+++ trunk/jcl/source/common/JclVectors.pas 2007-12-01 11:59:43 UTC (rev 2255)
@@ -2843,6 +2843,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := nil;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeObject(FItems[Index]);
@@ -3347,6 +3350,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := '';
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeString(FItems[Index]);
@@ -3851,6 +3857,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := '';
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeString(FItems[Index]);
@@ -4355,6 +4364,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := 0.0;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeSingle(FItems[Index]);
@@ -4859,6 +4871,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := 0.0;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeDouble(FItems[Index]);
@@ -5363,6 +5378,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := 0.0;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeExtended(FItems[Index]);
@@ -5867,6 +5885,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := 0;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeInteger(FItems[Index]);
@@ -6371,6 +6392,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := 0;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeCardinal(FItems[Index]);
@@ -6875,6 +6899,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := 0;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeInt64(FItems[Index]);
@@ -7381,6 +7408,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := nil;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreePointer(FItems[Index]);
@@ -7886,6 +7916,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := nil;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeObject(FItems[Index]);
@@ -8387,6 +8420,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := Default(T);
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := FreeItem(FItems[Index]);
Modified: trunk/jcl/source/prototypes/containers/JclArrayLists.imp
===================================================================
--- trunk/jcl/source/prototypes/containers/JclArrayLists.imp 2007-12-01 11:13:09 UTC (rev 2254)
+++ trunk/jcl/source/prototypes/containers/JclArrayLists.imp 2007-12-01 11:59:43 UTC (rev 2255)
@@ -421,6 +421,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := DEFAULTVALUE;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := RELEASERNAME(FElementData[Index]);
Modified: trunk/jcl/source/prototypes/containers/JclVectors.imp
===================================================================
--- trunk/jcl/source/prototypes/containers/JclVectors.imp 2007-12-01 11:13:09 UTC (rev 2254)
+++ trunk/jcl/source/prototypes/containers/JclVectors.imp 2007-12-01 11:59:43 UTC (rev 2255)
@@ -367,6 +367,9 @@
WriteLock;
try
{$ENDIF THREADSAFE}
+ {$IFDEF CLR}
+ Result := DEFAULTVALUE;
+ {$ENDIF CLR}
if (Index >= 0) and (Index < FSize) then
begin
Result := RELEASERNAME(FItems[Index]);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2007-12-01 11:13:11
|
Revision: 2254
http://jcl.svn.sourceforge.net/jcl/?rev=2254&view=rev
Author: outchy
Date: 2007-12-01 03:13:09 -0800 (Sat, 01 Dec 2007)
Log Message:
-----------
parent nodes are automatically marked as installed when all their children are installed.
Modified Paths:
--------------
trunk/jcl/install/prototypes/JediGUIInstall.pas
Modified: trunk/jcl/install/prototypes/JediGUIInstall.pas
===================================================================
--- trunk/jcl/install/prototypes/JediGUIInstall.pas 2007-12-01 10:54:29 UTC (rev 2253)
+++ trunk/jcl/install/prototypes/JediGUIInstall.pas 2007-12-01 11:13:09 UTC (rev 2254)
@@ -716,16 +716,19 @@
ANode: TTreeNode;
begin
ANode := GetNode(Id);
- if Assigned(ANode) then
+ while Assigned(ANode) do
begin
ANode.ImageIndex := IcoNotInstalled;
ANode.SelectedIndex := IcoNotInstalled;
+ ANode := ANode.Parent;
end;
end;
procedure TInstallFrame.MarkOptionEnd(Id: Integer; Failed: Boolean);
var
- ANode: TTreeNode;
+ ANode, BNode: TTreeNode;
+ Index: Integer;
+ ChangeIcon: Boolean;
begin
{$IFDEF VCL}
if Assigned(FFormCompile) then
@@ -738,22 +741,52 @@
end;
{$ENDIF VCL}
ANode := GetNode(Id);
- if Assigned(ANode) and GetNodeChecked(ANode) then
+ while Assigned(ANode) and GetNodeChecked(ANode) do
begin
- if Failed then
+ ChangeIcon := (ANode.Count = 0) or Failed;
+ if not ChangeIcon then
begin
- ANode.ImageIndex := IcoFailed;
- ANode.SelectedIndex := IcoFailed;
+ ChangeIcon := True;
+ for Index := 0 to ANode.Count - 1 do
+ begin
+ BNode := ANode.Item[Index];
+ case BNode.ImageIndex of
+ IcoNotInstalled:
+ begin
+ ChangeIcon := False;
+ Break;
+ end;
+ IcoFailed:
+ begin
+ Failed := True;
+ Break;
+ end;
+ IcoInstalled: ;
+ else
+ ChangeIcon := ChangeIcon and not GetNodeChecked(BNode);
+ end;
+ end;
+ end;
+ if ChangeIcon then
+ begin
+ if Failed then
+ begin
+ ANode.ImageIndex := IcoFailed;
+ ANode.SelectedIndex := IcoFailed;
+ end
+ else
+ begin
+ ANode.ImageIndex := IcoInstalled;
+ ANode.SelectedIndex := IcoInstalled;
+ end;
end
else
- begin
- ANode.ImageIndex := IcoInstalled;
- ANode.SelectedIndex := IcoInstalled;
- end;
- Inc(FInstallCount);
- if FCheckedCount > 0 then
- SetProgress(100 * FInstallCount div FCheckedCount);
+ Break;
+ ANode := ANode.Parent;
end;
+ Inc(FInstallCount);
+ if FCheckedCount > 0 then
+ SetProgress(100 * FInstallCount div FCheckedCount);
end;
procedure TInstallFrame.EndInstall;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2007-12-01 10:54:31
|
Revision: 2253
http://jcl.svn.sourceforge.net/jcl/?rev=2253&view=rev
Author: outchy
Date: 2007-12-01 02:54:29 -0800 (Sat, 01 Dec 2007)
Log Message:
-----------
Fix for Delphi.net 2007
Modified Paths:
--------------
trunk/jcl/source/common/JclTrees.pas
trunk/jcl/source/prototypes/containers/JclTrees.imp
Modified: trunk/jcl/source/common/JclTrees.pas
===================================================================
--- trunk/jcl/source/common/JclTrees.pas 2007-11-30 22:19:01 UTC (rev 2252)
+++ trunk/jcl/source/common/JclTrees.pas 2007-12-01 10:54:29 UTC (rev 2253)
@@ -57,7 +57,11 @@
TJclIntfTreeNode = class
public
Value: IInterface;
+ {$IFDEF BCB}
Children: TDynObjectArray;
+ {$ELSE ~BCB}
+ Children: array of TJclIntfTreeNode;
+ {$ENDIF ~BCB}
ChildrenCount: Integer;
Parent: TJclIntfTreeNode;
function IndexOfChild(AChild: TJclIntfTreeNode): Integer;
@@ -112,7 +116,11 @@
TJclAnsiStrTreeNode = class
public
Value: AnsiString;
+ {$IFDEF BCB}
Children: TDynObjectArray;
+ {$ELSE ~BCB}
+ Children: array of TJclAnsiStrTreeNode;
+ {$ENDIF ~BCB}
ChildrenCount: Integer;
Parent: TJclAnsiStrTreeNode;
function IndexOfChild(AChild: TJclAnsiStrTreeNode): Integer;
@@ -167,7 +175,11 @@
TJclWideStrTreeNode = class
public
Value: WideString;
+ {$IFDEF BCB}
Children: TDynObjectArray;
+ {$ELSE ~BCB}
+ Children: array of TJclWideStrTreeNode;
+ {$ENDIF ~BCB}
ChildrenCount: Integer;
Parent: TJclWideStrTreeNode;
function IndexOfChild(AChild: TJclWideStrTreeNode): Integer;
@@ -229,7 +241,11 @@
TJclSingleTreeNode = class
public
Value: Single;
+ {$IFDEF BCB}
Children: TDynObjectArray;
+ {$ELSE ~BCB}
+ Children: array of TJclSingleTreeNode;
+ {$ENDIF ~BCB}
ChildrenCount: Integer;
Parent: TJclSingleTreeNode;
function IndexOfChild(AChild: TJclSingleTreeNode): Integer;
@@ -284,7 +300,11 @@
TJclDoubleTreeNode = class
public
Value: Double;
+ {$IFDEF BCB}
Children: TDynObjectArray;
+ {$ELSE ~BCB}
+ Children: array of TJclDoubleTreeNode;
+ {$ENDIF ~BCB}
ChildrenCount: Integer;
Parent: TJclDoubleTreeNode;
function IndexOfChild(AChild: TJclDoubleTreeNode): Integer;
@@ -339,7 +359,11 @@
TJclExtendedTreeNode = class
public
Value: Extended;
+ {$IFDEF BCB}
Children: TDynObjectArray;
+ {$ELSE ~BCB}
+ Children: array of TJclExtendedTreeNode;
+ {$ENDIF ~BCB}
ChildrenCount: Integer;
Parent: TJclExtendedTreeNode;
function IndexOfChild(AChild: TJclExtendedTreeNode): Integer;
@@ -404,7 +428,11 @@
TJclIntegerTreeNode = class
public
Value: Integer;
+ {$IFDEF BCB}
Children: TDynObjectArray;
+ {$ELSE ~BCB}
+ Children: array of TJclIntegerTreeNode;
+ {$ENDIF ~BCB}
ChildrenCount: Integer;
Parent: TJclIntegerTreeNode;
function IndexOfChild(AChild: TJclIntegerTreeNode): Integer;
@@ -459,7 +487,11 @@
TJclCardinalTreeNode = class
public
Value: Cardinal;
+ {$IFDEF BCB}
Children: TDynObjectArray;
+ {$ELSE ~BCB}
+ Children: array of TJclCardinalTreeNode;
+ {$ENDIF ~BCB}
ChildrenCount: Integer;
Parent: TJclCardinalTreeNode;
function IndexOfChild(AChild: TJclCardinalTreeNode): Integer;
@@ -514,7 +546,11 @@
TJclInt64TreeNode = class
public
Value: Int64;
+ {$IFDEF BCB}
Children: TDynObjectArray;
+ {$ELSE ~BCB}
+ Children: array of TJclInt64TreeNode;
+ {$ENDIF ~BCB}
ChildrenCount: Integer;
Parent: TJclInt64TreeNode;
function IndexOfChild(AChild: TJclInt64TreeNode): Integer;
@@ -570,7 +606,11 @@
TJclPtrTreeNode = class
public
Value: Pointer;
+ {$IFDEF BCB}
Children: TDynObjectArray;
+ {$ELSE ~BCB}
+ Children: array of TJclPtrTreeNode;
+ {$ENDIF ~BCB}
ChildrenCount: Integer;
Parent: TJclPtrTreeNode;
function IndexOfChild(AChild: TJclPtrTreeNode): Integer;
@@ -626,7 +666,11 @@
TJclTreeNode = class
public
Value: TObject;
+ {$IFDEF BCB}
Children: TDynObjectArray;
+ {$ELSE ~BCB}
+ Children: array of TJclTreeNode;
+ {$ENDIF ~BCB}
ChildrenCount: Integer;
Parent: TJclTreeNode;
function IndexOfChild(AChild: TJclTreeNode): Integer;
@@ -682,7 +726,11 @@
TJclTreeNode<T> = class
public
Value: T;
+ {$IFDEF BCB}
Children: TDynObjectArray;
+ {$ELSE ~BCB}
+ Children: array of TJclTreeNode<T>;
+ {$ENDIF ~BCB}
ChildrenCount: Integer;
Parent: TJclTreeNode<T>;
function IndexOfChild(AChild: TJclTreeNode<T>): Integer;
@@ -956,7 +1004,11 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclIntfTreeNode(FCursor.Children[Index]));
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index]);
+ {$ENDIF ~BCB}
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -974,7 +1026,11 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclIntfTreeNode(FCursor.Children[Index]))
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index])
+ {$ENDIF ~BCB}
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -1682,7 +1738,11 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclAnsiStrTreeNode(FCursor.Children[Index]));
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index]);
+ {$ENDIF ~BCB}
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -1700,7 +1760,11 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclAnsiStrTreeNode(FCursor.Children[Index]))
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index])
+ {$ENDIF ~BCB}
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -2408,7 +2472,11 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclWideStrTreeNode(FCursor.Children[Index]));
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index]);
+ {$ENDIF ~BCB}
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -2426,7 +2494,11 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclWideStrTreeNode(FCursor.Children[Index]))
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index])
+ {$ENDIF ~BCB}
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -3134,7 +3206,11 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclSingleTreeNode(FCursor.Children[Index]));
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index]);
+ {$ENDIF ~BCB}
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -3152,7 +3228,11 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclSingleTreeNode(FCursor.Children[Index]))
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index])
+ {$ENDIF ~BCB}
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -3860,7 +3940,11 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclDoubleTreeNode(FCursor.Children[Index]));
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index]);
+ {$ENDIF ~BCB}
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -3878,7 +3962,11 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclDoubleTreeNode(FCursor.Children[Index]))
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index])
+ {$ENDIF ~BCB}
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -4586,7 +4674,11 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclExtendedTreeNode(FCursor.Children[Index]));
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index]);
+ {$ENDIF ~BCB}
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -4604,7 +4696,11 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclExtendedTreeNode(FCursor.Children[Index]))
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index])
+ {$ENDIF ~BCB}
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -5312,7 +5408,11 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclIntegerTreeNode(FCursor.Children[Index]));
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index]);
+ {$ENDIF ~BCB}
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -5330,7 +5430,11 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclIntegerTreeNode(FCursor.Children[Index]))
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index])
+ {$ENDIF ~BCB}
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -6038,7 +6142,11 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclCardinalTreeNode(FCursor.Children[Index]));
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index]);
+ {$ENDIF ~BCB}
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -6056,7 +6164,11 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclCardinalTreeNode(FCursor.Children[Index]))
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index])
+ {$ENDIF ~BCB}
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -6764,7 +6876,11 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclInt64TreeNode(FCursor.Children[Index]));
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index]);
+ {$ENDIF ~BCB}
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -6782,7 +6898,11 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclInt64TreeNode(FCursor.Children[Index]))
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index])
+ {$ENDIF ~BCB}
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -7491,7 +7611,11 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclPtrTreeNode(FCursor.Children[Index]));
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index]);
+ {$ENDIF ~BCB}
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -7509,7 +7633,11 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclPtrTreeNode(FCursor.Children[Index]))
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index])
+ {$ENDIF ~BCB}
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -8218,7 +8346,11 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclTreeNode(FCursor.Children[Index]));
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index]);
+ {$ENDIF ~BCB}
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -8236,7 +8368,11 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclTreeNode(FCursor.Children[Index]))
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index])
+ {$ENDIF ~BCB}
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -8945,7 +9081,11 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclTreeNode<T>(FCursor.Children[Index]));
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index]);
+ {$ENDIF ~BCB}
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -8963,7 +9103,11 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
+ {$IFDEF BCB}
FOwnTree.ClearNode(TJclTreeNode<T>(FCursor.Children[Index]))
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index])
+ {$ENDIF ~BCB}
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -9672,7 +9816,11 @@
Parent: TJclIntfTreeNode;
begin
for Index := ANode.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
ClearNode(TJclIntfTreeNode(ANode.Children[Index]));
+ {$ELSE ~BCB}
+ ClearNode(ANode.Children[Index]);
+ {$ENDIF ~BCB}
FreeObject(ANode.Value);
Parent := ANode.Parent;
if Parent <> nil then
@@ -10151,7 +10299,11 @@
Parent: TJclAnsiStrTreeNode;
begin
for Index := ANode.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
ClearNode(TJclAnsiStrTreeNode(ANode.Children[Index]));
+ {$ELSE ~BCB}
+ ClearNode(ANode.Children[Index]);
+ {$ENDIF ~BCB}
FreeString(ANode.Value);
Parent := ANode.Parent;
if Parent <> nil then
@@ -10630,7 +10782,11 @@
Parent: TJclWideStrTreeNode;
begin
for Index := ANode.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
ClearNode(TJclWideStrTreeNode(ANode.Children[Index]));
+ {$ELSE ~BCB}
+ ClearNode(ANode.Children[Index]);
+ {$ENDIF ~BCB}
FreeString(ANode.Value);
Parent := ANode.Parent;
if Parent <> nil then
@@ -11109,7 +11265,11 @@
Parent: TJclSingleTreeNode;
begin
for Index := ANode.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
ClearNode(TJclSingleTreeNode(ANode.Children[Index]));
+ {$ELSE ~BCB}
+ ClearNode(ANode.Children[Index]);
+ {$ENDIF ~BCB}
FreeSingle(ANode.Value);
Parent := ANode.Parent;
if Parent <> nil then
@@ -11588,7 +11748,11 @@
Parent: TJclDoubleTreeNode;
begin
for Index := ANode.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
ClearNode(TJclDoubleTreeNode(ANode.Children[Index]));
+ {$ELSE ~BCB}
+ ClearNode(ANode.Children[Index]);
+ {$ENDIF ~BCB}
FreeDouble(ANode.Value);
Parent := ANode.Parent;
if Parent <> nil then
@@ -12067,7 +12231,11 @@
Parent: TJclExtendedTreeNode;
begin
for Index := ANode.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
ClearNode(TJclExtendedTreeNode(ANode.Children[Index]));
+ {$ELSE ~BCB}
+ ClearNode(ANode.Children[Index]);
+ {$ENDIF ~BCB}
FreeExtended(ANode.Value);
Parent := ANode.Parent;
if Parent <> nil then
@@ -12546,7 +12714,11 @@
Parent: TJclIntegerTreeNode;
begin
for Index := ANode.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
ClearNode(TJclIntegerTreeNode(ANode.Children[Index]));
+ {$ELSE ~BCB}
+ ClearNode(ANode.Children[Index]);
+ {$ENDIF ~BCB}
FreeInteger(ANode.Value);
Parent := ANode.Parent;
if Parent <> nil then
@@ -13025,7 +13197,11 @@
Parent: TJclCardinalTreeNode;
begin
for Index := ANode.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
ClearNode(TJclCardinalTreeNode(ANode.Children[Index]));
+ {$ELSE ~BCB}
+ ClearNode(ANode.Children[Index]);
+ {$ENDIF ~BCB}
FreeCardinal(ANode.Value);
Parent := ANode.Parent;
if Parent <> nil then
@@ -13504,7 +13680,11 @@
Parent: TJclInt64TreeNode;
begin
for Index := ANode.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
ClearNode(TJclInt64TreeNode(ANode.Children[Index]));
+ {$ELSE ~BCB}
+ ClearNode(ANode.Children[Index]);
+ {$ENDIF ~BCB}
FreeInt64(ANode.Value);
Parent := ANode.Parent;
if Parent <> nil then
@@ -13984,7 +14164,11 @@
Parent: TJclPtrTreeNode;
begin
for Index := ANode.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
ClearNode(TJclPtrTreeNode(ANode.Children[Index]));
+ {$ELSE ~BCB}
+ ClearNode(ANode.Children[Index]);
+ {$ENDIF ~BCB}
FreePointer(ANode.Value);
Parent := ANode.Parent;
if Parent <> nil then
@@ -14464,7 +14648,11 @@
Parent: TJclTreeNode;
begin
for Index := ANode.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
ClearNode(TJclTreeNode(ANode.Children[Index]));
+ {$ELSE ~BCB}
+ ClearNode(ANode.Children[Index]);
+ {$ENDIF ~BCB}
FreeObject(ANode.Value);
Parent := ANode.Parent;
if Parent <> nil then
@@ -14944,7 +15132,11 @@
Parent: TJclTreeNode<T>;
begin
for Index := ANode.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
ClearNode(TJclTreeNode<T>(ANode.Children[Index]));
+ {$ELSE ~BCB}
+ ClearNode(ANode.Children[Index]);
+ {$ENDIF ~BCB}
FreeItem(ANode.Value);
Parent := ANode.Parent;
if Parent <> nil then
Modified: trunk/jcl/source/prototypes/containers/JclTrees.imp
===================================================================
--- trunk/jcl/source/prototypes/containers/JclTrees.imp 2007-11-30 22:19:01 UTC (rev 2252)
+++ trunk/jcl/source/prototypes/containers/JclTrees.imp 2007-12-01 10:54:29 UTC (rev 2253)
@@ -5,7 +5,11 @@
NODETYPENAME = class
public
Value: PARAMETERTYPE;
+ {$IFDEF BCB}
Children: TDynObjectArray;
+ {$ELSE ~BCB}
+ Children: array of NODETYPENAME;
+ {$ENDIF ~BCB}
ChildrenCount: Integer;
Parent: NODETYPENAME;
function IndexOfChild(AChild: NODETYPENAME): Integer;
@@ -222,7 +226,11 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
FOwnTree.ClearNode(NODETYPENAME(FCursor.Children[Index]));
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index]);
+ {$ENDIF ~BCB}
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -240,7 +248,11 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
+ {$IFDEF BCB}
FOwnTree.ClearNode(NODETYPENAME(FCursor.Children[Index]))
+ {$ELSE ~BCB}
+ FOwnTree.ClearNode(FCursor.Children[Index])
+ {$ENDIF ~BCB}
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -950,7 +962,11 @@
Parent: NODETYPENAME;
begin
for Index := ANode.ChildrenCount - 1 downto 0 do
+ {$IFDEF BCB}
ClearNode(NODETYPENAME(ANode.Children[Index]));
+ {$ELSE ~BCB}
+ ClearNode(ANode.Children[Index]);
+ {$ENDIF ~BCB}
RELEASERNAME(ANode.Value);
Parent := ANode.Parent;
if Parent <> nil then
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2007-11-30 22:19:04
|
Revision: 2252
http://jcl.svn.sourceforge.net/jcl/?rev=2252&view=rev
Author: outchy
Date: 2007-11-30 14:19:01 -0800 (Fri, 30 Nov 2007)
Log Message:
-----------
fix for C++Builder issues to generate valid .hpp files.
Modified Paths:
--------------
trunk/jcl/source/common/JclTrees.pas
trunk/jcl/source/prototypes/JclTrees.pas
trunk/jcl/source/prototypes/containers/JclTrees.imp
Modified: trunk/jcl/source/common/JclTrees.pas
===================================================================
--- trunk/jcl/source/common/JclTrees.pas 2007-11-30 22:15:07 UTC (rev 2251)
+++ trunk/jcl/source/common/JclTrees.pas 2007-11-30 22:19:01 UTC (rev 2252)
@@ -54,14 +54,10 @@
JclBase, JclAbstractContainers, JclContainerIntf;
type
- TJclIntfTreeNode = class;
-
- TJclIntfTreeNodeArray = array of TJclIntfTreeNode;
-
TJclIntfTreeNode = class
public
Value: IInterface;
- Children: TJclIntfTreeNodeArray;
+ Children: TDynObjectArray;
ChildrenCount: Integer;
Parent: TJclIntfTreeNode;
function IndexOfChild(AChild: TJclIntfTreeNode): Integer;
@@ -113,14 +109,10 @@
end;
- TJclAnsiStrTreeNode = class;
-
- TJclAnsiStrTreeNodeArray = array of TJclAnsiStrTreeNode;
-
TJclAnsiStrTreeNode = class
public
Value: AnsiString;
- Children: TJclAnsiStrTreeNodeArray;
+ Children: TDynObjectArray;
ChildrenCount: Integer;
Parent: TJclAnsiStrTreeNode;
function IndexOfChild(AChild: TJclAnsiStrTreeNode): Integer;
@@ -172,14 +164,10 @@
end;
- TJclWideStrTreeNode = class;
-
- TJclWideStrTreeNodeArray = array of TJclWideStrTreeNode;
-
TJclWideStrTreeNode = class
public
Value: WideString;
- Children: TJclWideStrTreeNodeArray;
+ Children: TDynObjectArray;
ChildrenCount: Integer;
Parent: TJclWideStrTreeNode;
function IndexOfChild(AChild: TJclWideStrTreeNode): Integer;
@@ -238,14 +226,10 @@
{$ENDIF CONTAINER_WIDESTR}
- TJclSingleTreeNode = class;
-
- TJclSingleTreeNodeArray = array of TJclSingleTreeNode;
-
TJclSingleTreeNode = class
public
Value: Single;
- Children: TJclSingleTreeNodeArray;
+ Children: TDynObjectArray;
ChildrenCount: Integer;
Parent: TJclSingleTreeNode;
function IndexOfChild(AChild: TJclSingleTreeNode): Integer;
@@ -297,14 +281,10 @@
end;
- TJclDoubleTreeNode = class;
-
- TJclDoubleTreeNodeArray = array of TJclDoubleTreeNode;
-
TJclDoubleTreeNode = class
public
Value: Double;
- Children: TJclDoubleTreeNodeArray;
+ Children: TDynObjectArray;
ChildrenCount: Integer;
Parent: TJclDoubleTreeNode;
function IndexOfChild(AChild: TJclDoubleTreeNode): Integer;
@@ -356,14 +336,10 @@
end;
- TJclExtendedTreeNode = class;
-
- TJclExtendedTreeNodeArray = array of TJclExtendedTreeNode;
-
TJclExtendedTreeNode = class
public
Value: Extended;
- Children: TJclExtendedTreeNodeArray;
+ Children: TDynObjectArray;
ChildrenCount: Integer;
Parent: TJclExtendedTreeNode;
function IndexOfChild(AChild: TJclExtendedTreeNode): Integer;
@@ -425,14 +401,10 @@
{$ENDIF MATH_SINGLE_PRECISION}
- TJclIntegerTreeNode = class;
-
- TJclIntegerTreeNodeArray = array of TJclIntegerTreeNode;
-
TJclIntegerTreeNode = class
public
Value: Integer;
- Children: TJclIntegerTreeNodeArray;
+ Children: TDynObjectArray;
ChildrenCount: Integer;
Parent: TJclIntegerTreeNode;
function IndexOfChild(AChild: TJclIntegerTreeNode): Integer;
@@ -484,14 +456,10 @@
end;
- TJclCardinalTreeNode = class;
-
- TJclCardinalTreeNodeArray = array of TJclCardinalTreeNode;
-
TJclCardinalTreeNode = class
public
Value: Cardinal;
- Children: TJclCardinalTreeNodeArray;
+ Children: TDynObjectArray;
ChildrenCount: Integer;
Parent: TJclCardinalTreeNode;
function IndexOfChild(AChild: TJclCardinalTreeNode): Integer;
@@ -543,14 +511,10 @@
end;
- TJclInt64TreeNode = class;
-
- TJclInt64TreeNodeArray = array of TJclInt64TreeNode;
-
TJclInt64TreeNode = class
public
Value: Int64;
- Children: TJclInt64TreeNodeArray;
+ Children: TDynObjectArray;
ChildrenCount: Integer;
Parent: TJclInt64TreeNode;
function IndexOfChild(AChild: TJclInt64TreeNode): Integer;
@@ -603,14 +567,10 @@
{$IFNDEF CLR}
- TJclPtrTreeNode = class;
-
- TJclPtrTreeNodeArray = array of TJclPtrTreeNode;
-
TJclPtrTreeNode = class
public
Value: Pointer;
- Children: TJclPtrTreeNodeArray;
+ Children: TDynObjectArray;
ChildrenCount: Integer;
Parent: TJclPtrTreeNode;
function IndexOfChild(AChild: TJclPtrTreeNode): Integer;
@@ -663,14 +623,10 @@
{$ENDIF ~CLR}
- TJclTreeNode = class;
-
- TJclTreeNodeArray = array of TJclTreeNode;
-
TJclTreeNode = class
public
Value: TObject;
- Children: TJclTreeNodeArray;
+ Children: TDynObjectArray;
ChildrenCount: Integer;
Parent: TJclTreeNode;
function IndexOfChild(AChild: TJclTreeNode): Integer;
@@ -723,14 +679,10 @@
{$IFDEF SUPPORTS_GENERICS}
- TJclTreeNode<T> = class;
-
- TJclTreeNodeArray<T> = array of TJclTreeNode<T>;
-
TJclTreeNode<T> = class
public
Value: T;
- Children: TJclTreeNodeArray<T>;
+ Children: TDynObjectArray;
ChildrenCount: Integer;
Parent: TJclTreeNode<T>;
function IndexOfChild(AChild: TJclTreeNode<T>): Integer;
@@ -1004,7 +956,7 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
- FOwnTree.ClearNode(FCursor.Children[Index]);
+ FOwnTree.ClearNode(TJclIntfTreeNode(FCursor.Children[Index]));
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -1022,7 +974,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FOwnTree.ClearNode(FCursor.Children[Index])
+ FOwnTree.ClearNode(TJclIntfTreeNode(FCursor.Children[Index]))
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -1056,7 +1008,7 @@
{$ENDIF THREADSAFE}
Result := nil;
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor := FCursor.Children[Index];
+ FCursor := TJclIntfTreeNode(FCursor.Children[Index]);
if FCursor <> nil then
Result := FCursor.Value
else
@@ -1380,7 +1332,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor.Children[Index].Value := AInterface
+ TJclIntfTreeNode(FCursor.Children[Index]).Value := AInterface
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -1437,7 +1389,7 @@
Exit;
LastRet := Result;
if Result.ChildrenCount > 0 then
- Result := Result.Children[0]
+ Result := TJclIntfTreeNode(Result.Children[0])
else
begin
Result := Result.Parent;
@@ -1447,7 +1399,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclIntfTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
end;
@@ -1467,7 +1419,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclIntfTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
function TPreOrderIntfItr.GetPreviousCursor: TJclIntfTreeNode;
@@ -1482,9 +1434,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) > 0) then
// come from Right
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclIntfTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
while (Result.ChildrenCount > 0) do // descend down the tree
- Result := Result.Children[Result.ChildrenCount - 1];
+ Result := TJclIntfTreeNode(Result.Children[Result.ChildrenCount - 1]);
end;
end;
@@ -1518,9 +1470,9 @@
Result := Result.Parent;
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclIntfTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclIntfTreeNode(Result.Children[0]);
end;
end;
@@ -1536,9 +1488,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclIntfTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclIntfTreeNode(Result.Children[0]);
end;
end;
@@ -1550,7 +1502,7 @@
if Result = nil then
Exit;
if Result.ChildrenCount > 0 then
- Result := Result.Children[Result.ChildrenCount - 1]
+ Result := TJclIntfTreeNode(Result.Children[Result.ChildrenCount - 1])
else
begin
LastRet := Result;
@@ -1561,7 +1513,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclIntfTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
end;
end;
@@ -1730,7 +1682,7 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
- FOwnTree.ClearNode(FCursor.Children[Index]);
+ FOwnTree.ClearNode(TJclAnsiStrTreeNode(FCursor.Children[Index]));
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -1748,7 +1700,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FOwnTree.ClearNode(FCursor.Children[Index])
+ FOwnTree.ClearNode(TJclAnsiStrTreeNode(FCursor.Children[Index]))
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -1782,7 +1734,7 @@
{$ENDIF THREADSAFE}
Result := '';
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor := FCursor.Children[Index];
+ FCursor := TJclAnsiStrTreeNode(FCursor.Children[Index]);
if FCursor <> nil then
Result := FCursor.Value
else
@@ -2106,7 +2058,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor.Children[Index].Value := AString
+ TJclAnsiStrTreeNode(FCursor.Children[Index]).Value := AString
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -2163,7 +2115,7 @@
Exit;
LastRet := Result;
if Result.ChildrenCount > 0 then
- Result := Result.Children[0]
+ Result := TJclAnsiStrTreeNode(Result.Children[0])
else
begin
Result := Result.Parent;
@@ -2173,7 +2125,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclAnsiStrTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
end;
@@ -2193,7 +2145,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclAnsiStrTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
function TPreOrderAnsiStrItr.GetPreviousCursor: TJclAnsiStrTreeNode;
@@ -2208,9 +2160,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) > 0) then
// come from Right
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclAnsiStrTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
while (Result.ChildrenCount > 0) do // descend down the tree
- Result := Result.Children[Result.ChildrenCount - 1];
+ Result := TJclAnsiStrTreeNode(Result.Children[Result.ChildrenCount - 1]);
end;
end;
@@ -2244,9 +2196,9 @@
Result := Result.Parent;
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclAnsiStrTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclAnsiStrTreeNode(Result.Children[0]);
end;
end;
@@ -2262,9 +2214,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclAnsiStrTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclAnsiStrTreeNode(Result.Children[0]);
end;
end;
@@ -2276,7 +2228,7 @@
if Result = nil then
Exit;
if Result.ChildrenCount > 0 then
- Result := Result.Children[Result.ChildrenCount - 1]
+ Result := TJclAnsiStrTreeNode(Result.Children[Result.ChildrenCount - 1])
else
begin
LastRet := Result;
@@ -2287,7 +2239,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclAnsiStrTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
end;
end;
@@ -2456,7 +2408,7 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
- FOwnTree.ClearNode(FCursor.Children[Index]);
+ FOwnTree.ClearNode(TJclWideStrTreeNode(FCursor.Children[Index]));
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -2474,7 +2426,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FOwnTree.ClearNode(FCursor.Children[Index])
+ FOwnTree.ClearNode(TJclWideStrTreeNode(FCursor.Children[Index]))
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -2508,7 +2460,7 @@
{$ENDIF THREADSAFE}
Result := '';
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor := FCursor.Children[Index];
+ FCursor := TJclWideStrTreeNode(FCursor.Children[Index]);
if FCursor <> nil then
Result := FCursor.Value
else
@@ -2832,7 +2784,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor.Children[Index].Value := AString
+ TJclWideStrTreeNode(FCursor.Children[Index]).Value := AString
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -2889,7 +2841,7 @@
Exit;
LastRet := Result;
if Result.ChildrenCount > 0 then
- Result := Result.Children[0]
+ Result := TJclWideStrTreeNode(Result.Children[0])
else
begin
Result := Result.Parent;
@@ -2899,7 +2851,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclWideStrTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
end;
@@ -2919,7 +2871,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclWideStrTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
function TPreOrderWideStrItr.GetPreviousCursor: TJclWideStrTreeNode;
@@ -2934,9 +2886,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) > 0) then
// come from Right
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclWideStrTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
while (Result.ChildrenCount > 0) do // descend down the tree
- Result := Result.Children[Result.ChildrenCount - 1];
+ Result := TJclWideStrTreeNode(Result.Children[Result.ChildrenCount - 1]);
end;
end;
@@ -2970,9 +2922,9 @@
Result := Result.Parent;
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclWideStrTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclWideStrTreeNode(Result.Children[0]);
end;
end;
@@ -2988,9 +2940,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclWideStrTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclWideStrTreeNode(Result.Children[0]);
end;
end;
@@ -3002,7 +2954,7 @@
if Result = nil then
Exit;
if Result.ChildrenCount > 0 then
- Result := Result.Children[Result.ChildrenCount - 1]
+ Result := TJclWideStrTreeNode(Result.Children[Result.ChildrenCount - 1])
else
begin
LastRet := Result;
@@ -3013,7 +2965,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclWideStrTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
end;
end;
@@ -3182,7 +3134,7 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
- FOwnTree.ClearNode(FCursor.Children[Index]);
+ FOwnTree.ClearNode(TJclSingleTreeNode(FCursor.Children[Index]));
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -3200,7 +3152,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FOwnTree.ClearNode(FCursor.Children[Index])
+ FOwnTree.ClearNode(TJclSingleTreeNode(FCursor.Children[Index]))
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -3234,7 +3186,7 @@
{$ENDIF THREADSAFE}
Result := 0.0;
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor := FCursor.Children[Index];
+ FCursor := TJclSingleTreeNode(FCursor.Children[Index]);
if FCursor <> nil then
Result := FCursor.Value
else
@@ -3558,7 +3510,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor.Children[Index].Value := AValue
+ TJclSingleTreeNode(FCursor.Children[Index]).Value := AValue
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -3615,7 +3567,7 @@
Exit;
LastRet := Result;
if Result.ChildrenCount > 0 then
- Result := Result.Children[0]
+ Result := TJclSingleTreeNode(Result.Children[0])
else
begin
Result := Result.Parent;
@@ -3625,7 +3577,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclSingleTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
end;
@@ -3645,7 +3597,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclSingleTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
function TPreOrderSingleItr.GetPreviousCursor: TJclSingleTreeNode;
@@ -3660,9 +3612,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) > 0) then
// come from Right
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclSingleTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
while (Result.ChildrenCount > 0) do // descend down the tree
- Result := Result.Children[Result.ChildrenCount - 1];
+ Result := TJclSingleTreeNode(Result.Children[Result.ChildrenCount - 1]);
end;
end;
@@ -3696,9 +3648,9 @@
Result := Result.Parent;
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclSingleTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclSingleTreeNode(Result.Children[0]);
end;
end;
@@ -3714,9 +3666,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclSingleTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclSingleTreeNode(Result.Children[0]);
end;
end;
@@ -3728,7 +3680,7 @@
if Result = nil then
Exit;
if Result.ChildrenCount > 0 then
- Result := Result.Children[Result.ChildrenCount - 1]
+ Result := TJclSingleTreeNode(Result.Children[Result.ChildrenCount - 1])
else
begin
LastRet := Result;
@@ -3739,7 +3691,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclSingleTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
end;
end;
@@ -3908,7 +3860,7 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
- FOwnTree.ClearNode(FCursor.Children[Index]);
+ FOwnTree.ClearNode(TJclDoubleTreeNode(FCursor.Children[Index]));
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -3926,7 +3878,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FOwnTree.ClearNode(FCursor.Children[Index])
+ FOwnTree.ClearNode(TJclDoubleTreeNode(FCursor.Children[Index]))
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -3960,7 +3912,7 @@
{$ENDIF THREADSAFE}
Result := 0.0;
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor := FCursor.Children[Index];
+ FCursor := TJclDoubleTreeNode(FCursor.Children[Index]);
if FCursor <> nil then
Result := FCursor.Value
else
@@ -4284,7 +4236,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor.Children[Index].Value := AValue
+ TJclDoubleTreeNode(FCursor.Children[Index]).Value := AValue
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -4341,7 +4293,7 @@
Exit;
LastRet := Result;
if Result.ChildrenCount > 0 then
- Result := Result.Children[0]
+ Result := TJclDoubleTreeNode(Result.Children[0])
else
begin
Result := Result.Parent;
@@ -4351,7 +4303,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclDoubleTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
end;
@@ -4371,7 +4323,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclDoubleTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
function TPreOrderDoubleItr.GetPreviousCursor: TJclDoubleTreeNode;
@@ -4386,9 +4338,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) > 0) then
// come from Right
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclDoubleTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
while (Result.ChildrenCount > 0) do // descend down the tree
- Result := Result.Children[Result.ChildrenCount - 1];
+ Result := TJclDoubleTreeNode(Result.Children[Result.ChildrenCount - 1]);
end;
end;
@@ -4422,9 +4374,9 @@
Result := Result.Parent;
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclDoubleTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclDoubleTreeNode(Result.Children[0]);
end;
end;
@@ -4440,9 +4392,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclDoubleTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclDoubleTreeNode(Result.Children[0]);
end;
end;
@@ -4454,7 +4406,7 @@
if Result = nil then
Exit;
if Result.ChildrenCount > 0 then
- Result := Result.Children[Result.ChildrenCount - 1]
+ Result := TJclDoubleTreeNode(Result.Children[Result.ChildrenCount - 1])
else
begin
LastRet := Result;
@@ -4465,7 +4417,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclDoubleTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
end;
end;
@@ -4634,7 +4586,7 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
- FOwnTree.ClearNode(FCursor.Children[Index]);
+ FOwnTree.ClearNode(TJclExtendedTreeNode(FCursor.Children[Index]));
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -4652,7 +4604,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FOwnTree.ClearNode(FCursor.Children[Index])
+ FOwnTree.ClearNode(TJclExtendedTreeNode(FCursor.Children[Index]))
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -4686,7 +4638,7 @@
{$ENDIF THREADSAFE}
Result := 0.0;
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor := FCursor.Children[Index];
+ FCursor := TJclExtendedTreeNode(FCursor.Children[Index]);
if FCursor <> nil then
Result := FCursor.Value
else
@@ -5010,7 +4962,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor.Children[Index].Value := AValue
+ TJclExtendedTreeNode(FCursor.Children[Index]).Value := AValue
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -5067,7 +5019,7 @@
Exit;
LastRet := Result;
if Result.ChildrenCount > 0 then
- Result := Result.Children[0]
+ Result := TJclExtendedTreeNode(Result.Children[0])
else
begin
Result := Result.Parent;
@@ -5077,7 +5029,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclExtendedTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
end;
@@ -5097,7 +5049,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclExtendedTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
function TPreOrderExtendedItr.GetPreviousCursor: TJclExtendedTreeNode;
@@ -5112,9 +5064,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) > 0) then
// come from Right
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclExtendedTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
while (Result.ChildrenCount > 0) do // descend down the tree
- Result := Result.Children[Result.ChildrenCount - 1];
+ Result := TJclExtendedTreeNode(Result.Children[Result.ChildrenCount - 1]);
end;
end;
@@ -5148,9 +5100,9 @@
Result := Result.Parent;
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclExtendedTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclExtendedTreeNode(Result.Children[0]);
end;
end;
@@ -5166,9 +5118,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclExtendedTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclExtendedTreeNode(Result.Children[0]);
end;
end;
@@ -5180,7 +5132,7 @@
if Result = nil then
Exit;
if Result.ChildrenCount > 0 then
- Result := Result.Children[Result.ChildrenCount - 1]
+ Result := TJclExtendedTreeNode(Result.Children[Result.ChildrenCount - 1])
else
begin
LastRet := Result;
@@ -5191,7 +5143,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclExtendedTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
end;
end;
@@ -5360,7 +5312,7 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
- FOwnTree.ClearNode(FCursor.Children[Index]);
+ FOwnTree.ClearNode(TJclIntegerTreeNode(FCursor.Children[Index]));
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -5378,7 +5330,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FOwnTree.ClearNode(FCursor.Children[Index])
+ FOwnTree.ClearNode(TJclIntegerTreeNode(FCursor.Children[Index]))
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -5412,7 +5364,7 @@
{$ENDIF THREADSAFE}
Result := 0;
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor := FCursor.Children[Index];
+ FCursor := TJclIntegerTreeNode(FCursor.Children[Index]);
if FCursor <> nil then
Result := FCursor.Value
else
@@ -5736,7 +5688,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor.Children[Index].Value := AValue
+ TJclIntegerTreeNode(FCursor.Children[Index]).Value := AValue
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -5793,7 +5745,7 @@
Exit;
LastRet := Result;
if Result.ChildrenCount > 0 then
- Result := Result.Children[0]
+ Result := TJclIntegerTreeNode(Result.Children[0])
else
begin
Result := Result.Parent;
@@ -5803,7 +5755,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclIntegerTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
end;
@@ -5823,7 +5775,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclIntegerTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
function TPreOrderIntegerItr.GetPreviousCursor: TJclIntegerTreeNode;
@@ -5838,9 +5790,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) > 0) then
// come from Right
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclIntegerTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
while (Result.ChildrenCount > 0) do // descend down the tree
- Result := Result.Children[Result.ChildrenCount - 1];
+ Result := TJclIntegerTreeNode(Result.Children[Result.ChildrenCount - 1]);
end;
end;
@@ -5874,9 +5826,9 @@
Result := Result.Parent;
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclIntegerTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclIntegerTreeNode(Result.Children[0]);
end;
end;
@@ -5892,9 +5844,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclIntegerTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclIntegerTreeNode(Result.Children[0]);
end;
end;
@@ -5906,7 +5858,7 @@
if Result = nil then
Exit;
if Result.ChildrenCount > 0 then
- Result := Result.Children[Result.ChildrenCount - 1]
+ Result := TJclIntegerTreeNode(Result.Children[Result.ChildrenCount - 1])
else
begin
LastRet := Result;
@@ -5917,7 +5869,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclIntegerTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
end;
end;
@@ -6086,7 +6038,7 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
- FOwnTree.ClearNode(FCursor.Children[Index]);
+ FOwnTree.ClearNode(TJclCardinalTreeNode(FCursor.Children[Index]));
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -6104,7 +6056,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FOwnTree.ClearNode(FCursor.Children[Index])
+ FOwnTree.ClearNode(TJclCardinalTreeNode(FCursor.Children[Index]))
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -6138,7 +6090,7 @@
{$ENDIF THREADSAFE}
Result := 0;
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor := FCursor.Children[Index];
+ FCursor := TJclCardinalTreeNode(FCursor.Children[Index]);
if FCursor <> nil then
Result := FCursor.Value
else
@@ -6462,7 +6414,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor.Children[Index].Value := AValue
+ TJclCardinalTreeNode(FCursor.Children[Index]).Value := AValue
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -6519,7 +6471,7 @@
Exit;
LastRet := Result;
if Result.ChildrenCount > 0 then
- Result := Result.Children[0]
+ Result := TJclCardinalTreeNode(Result.Children[0])
else
begin
Result := Result.Parent;
@@ -6529,7 +6481,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclCardinalTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
end;
@@ -6549,7 +6501,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclCardinalTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
function TPreOrderCardinalItr.GetPreviousCursor: TJclCardinalTreeNode;
@@ -6564,9 +6516,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) > 0) then
// come from Right
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclCardinalTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
while (Result.ChildrenCount > 0) do // descend down the tree
- Result := Result.Children[Result.ChildrenCount - 1];
+ Result := TJclCardinalTreeNode(Result.Children[Result.ChildrenCount - 1]);
end;
end;
@@ -6600,9 +6552,9 @@
Result := Result.Parent;
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclCardinalTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclCardinalTreeNode(Result.Children[0]);
end;
end;
@@ -6618,9 +6570,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclCardinalTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclCardinalTreeNode(Result.Children[0]);
end;
end;
@@ -6632,7 +6584,7 @@
if Result = nil then
Exit;
if Result.ChildrenCount > 0 then
- Result := Result.Children[Result.ChildrenCount - 1]
+ Result := TJclCardinalTreeNode(Result.Children[Result.ChildrenCount - 1])
else
begin
LastRet := Result;
@@ -6643,7 +6595,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclCardinalTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
end;
end;
@@ -6812,7 +6764,7 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
- FOwnTree.ClearNode(FCursor.Children[Index]);
+ FOwnTree.ClearNode(TJclInt64TreeNode(FCursor.Children[Index]));
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -6830,7 +6782,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FOwnTree.ClearNode(FCursor.Children[Index])
+ FOwnTree.ClearNode(TJclInt64TreeNode(FCursor.Children[Index]))
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -6864,7 +6816,7 @@
{$ENDIF THREADSAFE}
Result := 0;
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor := FCursor.Children[Index];
+ FCursor := TJclInt64TreeNode(FCursor.Children[Index]);
if FCursor <> nil then
Result := FCursor.Value
else
@@ -7188,7 +7140,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor.Children[Index].Value := AValue
+ TJclInt64TreeNode(FCursor.Children[Index]).Value := AValue
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -7245,7 +7197,7 @@
Exit;
LastRet := Result;
if Result.ChildrenCount > 0 then
- Result := Result.Children[0]
+ Result := TJclInt64TreeNode(Result.Children[0])
else
begin
Result := Result.Parent;
@@ -7255,7 +7207,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclInt64TreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
end;
@@ -7275,7 +7227,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclInt64TreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
function TPreOrderInt64Itr.GetPreviousCursor: TJclInt64TreeNode;
@@ -7290,9 +7242,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) > 0) then
// come from Right
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclInt64TreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
while (Result.ChildrenCount > 0) do // descend down the tree
- Result := Result.Children[Result.ChildrenCount - 1];
+ Result := TJclInt64TreeNode(Result.Children[Result.ChildrenCount - 1]);
end;
end;
@@ -7326,9 +7278,9 @@
Result := Result.Parent;
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclInt64TreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclInt64TreeNode(Result.Children[0]);
end;
end;
@@ -7344,9 +7296,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclInt64TreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclInt64TreeNode(Result.Children[0]);
end;
end;
@@ -7358,7 +7310,7 @@
if Result = nil then
Exit;
if Result.ChildrenCount > 0 then
- Result := Result.Children[Result.ChildrenCount - 1]
+ Result := TJclInt64TreeNode(Result.Children[Result.ChildrenCount - 1])
else
begin
LastRet := Result;
@@ -7369,7 +7321,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclInt64TreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
end;
end;
{$IFNDEF CLR}
@@ -7539,7 +7491,7 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
- FOwnTree.ClearNode(FCursor.Children[Index]);
+ FOwnTree.ClearNode(TJclPtrTreeNode(FCursor.Children[Index]));
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -7557,7 +7509,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FOwnTree.ClearNode(FCursor.Children[Index])
+ FOwnTree.ClearNode(TJclPtrTreeNode(FCursor.Children[Index]))
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -7591,7 +7543,7 @@
{$ENDIF THREADSAFE}
Result := nil;
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor := FCursor.Children[Index];
+ FCursor := TJclPtrTreeNode(FCursor.Children[Index]);
if FCursor <> nil then
Result := FCursor.Value
else
@@ -7915,7 +7867,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor.Children[Index].Value := APtr
+ TJclPtrTreeNode(FCursor.Children[Index]).Value := APtr
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -7972,7 +7924,7 @@
Exit;
LastRet := Result;
if Result.ChildrenCount > 0 then
- Result := Result.Children[0]
+ Result := TJclPtrTreeNode(Result.Children[0])
else
begin
Result := Result.Parent;
@@ -7982,7 +7934,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclPtrTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
end;
@@ -8002,7 +7954,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclPtrTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
function TPreOrderPtrItr.GetPreviousCursor: TJclPtrTreeNode;
@@ -8017,9 +7969,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) > 0) then
// come from Right
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclPtrTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
while (Result.ChildrenCount > 0) do // descend down the tree
- Result := Result.Children[Result.ChildrenCount - 1];
+ Result := TJclPtrTreeNode(Result.Children[Result.ChildrenCount - 1]);
end;
end;
@@ -8053,9 +8005,9 @@
Result := Result.Parent;
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclPtrTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclPtrTreeNode(Result.Children[0]);
end;
end;
@@ -8071,9 +8023,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclPtrTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclPtrTreeNode(Result.Children[0]);
end;
end;
@@ -8085,7 +8037,7 @@
if Result = nil then
Exit;
if Result.ChildrenCount > 0 then
- Result := Result.Children[Result.ChildrenCount - 1]
+ Result := TJclPtrTreeNode(Result.Children[Result.ChildrenCount - 1])
else
begin
LastRet := Result;
@@ -8096,7 +8048,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclPtrTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
end;
end;
{$ENDIF ~CLR}
@@ -8266,7 +8218,7 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
- FOwnTree.ClearNode(FCursor.Children[Index]);
+ FOwnTree.ClearNode(TJclTreeNode(FCursor.Children[Index]));
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -8284,7 +8236,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FOwnTree.ClearNode(FCursor.Children[Index])
+ FOwnTree.ClearNode(TJclTreeNode(FCursor.Children[Index]))
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -8318,7 +8270,7 @@
{$ENDIF THREADSAFE}
Result := nil;
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor := FCursor.Children[Index];
+ FCursor := TJclTreeNode(FCursor.Children[Index]);
if FCursor <> nil then
Result := FCursor.Value
else
@@ -8642,7 +8594,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor.Children[Index].Value := AObject
+ TJclTreeNode(FCursor.Children[Index]).Value := AObject
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -8699,7 +8651,7 @@
Exit;
LastRet := Result;
if Result.ChildrenCount > 0 then
- Result := Result.Children[0]
+ Result := TJclTreeNode(Result.Children[0])
else
begin
Result := Result.Parent;
@@ -8709,7 +8661,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
end;
@@ -8729,7 +8681,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
function TPreOrderItr.GetPreviousCursor: TJclTreeNode;
@@ -8744,9 +8696,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) > 0) then
// come from Right
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
while (Result.ChildrenCount > 0) do // descend down the tree
- Result := Result.Children[Result.ChildrenCount - 1];
+ Result := TJclTreeNode(Result.Children[Result.ChildrenCount - 1]);
end;
end;
@@ -8780,9 +8732,9 @@
Result := Result.Parent;
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclTreeNode(Result.Children[0]);
end;
end;
@@ -8798,9 +8750,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclTreeNode(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclTreeNode(Result.Children[0]);
end;
end;
@@ -8812,7 +8764,7 @@
if Result = nil then
Exit;
if Result.ChildrenCount > 0 then
- Result := Result.Children[Result.ChildrenCount - 1]
+ Result := TJclTreeNode(Result.Children[Result.ChildrenCount - 1])
else
begin
LastRet := Result;
@@ -8823,7 +8775,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclTreeNode(Result.Children[Result.IndexOfChild(LastRet) - 1]);
end;
end;
{$IFDEF SUPPORTS_GENERICS}
@@ -8993,7 +8945,7 @@
if FCursor <> nil then
begin
for Index := FCursor.ChildrenCount - 1 downto 0 do
- FOwnTree.ClearNode(FCursor.Children[Index]);
+ FOwnTree.ClearNode(TJclTreeNode<T>(FCursor.Children[Index]));
SetLength(FCursor.Children, 0);
FCursor.ChildrenCount := 0;
end;
@@ -9011,7 +8963,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FOwnTree.ClearNode(FCursor.Children[Index])
+ FOwnTree.ClearNode(TJclTreeNode<T>(FCursor.Children[Index]))
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -9045,7 +8997,7 @@
{$ENDIF THREADSAFE}
Result := Default(T);
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor := FCursor.Children[Index];
+ FCursor := TJclTreeNode<T>(FCursor.Children[Index]);
if FCursor <> nil then
Result := FCursor.Value
else
@@ -9369,7 +9321,7 @@
try
{$ENDIF THREADSAFE}
if (FCursor <> nil) and (Index >= 0) and (Index < FCursor.ChildrenCount) then
- FCursor.Children[Index].Value := AItem
+ TJclTreeNode<T>(FCursor.Children[Index]).Value := AItem
else
raise EJclOutOfBoundsError.Create;
{$IFDEF THREADSAFE}
@@ -9426,7 +9378,7 @@
Exit;
LastRet := Result;
if Result.ChildrenCount > 0 then
- Result := Result.Children[0]
+ Result := TJclTreeNode<T>(Result.Children[0])
else
begin
Result := Result.Parent;
@@ -9436,7 +9388,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclTreeNode<T>(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
end;
@@ -9456,7 +9408,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root = return successor
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclTreeNode<T>(Result.Children[Result.IndexOfChild(LastRet) + 1]);
end;
function TPreOrderItr<T>.GetPreviousCursor: TJclTreeNode<T>;
@@ -9471,9 +9423,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) > 0) then
// come from Right
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclTreeNode<T>(Result.Children[Result.IndexOfChild(LastRet) - 1]);
while (Result.ChildrenCount > 0) do // descend down the tree
- Result := Result.Children[Result.ChildrenCount - 1];
+ Result := TJclTreeNode<T>(Result.Children[Result.ChildrenCount - 1]);
end;
end;
@@ -9507,9 +9459,9 @@
Result := Result.Parent;
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclTreeNode<T>(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclTreeNode<T>(Result.Children[0]);
end;
end;
@@ -9525,9 +9477,9 @@
if (Result <> nil) and (Result.IndexOfChild(LastRet) <> (Result.ChildrenCount - 1)) then
begin
- Result := Result.Children[Result.IndexOfChild(LastRet) + 1];
+ Result := TJclTreeNode<T>(Result.Children[Result.IndexOfChild(LastRet) + 1]);
while Result.ChildrenCount > 0 do
- Result := Result.Children[0];
+ Result := TJclTreeNode<T>(Result.Children[0]);
end;
end;
@@ -9539,7 +9491,7 @@
if Result = nil then
Exit;
if Result.ChildrenCount > 0 then
- Result := Result.Children[Result.ChildrenCount - 1]
+ Result := TJclTreeNode<T>(Result.Children[Result.ChildrenCount - 1])
else
begin
LastRet := Result;
@@ -9550,7 +9502,7 @@
Result := Result.Parent;
end;
if Result <> nil then // not root
- Result := Result.Children[Result.IndexOfChild(LastRet) - 1];
+ Result := TJclTreeNode<T>(Result.Children[Result.IndexOfChild(LastRet) - 1]);
end;
end;
{$ENDIF SUPPORTS_GENERICS}
@@ -9570,7 +9522,7 @@
const AEqualityComparer: IJclIntfEqualityComparer): Integer;
begin
for Result := 0 to ChildrenCount - 1 do
- if AEqualityComparer.ItemsEqual(Children[Result].Value, AInterface) then
+ if AEqualityComparer.ItemsEqual(TJclIntfTreeNode(Children[Result]).Value, AInterface) then
Exit;
Result := -1;
end;
@@ -9668,7 +9620,7 @@
SetLength(Result.Children, Node.ChildrenCount);
Result.ChildrenCount := Node.ChildrenCount;
for Index := 0 to Node.ChildrenCount - 1 do
- Result.Children[Index] := CloneNode(Node.Children[Index], Result); // recursive call
+ Result.Children[Index] := CloneNode(TJclIntfTreeNode(Node.Children[Index]), Result); // recursive call
end;
var
ADest: TJclIntfTree;
@@ -9720,7 +9672,7 @@
Parent: TJclIntfTreeNode;
begin
for Index := ANode.ChildrenCount - 1 downto 0 do
- ClearNode(ANode.Children[Index]);
+ ClearNode(TJclIntfTreeNode(ANode.Children[Index]));
FreeObject(ANode.Value);
Parent := ANode.Parent;
if Parent <> nil then
@@ -9751,7 +9703,7 @@
if not Result then
for Index := 0 to ANode.ChildrenCount - 1 do
begin
- Result := NodeContains(ANode.Children[Index], AInterface);
+ Result := NodeContains(TJclIntfTreeNode(ANode.Children[Index]), AInterface);
if Result then
Break;
end;
@@ -9844,7 +9796,7 @@
begin
if Start <> nil then
while (Start.ChildrenCount > 0) do
- Start := Start.Children[0];
+ Start := TJclIntfTreeNode(Start.Children[0]);
Result := TPostOrderIntfItr.Create(Self, Start, False);
end;
else
@@ -9909,7 +9861,7 @@
begin
if Start <> nil then
while Start.ChildrenCount > 0 do
- Start := Start.Children[Start.ChildrenCount - 1];
+ Start := TJclIntfTreeNode(Start.Children[Start.ChildrenCount - 1]);
Result := TPreOrderIntfItr.Create(Self, Start, False);
end;
toPostOrder:
@@ -9931,7 +9883,7 @@
begin
SetLength(ANode.Children, ANode.ChildrenCount);
for Index := 0 to ANode.ChildrenCount - 1 do
- PackNode(ANode.Children[Index]);
+ PackNode(TJclIntfTreeNode(ANode.Children[Index]));
end;
begin
{$IFDEF THREADSAFE}
@@ -10049,7 +10001,7 @@
const AEqualityComparer: IJclAnsiStrEqualityComparer): Integer;
begin
for Result := 0 to ChildrenCount - 1 do
- if AEqualityComparer.ItemsEqual(Children[Result].Value, AString) then
+ if AEqualityComparer.ItemsEqual(TJclAnsiStrTreeNode(Children[Result]).Value, AString) then
Exit;
Result := -1;
end;
@@ -10147,7 +10099,7 @@
SetLength(Result.Children, Node.ChildrenCount);
Result.ChildrenCount := Node.ChildrenCount;
for Index := 0 to Node.ChildrenCount - 1 do
- Result.Children[Index] := CloneNode(Node.Children[Index], Result); // recursive call
+ Result.Children[Index] := CloneNode(TJclAnsiStrTreeNode(Node.Children[Index]), Result); // recursive call
end;
var
ADest: TJclAnsiStrTree;
@@ -10199,7 +10151,7 @@
Parent: TJclAnsiStrTreeNode;
begin
for Index := ANode.ChildrenCount - 1 downto 0 do
- ClearNode(ANode.Children[Index]);
+ ClearNode(TJclAnsiStrTreeNode(ANode.Children[Index]));
FreeString(ANode.Value);
Parent := ANode.Parent;
if Parent <> nil then
@@ -10230,7 +10182,7 @@
if not Result then
for Index := 0 to ANode.ChildrenCount - 1 do
begin
- Result := NodeContains(ANode.Children[Index], AString);
+ Result := NodeContains(TJclAnsiStrTreeNode(ANode.Children[Index]), AString);
if Result then
Break;
end;
@@ -10323,7 +10275,7 @@
begin
if Start <> nil then
while (Start.ChildrenCount > 0) do
- Start := Start.Children[0];
+ Start := TJclAnsiStrTreeNode(Start.Children[0]);
Result := TPostOrderAnsiStrItr.Create(Self, Start, False);
end;
else
@@ -10388,7 +10340,7 @@
begin
if Start <> nil then
while Start.ChildrenCount > 0 do
- Start := Start.Children[Start.ChildrenCount - 1];
+ Start := TJclAnsiStrTreeNode(Start.Children[Start.ChildrenCount - 1]);
Result := TPreOrderAnsiStrItr.Create(Self, Start, False);
end;
toPostOrder:
@@ -10410,7 +10362,7 @@
begin
SetLength(ANode.Children, ANode.ChildrenCount);
for Index := 0 to ANode.ChildrenCount - 1 do
- PackNode(ANode.Children[Index]);
+ PackNode(TJclAnsiStrTreeNode(ANode.Children[Index]));
end;
begin
{$IFDEF THREADSAFE}
@@ -10528,7 +10480,7 @@
const AEqualityComparer: IJclWideStrEqualityComparer): Integer;
begin
for Result := 0 to ChildrenCount - 1 do
- if AEqualityComparer.ItemsEqual(Children[Result].Value, AString) then
+ if AEqualityComparer.ItemsEqual(TJclWideStrTreeNode(Children[Result]).Value, AString) then
Exit;
Result := -1;
end;
@@ -10626,7 +10578,7 @@
SetLength(Result.Children, Node.ChildrenCount);
Result.ChildrenCount := Node.ChildrenCount;
for Index := 0 to Node.ChildrenCount - 1 do
- Result.Children[Index] := CloneNode(Node.Children[Index], Result); // recursive call
+ Result.Children[Index] := CloneNode(TJclWideStrTreeNode(Node.Children[Index]), Result); // recursive call
end;
var
ADest: TJclWideStrTree;
@@ -10678,7 +10630,7 @@
Parent: TJclWideStrTreeNode;
begin
for Index := ANode.ChildrenCount - 1 downto 0 do
- ClearNode(ANode.Children[Index]);
+ ClearNode(TJclWideStrTreeNode(ANode.Children[Index]));
FreeString(ANode.Value);
Parent := ANode.Parent;
if Parent <> nil then
@@ -10709,7 +10661,7 @@
if not Result then
for Index := 0 to ANode.ChildrenCount - 1 do
begin
- Result := NodeContains(ANode.Children[Index], AString);
+ Result := NodeContains(TJclWideStrTreeNode(ANode.Children[Index]), AString);
if Result then
Break;
end;
@@ -10802,7 +10754,7 @@
begin
if Start <> nil then
while (Start.ChildrenCount > 0) do
- Start := Start.Children[0];
+ Start := TJclWideStrTreeNode(Start.Children[0]);
Result := TPostOrderWideStrItr.Create(Self, Start, False);
...
[truncated message content] |
|
From: <ou...@us...> - 2007-11-30 22:15:09
|
Revision: 2251
http://jcl.svn.sourceforge.net/jcl/?rev=2251&view=rev
Author: outchy
Date: 2007-11-30 14:15:07 -0800 (Fri, 30 Nov 2007)
Log Message:
-----------
C++Builder 2007 fails to compile default indexed properties.
Modified Paths:
--------------
trunk/jcl/source/common/JclContainerIntf.pas
Modified: trunk/jcl/source/common/JclContainerIntf.pas
===================================================================
--- trunk/jcl/source/common/JclContainerIntf.pas 2007-11-30 22:00:24 UTC (rev 2250)
+++ trunk/jcl/source/common/JclContainerIntf.pas 2007-11-30 22:15:07 UTC (rev 2251)
@@ -52,6 +52,9 @@
{$IFDEF BCB10}
{$DEFINE BUGGY_DEFAULT_INDEXED_PROP}
{$ENDIF BCB10}
+{$IFDEF BCB11}
+{$DEFINE BUGGY_DEFAULT_INDEXED_PROP}
+{$ENDIF BCB11}
const
DefaultContainerCapacity = 16;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2007-11-30 22:00:29
|
Revision: 2250
http://jcl.svn.sourceforge.net/jcl/?rev=2250&view=rev
Author: outchy
Date: 2007-11-30 14:00:24 -0800 (Fri, 30 Nov 2007)
Log Message:
-----------
Fix for a bug in the C++Builder compiler: indexed properties cannot be compiled if index type is not Integer and if property type is different than index type.
Modified Paths:
--------------
trunk/jcl/source/common/JclContainerIntf.pas
Modified: trunk/jcl/source/common/JclContainerIntf.pas
===================================================================
--- trunk/jcl/source/common/JclContainerIntf.pas 2007-11-30 21:57:36 UTC (rev 2249)
+++ trunk/jcl/source/common/JclContainerIntf.pas 2007-11-30 22:00:24 UTC (rev 2250)
@@ -46,6 +46,13 @@
Classes,
JclBase;
+{$IFDEF BCB6}
+{$DEFINE BUGGY_DEFAULT_INDEXED_PROP}
+{$ENDIF BCB6}
+{$IFDEF BCB10}
+{$DEFINE BUGGY_DEFAULT_INDEXED_PROP}
+{$ENDIF BCB10}
+
const
DefaultContainerCapacity = 16;
@@ -2055,7 +2062,8 @@
function Remove(const Key: AnsiString): IInterface;
function Size: Integer;
function Values: IJclIntfCollection;
- property Items[const Key: AnsiString]: IInterface read GetValue write PutValue; default;
+ property Items[const Key: AnsiString]: IInterface read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclWideStrIntfMap = interface(IJclWideStrContainer)
@@ -2073,7 +2081,8 @@
function Remove(const Key: WideString): IInterface;
function Size: Integer;
function Values: IJclIntfCollection;
- property Items[const Key: WideString]: IInterface read GetValue write PutValue; default;
+ property Items[const Key: WideString]: IInterface read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
{$IFDEF CONTAINER_ANSISTR}
@@ -2098,7 +2107,8 @@
function Remove(const Key: IInterface): AnsiString;
function Size: Integer;
function Values: IJclAnsiStrCollection;
- property Items[const Key: IInterface]: AnsiString read GetValue write PutValue; default;
+ property Items[const Key: IInterface]: AnsiString read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclIntfWideStrMap = interface(IJclWideStrContainer)
@@ -2116,7 +2126,8 @@
function Remove(const Key: IInterface): WideString;
function Size: Integer;
function Values: IJclWideStrCollection;
- property Items[const Key: IInterface]: WideString read GetValue write PutValue; default;
+ property Items[const Key: IInterface]: WideString read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
{$IFDEF CONTAINER_ANSISTR}
@@ -2188,7 +2199,8 @@
function Remove(const Key: Single): IInterface;
function Size: Integer;
function Values: IJclIntfCollection;
- property Items[const Key: Single]: IInterface read GetValue write PutValue; default;
+ property Items[const Key: Single]: IInterface read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclIntfSingleMap = interface(IJclSingleContainer)
@@ -2206,7 +2218,8 @@
function Remove(const Key: IInterface): Single;
function Size: Integer;
function Values: IJclSingleCollection;
- property Items[const Key: IInterface]: Single read GetValue write PutValue; default;
+ property Items[const Key: IInterface]: Single read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclSingleSingleMap = interface(IJclSingleContainer)
@@ -2242,7 +2255,8 @@
function Remove(const Key: Double): IInterface;
function Size: Integer;
function Values: IJclIntfCollection;
- property Items[const Key: Double]: IInterface read GetValue write PutValue; default;
+ property Items[const Key: Double]: IInterface read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclIntfDoubleMap = interface(IJclDoubleContainer)
@@ -2260,7 +2274,8 @@
function Remove(const Key: IInterface): Double;
function Size: Integer;
function Values: IJclDoubleCollection;
- property Items[const Key: IInterface]: Double read GetValue write PutValue; default;
+ property Items[const Key: IInterface]: Double read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclDoubleDoubleMap = interface(IJclDoubleContainer)
@@ -2296,7 +2311,8 @@
function Remove(const Key: Extended): IInterface;
function Size: Integer;
function Values: IJclIntfCollection;
- property Items[const Key: Extended]: IInterface read GetValue write PutValue; default;
+ property Items[const Key: Extended]: IInterface read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclIntfExtendedMap = interface(IJclExtendedContainer)
@@ -2314,7 +2330,8 @@
function Remove(const Key: IInterface): Extended;
function Size: Integer;
function Values: IJclExtendedCollection;
- property Items[const Key: IInterface]: Extended read GetValue write PutValue; default;
+ property Items[const Key: IInterface]: Extended read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclExtendedExtendedMap = interface(IJclExtendedContainer)
@@ -2366,7 +2383,8 @@
function Remove(Key: Integer): IInterface;
function Size: Integer;
function Values: IJclIntfCollection;
- property Items[Key: Integer]: IInterface read GetValue write PutValue; default;
+ property Items[Key: Integer]: IInterface read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclIntfIntegerMap = interface(IJclContainer)
@@ -2384,7 +2402,8 @@
function Remove(const Key: IInterface): Integer;
function Size: Integer;
function Values: IJclIntegerCollection;
- property Items[const Key: IInterface]: Integer read GetValue write PutValue; default;
+ property Items[const Key: IInterface]: Integer read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclIntegerIntegerMap = interface(IJclContainer)
@@ -2420,7 +2439,8 @@
function Remove(Key: Cardinal): IInterface;
function Size: Integer;
function Values: IJclIntfCollection;
- property Items[Key: Cardinal]: IInterface read GetValue write PutValue; default;
+ property Items[Key: Cardinal]: IInterface read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclIntfCardinalMap = interface(IJclContainer)
@@ -2438,7 +2458,8 @@
function Remove(const Key: IInterface): Cardinal;
function Size: Integer;
function Values: IJclCardinalCollection;
- property Items[const Key: IInterface]: Cardinal read GetValue write PutValue; default;
+ property Items[const Key: IInterface]: Cardinal read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclCardinalCardinalMap = interface(IJclContainer)
@@ -2474,7 +2495,8 @@
function Remove(const Key: Int64): IInterface;
function Size: Integer;
function Values: IJclIntfCollection;
- property Items[const Key: Int64]: IInterface read GetValue write PutValue; default;
+ property Items[const Key: Int64]: IInterface read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclIntfInt64Map = interface(IJclContainer)
@@ -2492,7 +2514,8 @@
function Remove(const Key: IInterface): Int64;
function Size: Integer;
function Values: IJclInt64Collection;
- property Items[const Key: IInterface]: Int64 read GetValue write PutValue; default;
+ property Items[const Key: IInterface]: Int64 read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclInt64Int64Map = interface(IJclContainer)
@@ -2529,7 +2552,8 @@
function Remove(Key: Pointer): IInterface;
function Size: Integer;
function Values: IJclIntfCollection;
- property Items[Key: Pointer]: IInterface read GetValue write PutValue; default;
+ property Items[Key: Pointer]: IInterface read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclIntfPtrMap = interface(IJclContainer)
@@ -2547,7 +2571,8 @@
function Remove(const Key: IInterface): Pointer;
function Size: Integer;
function Values: IJclPtrCollection;
- property Items[const Key: IInterface]: Pointer read GetValue write PutValue; default;
+ property Items[const Key: IInterface]: Pointer read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclPtrPtrMap = interface(IJclContainer)
@@ -2585,7 +2610,8 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[const Key: IInterface]: TObject read GetValue write PutValue; default;
+ property Items[const Key: IInterface]: TObject read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclAnsiStrMap = interface(IJclAnsiStrContainer)
@@ -2604,7 +2630,8 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[const Key: AnsiString]: TObject read GetValue write PutValue; default;
+ property Items[const Key: AnsiString]: TObject read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclWideStrMap = interface(IJclWideStrContainer)
@@ -2623,7 +2650,8 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[const Key: WideString]: TObject read GetValue write PutValue; default;
+ property Items[const Key: WideString]: TObject read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
{$IFDEF CONTAINER_ANSISTR}
@@ -2649,7 +2677,8 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[const Key: Single]: TObject read GetValue write PutValue; default;
+ property Items[const Key: Single]: TObject read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclDoubleMap = interface(IJclDoubleContainer)
@@ -2668,7 +2697,8 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[const Key: Double]: TObject read GetValue write PutValue; default;
+ property Items[const Key: Double]: TObject read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclExtendedMap = interface(IJclExtendedContainer)
@@ -2687,7 +2717,8 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[const Key: Extended]: TObject read GetValue write PutValue; default;
+ property Items[const Key: Extended]: TObject read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
{$IFDEF MATH_EXTENDED_PRECISION}
@@ -2716,7 +2747,8 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[Key: Integer]: TObject read GetValue write PutValue; default;
+ property Items[Key: Integer]: TObject read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclCardinalMap = interface(IJclContainer)
@@ -2735,7 +2767,8 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[Key: Cardinal]: TObject read GetValue write PutValue; default;
+ property Items[Key: Cardinal]: TObject read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
IJclInt64Map = interface(IJclContainer)
@@ -2754,7 +2787,8 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[const Key: Int64]: TObject read GetValue write PutValue; default;
+ property Items[const Key: Int64]: TObject read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
{$IFNDEF CLR}
@@ -2774,7 +2808,8 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[Key: Pointer]: TObject read GetValue write PutValue; default;
+ property Items[Key: Pointer]: TObject read GetValue write PutValue;
+ {$IFNDEF BUGGY_DEFAULT_INDEXED_PROP} default; {$ENDIF ~BUGGY_DEFAULT_INDEXED_PROP}
end;
{$ENDIF ~CLR}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2007-11-30 21:57:38
|
Revision: 2249
http://jcl.svn.sourceforge.net/jcl/?rev=2249&view=rev
Author: outchy
Date: 2007-11-30 13:57:36 -0800 (Fri, 30 Nov 2007)
Log Message:
-----------
added missing comment for BCB11 and BCB11_UP defines.
Modified Paths:
--------------
trunk/jcl/source/jedi.inc
Modified: trunk/jcl/source/jedi.inc
===================================================================
--- trunk/jcl/source/jedi.inc 2007-11-30 20:58:17 UTC (rev 2248)
+++ trunk/jcl/source/jedi.inc 2007-11-30 21:57:36 UTC (rev 2249)
@@ -199,13 +199,15 @@
BCB4 Defined when compiling with C++ Builder 4
BCB5 Defined when compiling with C++ Builder 5
BCB6 Defined when compiling with C++ Builder 6
- BCB10 Defined when compiling with C++ Builder Personality of BDS 4.0
+ BCB10 Defined when compiling with C++ Builder Personality of BDS 4.0 (also known as C++Builder 2006)
+ BCB11 Defined when compiling with C++ Builder Personality of RAD Studio 2007 (also known as C++Builder 2007)
BCB1_UP Defined when compiling with C++ Builder 1 or higher
BCB3_UP Defined when compiling with C++ Builder 3 or higher
BCB4_UP Defined when compiling with C++ Builder 4 or higher
BCB5_UP Defined when compiling with C++ Builder 5 or higher
BCB6_UP Defined when compiling with C++ Builder 6 or higher
BCB10_UP Defined when compiling with C++ Builder Personality of BDS 4.0 or higher
+ BCB11_UP Defined when compiling with C++ Builder Personality of RAD Studio 2007 or higher
- Borland Developer Studio Versions
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2007-11-30 20:58:25
|
Revision: 2248
http://jcl.svn.sourceforge.net/jcl/?rev=2248&view=rev
Author: outchy
Date: 2007-11-30 12:58:17 -0800 (Fri, 30 Nov 2007)
Log Message:
-----------
Added new units
Modified Paths:
--------------
trunk/jcl/install/HeaderTest/jcl_a2z.cpp
trunk/jcl/install/HeaderTest/jcl_z2a.cpp
Modified: trunk/jcl/install/HeaderTest/jcl_a2z.cpp
===================================================================
--- trunk/jcl/install/HeaderTest/jcl_a2z.cpp 2007-11-30 20:33:13 UTC (rev 2247)
+++ trunk/jcl/install/HeaderTest/jcl_a2z.cpp 2007-11-30 20:58:17 UTC (rev 2248)
@@ -201,6 +201,9 @@
#include <JclSimpleXml.hpp>
#endif TEST_COMMON
#ifdef TEST_COMMON
+#include <JclSortedMaps.hpp>
+#endif TEST_COMMON
+#ifdef TEST_COMMON
#include <JclStacks.hpp>
#endif TEST_COMMON
#ifdef TEST_COMMON
@@ -239,6 +242,9 @@
#ifdef TEST_WINDOWS
#include <JclTD32.hpp>
#endif TEST_WINDOWS
+#ifdef TEST_COMMON
+#include <JclTrees.hpp>
+#endif TEST_COMMON
#ifdef TEST_WINDOWS
#include <JclUnicode.hpp>
#endif TEST_WINDOWS
Modified: trunk/jcl/install/HeaderTest/jcl_z2a.cpp
===================================================================
--- trunk/jcl/install/HeaderTest/jcl_z2a.cpp 2007-11-30 20:33:13 UTC (rev 2247)
+++ trunk/jcl/install/HeaderTest/jcl_z2a.cpp 2007-11-30 20:58:17 UTC (rev 2248)
@@ -59,6 +59,9 @@
#ifdef TEST_WINDOWS
#include <JclUnicode.hpp>
#endif TEST_WINDOWS
+#ifdef TEST_COMMON
+#include <JclTrees.hpp>
+#endif TEST_COMMON
#ifdef TEST_WINDOWS
#include <JclTD32.hpp>
#endif TEST_WINDOWS
@@ -99,6 +102,9 @@
#include <JclStacks.hpp>
#endif TEST_COMMON
#ifdef TEST_COMMON
+#include <JclSortedMaps.hpp>
+#endif TEST_COMMON
+#ifdef TEST_COMMON
#include <JclSimpleXml.hpp>
#endif TEST_COMMON
#ifdef TEST_WINDOWS
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2007-11-30 20:33:15
|
Revision: 2247
http://jcl.svn.sourceforge.net/jcl/?rev=2247&view=rev
Author: outchy
Date: 2007-11-30 12:33:13 -0800 (Fri, 30 Nov 2007)
Log Message:
-----------
fixed C++ Header failure (duplicate constructor(int) )
removing other IFDEF CLR in EJclEDIError constructions
Modified Paths:
--------------
trunk/jcl/source/common/JclEDI.pas
trunk/jcl/source/common/JclEDISEF.pas
trunk/jcl/source/common/JclEDI_ANSIX12.pas
trunk/jcl/source/common/JclEDI_ANSIX12_Ext.pas
Modified: trunk/jcl/source/common/JclEDI.pas
===================================================================
--- trunk/jcl/source/common/JclEDI.pas 2007-11-30 19:33:03 UTC (rev 2246)
+++ trunk/jcl/source/common/JclEDI.pas 2007-11-30 20:33:13 UTC (rev 2247)
@@ -91,8 +91,8 @@
EJclEDIError = class(EJclError)
public
- constructor CreateID(ID: Integer);
- constructor CreateIDFmt(ID: Integer; const Args: array of const);
+ constructor CreateID(ID: Cardinal);
+ constructor CreateIDFmt(ID: Cardinal; const Args: array of const);
end;
// EDI Forward Class Declarations
@@ -537,7 +537,7 @@
//=== { EJclEDIError } =======================================================
-constructor EJclEDIError.CreateID(ID: Integer);
+constructor EJclEDIError.CreateID(ID: Cardinal);
begin
{$IFDEF CLR}
Create(RsEDIErrors[ID]);
@@ -546,7 +546,7 @@
{$ENDIF ~CLR}
end;
-constructor EJclEDIError.CreateIDFmt(ID: Integer; const Args: array of const);
+constructor EJclEDIError.CreateIDFmt(ID: Cardinal; const Args: array of const);
begin
{$IFDEF CLR}
Create(Format(RsEDIErrors[ID], Args));
@@ -700,11 +700,7 @@
if IndexIsValid(Index) then
FEDIDataObjects.Delete(Index)
else
- {$IFNDEF CLR}
- raise EJclEDIError.CreateResFmt(@RsEDIError010, [Self.ClassName, IntToStr(Index)]);
- {$ELSE}
- raise EJclEDIError.CreateFmt(RsEDIError010, [Self.ClassName, IntToStr(Index)]);
- {$ENDIF ~CLR}
+ raise EJclEDIError.CreateIDFmt(10, [Self.ClassName, IntToStr(Index)]);
end;
procedure TEDIDataObjectGroup.DeleteEDIDataObjects;
@@ -727,11 +723,7 @@
end;
end
else
- {$IFNDEF CLR}
- raise EJclEDIError.CreateResFmt(@RsEDIError011, [IntToStr(Index)]);
- {$ELSE}
- raise EJclEDIError.CreateFmt(RsEDIError011, [IntToStr(Index)]);
- {$ENDIF ~CLR}
+ raise EJclEDIError.CreateIDFmt(11, [IntToStr(Index)]);
end;
destructor TEDIDataObjectGroup.Destroy;
@@ -748,15 +740,15 @@
if Index <= FEDIDataObjects.Count - 1 then
begin
if not Assigned(FEDIDataObjects[Index]) then
- raise EJclEDIError.CreateFmt(RsEDIError006, [Self.ClassName, IntToStr(Index)]);
+ raise EJclEDIError.CreateIDFmt(6, [Self.ClassName, IntToStr(Index)]);
Result := FEDIDataObjects[Index];
end
else
- raise EJclEDIError.CreateFmt(RsEDIError005, [Self.ClassName, IntToStr(Index)])
+ raise EJclEDIError.CreateIDFmt(5, [Self.ClassName, IntToStr(Index)])
else
- raise EJclEDIError.CreateFmt(RsEDIError004, [Self.ClassName, IntToStr(Index)])
+ raise EJclEDIError.CreateIDFmt(4, [Self.ClassName, IntToStr(Index)])
else
- raise EJclEDIError.CreateFmt(RsEDIError003, [Self.ClassName, IntToStr(Index)]);
+ raise EJclEDIError.CreateIDFmt(3, [Self.ClassName, IntToStr(Index)]);
end;
function TEDIDataObjectGroup.IndexIsValid(Index: Integer): Boolean;
@@ -832,11 +824,11 @@
FEDIDataObjects[Index].Parent := Self;
end
else
- raise EJclEDIError.CreateFmt(RsEDIError009, [Self.ClassName, IntToStr(Index)])
+ raise EJclEDIError.CreateIDFmt(9, [Self.ClassName, IntToStr(Index)])
else
- raise EJclEDIError.CreateFmt(RsEDIError008, [Self.ClassName, IntToStr(Index)])
+ raise EJclEDIError.CreateIDFmt(8, [Self.ClassName, IntToStr(Index)])
else
- raise EJclEDIError.CreateFmt(RsEDIError007, [Self.ClassName, IntToStr(Index)]);
+ raise EJclEDIError.CreateIDFmt(7, [Self.ClassName, IntToStr(Index)]);
end;
function TEDIDataObjectGroup.GetIndexPositionFromParent: Integer;
@@ -1513,11 +1505,7 @@
Result := Low(FStack);
end
else
- {$IFNDEF CLR}
- raise EJclEDIError.CreateResFmt(@RsEDIError057, [IntToStr(Index)]);
- {$ELSE}
- raise EJclEDIError.CreateFmt(RsEDIError057, [IntToStr(Index)]);
- {$ENDIF ~CLR}
+ raise EJclEDIError.CreateIDFmt(57, [IntToStr(Index)]);
end;
function TEDILoopStack.GetSize: Integer;
@@ -1537,11 +1525,11 @@
if Index <= High(FStack) then
Result := FStack[Index]
else
- raise EJclEDIError.CreateFmt(RsEDIError054, [IntToStr(Index)])
+ raise EJclEDIError.CreateIDFmt(54, [IntToStr(Index)])
else
- raise EJclEDIError.CreateFmt(RsEDIError055, [IntToStr(Index)])
+ raise EJclEDIError.CreateIDFmt(55, [IntToStr(Index)])
else
- raise EJclEDIError.CreateFmt(RsEDIError056, [IntToStr(Index)]);
+ raise EJclEDIError.CreateIDFmt(56, [IntToStr(Index)]);
end;
procedure TEDILoopStack.Pop(Index: Integer);
Modified: trunk/jcl/source/common/JclEDISEF.pas
===================================================================
--- trunk/jcl/source/common/JclEDISEF.pas 2007-11-30 19:33:03 UTC (rev 2246)
+++ trunk/jcl/source/common/JclEDISEF.pas 2007-11-30 20:33:13 UTC (rev 2247)
@@ -4079,11 +4079,7 @@
end;
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError001);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError001);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(1);
end;
procedure TEDISEFFile.ParseTextSets;
@@ -4368,11 +4364,7 @@
end;
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError002);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError002);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(2);
end;
procedure TEDISEFTable.Disassemble;
Modified: trunk/jcl/source/common/JclEDI_ANSIX12.pas
===================================================================
--- trunk/jcl/source/common/JclEDI_ANSIX12.pas 2007-11-30 19:33:03 UTC (rev 2246)
+++ trunk/jcl/source/common/JclEDI_ANSIX12.pas 2007-11-30 20:33:13 UTC (rev 2247)
@@ -748,11 +748,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError036);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError036);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(36);
end;
FData := FSegmentId;
@@ -805,11 +801,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError035);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError035);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(35);
end;
// Continue
StartPos := 1;
@@ -1047,11 +1039,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError026);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError026);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(26);
end;
FData := FSTSegment.Assemble;
@@ -1108,11 +1096,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError025);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError025);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(25);
end;
// Find the first segment
StartPos := 1;
@@ -1312,11 +1296,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError020);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError020);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(20);
end;
FData := FGSSegment.Assemble;
FGSSegment.Data := '';
@@ -1371,11 +1351,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError019);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError019);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(19);
end;
// Find Functional Group Header Segment
StartPos := 1;
@@ -1390,26 +1366,14 @@
FGSSegment.Disassemble;
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError021);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError021);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(21);
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError022);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError022);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(22);
// Search for Transaction Set Header
SearchResult := StrSearch(FDelimiters.SD + TSHSegmentId + FDelimiters.ED, FData, StartPos);
if SearchResult <= 0 then
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError027);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError027);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(27);
// Set next start position
StartPos := SearchResult + FDelimiters.SDLen; // Move past the delimiter
// Continue
@@ -1431,18 +1395,10 @@
FEDIDataObjects[I].Disassemble;
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError028);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError028);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(28);
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError029);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError029);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(29);
// Set the next start position
StartPos := SearchResult + FDelimiters.SDLen; // Move past the delimiter
//
@@ -1465,18 +1421,10 @@
FGESegment.Disassemble;
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError023);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError023);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(23);
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError024);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError024);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(24);
FData := '';
FState := ediDisassembled;
end;
@@ -1632,11 +1580,7 @@
Result := '';
if not Assigned(FDelimiters) then
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError013);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError013);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(13);
FData := FISASegment.Assemble;
FISASegment.Data := '';
@@ -1687,11 +1631,7 @@
DeleteFunctionalGroups;
if not Assigned(FDelimiters) then
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError012);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError012);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(12);
StartPos := 1;
// Search for Interchange Control Header
@@ -1704,18 +1644,10 @@
FISASegment.Disassemble;
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError014);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError014);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(14);
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError015);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError015);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(15);
// Search for Functional Group Header
SearchResult := StrSearch(FDelimiters.SD + FGHSegmentId + FDelimiters.ED, FData, StartPos);
// Check for TA1 Segment
@@ -1726,11 +1658,7 @@
SearchResult := I;
end;
if (SearchResult <= 0) and (not ProcessTA1) then
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError022);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError022);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(22);
// Set next start positon
StartPos := SearchResult + FDelimiters.SDLen; // Move past the delimiter
// Continue
@@ -1754,18 +1682,10 @@
FEDIDataObjects[I].Disassemble;
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError023);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError023);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(23);
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError024);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError024);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(24);
// Set next start positon
StartPos := SearchResult + FDelimiters.SDLen; // Move past the delimiter
// Verify the next record is a Functional Group Header
@@ -1812,18 +1732,10 @@
FIEASegment.Disassemble;
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError016);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError016);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(16);
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError017);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError017);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(17);
FData := '';
FState := ediDisassembled;
end;
@@ -2042,11 +1954,7 @@
InternalDelimitersDetection(StartPos);
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError015);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError015);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(15);
// Continue
while (StartPos + Length(ICHSegmentId)) < Length(FData) do
begin
@@ -2067,18 +1975,10 @@
FEDIDataObjects[I].Disassemble;
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError016);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError016);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(16);
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError017);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError017);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(17);
// Set next start position, Move past the delimiter
StartPos := SearchResult + FDelimiters.SDLen;
// Verify the next record is an Interchange Control Header
@@ -2096,11 +1996,7 @@
if foIgnoreGarbageAtEndOfFile in FEDIFileOptions then
Break
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError018);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError018);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(18);
end;
end;
FData := '';
@@ -2171,11 +2067,7 @@
end;
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError001);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError001);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(1);
end;
procedure TEDIFile.LoadFromFile(const FileName: string);
@@ -2209,11 +2101,7 @@
end;
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError002);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError002);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(2);
end;
procedure TEDIFile.SaveToFile;
@@ -2234,11 +2122,7 @@
end;
end
else
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError002);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError002);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(2);
end;
procedure TEDIFile.SetInterchangeControl(Index: Integer; Interchange: TEDIInterchangeControl);
@@ -2723,11 +2607,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- {$IFDEF CLR}
- raise EJclEDIError.Create(RsEDIError035);
- {$ELSE}
- raise EJclEDIError.CreateRes(@RsEDIError035);
- {$ENDIF CLR}
+ raise EJclEDIError.CreateID(35);
end;
SearchResult := StrSearch(FDelimiters.ED + FDelimiters.SS, FData, 1);
if SearchResult <> 0 then
@@ -3237,12 +3117,7 @@
for I := 0 to DataSegment.ElementCount - 1 do
begin
if I > J then
- {$IFDEF CLR}
- raise EJclEDIError.CreateFmt(RsEDIError002,
- {$ELSE}
- raise EJclEDIError.CreateResFmt(@RsEDIError058,
- {$ENDIF CLR}
- [IntToStr(I), DataSegment.SegmentID,
+ raise EJclEDIError.CreateIDFmt(58, [IntToStr(I), DataSegment.SegmentID,
IntToStr(DataSegment.GetIndexPositionFromParent)]);
DataSegment.Element[I].SpecPointer := SpecSegment.Element[I];
end;
Modified: trunk/jcl/source/common/JclEDI_ANSIX12_Ext.pas
===================================================================
--- trunk/jcl/source/common/JclEDI_ANSIX12_Ext.pas 2007-11-30 19:33:03 UTC (rev 2246)
+++ trunk/jcl/source/common/JclEDI_ANSIX12_Ext.pas 2007-11-30 20:33:13 UTC (rev 2247)
@@ -222,12 +222,7 @@
for I := 0 to DataSegment.ElementCount - 1 do
begin
if I > J then
- {$IFDEF CLR}
- raise EJclEDIError.CreateFmt(RsEDIError058,
- {$ELSE}
- raise EJclEDIError.CreateResFmt(@RsEDIError058,
- {$ENDIF CLR}
- [IntToStr(I), DataSegment.SegmentId,
+ raise EJclEDIError.CreateIDFmt(58, [IntToStr(I), DataSegment.SegmentId,
IntToStr(DataSegment.GetIndexPositionFromParent)]);
DataSegment.Element[I].SpecPointer := SpecSegment.Elements[I];
end;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ah...@us...> - 2007-11-30 19:33:12
|
Revision: 2246
http://jcl.svn.sourceforge.net/jcl/?rev=2246&view=rev
Author: ahuser
Date: 2007-11-30 11:33:03 -0800 (Fri, 30 Nov 2007)
Log Message:
-----------
Added missing "default" property flag.
Modified Paths:
--------------
trunk/jcl/source/common/JclContainerIntf.pas
Modified: trunk/jcl/source/common/JclContainerIntf.pas
===================================================================
--- trunk/jcl/source/common/JclContainerIntf.pas 2007-11-30 19:32:28 UTC (rev 2245)
+++ trunk/jcl/source/common/JclContainerIntf.pas 2007-11-30 19:33:03 UTC (rev 2246)
@@ -2031,7 +2031,7 @@
function Remove(const Key: IInterface): IInterface;
function Size: Integer;
function Values: IJclIntfCollection;
- property Items[const Key: IInterface]: IInterface read GetValue write PutValue;
+ property Items[const Key: IInterface]: IInterface read GetValue write PutValue; default;
end;
(*IJclMultiIntfIntfMap = interface(IJclIntfIntfMap)
@@ -2055,7 +2055,7 @@
function Remove(const Key: AnsiString): IInterface;
function Size: Integer;
function Values: IJclIntfCollection;
- property Items[const Key: AnsiString]: IInterface read GetValue write PutValue;
+ property Items[const Key: AnsiString]: IInterface read GetValue write PutValue; default;
end;
IJclWideStrIntfMap = interface(IJclWideStrContainer)
@@ -2073,7 +2073,7 @@
function Remove(const Key: WideString): IInterface;
function Size: Integer;
function Values: IJclIntfCollection;
- property Items[const Key: WideString]: IInterface read GetValue write PutValue;
+ property Items[const Key: WideString]: IInterface read GetValue write PutValue; default;
end;
{$IFDEF CONTAINER_ANSISTR}
@@ -2098,7 +2098,7 @@
function Remove(const Key: IInterface): AnsiString;
function Size: Integer;
function Values: IJclAnsiStrCollection;
- property Items[const Key: IInterface]: AnsiString read GetValue write PutValue;
+ property Items[const Key: IInterface]: AnsiString read GetValue write PutValue; default;
end;
IJclIntfWideStrMap = interface(IJclWideStrContainer)
@@ -2116,7 +2116,7 @@
function Remove(const Key: IInterface): WideString;
function Size: Integer;
function Values: IJclWideStrCollection;
- property Items[const Key: IInterface]: WideString read GetValue write PutValue;
+ property Items[const Key: IInterface]: WideString read GetValue write PutValue; default;
end;
{$IFDEF CONTAINER_ANSISTR}
@@ -2143,7 +2143,7 @@
function Size: Integer;
function Values: IJclAnsiStrCollection;
//Daniele Teti
- property Items[const Key: AnsiString]: AnsiString read GetValue write PutValue;
+ property Items[const Key: AnsiString]: AnsiString read GetValue write PutValue; default;
end;
IJclWideStrWideStrMap = interface(IJclWideStrContainer)
@@ -2163,7 +2163,7 @@
function Size: Integer;
function Values: IJclWideStrCollection;
//Daniele Teti
- property Items[const Key: WideString]: WideString read GetValue write PutValue;
+ property Items[const Key: WideString]: WideString read GetValue write PutValue; default;
end;
{$IFDEF CONTAINER_ANSISTR}
@@ -2188,7 +2188,7 @@
function Remove(const Key: Single): IInterface;
function Size: Integer;
function Values: IJclIntfCollection;
- property Items[const Key: Single]: IInterface read GetValue write PutValue;
+ property Items[const Key: Single]: IInterface read GetValue write PutValue; default;
end;
IJclIntfSingleMap = interface(IJclSingleContainer)
@@ -2206,7 +2206,7 @@
function Remove(const Key: IInterface): Single;
function Size: Integer;
function Values: IJclSingleCollection;
- property Items[const Key: IInterface]: Single read GetValue write PutValue;
+ property Items[const Key: IInterface]: Single read GetValue write PutValue; default;
end;
IJclSingleSingleMap = interface(IJclSingleContainer)
@@ -2224,7 +2224,7 @@
function Remove(const Key: Single): Single;
function Size: Integer;
function Values: IJclSingleCollection;
- property Items[const Key: Single]: Single read GetValue write PutValue;
+ property Items[const Key: Single]: Single read GetValue write PutValue; default;
end;
IJclDoubleIntfMap = interface(IJclDoubleContainer)
@@ -2242,7 +2242,7 @@
function Remove(const Key: Double): IInterface;
function Size: Integer;
function Values: IJclIntfCollection;
- property Items[const Key: Double]: IInterface read GetValue write PutValue;
+ property Items[const Key: Double]: IInterface read GetValue write PutValue; default;
end;
IJclIntfDoubleMap = interface(IJclDoubleContainer)
@@ -2260,7 +2260,7 @@
function Remove(const Key: IInterface): Double;
function Size: Integer;
function Values: IJclDoubleCollection;
- property Items[const Key: IInterface]: Double read GetValue write PutValue;
+ property Items[const Key: IInterface]: Double read GetValue write PutValue; default;
end;
IJclDoubleDoubleMap = interface(IJclDoubleContainer)
@@ -2278,7 +2278,7 @@
function Remove(const Key: Double): Double;
function Size: Integer;
function Values: IJclDoubleCollection;
- property Items[const Key: Double]: Double read GetValue write PutValue;
+ property Items[const Key: Double]: Double read GetValue write PutValue; default;
end;
IJclExtendedIntfMap = interface(IJclExtendedContainer)
@@ -2296,7 +2296,7 @@
function Remove(const Key: Extended): IInterface;
function Size: Integer;
function Values: IJclIntfCollection;
- property Items[const Key: Extended]: IInterface read GetValue write PutValue;
+ property Items[const Key: Extended]: IInterface read GetValue write PutValue; default;
end;
IJclIntfExtendedMap = interface(IJclExtendedContainer)
@@ -2314,7 +2314,7 @@
function Remove(const Key: IInterface): Extended;
function Size: Integer;
function Values: IJclExtendedCollection;
- property Items[const Key: IInterface]: Extended read GetValue write PutValue;
+ property Items[const Key: IInterface]: Extended read GetValue write PutValue; default;
end;
IJclExtendedExtendedMap = interface(IJclExtendedContainer)
@@ -2332,7 +2332,7 @@
function Remove(const Key: Extended): Extended;
function Size: Integer;
function Values: IJclExtendedCollection;
- property Items[const Key: Extended]: Extended read GetValue write PutValue;
+ property Items[const Key: Extended]: Extended read GetValue write PutValue; default;
end;
{$IFDEF MATH_EXTENDED_PRECISION}
@@ -2366,7 +2366,7 @@
function Remove(Key: Integer): IInterface;
function Size: Integer;
function Values: IJclIntfCollection;
- property Items[Key: Integer]: IInterface read GetValue write PutValue;
+ property Items[Key: Integer]: IInterface read GetValue write PutValue; default;
end;
IJclIntfIntegerMap = interface(IJclContainer)
@@ -2384,7 +2384,7 @@
function Remove(const Key: IInterface): Integer;
function Size: Integer;
function Values: IJclIntegerCollection;
- property Items[const Key: IInterface]: Integer read GetValue write PutValue;
+ property Items[const Key: IInterface]: Integer read GetValue write PutValue; default;
end;
IJclIntegerIntegerMap = interface(IJclContainer)
@@ -2402,7 +2402,7 @@
function Remove(Key: Integer): Integer;
function Size: Integer;
function Values: IJclIntegerCollection;
- property Items[Key: Integer]: Integer read GetValue write PutValue;
+ property Items[Key: Integer]: Integer read GetValue write PutValue; default;
end;
IJclCardinalIntfMap = interface(IJclContainer)
@@ -2420,7 +2420,7 @@
function Remove(Key: Cardinal): IInterface;
function Size: Integer;
function Values: IJclIntfCollection;
- property Items[Key: Cardinal]: IInterface read GetValue write PutValue;
+ property Items[Key: Cardinal]: IInterface read GetValue write PutValue; default;
end;
IJclIntfCardinalMap = interface(IJclContainer)
@@ -2438,7 +2438,7 @@
function Remove(const Key: IInterface): Cardinal;
function Size: Integer;
function Values: IJclCardinalCollection;
- property Items[const Key: IInterface]: Cardinal read GetValue write PutValue;
+ property Items[const Key: IInterface]: Cardinal read GetValue write PutValue; default;
end;
IJclCardinalCardinalMap = interface(IJclContainer)
@@ -2456,7 +2456,7 @@
function Remove(Key: Cardinal): Cardinal;
function Size: Integer;
function Values: IJclCardinalCollection;
- property Items[Key: Cardinal]: Cardinal read GetValue write PutValue;
+ property Items[Key: Cardinal]: Cardinal read GetValue write PutValue; default;
end;
IJclInt64IntfMap = interface(IJclContainer)
@@ -2474,7 +2474,7 @@
function Remove(const Key: Int64): IInterface;
function Size: Integer;
function Values: IJclIntfCollection;
- property Items[const Key: Int64]: IInterface read GetValue write PutValue;
+ property Items[const Key: Int64]: IInterface read GetValue write PutValue; default;
end;
IJclIntfInt64Map = interface(IJclContainer)
@@ -2492,7 +2492,7 @@
function Remove(const Key: IInterface): Int64;
function Size: Integer;
function Values: IJclInt64Collection;
- property Items[const Key: IInterface]: Int64 read GetValue write PutValue;
+ property Items[const Key: IInterface]: Int64 read GetValue write PutValue; default;
end;
IJclInt64Int64Map = interface(IJclContainer)
@@ -2510,7 +2510,7 @@
function Remove(const Key: Int64): Int64;
function Size: Integer;
function Values: IJclInt64Collection;
- property Items[const Key: Int64]: Int64 read GetValue write PutValue;
+ property Items[const Key: Int64]: Int64 read GetValue write PutValue; default;
end;
{$IFNDEF CLR}
@@ -2529,7 +2529,7 @@
function Remove(Key: Pointer): IInterface;
function Size: Integer;
function Values: IJclIntfCollection;
- property Items[Key: Pointer]: IInterface read GetValue write PutValue;
+ property Items[Key: Pointer]: IInterface read GetValue write PutValue; default;
end;
IJclIntfPtrMap = interface(IJclContainer)
@@ -2547,7 +2547,7 @@
function Remove(const Key: IInterface): Pointer;
function Size: Integer;
function Values: IJclPtrCollection;
- property Items[const Key: IInterface]: Pointer read GetValue write PutValue;
+ property Items[const Key: IInterface]: Pointer read GetValue write PutValue; default;
end;
IJclPtrPtrMap = interface(IJclContainer)
@@ -2565,7 +2565,7 @@
function Remove(Key: Pointer): Pointer;
function Size: Integer;
function Values: IJclPtrCollection;
- property Items[Key: Pointer]: Pointer read GetValue write PutValue;
+ property Items[Key: Pointer]: Pointer read GetValue write PutValue; default;
end;
{$ENDIF ~CLR}
@@ -2585,7 +2585,7 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[const Key: IInterface]: TObject read GetValue write PutValue;
+ property Items[const Key: IInterface]: TObject read GetValue write PutValue; default;
end;
IJclAnsiStrMap = interface(IJclAnsiStrContainer)
@@ -2604,7 +2604,7 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[const Key: AnsiString]: TObject read GetValue write PutValue;
+ property Items[const Key: AnsiString]: TObject read GetValue write PutValue; default;
end;
IJclWideStrMap = interface(IJclWideStrContainer)
@@ -2623,7 +2623,7 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[const Key: WideString]: TObject read GetValue write PutValue;
+ property Items[const Key: WideString]: TObject read GetValue write PutValue; default;
end;
{$IFDEF CONTAINER_ANSISTR}
@@ -2649,7 +2649,7 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[const Key: Single]: TObject read GetValue write PutValue;
+ property Items[const Key: Single]: TObject read GetValue write PutValue; default;
end;
IJclDoubleMap = interface(IJclDoubleContainer)
@@ -2668,7 +2668,7 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[const Key: Double]: TObject read GetValue write PutValue;
+ property Items[const Key: Double]: TObject read GetValue write PutValue; default;
end;
IJclExtendedMap = interface(IJclExtendedContainer)
@@ -2687,7 +2687,7 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[const Key: Extended]: TObject read GetValue write PutValue;
+ property Items[const Key: Extended]: TObject read GetValue write PutValue; default;
end;
{$IFDEF MATH_EXTENDED_PRECISION}
@@ -2716,7 +2716,7 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[Key: Integer]: TObject read GetValue write PutValue;
+ property Items[Key: Integer]: TObject read GetValue write PutValue; default;
end;
IJclCardinalMap = interface(IJclContainer)
@@ -2735,7 +2735,7 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[Key: Cardinal]: TObject read GetValue write PutValue;
+ property Items[Key: Cardinal]: TObject read GetValue write PutValue; default;
end;
IJclInt64Map = interface(IJclContainer)
@@ -2754,7 +2754,7 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[const Key: Int64]: TObject read GetValue write PutValue;
+ property Items[const Key: Int64]: TObject read GetValue write PutValue; default;
end;
{$IFNDEF CLR}
@@ -2774,7 +2774,7 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[Key: Pointer]: TObject read GetValue write PutValue;
+ property Items[Key: Pointer]: TObject read GetValue write PutValue; default;
end;
{$ENDIF ~CLR}
@@ -2794,7 +2794,7 @@
function Size: Integer;
function Values: IJclCollection;
//Daniele Teti
- property Items[Key: TObject]: TObject read GetValue write PutValue;
+ property Items[Key: TObject]: TObject read GetValue write PutValue; default;
end;
{$IFDEF SUPPORTS_GENERICS}
@@ -2818,7 +2818,7 @@
function Size: Integer;
function Values: IJclCollection<TValue>;
- property Items[const Key: TKey]: TValue read GetValue write PutValue;
+ property Items[const Key: TKey]: TValue read GetValue write PutValue; default;
end;
{$ENDIF SUPPORTS_GENERICS}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ah...@us...> - 2007-11-30 19:32:39
|
Revision: 2245
http://jcl.svn.sourceforge.net/jcl/?rev=2245&view=rev
Author: ahuser
Date: 2007-11-30 11:32:28 -0800 (Fri, 30 Nov 2007)
Log Message:
-----------
Fixed Delphi 5 compilation
Modified Paths:
--------------
trunk/jcl/source/common/JclStringLists.pas
Modified: trunk/jcl/source/common/JclStringLists.pas
===================================================================
--- trunk/jcl/source/common/JclStringLists.pas 2007-11-30 19:31:30 UTC (rev 2244)
+++ trunk/jcl/source/common/JclStringLists.pas 2007-11-30 19:32:28 UTC (rev 2245)
@@ -53,6 +53,14 @@
Classes, SysUtils,
JclBase;
+{$DEFINE HAS_TSTRINGS_COMPARESTRINGS}
+{$IFDEF FPC}
+ {$UNDEF HAS_TSTRINGS_COMPARESTRINGS}
+{$ENDIF FPC}
+{$IFDEF COMPILER5}
+ {$UNDEF HAS_TSTRINGS_COMPARESTRINGS}
+{$ENDIF COMPILER5}
+
type
IJclStringList = interface;
@@ -355,9 +363,9 @@
function _AddRef: Integer; stdcall;
function _Release: Integer; stdcall;
{$ENDIF CLR}
- {$IF defined(COMPILER5) OR defined(FPC)}
+ {$IFNDEF HAS_TSTRINGS_COMPARESTRINGS}
function CompareStrings(const S1, S2: string): Integer; virtual;
- {$IFEND}
+ {$ENDIF ~HAS_TSTRINGS_COMPARESTRINGS}
public
constructor Create;
destructor Destroy; override;
@@ -1126,12 +1134,12 @@
Result := FSelfAsInterface;
end;
-{$IF defined(COMPILER5) OR defined(FPC)}
+{$IFNDEF HAS_TSTRINGS_COMPARESTRINGS}
function TJclStringListImpl.CompareStrings(const S1, S2: string): Integer;
begin
Result := AnsiCompareText(S1, S2);
end;
-{$IFEND}
+{$ENDIF ~HAS_TSTRINGS_COMPARESTRINGS}
function TJclStringListImpl.SortByName: IJclStringList;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2007-11-30 19:31:38
|
Revision: 2244
http://jcl.svn.sourceforge.net/jcl/?rev=2244&view=rev
Author: outchy
Date: 2007-11-30 11:31:30 -0800 (Fri, 30 Nov 2007)
Log Message:
-----------
Introducing CLR version detection (based on revision 2220 of Andreas Hausladen)
Revision Links:
--------------
http://jcl.svn.sourceforge.net/jcl/?rev=2220&view=rev
Modified Paths:
--------------
trunk/jcl/source/common/JclDateTime.pas
trunk/jcl/source/jedi.inc
Modified: trunk/jcl/source/common/JclDateTime.pas
===================================================================
--- trunk/jcl/source/common/JclDateTime.pas 2007-11-30 19:28:51 UTC (rev 2243)
+++ trunk/jcl/source/common/JclDateTime.pas 2007-11-30 19:31:30 UTC (rev 2244)
@@ -62,7 +62,9 @@
{$ENDIF UNITVERSIONING}
{$IFDEF CLR}
System.Globalization, System.Runtime.InteropServices,
+ {$IFDEF CLR20}
System.Runtime.InteropServices.ComTypes,
+ {$ENDIF CLR20}
{$ELSE}
{$IFDEF MSWINDOWS}
Windows,
@@ -88,7 +90,11 @@
{$IFDEF CLR}
type
+ {$IFDEF CLR20_UP}
TFileTime = System.Runtime.InteropServices.ComTypes.FILETIME;
+ {$ELSE ~CLR20_UP}
+ TFileTime = System.Runtime.InteropServices.FILETIME;
+ {$ENDIF ~CLR20_UP}
{$ENDIF CLR}
{ Encode / Decode functions }
Modified: trunk/jcl/source/jedi.inc
===================================================================
--- trunk/jcl/source/jedi.inc 2007-11-30 19:28:51 UTC (rev 2243)
+++ trunk/jcl/source/jedi.inc 2007-11-30 19:31:30 UTC (rev 2244)
@@ -293,6 +293,19 @@
RTL185_UP Defined when compiling with Delphi for Win32 2007 or later
+- CLR Versions
+
+ Directive Description
+ ------------------------------------------------------------------------------
+ CLR Defined when compiling for .NET
+ CLR10 Defined when compiling for .NET 1.0 (may be overriden by FORCE_CLR10)
+ CLR10_UP Defined when compiling for .NET 1.0 or later
+ CLR11 Defined when compiling for .NET 1.1 (may be overriden by FORCE_CLR11)
+ CLR11_UP Defined when compiling for .NET 1.1 or later
+ CLR20 Defined when compiling for .NET 2.0 (may be overriden by FORCE_CLR20)
+ CLR20_UP Defined when compiling for .NET 2.0 or later
+
+
- Feature Directives
The features directives are used to test if the compiler supports specific
@@ -504,6 +517,9 @@
{$IFDEF VER160}
{$DEFINE BDS2}
{$DEFINE BDS}
+ {$IFDEF CLR}
+ {$DEFINE CLR10}
+ {$ENDIF CLR}
{$DEFINE COMPILER8}
{$DEFINE DELPHI8}
{$DEFINE DELPHICOMPILER8}
@@ -514,6 +530,9 @@
{$IFDEF VER170}
{$DEFINE BDS3}
{$DEFINE BDS}
+ {$IFDEF CLR}
+ {$DEFINE CLR11}
+ {$ENDIF CLR}
{$DEFINE COMPILER9}
{$DEFINE DELPHI9}
{$DEFINE DELPHI2005} // synonym to DELPHI9
@@ -524,6 +543,9 @@
{$IFDEF VER180}
{$DEFINE BDS}
+ {$IFDEF CLR}
+ {$DEFINE CLR11}
+ {$ENDIF CLR}
{$IFDEF VER185}
{$DEFINE BDS5}
{$DEFINE COMPILER11}
@@ -553,6 +575,9 @@
{$IFDEF VER190} // Delphi.NET 2007
{$DEFINE BDS}
{$DEFINE BDS5}
+ {$IFDEF CLR}
+ {$DEFINE CLR20}
+ {$ENDIF CLR}
{$DEFINE COMPILER11}
{$DEFINE DELPHI11}
{$DEFINE DELPHI2007} // synonym to DELPHI10
@@ -754,7 +779,46 @@
{$IFDEF RTL90_UP} {$DEFINE RTL80_UP} {$ENDIF}
{------------------------------------------------------------------------------}
+{ Check for CLR overrides of default detection }
+{------------------------------------------------------------------------------}
+{$IFDEF CLR}
+ {$IFDEF FORCE_CLR10}
+ {$DEFINE CLR10}
+ {$UNDEF CLR11}
+ {$UNDEF CLR20}
+ {$ENDIF FORCE_CLR10}
+
+ {$IFDEF FORCE_CLR11}
+ {$UNDEF CLR10}
+ {$DEFINE CLR11}
+ {$UNDEF CLR20}
+ {$ENDIF FORCE_CLR11}
+
+ {$IFDEF FORCE_CLR20}
+ {$UNDEF CLR10}
+ {$UNDEF CLR11}
+ {$DEFINE CLR20}
+ {$ENDIF FORCE_CLR20}
+{$ENDIF CLR}
+
+{------------------------------------------------------------------------------}
+{ CLRX from CLRX_UP mappings }
+{------------------------------------------------------------------------------}
+
+{$IFDEF CLR10} {$DEFINE CLR10_UP} {$ENDIF}
+{$IFDEF CLR11} {$DEFINE CLR11_UP} {$ENDIF}
+{$IFDEF CLR20} {$DEFINE CLR20_UP} {$ENDIF}
+
+{------------------------------------------------------------------------------}
+{ CLRX_UP from CLRX_UP mappings }
+{------------------------------------------------------------------------------}
+
+{$IFDEF CLR20_UP} {$DEFINE CLR11_UP} {$ENDIF}
+{$IFDEF CLR11_UP} {$DEFINE CLR10_UP} {$ENDIF}
+
+{------------------------------------------------------------------------------}
+
{$IFDEF DELPHICOMPILER}
{$DEFINE DELPHILANGUAGE}
{$ENDIF}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2007-11-30 19:28:53
|
Revision: 2243
http://jcl.svn.sourceforge.net/jcl/?rev=2243&view=rev
Author: outchy
Date: 2007-11-30 11:28:51 -0800 (Fri, 30 Nov 2007)
Log Message:
-----------
Removing lots of CLR excluded code, refactoring EDI exception constructors.
Modified Paths:
--------------
trunk/jcl/source/common/JclEDI.pas
trunk/jcl/source/common/JclEDIXML.pas
trunk/jcl/source/common/JclEDI_UNEDIFACT.pas
trunk/jcl/source/common/JclEDI_UNEDIFACT_Ext.pas
trunk/jcl/source/common/JclResources.pas
Modified: trunk/jcl/source/common/JclEDI.pas
===================================================================
--- trunk/jcl/source/common/JclEDI.pas 2007-11-30 19:24:18 UTC (rev 2242)
+++ trunk/jcl/source/common/JclEDI.pas 2007-11-30 19:28:51 UTC (rev 2243)
@@ -89,7 +89,11 @@
TEDIObject = class(TObject); // Base EDI Object
TEDIObjectArray = array of TEDIObject;
- EJclEDIError = EJclError;
+ EJclEDIError = class(EJclError)
+ public
+ constructor CreateID(ID: Integer);
+ constructor CreateIDFmt(ID: Integer; const Args: array of const);
+ end;
// EDI Forward Class Declarations
TEDIDataObject = class;
@@ -531,6 +535,26 @@
end;
end;
+//=== { EJclEDIError } =======================================================
+
+constructor EJclEDIError.CreateID(ID: Integer);
+begin
+ {$IFDEF CLR}
+ Create(RsEDIErrors[ID]);
+ {$ELSE ~CLR}
+ CreateRes(RsEDIErrors[ID]);
+ {$ENDIF ~CLR}
+end;
+
+constructor EJclEDIError.CreateIDFmt(ID: Integer; const Args: array of const);
+begin
+ {$IFDEF CLR}
+ Create(Format(RsEDIErrors[ID], Args));
+ {$ELSE ~CLR}
+ CreateResFmt(RsEDIErrors[ID], Args);
+ {$ENDIF ~CLR}
+end;
+
//=== { TEDIDelimiters } =====================================================
constructor TEDIDelimiters.Create;
Modified: trunk/jcl/source/common/JclEDIXML.pas
===================================================================
--- trunk/jcl/source/common/JclEDIXML.pas 2007-11-30 19:24:18 UTC (rev 2242)
+++ trunk/jcl/source/common/JclEDIXML.pas 2007-11-30 19:28:51 UTC (rev 2243)
@@ -721,7 +721,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError047);
+ raise EJclEDIError.CreateID(47);
end;
OriginalData := FData;
@@ -760,7 +760,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError046);
+ raise EJclEDIError.CreateID(46);
end;
// Set next start positon
StartPos := 1;
@@ -773,7 +773,7 @@
FAttributes.ParseAttributes(XMLStartTag);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError048);
+ raise EJclEDIError.CreateID(48);
// Set data start positon
StartPos := SearchResult + FDelimiters.ETDLength;
// Check for CData tag
@@ -797,10 +797,10 @@
FData := Copy(FData, StartPos, (EndPos - StartPos));
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError050);
+ raise EJclEDIError.CreateID(50);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError049);
+ raise EJclEDIError.CreateID(49);
// Handle Entity Reference Characters
StrReplace(FData, EDIXML_HTMLLessThanSign, EDIXML_LessThanSign, [rfReplaceAll]);
StrReplace(FData, EDIXML_HTMLGreaterThanSign, EDIXML_GreaterThanSign, [rfReplaceAll]);
@@ -920,7 +920,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError042);
+ raise EJclEDIError.CreateID(42);
end;
AttributeString := FAttributes.CombineAttributes;
@@ -970,7 +970,7 @@
SetLength(FElements, High(FElements));
end
else
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}EDIXMLError058, [IntToStr(Index)]);
+ raise EJclEDIError.CreateIDFmt(58, [IntToStr(Index)]);
end;
procedure TEDIXMLSegment.DeleteElements;
@@ -1003,7 +1003,7 @@
SetLength(FElements, Length(FElements) - Count);
end
else
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}EDIXMLError058, [IntToStr(Index)]);
+ raise EJclEDIError.CreateIDFmt(58, [IntToStr(Index)]);
end;
procedure TEDIXMLSegment.Disassemble;
@@ -1017,7 +1017,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError041);
+ raise EJclEDIError.CreateID(41);
end;
// Set next start positon
StartPos := 1;
@@ -1031,7 +1031,7 @@
FAttributes.ParseAttributes(XMLStartTag);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError043);
+ raise EJclEDIError.CreateID(43);
// Set next start positon
StartPos := SearchResult + FDelimiters.ETDLength;
// Search for element
@@ -1051,10 +1051,10 @@
FElements[I].Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError050);
+ raise EJclEDIError.CreateID(50);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError049);
+ raise EJclEDIError.CreateID(49);
// Set next start positon
StartPos := SearchResult + FDelimiters.ETDLength;
// Search for element
@@ -1072,15 +1072,15 @@
if Index <= High(FElements) then
begin
if not Assigned(FElements[Index]) then
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}EDIXMLError057, [IntToStr(Index)]);
+ raise EJclEDIError.CreateIDFmt(57, [IntToStr(Index)]);
Result := FElements[Index];
end
else
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}EDIXMLError056, [IntToStr(Index)])
+ raise EJclEDIError.CreateIDFmt(56, [IntToStr(Index)])
else
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}EDIXMLError055, [IntToStr(Index)])
+ raise EJclEDIError.CreateIDFmt(55, [IntToStr(Index)])
else
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}EDIXMLError054, [IntToStr(Index)]);
+ raise EJclEDIError.CreateIDFmt(54, [IntToStr(Index)]);
end;
function TEDIXMLSegment.GetIndexPositionFromParent: Integer;
@@ -1249,11 +1249,11 @@
FElements[Index] := Element;
end
else
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}EDIXMLError053, [IntToStr(Index)])
+ raise EJclEDIError.CreateIDFmt(53, [IntToStr(Index)])
else
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}EDIXMLError052, [IntToStr(Index)])
+ raise EJclEDIError.CreateIDFmt(52, [IntToStr(Index)])
else
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}EDIXMLError051, [IntToStr(Index)]);
+ raise EJclEDIError.CreateIDFmt(51, [IntToStr(Index)]);
end;
//=== { TEDIXMLTransactionSetSegment } =======================================
@@ -1398,7 +1398,7 @@
SetLength(FEDIDataObjects, High(FEDIDataObjects));
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError040);
+ raise EJclEDIError.CreateID(40);
end;
procedure TEDIXMLDataObjectGroup.DeleteEDIDataObjects;
@@ -1418,15 +1418,15 @@
if Index <= High(FEDIDataObjects) then
begin
if not Assigned(FEDIDataObjects[Index]) then
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}EDIXMLError039, [IntToStr(Index)]);
+ raise EJclEDIError.CreateIDFmt(39, [IntToStr(Index)]);
Result := FEDIDataObjects[Index];
end
else
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}EDIXMLError038, [IntToStr(Index)])
+ raise EJclEDIError.CreateIDFmt(38, [IntToStr(Index)])
else
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}EDIXMLError037, [IntToStr(Index)])
+ raise EJclEDIError.CreateIDFmt(37, [IntToStr(Index)])
else
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}EDIXMLError036, [IntToStr(Index)]);
+ raise EJclEDIError.CreateIDFmt(36, [IntToStr(Index)]);
end;
function TEDIXMLDataObjectGroup.InsertEDIDataObject(InsertIndex: Integer;
@@ -1509,11 +1509,11 @@
FEDIDataObjects[Index] := EDIDataObject;
end
else
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}EDIXMLError035, [IntToStr(Index)])
+ raise EJclEDIError.CreateIDFmt(35, [IntToStr(Index)])
else
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}EDIXMLError034, [IntToStr(Index)])
+ raise EJclEDIError.CreateIDFmt(34, [IntToStr(Index)])
else
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}EDIXMLError033, [IntToStr(Index)]);
+ raise EJclEDIError.CreateIDFmt(33, [IntToStr(Index)]);
end;
//=== { TEDIXMLTransactionSetLoop } ==========================================
@@ -1549,7 +1549,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError030);
+ raise EJclEDIError.CreateID(30);
end;
AttributeString := FAttributes.CombineAttributes;
@@ -1584,7 +1584,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError029);
+ raise EJclEDIError.CreateID(29);
end;
// Set next start positon
StartPos := 1;
@@ -1598,7 +1598,7 @@
FAttributes.ParseAttributes(XMLStartTag);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError031);
+ raise EJclEDIError.CreateID(31);
// Set next start positon
StartPos := SearchResult + FDelimiters.ETDLength;
// Determine the nearest tag to search for
@@ -1631,10 +1631,10 @@
EDIDataObjects[I].Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError045);
+ raise EJclEDIError.CreateID(45);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError044);
+ raise EJclEDIError.CreateID(44);
end
else
begin
@@ -1669,10 +1669,10 @@
EDIDataObjects[I].Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError032);
+ raise EJclEDIError.CreateID(32);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError031);
+ raise EJclEDIError.CreateID(31);
end;
// Set next start positon
StartPos := SearchResult + FDelimiters.ETDLength;
@@ -1730,7 +1730,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError026);
+ raise EJclEDIError.CreateID(26);
end;
AttributeString := FAttributes.CombineAttributes;
@@ -1765,7 +1765,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError025);
+ raise EJclEDIError.CreateID(25);
end;
// Set next start positon
StartPos := 1;
@@ -1795,10 +1795,10 @@
EDIDataObjects[I].Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError045);
+ raise EJclEDIError.CreateID(45);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError044);
+ raise EJclEDIError.CreateID(44);
end
else
begin
@@ -1833,10 +1833,10 @@
EDIDataObjects[I].Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError032);
+ raise EJclEDIError.CreateID(32);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError031);
+ raise EJclEDIError.CreateID(31);
end;
// Set next start positon
StartPos := SearchResult + FDelimiters.ETDLength;
@@ -1870,7 +1870,7 @@
else
begin
FSTSegment := nil;
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError059);
+ raise EJclEDIError.CreateID(59);
end;
if FSESegment.Attributes.GetAttributeValue(XMLAttribute_Id) = XMLTag_TSTSegmentId then
@@ -1887,14 +1887,14 @@
else
begin
FSESegment := nil;
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError060);
+ raise EJclEDIError.CreateID(60);
end;
end
else
begin
FSTSegment := nil;
FSESegment := nil;
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError061);
+ raise EJclEDIError.CreateID(61);
end;
FData := '';
//
@@ -1944,7 +1944,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError016);
+ raise EJclEDIError.CreateID(16);
end;
AttributeString := FAttributes.CombineAttributes;
@@ -1977,7 +1977,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError015);
+ raise EJclEDIError.CreateID(15);
end;
// Search for Functional Group Header
StartPos := 1;
@@ -1998,13 +1998,13 @@
FGSSegment.Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError021);
+ raise EJclEDIError.CreateID(21);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError020);
+ raise EJclEDIError.CreateID(20);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError019);
+ raise EJclEDIError.CreateID(19);
// Set next start positon
StartPos := SearchResult + FDelimiters.ETDLength;
// Search for Transaction Set
@@ -2024,10 +2024,10 @@
EDIDataObjects[I].Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError028);
+ raise EJclEDIError.CreateID(28);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError027);
+ raise EJclEDIError.CreateID(27);
// Set next start positon
StartPos := SearchResult + FDelimiters.ETDLength;
// Search for Transaction Set
@@ -2051,13 +2051,13 @@
FGESegment.Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError024);
+ raise EJclEDIError.CreateID(24);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError023);
+ raise EJclEDIError.CreateID(23);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError022);
+ raise EJclEDIError.CreateID(22);
FData := '';
//
FState := ediDisassembled;
@@ -2104,7 +2104,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError005);
+ raise EJclEDIError.CreateID(5);
end;
AttributeString := FAttributes.CombineAttributes;
@@ -2137,7 +2137,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError006);
+ raise EJclEDIError.CreateID(6);
end;
// Search for Interchange Control Header
StartPos := 1;
@@ -2158,13 +2158,13 @@
FISASegment.Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError011);
+ raise EJclEDIError.CreateID(11);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError010);
+ raise EJclEDIError.CreateID(10);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError009);
+ raise EJclEDIError.CreateID(9);
// Set next start position. Move past the delimiter
StartPos := SearchResult + FDelimiters.ETDLength;
// Search for Functional Group
@@ -2184,10 +2184,10 @@
EDIDataObjects[I].Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError018);
+ raise EJclEDIError.CreateID(18);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError017);
+ raise EJclEDIError.CreateID(17);
// Set next start positon
StartPos := SearchResult + FDelimiters.ETDLength;
// Search for Functional Group
@@ -2211,13 +2211,13 @@
FIEASegment.Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError014);
+ raise EJclEDIError.CreateID(14);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError013);
+ raise EJclEDIError.CreateID(13);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError012);
+ raise EJclEDIError.CreateID(12);
FData := '';
//
FState := ediDisassembled;
@@ -2261,7 +2261,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError004);
+ raise EJclEDIError.CreateID(4);
end;
FData := FEDIXMLFileHeader.OutputXMLHeader;
@@ -2297,7 +2297,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError003);
+ raise EJclEDIError.CreateID(3);
end;
// Search for XML file heaer
StartPos := 1;
@@ -2342,10 +2342,10 @@
FEDIDataObjects[I].Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError008);
+ raise EJclEDIError.CreateID(8);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError007);
+ raise EJclEDIError.CreateID(7);
// Set next start position. Move past the delimiter
StartPos := SearchResult + FDelimiters.ETDLength;
// Search for Interchange
@@ -2387,7 +2387,7 @@
FData := StringReplace(FData, AnsiCrLf, '', [rfReplaceAll, rfIgnoreCase]);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError001);
+ raise EJclEDIError.CreateID(1);
end;
procedure TEDIXMLFile.LoadFromFile(const FileName: string);
@@ -2420,7 +2420,7 @@
end;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError002);
+ raise EJclEDIError.CreateID(2);
end;
procedure TEDIXMLFile.SaveToFile;
@@ -2441,7 +2441,7 @@
end;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}EDIXMLError002);
+ raise EJclEDIError.CreateID(2);
end;
//=== { TEDIXMLFileHeader } ==================================================
@@ -2573,7 +2573,7 @@
ConvertTransactionSetLoopToEDI(Result, XMLLoop);
end
else
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}EDIXMLError062, [XMLTransactionSet[I].ClassName]);
+ raise EJclEDIError.CreateIDFmt(62, [XMLTransactionSet[I].ClassName]);
end;
end;
@@ -2670,7 +2670,7 @@
ConvertTransactionSetLoopToEDI(EDITransactionSet, nXMLLoop);
end
else
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}EDIXMLError062, [XMLLoop[I].ClassName]);
+ raise EJclEDIError.CreateIDFmt(62, [XMLLoop[I].ClassName]);
end;
end;
@@ -2701,7 +2701,7 @@
ConvertTransactionSetLoopToXML(nEDILoop, nXMLLoop);
end
else
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}EDIXMLError062, [EDILoop[I].ClassName]);
+ raise EJclEDIError.CreateIDFmt(62, [EDILoop[I].ClassName]);
end;
end;
Modified: trunk/jcl/source/common/JclEDI_UNEDIFACT.pas
===================================================================
--- trunk/jcl/source/common/JclEDI_UNEDIFACT.pas 2007-11-30 19:24:18 UTC (rev 2242)
+++ trunk/jcl/source/common/JclEDI_UNEDIFACT.pas 2007-11-30 19:28:51 UTC (rev 2243)
@@ -575,7 +575,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError036);
+ raise EJclEDIError.CreateID(36);
end;
FData := FSegmentID;
@@ -629,7 +629,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError035);
+ raise EJclEDIError.CreateID(35);
end;
// Continue
StartPos := 1;
@@ -905,7 +905,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError031);
+ raise EJclEDIError.CreateID(31);
end;
FData := FUNHSegment.Assemble;
@@ -962,7 +962,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError030);
+ raise EJclEDIError.CreateID(30);
end;
// Find the first segment
StartPos := 1;
@@ -1135,7 +1135,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError020);
+ raise EJclEDIError.CreateID(20);
end;
FData := FUNGSegment.Assemble;
FUNGSegment.Data := '';
@@ -1190,7 +1190,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError019);
+ raise EJclEDIError.CreateID(19);
end;
// Find Functional Group Header Segment
StartPos := 1;
@@ -1205,14 +1205,14 @@
FUNGSegment.Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError021);
+ raise EJclEDIError.CreateID(21);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError022);
+ raise EJclEDIError.CreateID(22);
// Search for Message Header
SearchResult := StrSearch(FDelimiters.SD + UNHSegmentId + FDelimiters.ED, FData, StartPos);
if SearchResult <= 0 then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError032);
+ raise EJclEDIError.CreateID(32);
// Set next start position
StartPos := SearchResult + FDelimiters.SDLen; // Move past the delimiter
// Continue
@@ -1234,10 +1234,10 @@
FEDIDataObjects[I].Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError033);
+ raise EJclEDIError.CreateID(33);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError034);
+ raise EJclEDIError.CreateID(34);
// Set the next start position
StartPos := SearchResult + FDelimiters.SDLen; // Move past the delimiter
//
@@ -1260,10 +1260,10 @@
FUNESegment.Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError023);
+ raise EJclEDIError.CreateID(23);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError024);
+ raise EJclEDIError.CreateID(24);
FData := '';
FState := ediDisassembled;
end;
@@ -1397,7 +1397,7 @@
Result := '';
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError013);
+ raise EJclEDIError.CreateID(13);
FData := FUNBSegment.Assemble;
FUNBSegment.Data := '';
@@ -1429,7 +1429,7 @@
DeleteEDIDataObjects;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError012);
+ raise EJclEDIError.CreateID(12);
StartPos := 1;
// Search for Interchange Control Header
@@ -1442,10 +1442,10 @@
FUNBSegment.Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError014);
+ raise EJclEDIError.CreateID(14);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError015);
+ raise EJclEDIError.CreateID(15);
// Search for Functional Group Header
SearchResult := StrSearch(FDelimiters.SD + UNGSegmentId + FDelimiters.ED, FData, StartPos);
if SearchResult > 0 then
@@ -1471,10 +1471,10 @@
FEDIDataObjects[I].Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError023);
+ raise EJclEDIError.CreateID(23);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError024);
+ raise EJclEDIError.CreateID(24);
// Set next start positon
StartPos := SearchResult + FDelimiters.SDLen; // Move past the delimiter
// Verify the next record is a Functional Group Header
@@ -1488,7 +1488,7 @@
// Search for Message Header
SearchResult := StrSearch(FDelimiters.SD + UNHSegmentId + FDelimiters.ED, FData, StartPos);
if SearchResult <= 0 then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError032);
+ raise EJclEDIError.CreateID(32);
// Set next start position
StartPos := SearchResult + FDelimiters.SDLen; // Move past the delimiter
// Continue
@@ -1510,10 +1510,10 @@
FEDIDataObjects[I].Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError033);
+ raise EJclEDIError.CreateID(33);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError034);
+ raise EJclEDIError.CreateID(34);
// Set the next start position
StartPos := SearchResult + FDelimiters.SDLen; // Move past the delimiter
// Verify the next record is a Message Header
@@ -1534,10 +1534,10 @@
FUNZSegment.Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError016);
+ raise EJclEDIError.CreateID(16);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError017);
+ raise EJclEDIError.CreateID(17);
FData := '';
FState := ediDisassembled;
@@ -1796,7 +1796,7 @@
InternalAlternateDelimitersDetection(StartPos);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError015);
+ raise EJclEDIError.CreateID(15);
// Continue
while (StartPos + Length(UNBSegmentId)) < Length(FData) do
@@ -1820,10 +1820,10 @@
FEDIDataObjects[I].Disassemble;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError016);
+ raise EJclEDIError.CreateID(16);
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError017);
+ raise EJclEDIError.CreateID(17);
// Set next start position, Move past the delimiter
StartPos := SearchResult + FDelimiters.SDLen;
//
@@ -1847,7 +1847,7 @@
if foIgnoreGarbageAtEndOfFile in FEDIFileOptions then
Break
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError018);
+ raise EJclEDIError.CreateID(18);
end;
end;
FData := '';
@@ -1901,7 +1901,7 @@
end;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError001);
+ raise EJclEDIError.CreateID(1);
end;
procedure TEDIFile.LoadFromFile(const FileName: string);
@@ -1934,7 +1934,7 @@
end;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError002);
+ raise EJclEDIError.CreateID(2);
end;
procedure TEDIFile.SaveToFile;
@@ -1955,7 +1955,7 @@
end;
end
else
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError002);
+ raise EJclEDIError.CreateID(2);
end;
procedure TEDIFile.SetInterchangeControl(Index: Integer; Interchange: TEDIInterchangeControl);
@@ -1991,8 +1991,8 @@
for I := SearchResult downto 1 do
begin
Delimiter := Copy(FData, I, 1);
- if not (Delimiter[1] in
- AnsiLetters + AnsiDecDigits + [FDelimiters.ED[1], FDelimiters.SD[1]]) then
+ if not (AnsiChar(Delimiter[1]) in
+ AnsiLetters + AnsiDecDigits + [AnsiChar(FDelimiters.ED[1]), AnsiChar(FDelimiters.SD[1])]) then
begin
FDelimiters.SS := Copy(FData, I, 1);
Break;
@@ -2068,7 +2068,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError038);
+ raise EJclEDIError.CreateID(38);
end;
if GetCount > 0 then
@@ -2123,7 +2123,7 @@
begin
FDelimiters := InternalAssignDelimiters;
if not Assigned(FDelimiters) then
- raise EJclEDIError.CreateRes({$IFNDEF CLR}@{$ENDIF}RsEDIError037);
+ raise EJclEDIError.CreateID(37);
end;
StartPos := 1;
SearchResult := StrSearch(FDelimiters.SS, FData, StartPos);
Modified: trunk/jcl/source/common/JclEDI_UNEDIFACT_Ext.pas
===================================================================
--- trunk/jcl/source/common/JclEDI_UNEDIFACT_Ext.pas 2007-11-30 19:24:18 UTC (rev 2242)
+++ trunk/jcl/source/common/JclEDI_UNEDIFACT_Ext.pas 2007-11-30 19:28:51 UTC (rev 2243)
@@ -226,9 +226,8 @@
for I := 0 to DataSegment.ElementCount - 1 do
begin
if I > J then
- raise EJclEDIError.CreateResFmt({$IFNDEF CLR}@{$ENDIF}RsEDIError058,
- [IntToStr(I), DataSegment.SegmentId,
- IntToStr(DataSegment.GetIndexPositionFromParent)]);
+ raise EJclEDIError.CreateIDFmt(58, [IntToStr(I), DataSegment.SegmentId,
+ IntToStr(DataSegment.GetIndexPositionFromParent)]);
DataSegment.EDIDataObject[I].SpecPointer := SpecSegment.Elements[I];
// ToDo: Assign SubElement Specs
end;
Modified: trunk/jcl/source/common/JclResources.pas
===================================================================
--- trunk/jcl/source/common/JclResources.pas 2007-11-30 19:24:18 UTC (rev 2242)
+++ trunk/jcl/source/common/JclResources.pas 2007-11-30 19:28:51 UTC (rev 2243)
@@ -918,6 +918,32 @@
RsUnknownAttribute = 'Unknown Attribute';
+
+const
+ {$IFDEF CLR}
+ RsEDIErrors: array [1..58] of string =
+ ( RsEDIError001, RsEDIError002, RsEDIError003, RsEDIError004, RsEDIError005, RsEDIError006, RsEDIError007,
+ RsEDIError008, RsEDIError009, RsEDIError010, RsEDIError011, RsEDIError012, RsEDIError013, RsEDIError014,
+ RsEDIError015, RsEDIError016, RsEDIError017, RsEDIError018, RsEDIError019, RsEDIError020, RsEDIError021,
+ RsEDIError022, RsEDIError023, RsEDIError024, RsEDIError025, RsEDIError026, RsEDIError027, RsEDIError028,
+ RsEDIError029, RsEDIError030, RsEDIError031, RsEDIError032, RsEDIError033, RsEDIError034, RsEDIError035,
+ RsEDIError036, RsEDIError037, RsEDIError038, RsEDIError039, RsEDIError040, RsEDIError041, RsEDIError042,
+ RsEDIError043, RsEDIError044, RsEDIError045, RsEDIError046, RsEDIError047, RsEDIError048, RsEDIError049,
+ RsEDIError050, RsEDIError051, RsEDIError052, RsEDIError053, RsEDIError054, RsEDIError055, RsEDIError056,
+ RsEDIError057, RsEDIError058 );
+ {$ELSE ~CLR}
+ RsEDIErrors: array [1..58] of PResStringRec =
+ ( @RsEDIError001, @RsEDIError002, @RsEDIError003, @RsEDIError004, @RsEDIError005, @RsEDIError006, @RsEDIError007,
+ @RsEDIError008, @RsEDIError009, @RsEDIError010, @RsEDIError011, @RsEDIError012, @RsEDIError013, @RsEDIError014,
+ @RsEDIError015, @RsEDIError016, @RsEDIError017, @RsEDIError018, @RsEDIError019, @RsEDIError020, @RsEDIError021,
+ @RsEDIError022, @RsEDIError023, @RsEDIError024, @RsEDIError025, @RsEDIError026, @RsEDIError027, @RsEDIError028,
+ @RsEDIError029, @RsEDIError030, @RsEDIError031, @RsEDIError032, @RsEDIError033, @RsEDIError034, @RsEDIError035,
+ @RsEDIError036, @RsEDIError037, @RsEDIError038, @RsEDIError039, @RsEDIError040, @RsEDIError041, @RsEDIError042,
+ @RsEDIError043, @RsEDIError044, @RsEDIError045, @RsEDIError046, @RsEDIError047, @RsEDIError048, @RsEDIError049,
+ @RsEDIError050, @RsEDIError051, @RsEDIError052, @RsEDIError053, @RsEDIError054, @RsEDIError055, @RsEDIError056,
+ @RsEDIError057, @RsEDIError058 );
+ {$ENDIF ~CLR}
+
//== JclEDISEF ===============================================================
resourcestring
// Transaction Set:850
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2007-11-30 19:24:23
|
Revision: 2242
http://jcl.svn.sourceforge.net/jcl/?rev=2242&view=rev
Author: outchy
Date: 2007-11-30 11:24:18 -0800 (Fri, 30 Nov 2007)
Log Message:
-----------
Renamed entry class names to avoid conflicts
Modified Paths:
--------------
trunk/jcl/source/common/JclHashMaps.pas
trunk/jcl/source/common/JclSortedMaps.pas
trunk/jcl/source/prototypes/JclHashMaps.pas
trunk/jcl/source/prototypes/JclSortedMaps.pas
Modified: trunk/jcl/source/common/JclHashMaps.pas
===================================================================
--- trunk/jcl/source/common/JclHashMaps.pas 2007-11-30 16:25:11 UTC (rev 2241)
+++ trunk/jcl/source/common/JclHashMaps.pas 2007-11-30 19:24:18 UTC (rev 2242)
@@ -60,17 +60,17 @@
TJclHashFunction = function(Key, Range: Integer): Integer;
- TJclIntfIntfEntry = record
+ TJclIntfIntfHashEntry = record
Key: IInterface;
Value: IInterface;
end;
- TJclIntfIntfEntryArray = array of TJclIntfIntfEntry;
+ TJclIntfIntfHashEntryArray = array of TJclIntfIntfHashEntry;
TJclIntfIntfBucket = class
public
Size: Integer;
- Entries: TJclIntfIntfEntryArray;
+ Entries: TJclIntfIntfHashEntryArray;
end;
TJclIntfIntfBucketArray = array of TJclIntfIntfBucket;
@@ -84,7 +84,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclIntfIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclIntfIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -116,17 +116,17 @@
end;
- TJclAnsiStrIntfEntry = record
+ TJclAnsiStrIntfHashEntry = record
Key: AnsiString;
Value: IInterface;
end;
- TJclAnsiStrIntfEntryArray = array of TJclAnsiStrIntfEntry;
+ TJclAnsiStrIntfHashEntryArray = array of TJclAnsiStrIntfHashEntry;
TJclAnsiStrIntfBucket = class
public
Size: Integer;
- Entries: TJclAnsiStrIntfEntryArray;
+ Entries: TJclAnsiStrIntfHashEntryArray;
end;
TJclAnsiStrIntfBucketArray = array of TJclAnsiStrIntfBucket;
@@ -140,7 +140,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclAnsiStrIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclAnsiStrIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -172,17 +172,17 @@
end;
- TJclIntfAnsiStrEntry = record
+ TJclIntfAnsiStrHashEntry = record
Key: IInterface;
Value: AnsiString;
end;
- TJclIntfAnsiStrEntryArray = array of TJclIntfAnsiStrEntry;
+ TJclIntfAnsiStrHashEntryArray = array of TJclIntfAnsiStrHashEntry;
TJclIntfAnsiStrBucket = class
public
Size: Integer;
- Entries: TJclIntfAnsiStrEntryArray;
+ Entries: TJclIntfAnsiStrHashEntryArray;
end;
TJclIntfAnsiStrBucketArray = array of TJclIntfAnsiStrBucket;
@@ -196,7 +196,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclIntfAnsiStrEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclIntfAnsiStrHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -229,17 +229,17 @@
end;
- TJclAnsiStrAnsiStrEntry = record
+ TJclAnsiStrAnsiStrHashEntry = record
Key: AnsiString;
Value: AnsiString;
end;
- TJclAnsiStrAnsiStrEntryArray = array of TJclAnsiStrAnsiStrEntry;
+ TJclAnsiStrAnsiStrHashEntryArray = array of TJclAnsiStrAnsiStrHashEntry;
TJclAnsiStrAnsiStrBucket = class
public
Size: Integer;
- Entries: TJclAnsiStrAnsiStrEntryArray;
+ Entries: TJclAnsiStrAnsiStrHashEntryArray;
end;
TJclAnsiStrAnsiStrBucketArray = array of TJclAnsiStrAnsiStrBucket;
@@ -253,7 +253,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclAnsiStrAnsiStrEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclAnsiStrAnsiStrHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -285,17 +285,17 @@
end;
- TJclWideStrIntfEntry = record
+ TJclWideStrIntfHashEntry = record
Key: WideString;
Value: IInterface;
end;
- TJclWideStrIntfEntryArray = array of TJclWideStrIntfEntry;
+ TJclWideStrIntfHashEntryArray = array of TJclWideStrIntfHashEntry;
TJclWideStrIntfBucket = class
public
Size: Integer;
- Entries: TJclWideStrIntfEntryArray;
+ Entries: TJclWideStrIntfHashEntryArray;
end;
TJclWideStrIntfBucketArray = array of TJclWideStrIntfBucket;
@@ -309,7 +309,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclWideStrIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclWideStrIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -341,17 +341,17 @@
end;
- TJclIntfWideStrEntry = record
+ TJclIntfWideStrHashEntry = record
Key: IInterface;
Value: WideString;
end;
- TJclIntfWideStrEntryArray = array of TJclIntfWideStrEntry;
+ TJclIntfWideStrHashEntryArray = array of TJclIntfWideStrHashEntry;
TJclIntfWideStrBucket = class
public
Size: Integer;
- Entries: TJclIntfWideStrEntryArray;
+ Entries: TJclIntfWideStrHashEntryArray;
end;
TJclIntfWideStrBucketArray = array of TJclIntfWideStrBucket;
@@ -365,7 +365,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclIntfWideStrEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclIntfWideStrHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -398,17 +398,17 @@
end;
- TJclWideStrWideStrEntry = record
+ TJclWideStrWideStrHashEntry = record
Key: WideString;
Value: WideString;
end;
- TJclWideStrWideStrEntryArray = array of TJclWideStrWideStrEntry;
+ TJclWideStrWideStrHashEntryArray = array of TJclWideStrWideStrHashEntry;
TJclWideStrWideStrBucket = class
public
Size: Integer;
- Entries: TJclWideStrWideStrEntryArray;
+ Entries: TJclWideStrWideStrHashEntryArray;
end;
TJclWideStrWideStrBucketArray = array of TJclWideStrWideStrBucket;
@@ -422,7 +422,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclWideStrWideStrEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclWideStrWideStrHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -465,17 +465,17 @@
{$ENDIF CONTAINER_WIDESTR}
- TJclSingleIntfEntry = record
+ TJclSingleIntfHashEntry = record
Key: Single;
Value: IInterface;
end;
- TJclSingleIntfEntryArray = array of TJclSingleIntfEntry;
+ TJclSingleIntfHashEntryArray = array of TJclSingleIntfHashEntry;
TJclSingleIntfBucket = class
public
Size: Integer;
- Entries: TJclSingleIntfEntryArray;
+ Entries: TJclSingleIntfHashEntryArray;
end;
TJclSingleIntfBucketArray = array of TJclSingleIntfBucket;
@@ -489,7 +489,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclSingleIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclSingleIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -521,17 +521,17 @@
end;
- TJclIntfSingleEntry = record
+ TJclIntfSingleHashEntry = record
Key: IInterface;
Value: Single;
end;
- TJclIntfSingleEntryArray = array of TJclIntfSingleEntry;
+ TJclIntfSingleHashEntryArray = array of TJclIntfSingleHashEntry;
TJclIntfSingleBucket = class
public
Size: Integer;
- Entries: TJclIntfSingleEntryArray;
+ Entries: TJclIntfSingleHashEntryArray;
end;
TJclIntfSingleBucketArray = array of TJclIntfSingleBucket;
@@ -545,7 +545,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclIntfSingleEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclIntfSingleHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -578,17 +578,17 @@
end;
- TJclSingleSingleEntry = record
+ TJclSingleSingleHashEntry = record
Key: Single;
Value: Single;
end;
- TJclSingleSingleEntryArray = array of TJclSingleSingleEntry;
+ TJclSingleSingleHashEntryArray = array of TJclSingleSingleHashEntry;
TJclSingleSingleBucket = class
public
Size: Integer;
- Entries: TJclSingleSingleEntryArray;
+ Entries: TJclSingleSingleHashEntryArray;
end;
TJclSingleSingleBucketArray = array of TJclSingleSingleBucket;
@@ -602,7 +602,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclSingleSingleEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclSingleSingleHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -634,17 +634,17 @@
end;
- TJclDoubleIntfEntry = record
+ TJclDoubleIntfHashEntry = record
Key: Double;
Value: IInterface;
end;
- TJclDoubleIntfEntryArray = array of TJclDoubleIntfEntry;
+ TJclDoubleIntfHashEntryArray = array of TJclDoubleIntfHashEntry;
TJclDoubleIntfBucket = class
public
Size: Integer;
- Entries: TJclDoubleIntfEntryArray;
+ Entries: TJclDoubleIntfHashEntryArray;
end;
TJclDoubleIntfBucketArray = array of TJclDoubleIntfBucket;
@@ -658,7 +658,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclDoubleIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclDoubleIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -690,17 +690,17 @@
end;
- TJclIntfDoubleEntry = record
+ TJclIntfDoubleHashEntry = record
Key: IInterface;
Value: Double;
end;
- TJclIntfDoubleEntryArray = array of TJclIntfDoubleEntry;
+ TJclIntfDoubleHashEntryArray = array of TJclIntfDoubleHashEntry;
TJclIntfDoubleBucket = class
public
Size: Integer;
- Entries: TJclIntfDoubleEntryArray;
+ Entries: TJclIntfDoubleHashEntryArray;
end;
TJclIntfDoubleBucketArray = array of TJclIntfDoubleBucket;
@@ -714,7 +714,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclIntfDoubleEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclIntfDoubleHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -747,17 +747,17 @@
end;
- TJclDoubleDoubleEntry = record
+ TJclDoubleDoubleHashEntry = record
Key: Double;
Value: Double;
end;
- TJclDoubleDoubleEntryArray = array of TJclDoubleDoubleEntry;
+ TJclDoubleDoubleHashEntryArray = array of TJclDoubleDoubleHashEntry;
TJclDoubleDoubleBucket = class
public
Size: Integer;
- Entries: TJclDoubleDoubleEntryArray;
+ Entries: TJclDoubleDoubleHashEntryArray;
end;
TJclDoubleDoubleBucketArray = array of TJclDoubleDoubleBucket;
@@ -771,7 +771,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclDoubleDoubleEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclDoubleDoubleHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -803,17 +803,17 @@
end;
- TJclExtendedIntfEntry = record
+ TJclExtendedIntfHashEntry = record
Key: Extended;
Value: IInterface;
end;
- TJclExtendedIntfEntryArray = array of TJclExtendedIntfEntry;
+ TJclExtendedIntfHashEntryArray = array of TJclExtendedIntfHashEntry;
TJclExtendedIntfBucket = class
public
Size: Integer;
- Entries: TJclExtendedIntfEntryArray;
+ Entries: TJclExtendedIntfHashEntryArray;
end;
TJclExtendedIntfBucketArray = array of TJclExtendedIntfBucket;
@@ -827,7 +827,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclExtendedIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclExtendedIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -859,17 +859,17 @@
end;
- TJclIntfExtendedEntry = record
+ TJclIntfExtendedHashEntry = record
Key: IInterface;
Value: Extended;
end;
- TJclIntfExtendedEntryArray = array of TJclIntfExtendedEntry;
+ TJclIntfExtendedHashEntryArray = array of TJclIntfExtendedHashEntry;
TJclIntfExtendedBucket = class
public
Size: Integer;
- Entries: TJclIntfExtendedEntryArray;
+ Entries: TJclIntfExtendedHashEntryArray;
end;
TJclIntfExtendedBucketArray = array of TJclIntfExtendedBucket;
@@ -883,7 +883,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclIntfExtendedEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclIntfExtendedHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -916,17 +916,17 @@
end;
- TJclExtendedExtendedEntry = record
+ TJclExtendedExtendedHashEntry = record
Key: Extended;
Value: Extended;
end;
- TJclExtendedExtendedEntryArray = array of TJclExtendedExtendedEntry;
+ TJclExtendedExtendedHashEntryArray = array of TJclExtendedExtendedHashEntry;
TJclExtendedExtendedBucket = class
public
Size: Integer;
- Entries: TJclExtendedExtendedEntryArray;
+ Entries: TJclExtendedExtendedHashEntryArray;
end;
TJclExtendedExtendedBucketArray = array of TJclExtendedExtendedBucket;
@@ -940,7 +940,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclExtendedExtendedEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclExtendedExtendedHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -988,17 +988,17 @@
{$ENDIF MATH_SINGLE_PRECISION}
- TJclIntegerIntfEntry = record
+ TJclIntegerIntfHashEntry = record
Key: Integer;
Value: IInterface;
end;
- TJclIntegerIntfEntryArray = array of TJclIntegerIntfEntry;
+ TJclIntegerIntfHashEntryArray = array of TJclIntegerIntfHashEntry;
TJclIntegerIntfBucket = class
public
Size: Integer;
- Entries: TJclIntegerIntfEntryArray;
+ Entries: TJclIntegerIntfHashEntryArray;
end;
TJclIntegerIntfBucketArray = array of TJclIntegerIntfBucket;
@@ -1012,7 +1012,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclIntegerIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclIntegerIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -1044,17 +1044,17 @@
end;
- TJclIntfIntegerEntry = record
+ TJclIntfIntegerHashEntry = record
Key: IInterface;
Value: Integer;
end;
- TJclIntfIntegerEntryArray = array of TJclIntfIntegerEntry;
+ TJclIntfIntegerHashEntryArray = array of TJclIntfIntegerHashEntry;
TJclIntfIntegerBucket = class
public
Size: Integer;
- Entries: TJclIntfIntegerEntryArray;
+ Entries: TJclIntfIntegerHashEntryArray;
end;
TJclIntfIntegerBucketArray = array of TJclIntfIntegerBucket;
@@ -1068,7 +1068,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclIntfIntegerEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclIntfIntegerHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -1101,17 +1101,17 @@
end;
- TJclIntegerIntegerEntry = record
+ TJclIntegerIntegerHashEntry = record
Key: Integer;
Value: Integer;
end;
- TJclIntegerIntegerEntryArray = array of TJclIntegerIntegerEntry;
+ TJclIntegerIntegerHashEntryArray = array of TJclIntegerIntegerHashEntry;
TJclIntegerIntegerBucket = class
public
Size: Integer;
- Entries: TJclIntegerIntegerEntryArray;
+ Entries: TJclIntegerIntegerHashEntryArray;
end;
TJclIntegerIntegerBucketArray = array of TJclIntegerIntegerBucket;
@@ -1125,7 +1125,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclIntegerIntegerEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclIntegerIntegerHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -1157,17 +1157,17 @@
end;
- TJclCardinalIntfEntry = record
+ TJclCardinalIntfHashEntry = record
Key: Cardinal;
Value: IInterface;
end;
- TJclCardinalIntfEntryArray = array of TJclCardinalIntfEntry;
+ TJclCardinalIntfHashEntryArray = array of TJclCardinalIntfHashEntry;
TJclCardinalIntfBucket = class
public
Size: Integer;
- Entries: TJclCardinalIntfEntryArray;
+ Entries: TJclCardinalIntfHashEntryArray;
end;
TJclCardinalIntfBucketArray = array of TJclCardinalIntfBucket;
@@ -1181,7 +1181,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclCardinalIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclCardinalIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -1213,17 +1213,17 @@
end;
- TJclIntfCardinalEntry = record
+ TJclIntfCardinalHashEntry = record
Key: IInterface;
Value: Cardinal;
end;
- TJclIntfCardinalEntryArray = array of TJclIntfCardinalEntry;
+ TJclIntfCardinalHashEntryArray = array of TJclIntfCardinalHashEntry;
TJclIntfCardinalBucket = class
public
Size: Integer;
- Entries: TJclIntfCardinalEntryArray;
+ Entries: TJclIntfCardinalHashEntryArray;
end;
TJclIntfCardinalBucketArray = array of TJclIntfCardinalBucket;
@@ -1237,7 +1237,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclIntfCardinalEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclIntfCardinalHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -1270,17 +1270,17 @@
end;
- TJclCardinalCardinalEntry = record
+ TJclCardinalCardinalHashEntry = record
Key: Cardinal;
Value: Cardinal;
end;
- TJclCardinalCardinalEntryArray = array of TJclCardinalCardinalEntry;
+ TJclCardinalCardinalHashEntryArray = array of TJclCardinalCardinalHashEntry;
TJclCardinalCardinalBucket = class
public
Size: Integer;
- Entries: TJclCardinalCardinalEntryArray;
+ Entries: TJclCardinalCardinalHashEntryArray;
end;
TJclCardinalCardinalBucketArray = array of TJclCardinalCardinalBucket;
@@ -1294,7 +1294,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclCardinalCardinalEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclCardinalCardinalHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -1326,17 +1326,17 @@
end;
- TJclInt64IntfEntry = record
+ TJclInt64IntfHashEntry = record
Key: Int64;
Value: IInterface;
end;
- TJclInt64IntfEntryArray = array of TJclInt64IntfEntry;
+ TJclInt64IntfHashEntryArray = array of TJclInt64IntfHashEntry;
TJclInt64IntfBucket = class
public
Size: Integer;
- Entries: TJclInt64IntfEntryArray;
+ Entries: TJclInt64IntfHashEntryArray;
end;
TJclInt64IntfBucketArray = array of TJclInt64IntfBucket;
@@ -1350,7 +1350,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclInt64IntfEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclInt64IntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -1382,17 +1382,17 @@
end;
- TJclIntfInt64Entry = record
+ TJclIntfInt64HashEntry = record
Key: IInterface;
Value: Int64;
end;
- TJclIntfInt64EntryArray = array of TJclIntfInt64Entry;
+ TJclIntfInt64HashEntryArray = array of TJclIntfInt64HashEntry;
TJclIntfInt64Bucket = class
public
Size: Integer;
- Entries: TJclIntfInt64EntryArray;
+ Entries: TJclIntfInt64HashEntryArray;
end;
TJclIntfInt64BucketArray = array of TJclIntfInt64Bucket;
@@ -1406,7 +1406,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclIntfInt64EntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclIntfInt64HashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -1439,17 +1439,17 @@
end;
- TJclInt64Int64Entry = record
+ TJclInt64Int64HashEntry = record
Key: Int64;
Value: Int64;
end;
- TJclInt64Int64EntryArray = array of TJclInt64Int64Entry;
+ TJclInt64Int64HashEntryArray = array of TJclInt64Int64HashEntry;
TJclInt64Int64Bucket = class
public
Size: Integer;
- Entries: TJclInt64Int64EntryArray;
+ Entries: TJclInt64Int64HashEntryArray;
end;
TJclInt64Int64BucketArray = array of TJclInt64Int64Bucket;
@@ -1463,7 +1463,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclInt64Int64EntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclInt64Int64HashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -1496,17 +1496,17 @@
{$IFNDEF CLR}
- TJclPtrIntfEntry = record
+ TJclPtrIntfHashEntry = record
Key: Pointer;
Value: IInterface;
end;
- TJclPtrIntfEntryArray = array of TJclPtrIntfEntry;
+ TJclPtrIntfHashEntryArray = array of TJclPtrIntfHashEntry;
TJclPtrIntfBucket = class
public
Size: Integer;
- Entries: TJclPtrIntfEntryArray;
+ Entries: TJclPtrIntfHashEntryArray;
end;
TJclPtrIntfBucketArray = array of TJclPtrIntfBucket;
@@ -1520,7 +1520,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclPtrIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclPtrIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -1552,17 +1552,17 @@
end;
- TJclIntfPtrEntry = record
+ TJclIntfPtrHashEntry = record
Key: IInterface;
Value: Pointer;
end;
- TJclIntfPtrEntryArray = array of TJclIntfPtrEntry;
+ TJclIntfPtrHashEntryArray = array of TJclIntfPtrHashEntry;
TJclIntfPtrBucket = class
public
Size: Integer;
- Entries: TJclIntfPtrEntryArray;
+ Entries: TJclIntfPtrHashEntryArray;
end;
TJclIntfPtrBucketArray = array of TJclIntfPtrBucket;
@@ -1576,7 +1576,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclIntfPtrEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclIntfPtrHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -1609,17 +1609,17 @@
end;
- TJclPtrPtrEntry = record
+ TJclPtrPtrHashEntry = record
Key: Pointer;
Value: Pointer;
end;
- TJclPtrPtrEntryArray = array of TJclPtrPtrEntry;
+ TJclPtrPtrHashEntryArray = array of TJclPtrPtrHashEntry;
TJclPtrPtrBucket = class
public
Size: Integer;
- Entries: TJclPtrPtrEntryArray;
+ Entries: TJclPtrPtrHashEntryArray;
end;
TJclPtrPtrBucketArray = array of TJclPtrPtrBucket;
@@ -1633,7 +1633,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclPtrPtrEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclPtrPtrHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -1666,17 +1666,17 @@
{$ENDIF ~CLR}
- TJclIntfEntry = record
+ TJclIntfHashEntry = record
Key: IInterface;
Value: TObject;
end;
- TJclIntfEntryArray = array of TJclIntfEntry;
+ TJclIntfHashEntryArray = array of TJclIntfHashEntry;
TJclIntfBucket = class
public
Size: Integer;
- Entries: TJclIntfEntryArray;
+ Entries: TJclIntfHashEntryArray;
end;
TJclIntfBucketArray = array of TJclIntfBucket;
@@ -1691,7 +1691,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -1727,17 +1727,17 @@
end;
- TJclAnsiStrEntry = record
+ TJclAnsiStrHashEntry = record
Key: AnsiString;
Value: TObject;
end;
- TJclAnsiStrEntryArray = array of TJclAnsiStrEntry;
+ TJclAnsiStrHashEntryArray = array of TJclAnsiStrHashEntry;
TJclAnsiStrBucket = class
public
Size: Integer;
- Entries: TJclAnsiStrEntryArray;
+ Entries: TJclAnsiStrHashEntryArray;
end;
TJclAnsiStrBucketArray = array of TJclAnsiStrBucket;
@@ -1752,7 +1752,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclAnsiStrEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclAnsiStrHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -1787,17 +1787,17 @@
end;
- TJclWideStrEntry = record
+ TJclWideStrHashEntry = record
Key: WideString;
Value: TObject;
end;
- TJclWideStrEntryArray = array of TJclWideStrEntry;
+ TJclWideStrHashEntryArray = array of TJclWideStrHashEntry;
TJclWideStrBucket = class
public
Size: Integer;
- Entries: TJclWideStrEntryArray;
+ Entries: TJclWideStrHashEntryArray;
end;
TJclWideStrBucketArray = array of TJclWideStrBucket;
@@ -1812,7 +1812,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclWideStrEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclWideStrHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -1854,17 +1854,17 @@
{$ENDIF CONTAINER_WIDESTR}
- TJclSingleEntry = record
+ TJclSingleHashEntry = record
Key: Single;
Value: TObject;
end;
- TJclSingleEntryArray = array of TJclSingleEntry;
+ TJclSingleHashEntryArray = array of TJclSingleHashEntry;
TJclSingleBucket = class
public
Size: Integer;
- Entries: TJclSingleEntryArray;
+ Entries: TJclSingleHashEntryArray;
end;
TJclSingleBucketArray = array of TJclSingleBucket;
@@ -1879,7 +1879,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclSingleEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclSingleHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -1914,17 +1914,17 @@
end;
- TJclDoubleEntry = record
+ TJclDoubleHashEntry = record
Key: Double;
Value: TObject;
end;
- TJclDoubleEntryArray = array of TJclDoubleEntry;
+ TJclDoubleHashEntryArray = array of TJclDoubleHashEntry;
TJclDoubleBucket = class
public
Size: Integer;
- Entries: TJclDoubleEntryArray;
+ Entries: TJclDoubleHashEntryArray;
end;
TJclDoubleBucketArray = array of TJclDoubleBucket;
@@ -1939,7 +1939,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclDoubleEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclDoubleHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -1974,17 +1974,17 @@
end;
- TJclExtendedEntry = record
+ TJclExtendedHashEntry = record
Key: Extended;
Value: TObject;
end;
- TJclExtendedEntryArray = array of TJclExtendedEntry;
+ TJclExtendedHashEntryArray = array of TJclExtendedHashEntry;
TJclExtendedBucket = class
public
Size: Integer;
- Entries: TJclExtendedEntryArray;
+ Entries: TJclExtendedHashEntryArray;
end;
TJclExtendedBucketArray = array of TJclExtendedBucket;
@@ -1999,7 +1999,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclExtendedEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclExtendedHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -2044,17 +2044,17 @@
{$ENDIF MATH_SINGLE_PRECISION}
- TJclIntegerEntry = record
+ TJclIntegerHashEntry = record
Key: Integer;
Value: TObject;
end;
- TJclIntegerEntryArray = array of TJclIntegerEntry;
+ TJclIntegerHashEntryArray = array of TJclIntegerHashEntry;
TJclIntegerBucket = class
public
Size: Integer;
- Entries: TJclIntegerEntryArray;
+ Entries: TJclIntegerHashEntryArray;
end;
TJclIntegerBucketArray = array of TJclIntegerBucket;
@@ -2069,7 +2069,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclIntegerEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclIntegerHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -2104,17 +2104,17 @@
end;
- TJclCardinalEntry = record
+ TJclCardinalHashEntry = record
Key: Cardinal;
Value: TObject;
end;
- TJclCardinalEntryArray = array of TJclCardinalEntry;
+ TJclCardinalHashEntryArray = array of TJclCardinalHashEntry;
TJclCardinalBucket = class
public
Size: Integer;
- Entries: TJclCardinalEntryArray;
+ Entries: TJclCardinalHashEntryArray;
end;
TJclCardinalBucketArray = array of TJclCardinalBucket;
@@ -2129,7 +2129,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclCardinalEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclCardinalHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -2164,17 +2164,17 @@
end;
- TJclInt64Entry = record
+ TJclInt64HashEntry = record
Key: Int64;
Value: TObject;
end;
- TJclInt64EntryArray = array of TJclInt64Entry;
+ TJclInt64HashEntryArray = array of TJclInt64HashEntry;
TJclInt64Bucket = class
public
Size: Integer;
- Entries: TJclInt64EntryArray;
+ Entries: TJclInt64HashEntryArray;
end;
TJclInt64BucketArray = array of TJclInt64Bucket;
@@ -2189,7 +2189,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclInt64EntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclInt64HashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -2225,17 +2225,17 @@
{$IFNDEF CLR}
- TJclPtrEntry = record
+ TJclPtrHashEntry = record
Key: Pointer;
Value: TObject;
end;
- TJclPtrEntryArray = array of TJclPtrEntry;
+ TJclPtrHashEntryArray = array of TJclPtrHashEntry;
TJclPtrBucket = class
public
Size: Integer;
- Entries: TJclPtrEntryArray;
+ Entries: TJclPtrHashEntryArray;
end;
TJclPtrBucketArray = array of TJclPtrBucket;
@@ -2250,7 +2250,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclPtrEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclPtrHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -2286,17 +2286,17 @@
{$ENDIF ~CLR}
- TJclEntry = record
+ TJclHashEntry = record
Key: TObject;
Value: TObject;
end;
- TJclEntryArray = array of TJclEntry;
+ TJclHashEntryArray = array of TJclHashEntry;
TJclBucket = class
public
Size: Integer;
- Entries: TJclEntryArray;
+ Entries: TJclHashEntryArray;
end;
TJclBucketArray = array of TJclBucket;
@@ -2312,7 +2312,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclEntryArray; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclHashEntryArray; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -2352,17 +2352,17 @@
{$IFDEF SUPPORTS_GENERICS}
- TJclEntry<TKey,TValue> = record
+ TJclHashEntry<TKey,TValue> = record
Key: TKey;
Value: TValue;
end;
- TJclEntryArray<TKey,TValue> = array of TJclEntry<TKey,TValue>;
+ TJclHashEntryArray<TKey,TValue> = array of TJclHashEntry<TKey,TValue>;
TJclBucket<TKey,TValue> = class
public
Size: Integer;
- Entries: TJclEntryArray<TKey,TValue>;
+ Entries: TJclHashEntryArray<TKey,TValue>;
end;
TJclBucketArray<TKey,TValue> = array of TJclBucket<TKey,TValue>;
@@ -2378,7 +2378,7 @@
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
procedure AssignPropertiesTo(Dest: TJclAbstractContainerBase); override;
- procedure MoveArray(var List: TJclEntryArray<TKey,TValue>; FromIndex, ToIndex, Count: Integer);
+ procedure MoveArray(var List: TJclHashEntryArray<TKey,TValue>; FromIndex, ToIndex, Count: Integer);
{ IJclPackable }
procedure Pack; override;
procedure SetCapacity(Value: Integer); override;
@@ -2822,7 +2822,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclIntfIntfHashMap.MoveArray(var List: TJclIntfIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclIntfIntfHashMap.MoveArray(var List: TJclIntfIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -3388,7 +3388,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclAnsiStrIntfHashMap.MoveArray(var List: TJclAnsiStrIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclAnsiStrIntfHashMap.MoveArray(var List: TJclAnsiStrIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -3956,7 +3956,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclIntfAnsiStrHashMap.MoveArray(var List: TJclIntfAnsiStrEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclIntfAnsiStrHashMap.MoveArray(var List: TJclIntfAnsiStrHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -4519,7 +4519,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclAnsiStrAnsiStrHashMap.MoveArray(var List: TJclAnsiStrAnsiStrEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclAnsiStrAnsiStrHashMap.MoveArray(var List: TJclAnsiStrAnsiStrHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -5085,7 +5085,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclWideStrIntfHashMap.MoveArray(var List: TJclWideStrIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclWideStrIntfHashMap.MoveArray(var List: TJclWideStrIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -5655,7 +5655,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclIntfWideStrHashMap.MoveArray(var List: TJclIntfWideStrEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclIntfWideStrHashMap.MoveArray(var List: TJclIntfWideStrHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -6221,7 +6221,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclWideStrWideStrHashMap.MoveArray(var List: TJclWideStrWideStrEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclWideStrWideStrHashMap.MoveArray(var List: TJclWideStrWideStrHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -6787,7 +6787,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclSingleIntfHashMap.MoveArray(var List: TJclSingleIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclSingleIntfHashMap.MoveArray(var List: TJclSingleIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -7357,7 +7357,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclIntfSingleHashMap.MoveArray(var List: TJclIntfSingleEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclIntfSingleHashMap.MoveArray(var List: TJclIntfSingleHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -7923,7 +7923,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclSingleSingleHashMap.MoveArray(var List: TJclSingleSingleEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclSingleSingleHashMap.MoveArray(var List: TJclSingleSingleHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -8489,7 +8489,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclDoubleIntfHashMap.MoveArray(var List: TJclDoubleIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclDoubleIntfHashMap.MoveArray(var List: TJclDoubleIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -9059,7 +9059,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclIntfDoubleHashMap.MoveArray(var List: TJclIntfDoubleEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclIntfDoubleHashMap.MoveArray(var List: TJclIntfDoubleHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -9625,7 +9625,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclDoubleDoubleHashMap.MoveArray(var List: TJclDoubleDoubleEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclDoubleDoubleHashMap.MoveArray(var List: TJclDoubleDoubleHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -10191,7 +10191,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclExtendedIntfHashMap.MoveArray(var List: TJclExtendedIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclExtendedIntfHashMap.MoveArray(var List: TJclExtendedIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -10761,7 +10761,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclIntfExtendedHashMap.MoveArray(var List: TJclIntfExtendedEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclIntfExtendedHashMap.MoveArray(var List: TJclIntfExtendedHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -11327,7 +11327,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclExtendedExtendedHashMap.MoveArray(var List: TJclExtendedExtendedEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclExtendedExtendedHashMap.MoveArray(var List: TJclExtendedExtendedHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -11893,7 +11893,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclIntegerIntfHashMap.MoveArray(var List: TJclIntegerIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclIntegerIntfHashMap.MoveArray(var List: TJclIntegerIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -12463,7 +12463,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclIntfIntegerHashMap.MoveArray(var List: TJclIntfIntegerEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclIntfIntegerHashMap.MoveArray(var List: TJclIntfIntegerHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -13029,7 +13029,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclIntegerIntegerHashMap.MoveArray(var List: TJclIntegerIntegerEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclIntegerIntegerHashMap.MoveArray(var List: TJclIntegerIntegerHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -13595,7 +13595,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclCardinalIntfHashMap.MoveArray(var List: TJclCardinalIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclCardinalIntfHashMap.MoveArray(var List: TJclCardinalIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -14165,7 +14165,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclIntfCardinalHashMap.MoveArray(var List: TJclIntfCardinalEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclIntfCardinalHashMap.MoveArray(var List: TJclIntfCardinalHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -14731,7 +14731,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclCardinalCardinalHashMap.MoveArray(var List: TJclCardinalCardinalEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclCardinalCardinalHashMap.MoveArray(var List: TJclCardinalCardinalHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -15297,7 +15297,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclInt64IntfHashMap.MoveArray(var List: TJclInt64IntfEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclInt64IntfHashMap.MoveArray(var List: TJclInt64IntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -15867,7 +15867,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclIntfInt64HashMap.MoveArray(var List: TJclIntfInt64EntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclIntfInt64HashMap.MoveArray(var List: TJclIntfInt64HashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -16433,7 +16433,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclInt64Int64HashMap.MoveArray(var List: TJclInt64Int64EntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclInt64Int64HashMap.MoveArray(var List: TJclInt64Int64HashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -17000,7 +17000,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclPtrIntfHashMap.MoveArray(var List: TJclPtrIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclPtrIntfHashMap.MoveArray(var List: TJclPtrIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -17570,7 +17570,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclIntfPtrHashMap.MoveArray(var List: TJclIntfPtrEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclIntfPtrHashMap.MoveArray(var List: TJclIntfPtrHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -18136,7 +18136,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclPtrPtrHashMap.MoveArray(var List: TJclPtrPtrEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclPtrPtrHashMap.MoveArray(var List: TJclPtrPtrHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -18720,7 +18720,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclIntfHashMap.MoveArray(var List: TJclIntfEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclIntfHashMap.MoveArray(var List: TJclIntfHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -19299,7 +19299,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclAnsiStrHashMap.MoveArray(var List: TJclAnsiStrEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclAnsiStrHashMap.MoveArray(var List: TJclAnsiStrHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -19878,7 +19878,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclWideStrHashMap.MoveArray(var List: TJclWideStrEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclWideStrHashMap.MoveArray(var List: TJclWideStrHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -20457,7 +20457,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclSingleHashMap.MoveArray(var List: TJclSingleEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclSingleHashMap.MoveArray(var List: TJclSingleHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -21036,7 +21036,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclDoubleHashMap.MoveArray(var List: TJclDoubleEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclDoubleHashMap.MoveArray(var List: TJclDoubleHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -21615,7 +21615,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclExtendedHashMap.MoveArray(var List: TJclExtendedEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclExtendedHashMap.MoveArray(var List: TJclExtendedHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -22194,7 +22194,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclIntegerHashMap.MoveArray(var List: TJclIntegerEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclIntegerHashMap.MoveArray(var List: TJclIntegerHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -22773,7 +22773,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclCardinalHashMap.MoveArray(var List: TJclCardinalEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclCardinalHashMap.MoveArray(var List: TJclCardinalHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -23352,7 +23352,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclInt64HashMap.MoveArray(var List: TJclInt64EntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclInt64HashMap.MoveArray(var List: TJclInt64HashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -23932,7 +23932,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclPtrHashMap.MoveArray(var List: TJclPtrEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclPtrHashMap.MoveArray(var List: TJclPtrHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -24529,7 +24529,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclHashMap.MoveArray(var List: TJclEntryArray; FromIndex, ToIndex, Count: Integer);
+procedure TJclHashMap.MoveArray(var List: TJclHashEntryArray; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
@@ -25114,7 +25114,7 @@
{$ENDIF THREADSAFE}
end;
-procedure TJclHashMap<TKey, TValue>.MoveArray(var List: TJclEntryArray<TKey, TValue>; FromIndex, ToIndex, Count: Integer);
+procedure TJclHashMap<TKey, TValue>.MoveArray(var List: TJclHashEntryArray<TKey, TValue>; FromIndex, ToIndex, Count: Integer);
{$IFDEF CLR}
var
I: Integer;
Modified: trunk/jcl/source/common/JclSortedMaps.pas
===================================================================
--- trunk/jcl/source/common/JclSortedMaps.pas 2007-11-30 16:25:11 UTC (rev 2241)
+++ trunk/jcl/source/common/JclSortedMaps.pas 2007-11-30 19:24:18 UTC (rev 2242)
@@ -55,18 +55,18 @@
type
- TJclIntfIntfEntry = record
+ TJclIntfIntfSortedEntry = record
Key: IInterface;
Value: IInterface;
end;
- TJclIntfIntfEntryArray = array of TJclIntfIntfEntry;
+ TJclIntfIntfSortedEntryArray = array of TJclIntfIntfSortedEntry;
TJclIntfIntfSortedMap = class(TJclIntfAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
IJclIntfCloneable, IJclCloneable, IJclGrowable, IJclPackable, IJclContainer,
IJclIntfIntfMap, IJclIntfIntfSortedMap)
private
- FEntries: TJclIntfIntfEntryArray;
+ FEntries: TJclIntfIntfSortedEntryArray;
function BinarySearch(const Key: IInterface): Integer;
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
@@ -106,18 +106,18 @@
end;
- TJclAnsiStrIntfEntry = record
+ TJclAnsiStrIntfSortedEntry = record
Key: AnsiString;
Value: IInterface;
end;
- TJclAnsiStrIntfEntryArray = array of TJclAnsiStrIntfEntry;
+ TJclAnsiStrIntfSortedEntryArray = array of TJclAnsiStrIntfSortedEntry;
TJclAnsiStrIntfSortedMap = class(TJclAnsiStrAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
IJclIntfCloneable, IJclCloneable, IJclGrowable, IJclPackable, IJclContainer, IJclStrContainer, IJclAnsiStrContainer,
IJclAnsiStrIntfMap, IJclAnsiStrIntfSortedMap)
private
- FEntries: TJclAnsiStrIntfEntryArray;
+ FEntries: TJclAnsiStrIntfSortedEntryArray;
function BinarySearch(const Key: AnsiString): Integer;
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
@@ -157,18 +157,18 @@
end;
- TJclIntfAnsiStrEntry = record
+ TJclIntfAnsiStrSortedEntry = record
Key: IInterface;
Value: AnsiString;
end;
- TJclIntfAnsiStrEntryArray = array of TJclIntfAnsiStrEntry;
+ TJclIntfAnsiStrSortedEntryArray = array of TJclIntfAnsiStrSortedEntry;
TJclIntfAnsiStrSortedMap = class(TJclAnsiStrAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
IJclIntfCloneable, IJclCloneable, IJclGrowable, IJclPackable, IJclContainer, IJclStrContainer, IJclAnsiStrContainer,
IJclIntfAnsiStrMap, IJclIntfAnsiStrSortedMap)
private
- FEntries: TJclIntfAnsiStrEntryArray;
+ FEntries: TJclIntfAnsiStrSortedEntryArray;
function BinarySearch(const Key: IInterface): Integer;
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
@@ -208,18 +208,18 @@
end;
- TJclAnsiStrAnsiStrEntry = record
+ TJclAnsiStrAnsiStrSortedEntry = record
Key: AnsiString;
Value: AnsiString;
end;
- TJclAnsiStrAnsiStrEntryArray = array of TJclAnsiStrAnsiStrEntry;
+ TJclAnsiStrAnsiStrSortedEntryArray = array of TJclAnsiStrAnsiStrSortedEntry;
TJclAnsiStrAnsiStrSortedMap = class(TJclAnsiStrAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
IJclIntfCloneable, IJclCloneable, IJclGrowable, IJclPackable, IJclContainer, IJclStrContainer, IJclAnsiStrContainer,
IJclAnsiStrAnsiStrMap, IJclAnsiStrAnsiStrSortedMap)
private
- FEntries: TJclAnsiStrAnsiStrEntryArray;
+ FEntries: TJclAnsiStrAnsiStrSortedEntryArray;
function BinarySearch(const Key: AnsiString): Integer;
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
@@ -259,18 +259,18 @@
end;
- TJclWideStrIntfEntry = record
+ TJclWideStrIntfSortedEntry = record
Key: WideString;
Value: IInterface;
end;
- TJclWideStrIntfEntryArray = array of TJclWideStrIntfEntry;
+ TJclWideStrIntfSortedEntryArray = array of TJclWideStrIntfSortedEntry;
TJclWideStrIntfSortedMap = class(TJclWideStrAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
IJclIntfCloneable, IJclCloneable, IJclGrowable, IJclPackable, IJclContainer, IJclStrContainer, IJclWideStrContainer,
IJclWideStrIntfMap, IJclWideStrIntfSortedMap)
private
- FEntries: TJclWideStrIntfEntryArray;
+ FEntries: TJclWideStrIntfSortedEntryArray;
function BinarySearch(const Key: WideString): Integer;
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
@@ -310,18 +310,18 @@
end;
- TJclIntfWideStrEntry = record
+ TJclIntfWideStrSortedEntry = record
Key: IInterface;
Value: WideString;
end;
- TJclIntfWideStrEntryArray = array of TJclIntfWideStrEntry;
+ TJclIntfWideStrSortedEntryArray = array of TJclIntfWideStrSortedEntry;
TJclIntfWideStrSortedMap = class(TJclWideStrAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
IJclIntfCloneable, IJclCloneable, IJclGrowable, IJclPackable, IJclContainer, IJclStrContainer, IJclWideStrContainer,
IJclIntfWideStrMap, IJclIntfWideStrSortedMap)
private
- FEntries: TJclIntfWideStrEntryArray;
+ FEntries: TJclIntfWideStrSortedEntryArray;
function BinarySearch(const Key: IInterface): Integer;
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
@@ -361,18 +361,18 @@
end;
- TJclWideStrWideStrEntry = record
+ TJclWideStrWideStrSortedEntry = record
Key: WideString;
Value: WideString;
end;
- TJclWideStrWideStrEntryArray = array of TJclWideStrWideStrEntry;
+ TJclWideStrWideStrSortedEntryArray = array of TJclWideStrWideStrSortedEntry;
TJclWideStrWideStrSortedMap = class(TJclWideStrAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
IJclIntfCloneable, IJclCloneable, IJclGrowable, IJclPackable, IJclContainer, IJclStrContainer, IJclWideStrContainer,
IJclWideStrWideStrMap, IJclWideStrWideStrSortedMap)
private
- FEntries: TJclWideStrWideStrEntryArray;
+ FEntries: TJclWideStrWideStrSortedEntryArray;
function BinarySearch(const Key: WideString): Integer;
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
@@ -423,18 +423,18 @@
{$ENDIF CONTAINER_WIDESTR}
- TJclSingleIntfEntry = record
+ TJclSingleIntfSortedEntry = record
Key: Single;
Value: IInterface;
end;
- TJclSingleIntfEntryArray = array of TJclSingleIntfEntry;
+ TJclSingleIntfSortedEntryArray = array of TJclSingleIntfSortedEntry;
TJclSingleIntfSortedMap = class(TJclSingleAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, {$ENDIF THREADSAFE}
IJclIntfCloneable, IJclCloneable, IJclGrowable, IJclPackable, IJclContainer, IJclSingleContainer,
IJclSingleIntfMap, IJclSingleIntfSortedMap)
private
- FEntries: TJclSingleIntfEntryArray;
+ FEntries: TJclSingleIntfSortedEntryArray;
function BinarySearch(const Key: Single): Integer;
protected
procedure AssignDataTo(Dest: TJclAbstractContainerBase); override;
@@ -474,18 +474,18 @@
end;
- TJclIntfSingleEntry = record
+ TJclIntfSingleSortedEntry = record
Key: IInterface;
Value: Single;
end;
- TJclIntfSingleEntryArray = array of TJclIntfSingleEntry;
+ TJclIntfSingleSortedEntryArray = array of TJclIntfSingleSortedEntry;
TJclIntfSingleSortedMap = class(TJclSingleAbstractContainer, {$IFDEF THREADSAFE} IJclLockable, ...
[truncated message content] |
|
From: <ou...@us...> - 2007-11-30 16:25:12
|
Revision: 2241
http://jcl.svn.sourceforge.net/jcl/?rev=2241&view=rev
Author: outchy
Date: 2007-11-30 08:25:11 -0800 (Fri, 30 Nov 2007)
Log Message:
-----------
Fix compilation of Jedi.Jcl packages.
Added GUID to project files.
Modified Paths:
--------------
trunk/jcl/install/JclInstall.pas
trunk/jcl/packages/cs1/Jcl.bdsproj
trunk/jcl/packages/d10/Jcl.bdsproj
trunk/jcl/packages/d10.net/Jedi.Jcl.bdsproj
trunk/jcl/packages/d10.net/Jedi.Jcl.dpr
trunk/jcl/packages/d11/Jcl.dproj
trunk/jcl/packages/d11.net/Jedi.Jcl.dpk
trunk/jcl/packages/d11.net/Jedi.Jcl.dproj
trunk/jcl/packages/d11.net/template.dpk
trunk/jcl/packages/d11.net/template.dproj
trunk/jcl/packages/d8/Jcl.bdsproj
trunk/jcl/packages/d9/Jcl.bdsproj
trunk/jcl/packages/d9.net/Jedi.Jcl.bdsproj
trunk/jcl/packages/d9.net/Jedi.Jcl.dpr
trunk/jcl/packages/xml/Jcl-R.xml
trunk/jcl/source/common/JclBorlandTools.pas
Removed Paths:
-------------
trunk/jcl/packages/xml/Jcl-L.xml
Modified: trunk/jcl/install/JclInstall.pas
===================================================================
--- trunk/jcl/install/JclInstall.pas 2007-11-28 10:37:40 UTC (rev 2240)
+++ trunk/jcl/install/JclInstall.pas 2007-11-30 16:25:11 UTC (rev 2241)
@@ -663,7 +663,7 @@
JclDpk = 'Jcl';
JclVclDpk = 'JclVcl';
JclVClxDpk = 'JclVClx';
- JediJclDpr = 'Jedi.Jcl';
+ JediJclDpk = 'Jedi.Jcl';
JclExpertBase = 'JclBaseExpert';
JclExpertDebug = 'JclDebugExpert';
@@ -1799,7 +1799,7 @@
{$IFDEF MSWINDOWS}
else
// CLR installation
- Result := CompileCLRPackage(JediJclDpr);
+ Result := CompileCLRPackage(JediJclDpk);
{$ENDIF MSWINDOWS}
end;
end;
@@ -2784,7 +2784,7 @@
ProjectFileName: string;
begin
ProjectFileName := Format('%spackages%s%s.net%s%s%s', [PathAddSeparator(Distribution.JclPath),
- DirDelimiter, Target.VersionNumberStr, DirDelimiter, Name, SourceExtensionDelphiProject]);
+ DirDelimiter, Target.VersionNumberStr, DirDelimiter, Name, SourceExtensionDelphiPackage]);
WriteLog(Format('Compiling CLR package %s...', [ProjectFileName]));
if Assigned(GUIPage) then
Modified: trunk/jcl/packages/cs1/Jcl.bdsproj
===================================================================
--- trunk/jcl/packages/cs1/Jcl.bdsproj 2007-11-28 10:37:40 UTC (rev 2240)
+++ trunk/jcl/packages/cs1/Jcl.bdsproj 2007-11-30 16:25:11 UTC (rev 2241)
@@ -5,7 +5,7 @@
<Option Name="Personality">Delphi.Personality</Option>
<Option Name="ProjectType"></Option>
<Option Name="Version">1.0</Option>
- <Option Name="GUID"></Option>
+ <Option Name="GUID">{44DB645B-C167-410D-9334-38AF9F0C7913}</Option>
</Option>
</PersonalityInfo>
<Delphi.Personality>
Modified: trunk/jcl/packages/d10/Jcl.bdsproj
===================================================================
--- trunk/jcl/packages/d10/Jcl.bdsproj 2007-11-28 10:37:40 UTC (rev 2240)
+++ trunk/jcl/packages/d10/Jcl.bdsproj 2007-11-30 16:25:11 UTC (rev 2241)
@@ -5,7 +5,7 @@
<Option Name="Personality">Delphi.Personality</Option>
<Option Name="ProjectType"></Option>
<Option Name="Version">1.0</Option>
- <Option Name="GUID"></Option>
+ <Option Name="GUID">{44DB645B-C167-410D-9334-38AF9F0C7913}</Option>
</Option>
</PersonalityInfo>
<Delphi.Personality>
Modified: trunk/jcl/packages/d10.net/Jedi.Jcl.bdsproj
===================================================================
--- trunk/jcl/packages/d10.net/Jedi.Jcl.bdsproj 2007-11-28 10:37:40 UTC (rev 2240)
+++ trunk/jcl/packages/d10.net/Jedi.Jcl.bdsproj 2007-11-30 16:25:11 UTC (rev 2241)
@@ -10,7 +10,7 @@
</PersonalityInfo>
<DelphiDotNet.Personality>
<Source>
- <Source Name="MainSource">Jedi.Jcl.dpr</Source>
+ <Source Name="MainSource">Jedi.Jcl.dpk</Source>
</Source>
<FileVersion>
<FileVersion Name="Version">7.0</FileVersion>
@@ -160,7 +160,7 @@
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
- <VersionInfo Name="DLL">True</VersionInfo>
+ <VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1031</VersionInfo>
<VersionInfo Name="CodePage">1252</VersionInfo>
</VersionInfo>
@@ -171,14 +171,14 @@
<VersionInfoKeys Name="InternalName">Jedi.Jcl</VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright">Copyright (C) 1999, 2007 Project JEDI</VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
- <VersionInfoKeys Name="OriginalFilename">Jedi.Jcl100.dll</VersionInfoKeys>
+ <VersionInfoKeys Name="OriginalFilename">Jedi.Jcl100.bpl</VersionInfoKeys>
<VersionInfoKeys Name="ProductName">JEDI Code Library</VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.102 Build 2726</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<FileList>
- <File FileName="" ContainerId="" ModuleName="System.Reflection"/>
- <File FileName="" ContainerId="" ModuleName="System.Runtime.InteropServices"/>
+ <File FileName="" ContainerId="" ModuleName="Borland.Delphi"/>
+ <File FileName="" ContainerId="" ModuleName="Borland.VclRtl"/>
<File FileName="..\..\source\common\JclAbstractContainers.pas" ContainerId="" ModuleName="JclAbstractContainers"/>
<File FileName="..\..\source\common\JclAlgorithms.pas" ContainerId="" ModuleName="JclAlgorithms"/>
<File FileName="..\..\source\common\JclAnsiStrings.pas" ContainerId="" ModuleName="JclAnsiStrings"/>
@@ -188,7 +188,16 @@
<File FileName="..\..\source\common\JclBinaryTrees.pas" ContainerId="" ModuleName="JclBinaryTrees"/>
<File FileName="..\..\source\common\JclComplex.pas" ContainerId="" ModuleName="JclComplex"/>
<File FileName="..\..\source\common\JclContainerIntf.pas" ContainerId="" ModuleName="JclContainerIntf"/>
+ <File FileName="..\..\source\common\JclCounter.pas" ContainerId="" ModuleName="JclCounter"/>
<File FileName="..\..\source\common\JclDateTime.pas" ContainerId="" ModuleName="JclDateTime"/>
+ <File FileName="..\..\source\common\JclEDI.pas" ContainerId="" ModuleName="JclEDI"/>
+ <File FileName="..\..\source\common\JclEDISEF.pas" ContainerId="" ModuleName="JclEDISEF"/>
+ <File FileName="..\..\source\common\JclEDITranslators.pas" ContainerId="" ModuleName="JclEDITranslators"/>
+ <File FileName="..\..\source\common\JclEDIXML.pas" ContainerId="" ModuleName="JclEDIXML"/>
+ <File FileName="..\..\source\common\JclEDI_ANSIX12.pas" ContainerId="" ModuleName="JclEDI_ANSIX12"/>
+ <File FileName="..\..\source\common\JclEDI_ANSIX12_Ext.pas" ContainerId="" ModuleName="JclEDI_ANSIX12_Ext"/>
+ <File FileName="..\..\source\common\JclEDI_UNEDIFACT.pas" ContainerId="" ModuleName="JclEDI_UNEDIFACT"/>
+ <File FileName="..\..\source\common\JclEDI_UNEDIFACT_Ext.pas" ContainerId="" ModuleName="JclEDI_UNEDIFACT_Ext"/>
<File FileName="..\..\source\common\JclFileUtils.pas" ContainerId="" ModuleName="JclFileUtils"/>
<File FileName="..\..\source\common\JclHashMaps.pas" ContainerId="" ModuleName="JclHashMaps"/>
<File FileName="..\..\source\common\JclHashSets.pas" ContainerId="" ModuleName="JclHashSets"/>
@@ -200,6 +209,7 @@
<File FileName="..\..\source\common\JclQueues.pas" ContainerId="" ModuleName="JclQueues"/>
<File FileName="..\..\source\common\JclResources.pas" ContainerId="" ModuleName="JclResources"/>
<File FileName="..\..\source\common\JclRTTI.pas" ContainerId="" ModuleName="JclRTTI"/>
+ <File FileName="..\..\source\common\JclSimpleXml.pas" ContainerId="" ModuleName="JclSimpleXml"/>
<File FileName="..\..\source\common\JclSortedMaps.pas" ContainerId="" ModuleName="JclSortedMaps"/>
<File FileName="..\..\source\common\JclStacks.pas" ContainerId="" ModuleName="JclStacks"/>
<File FileName="..\..\source\common\JclStatistics.pas" ContainerId="" ModuleName="JclStatistics"/>
@@ -211,6 +221,7 @@
<File FileName="..\..\source\common\JclUnitConv.pas" ContainerId="" ModuleName="JclUnitConv"/>
<File FileName="..\..\source\common\JclValidation.pas" ContainerId="" ModuleName="JclValidation"/>
<File FileName="..\..\source\common\JclVectors.pas" ContainerId="" ModuleName="JclVectors"/>
+ <File FileName="..\..\source\windows\JclSynch.pas" ContainerId="" ModuleName="JclSynch"/>
</FileList>
</DelphiDotNet.Personality>
</BorlandProject>
Modified: trunk/jcl/packages/d10.net/Jedi.Jcl.dpr
===================================================================
--- trunk/jcl/packages/d10.net/Jedi.Jcl.dpr 2007-11-28 10:37:40 UTC (rev 2240)
+++ trunk/jcl/packages/d10.net/Jedi.Jcl.dpr 2007-11-30 16:25:11 UTC (rev 2241)
@@ -1,8 +1,8 @@
-Library Jedi.Jcl;
+Package Jedi.Jcl;
uses
- System.Reflection,
- System.Runtime.InteropServices
+ Borland.Delphi,
+ Borland.VclRtl
,
JclAbstractContainers in '..\..\source\common\JclAbstractContainers.pas' ,
JclAlgorithms in '..\..\source\common\JclAlgorithms.pas' ,
@@ -13,7 +13,16 @@
JclBinaryTrees in '..\..\source\common\JclBinaryTrees.pas' ,
JclComplex in '..\..\source\common\JclComplex.pas' ,
JclContainerIntf in '..\..\source\common\JclContainerIntf.pas' ,
+ JclCounter in '..\..\source\common\JclCounter.pas' ,
JclDateTime in '..\..\source\common\JclDateTime.pas' ,
+ JclEDI in '..\..\source\common\JclEDI.pas' ,
+ JclEDISEF in '..\..\source\common\JclEDISEF.pas' ,
+ JclEDITranslators in '..\..\source\common\JclEDITranslators.pas' ,
+ JclEDIXML in '..\..\source\common\JclEDIXML.pas' ,
+ JclEDI_ANSIX12 in '..\..\source\common\JclEDI_ANSIX12.pas' ,
+ JclEDI_ANSIX12_Ext in '..\..\source\common\JclEDI_ANSIX12_Ext.pas' ,
+ JclEDI_UNEDIFACT in '..\..\source\common\JclEDI_UNEDIFACT.pas' ,
+ JclEDI_UNEDIFACT_Ext in '..\..\source\common\JclEDI_UNEDIFACT_Ext.pas' ,
JclFileUtils in '..\..\source\common\JclFileUtils.pas' ,
JclHashMaps in '..\..\source\common\JclHashMaps.pas' ,
JclHashSets in '..\..\source\common\JclHashSets.pas' ,
@@ -25,6 +34,7 @@
JclQueues in '..\..\source\common\JclQueues.pas' ,
JclResources in '..\..\source\common\JclResources.pas' ,
JclRTTI in '..\..\source\common\JclRTTI.pas' ,
+ JclSimpleXml in '..\..\source\common\JclSimpleXml.pas' ,
JclSortedMaps in '..\..\source\common\JclSortedMaps.pas' ,
JclStacks in '..\..\source\common\JclStacks.pas' ,
JclStatistics in '..\..\source\common\JclStatistics.pas' ,
@@ -35,7 +45,8 @@
JclTrees in '..\..\source\common\JclTrees.pas' ,
JclUnitConv in '..\..\source\common\JclUnitConv.pas' ,
JclValidation in '..\..\source\common\JclValidation.pas' ,
- JclVectors in '..\..\source\common\JclVectors.pas'
+ JclVectors in '..\..\source\common\JclVectors.pas' ,
+ JclSynch in '..\..\source\windows\JclSynch.pas'
;
{$LIBSUFFIX '10'}
Modified: trunk/jcl/packages/d11/Jcl.dproj
===================================================================
--- trunk/jcl/packages/d11/Jcl.dproj 2007-11-28 10:37:40 UTC (rev 2240)
+++ trunk/jcl/packages/d11/Jcl.dproj 2007-11-30 16:25:11 UTC (rev 2241)
@@ -1,6 +1,6 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
- <ProjectGuid></ProjectGuid>
+ <ProjectGuid>{44DB645B-C167-410D-9334-38AF9F0C7913}</ProjectGuid>
<MainSource>Jcl.dpk</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Modified: trunk/jcl/packages/d11.net/Jedi.Jcl.dpk
===================================================================
--- trunk/jcl/packages/d11.net/Jedi.Jcl.dpk 2007-11-28 10:37:40 UTC (rev 2240)
+++ trunk/jcl/packages/d11.net/Jedi.Jcl.dpk 2007-11-30 16:25:11 UTC (rev 2241)
@@ -1,146 +1,107 @@
package Jedi.Jcl;
+{
+-----------------------------------------------------------------------------
+ DO NOT EDIT THIS FILE, IT IS GENERATED BY THE PACKAGE GENERATOR
+ ALWAYS EDIT THE RELATED XML FILE (Jcl-R.xml)
+ Last generated: 30-11-2007 11:14:42 UTC
+-----------------------------------------------------------------------------
+}
+
{$ALIGN 0}
-{$ASSERTIONS ON}
+{$ASSERTIONS OFF}
{$BOOLEVAL OFF}
-{$DEBUGINFO ON}
+{$DEBUGINFO OFF}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
-{$IOCHECKS ON}
-{$LOCALSYMBOLS ON}
+{$IOCHECKS OFF}
+{$LOCALSYMBOLS OFF}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION ON}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
-{$REFERENCEINFO ON}
+{$REFERENCEINFO OFF}
{$SAFEDIVIDE OFF}
{$STACKFRAMES OFF}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
-{$WRITEABLECONST OFF}
+{$WRITEABLECONST ON}
{$MINENUMSIZE 1}
-{$IMAGEBASE $400000}
+{$IMAGEBASE $48000000}
{$RUNONLY}
{$IMPLICITBUILD OFF}
-{$DEFINE DEBUG}
+{$DEFINE RELEASE}
requires
Borland.Delphi,
- Borland.Vcl,
- System.Drawing;
-
+ Borland.VclRtl
+ ;
+
contains
- JclAbstractContainers in '..\..\source\common\JclAbstractContainers.pas',
- JclAlgorithms in '..\..\source\common\JclAlgorithms.pas',
- JclAnsiStrings in '..\..\source\common\JclAnsiStrings.pas',
- JclArrayLists in '..\..\source\common\JclArrayLists.pas',
- JclArraySets in '..\..\source\common\JclArraySets.pas',
- JclBase in '..\..\source\common\JclBase.pas',
- JclBinaryTrees in '..\..\source\common\JclBinaryTrees.pas',
- JclComplex in '..\..\source\common\JclComplex.pas',
- JclContainerIntf in '..\..\source\common\JclContainerIntf.pas',
- JclCounter in '..\..\source\common\JclCounter.pas',
- JclDateTime in '..\..\source\common\JclDateTime.pas',
- JclEDI in '..\..\source\common\JclEDI.pas',
- JclEDI_ANSIX12 in '..\..\source\common\JclEDI_ANSIX12.pas',
- JclEDI_ANSIX12_Ext in '..\..\source\common\JclEDI_ANSIX12_Ext.pas',
- JclEDI_UNEDIFACT in '..\..\source\common\JclEDI_UNEDIFACT.pas',
- JclEDI_UNEDIFACT_Ext in '..\..\source\common\JclEDI_UNEDIFACT_Ext.pas',
- JclEDISEF in '..\..\source\common\JclEDISEF.pas',
- JclEDITranslators in '..\..\source\common\JclEDITranslators.pas',
- JclEDIXML in '..\..\source\common\JclEDIXML.pas',
- JclFileUtils in '..\..\source\common\JclFileUtils.pas',
- JclHashMaps in '..\..\source\common\JclHashMaps.pas',
- JclHashSets in '..\..\source\common\JclHashSets.pas',
- JclIniFiles in '..\..\source\common\JclIniFiles.pas',
- JclLinkedLists in '..\..\source\common\JclLinkedLists.pas',
- JclLogic in '..\..\source\common\JclLogic.pas',
- JclMath in '..\..\source\common\JclMath.pas',
- JclMime in '..\..\source\common\JclMime.pas',
- JclQueues in '..\..\source\common\JclQueues.pas',
- JclResources in '..\..\source\common\JclResources.pas',
- JclRTTI in '..\..\source\common\JclRTTI.pas',
- JclSimpleXml in '..\..\source\common\JclSimpleXml.pas',
- JclStacks in '..\..\source\common\JclStacks.pas',
- JclStatistics in '..\..\source\common\JclStatistics.pas',
- JclStreams in '..\..\source\common\JclStreams.pas',
- JclStringLists in '..\..\source\common\JclStringLists.pas',
- JclStrings in '..\..\source\common\JclStrings.pas',
- JclSysInfo in '..\..\source\common\JclSysInfo.pas',
- JclSysUtils in '..\..\source\common\JclSysUtils.pas',
- JclUnitConv in '..\..\source\common\JclUnitConv.pas',
- JclValidation in '..\..\source\common\JclValidation.pas',
- JclVectors in '..\..\source\common\JclVectors.pas',
- JclSynch in '..\..\source\windows\JclSynch.pas',
- JclTrees in '..\..\source\common\JclTrees.pas';
+ JclAbstractContainers in '..\..\source\common\JclAbstractContainers.pas' ,
+ JclAlgorithms in '..\..\source\common\JclAlgorithms.pas' ,
+ JclAnsiStrings in '..\..\source\common\JclAnsiStrings.pas' ,
+ JclArrayLists in '..\..\source\common\JclArrayLists.pas' ,
+ JclArraySets in '..\..\source\common\JclArraySets.pas' ,
+ JclBase in '..\..\source\common\JclBase.pas' ,
+ JclBinaryTrees in '..\..\source\common\JclBinaryTrees.pas' ,
+ JclComplex in '..\..\source\common\JclComplex.pas' ,
+ JclContainerIntf in '..\..\source\common\JclContainerIntf.pas' ,
+ JclCounter in '..\..\source\common\JclCounter.pas' ,
+ JclDateTime in '..\..\source\common\JclDateTime.pas' ,
+ JclEDI in '..\..\source\common\JclEDI.pas' ,
+ JclEDISEF in '..\..\source\common\JclEDISEF.pas' ,
+ JclEDITranslators in '..\..\source\common\JclEDITranslators.pas' ,
+ JclEDIXML in '..\..\source\common\JclEDIXML.pas' ,
+ JclEDI_ANSIX12 in '..\..\source\common\JclEDI_ANSIX12.pas' ,
+ JclEDI_ANSIX12_Ext in '..\..\source\common\JclEDI_ANSIX12_Ext.pas' ,
+ JclEDI_UNEDIFACT in '..\..\source\common\JclEDI_UNEDIFACT.pas' ,
+ JclEDI_UNEDIFACT_Ext in '..\..\source\common\JclEDI_UNEDIFACT_Ext.pas' ,
+ JclFileUtils in '..\..\source\common\JclFileUtils.pas' ,
+ JclHashMaps in '..\..\source\common\JclHashMaps.pas' ,
+ JclHashSets in '..\..\source\common\JclHashSets.pas' ,
+ JclIniFiles in '..\..\source\common\JclIniFiles.pas' ,
+ JclLinkedLists in '..\..\source\common\JclLinkedLists.pas' ,
+ JclLogic in '..\..\source\common\JclLogic.pas' ,
+ JclMath in '..\..\source\common\JclMath.pas' ,
+ JclMime in '..\..\source\common\JclMime.pas' ,
+ JclQueues in '..\..\source\common\JclQueues.pas' ,
+ JclResources in '..\..\source\common\JclResources.pas' ,
+ JclRTTI in '..\..\source\common\JclRTTI.pas' ,
+ JclSimpleXml in '..\..\source\common\JclSimpleXml.pas' ,
+ JclSortedMaps in '..\..\source\common\JclSortedMaps.pas' ,
+ JclStacks in '..\..\source\common\JclStacks.pas' ,
+ JclStatistics in '..\..\source\common\JclStatistics.pas' ,
+ JclStreams in '..\..\source\common\JclStreams.pas' ,
+ JclStrings in '..\..\source\common\JclStrings.pas' ,
+ JclSysInfo in '..\..\source\common\JclSysInfo.pas' ,
+ JclSysUtils in '..\..\source\common\JclSysUtils.pas' ,
+ JclTrees in '..\..\source\common\JclTrees.pas' ,
+ JclUnitConv in '..\..\source\common\JclUnitConv.pas' ,
+ JclValidation in '..\..\source\common\JclValidation.pas' ,
+ JclVectors in '..\..\source\common\JclVectors.pas' ,
+ JclSynch in '..\..\source\windows\JclSynch.pas'
+ ;
-[assembly: AssemblyDescription('')]
+[assembly: AssemblyTitle('JEDI Code Library for .NET')]
+[assembly: AssemblyDescription('JEDI Code Library RTL package')]
[assembly: AssemblyConfiguration('')]
-[assembly: AssemblyCompany('')]
-[assembly: AssemblyProduct('')]
-[assembly: AssemblyCopyright('')]
+[assembly: AssemblyCompany('Project JEDI')]
+[assembly: AssemblyProduct('JEDI Code Library')]
+[assembly: AssemblyCopyright('Copyright (C) 1999, 2007 Project JEDI')]
[assembly: AssemblyTrademark('')]
[assembly: AssemblyCulture('')]
+// MajorVersion.MinorVersion.BuildNumber.Revision
+[assembly: AssemblyVersion('1.102.0.2726')]
-// Der Delphi-Compiler steuert AssemblyTitleAttribute via ExeDescription.
-// Sie k\xF6nnen dies in der IDE \xFCber Projekt/Optionen festlegen.
-// Wenn Sie das Attribut AssemblyTitle wie unten gezeigt manuell festlegen,
-// wird die IDE-Einstellung \xFCberschrieben.
-// [assembly: AssemblyTitle('')]
-
-
-//
-// Die Versionsinformation einer Assemblierung enth\xE4lt die folgenden vier Werte:
-//
-// Hauptversion
-// Nebenversion
-// Build-Nummer
-// Revision
-//
-// Sie k\xF6nnen alle vier Werte festlegen oder f\xFCr Revision und Build-Nummern die
-// Standardwerte mit '*' - wie nachfolgend gezeigt - verwenden:
-
-[assembly: AssemblyVersion('1.0.*')]
-
-//
-// Zum Signieren einer Assemblierung m\xFCssen Sie einen Schl\xFCssel angeben. Weitere Informationen
-// \xFCber das Signieren von Assemblierungen finden Sie in der Microsoft .NET Framework-Dokumentation.
-//
-// Mit den folgenden Attributen steuern Sie, welcher Schl\xFCssel f\xFCr die Signatur verwendet wird.
-//
-// Hinweise:
-// (*) Wenn kein Schl\xFCssel angegeben wird, ist die Assemblierung nicht signiert.
-// (*) KeyName verweist auf einen Schl\xFCssel, der im Crypto Service Provider
-// (CSP) auf Ihrem Rechner installiert wurde. KeyFile verweist auf eine
-// Datei, die einen Schl\xFCssel enth\xE4lt.
-// (*) Wenn sowohl der KeyFile- als auch der KeyName-Wert angegeben ist, wird
-// die folgende Verarbeitung durchgef\xFChrt:
-// (1) Wenn KeyName in dem CSP gefunden wird, wird dieser Schl\xFCssel verwendet.
-// (2) Wenn KeyName nicht, aber KeyFile vorhanden ist, wird der Schl\xFCssel
-// in KeyFile im CSP installiert und verwendet.
-// (*) Ein KeyFile k\xF6nnen Sie mit dem Utility sn.exe (Starker Name) erzeugen.
-// Der Speicherort von KeyFile sollte relativ zum Projektausgabeverzeichnis
-// angegeben werden. Wenn sich Ihr KeyFile im Projektverzeichnis befindet,
-// w\xFCrden Sie AssemblyKeyFile folgenderma\xDFen festlegen:
-// [assembly: AssemblyKeyFile('mykey.snk')], vorausgesetzt, Ihr
-// Ausgabeverzeichnis ist das Projektverzeichnis (Vorgabe).
-// (*) Verz\xF6gerte Signatur ist eine erweiterte Option; n\xE4here Informationen
-// dazu finden Sie in der Microsoft .NET Framework-Dokumentation.
-//
+// Package signature
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile('')]
[assembly: AssemblyKeyName('')]
-//
-// Verwenden Sie die folgenden Attribute zur Steuerung der COM-Sichtbarkeit Ihrer Assemblierung.
-// Standardm\xE4\xDFig ist die gesamte Assemblierung f\xFCr COM sichtbar. Die Einstellung false f\xFCr ComVisible
-// ist die f\xFCr Ihre Assemblierung empfohlene Vorgabe. Um dann eine Klasse und ein Interface f\xFCr COM
-// bereitzustellen, setzen Sie jeweils ComVisible auf true. Es wird auch empfohlen das Attribut
-// Guid hinzuzuf\xFCgen.
-//
-
+// Com visibility of the assembly
[assembly: ComVisible(False)]
//[assembly: Guid('')]
//[assembly: TypeLibVersion(1, 0)]
Modified: trunk/jcl/packages/d11.net/Jedi.Jcl.dproj
===================================================================
--- trunk/jcl/packages/d11.net/Jedi.Jcl.dproj 2007-11-28 10:37:40 UTC (rev 2240)
+++ trunk/jcl/packages/d11.net/Jedi.Jcl.dproj 2007-11-30 16:25:11 UTC (rev 2241)
@@ -2,12 +2,13 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{44DB645B-C167-410D-9334-38AF9F0C7913}</ProjectGuid>
- <MainSource>Jedi.Jcl.dpr</MainSource>
+ <MainSource>Jedi.Jcl.dpk</MainSource>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCCIL</DCC_DCCCompiler>
- <DCC_DependencyCheckOutputName>Jedi.Jcl.dll</DCC_DependencyCheckOutputName>
+ <DCC_DependencyCheckOutputName>Jedi.Jcl.bpl</DCC_DependencyCheckOutputName>
<DCC_EnabledPackages>true</DCC_EnabledPackages>
+ <DCC_UsePackage>Borland.Delphi;Borland.VclRtl</DCC_UsePackage>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
@@ -15,6 +16,7 @@
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
+ <DCC_Platform>x86</DCC_Platform>
<DCC_DcuOutput>..\..\lib\d11.net</DCC_DcuOutput>
<DCC_ObjOutput>..\..\lib\d11.net</DCC_ObjOutput>
<DCC_HppOutput>..\..\lib\d11.net</DCC_HppOutput>
@@ -29,6 +31,7 @@
<DCC_DebugInfoInExe>True</DCC_DebugInfoInExe>
<DCC_DebugVN>True</DCC_DebugVN>
<DCC_Define>DEBUG</DCC_Define>
+ <DCC_Platform>x86</DCC_Platform>
<DCC_DcuOutput>..\..\lib\d11.net</DCC_DcuOutput>
<DCC_ObjOutput>..\..\lib\d11.net</DCC_ObjOutput>
<DCC_HppOutput>..\..\lib\d11.net</DCC_HppOutput>
@@ -40,7 +43,7 @@
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>DelphiDotNet.Personality</Borland.Personality>
- <Borland.ProjectType>Library</Borland.ProjectType>
+ <Borland.ProjectType/>
<BorlandProject>
<BorlandProject xmlns="">
<DelphiDotNet.Personality>
@@ -49,6 +52,11 @@
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
+ <Package_Options>
+ <Package_Options Name="ImplicitBuild">False</Package_Options>
+ <Package_Options Name="DesigntimeOnly">False</Package_Options>
+ <Package_Options Name="RuntimeOnly">True</Package_Options>
+ </Package_Options>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
@@ -60,7 +68,7 @@
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
- <VersionInfo Name="DLL">True</VersionInfo>
+ <VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1031</VersionInfo>
<VersionInfo Name="CodePage">1252</VersionInfo>
</VersionInfo>
@@ -71,21 +79,20 @@
<VersionInfoKeys Name="InternalName">Jedi.Jcl</VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright">Copyright (C) 1999, 2007 Project JEDI</VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
- <VersionInfoKeys Name="OriginalFilename">Jedi.Jcl.dll</VersionInfoKeys>
+ <VersionInfoKeys Name="OriginalFilename">Jedi.Jcl.bpl</VersionInfoKeys>
<VersionInfoKeys Name="ProductName">JEDI Code Library</VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.102 Build 2726</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<Source>
- <Source Name="MainSource">Jedi.Jcl.dpr</Source>
+ <Source Name="MainSource">Jedi.Jcl.dpk</Source>
</Source>
</DelphiDotNet.Personality>
</BorlandProject>
</BorlandProject>
</ProjectExtensions>
- <ItemGroup />
<ItemGroup>
- <DelphiCompile Include="Jedi.Jcl.dpr">
+ <DelphiCompile Include="Jedi.Jcl.dpk">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="..\..\source\common\JclAbstractContainers.pas"/>
@@ -97,7 +104,16 @@
<DCCReference Include="..\..\source\common\JclBinaryTrees.pas"/>
<DCCReference Include="..\..\source\common\JclComplex.pas"/>
<DCCReference Include="..\..\source\common\JclContainerIntf.pas"/>
+ <DCCReference Include="..\..\source\common\JclCounter.pas"/>
<DCCReference Include="..\..\source\common\JclDateTime.pas"/>
+ <DCCReference Include="..\..\source\common\JclEDI.pas"/>
+ <DCCReference Include="..\..\source\common\JclEDISEF.pas"/>
+ <DCCReference Include="..\..\source\common\JclEDITranslators.pas"/>
+ <DCCReference Include="..\..\source\common\JclEDIXML.pas"/>
+ <DCCReference Include="..\..\source\common\JclEDI_ANSIX12.pas"/>
+ <DCCReference Include="..\..\source\common\JclEDI_ANSIX12_Ext.pas"/>
+ <DCCReference Include="..\..\source\common\JclEDI_UNEDIFACT.pas"/>
+ <DCCReference Include="..\..\source\common\JclEDI_UNEDIFACT_Ext.pas"/>
<DCCReference Include="..\..\source\common\JclFileUtils.pas"/>
<DCCReference Include="..\..\source\common\JclHashMaps.pas"/>
<DCCReference Include="..\..\source\common\JclHashSets.pas"/>
@@ -109,6 +125,7 @@
<DCCReference Include="..\..\source\common\JclQueues.pas"/>
<DCCReference Include="..\..\source\common\JclResources.pas"/>
<DCCReference Include="..\..\source\common\JclRTTI.pas"/>
+ <DCCReference Include="..\..\source\common\JclSimpleXml.pas"/>
<DCCReference Include="..\..\source\common\JclSortedMaps.pas"/>
<DCCReference Include="..\..\source\common\JclStacks.pas"/>
<DCCReference Include="..\..\source\common\JclStatistics.pas"/>
@@ -120,6 +137,7 @@
<DCCReference Include="..\..\source\common\JclUnitConv.pas"/>
<DCCReference Include="..\..\source\common\JclValidation.pas"/>
<DCCReference Include="..\..\source\common\JclVectors.pas"/>
+ <DCCReference Include="..\..\source\windows\JclSynch.pas"/>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
</Project>
Modified: trunk/jcl/packages/d11.net/template.dpk
===================================================================
--- trunk/jcl/packages/d11.net/template.dpk 2007-11-28 10:37:40 UTC (rev 2240)
+++ trunk/jcl/packages/d11.net/template.dpk 2007-11-30 16:25:11 UTC (rev 2241)
@@ -15,28 +15,29 @@
<%%% END LIBRARYONLY %%%>
{$ALIGN 0}
-{$ASSERTIONS ON}
+{$ASSERTIONS OFF}
{$BOOLEVAL OFF}
-{$DEBUGINFO ON}
+{$DEBUGINFO OFF}
{$EXTENDEDSYNTAX ON}
{$IMPORTEDDATA ON}
-{$IOCHECKS ON}
-{$LOCALSYMBOLS ON}
+{$IOCHECKS OFF}
+{$LOCALSYMBOLS OFF}
{$LONGSTRINGS ON}
{$OPENSTRINGS ON}
{$OPTIMIZATION ON}
{$OVERFLOWCHECKS OFF}
{$RANGECHECKS OFF}
-{$REFERENCEINFO ON}
+{$REFERENCEINFO OFF}
{$SAFEDIVIDE OFF}
{$STACKFRAMES OFF}
{$TYPEDADDRESS OFF}
{$VARSTRINGCHECKS ON}
-{$WRITEABLECONST OFF}
+{$WRITEABLECONST ON}
{$MINENUMSIZE 1}
{$IMAGEBASE $%IMAGE_BASE%}
{$%TYPE%ONLY}
{$IMPLICITBUILD OFF}
+{$DEFINE RELEASE}
requires
<%%% START REQUIRES %%%>
Modified: trunk/jcl/packages/d11.net/template.dproj
===================================================================
--- trunk/jcl/packages/d11.net/template.dproj 2007-11-28 10:37:40 UTC (rev 2240)
+++ trunk/jcl/packages/d11.net/template.dproj 2007-11-30 16:25:11 UTC (rev 2241)
@@ -8,6 +8,7 @@
<DCC_DCCCompiler>DCCIL</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>%NAME%%BINEXTENSION%</DCC_DependencyCheckOutputName>
<DCC_EnabledPackages>true</DCC_EnabledPackages>
+ <DCC_UsePackage>%NOLINKPACKAGELIST%</DCC_UsePackage>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Version>7.0</Version>
@@ -15,6 +16,7 @@
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define>
+ <DCC_Platform>x86</DCC_Platform>
<DCC_DcuOutput>..\..\lib\d11.net</DCC_DcuOutput>
<DCC_ObjOutput>..\..\lib\d11.net</DCC_ObjOutput>
<DCC_HppOutput>..\..\lib\d11.net</DCC_HppOutput>
@@ -29,6 +31,7 @@
<DCC_DebugInfoInExe>True</DCC_DebugInfoInExe>
<DCC_DebugVN>True</DCC_DebugVN>
<DCC_Define>DEBUG</DCC_Define>
+ <DCC_Platform>x86</DCC_Platform>
<DCC_DcuOutput>..\..\lib\d11.net</DCC_DcuOutput>
<DCC_ObjOutput>..\..\lib\d11.net</DCC_ObjOutput>
<DCC_HppOutput>..\..\lib\d11.net</DCC_HppOutput>
@@ -40,7 +43,7 @@
</PropertyGroup>
<ProjectExtensions>
<Borland.Personality>DelphiDotNet.Personality</Borland.Personality>
- <Borland.ProjectType>Library</Borland.ProjectType>
+ <Borland.ProjectType/>
<BorlandProject>
<BorlandProject xmlns="">
<DelphiDotNet.Personality>
@@ -49,6 +52,27 @@
<Parameters Name="LoadAllSymbols">True</Parameters>
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
</Parameters>
+<%%% BEGIN PACKAGEONLY %%%>
+ <Package_Options>
+ <Package_Options Name="ImplicitBuild">False</Package_Options>
+ <Package_Options Name="DesigntimeOnly">False</Package_Options>
+ <Package_Options Name="RuntimeOnly">False</Package_Options>
+ </Package_Options>
+<%%% END PACKAGEONLY %%%>
+<%%% BEGIN RUNONLY %%%>
+ <Package_Options>
+ <Package_Options Name="ImplicitBuild">False</Package_Options>
+ <Package_Options Name="DesigntimeOnly">False</Package_Options>
+ <Package_Options Name="RuntimeOnly">True</Package_Options>
+ </Package_Options>
+<%%% END RUNONLY %%%>
+<%%% BEGIN DESIGNONLY %%%>
+ <Package_Options>
+ <Package_Options Name="ImplicitBuild">False</Package_Options>
+ <Package_Options Name="DesigntimeOnly">True</Package_Options>
+ <Package_Options Name="RuntimeOnly">False</Package_Options>
+ </Package_Options>
+<%%% END DESIGNONLY %%%>
<VersionInfo>
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
@@ -83,7 +107,6 @@
</BorlandProject>
</BorlandProject>
</ProjectExtensions>
- <ItemGroup />
<ItemGroup>
<DelphiCompile Include="%NAME%%SOURCEEXTENSION%">
<MainSource>MainSource</MainSource>
Modified: trunk/jcl/packages/d8/Jcl.bdsproj
===================================================================
--- trunk/jcl/packages/d8/Jcl.bdsproj 2007-11-28 10:37:40 UTC (rev 2240)
+++ trunk/jcl/packages/d8/Jcl.bdsproj 2007-11-30 16:25:11 UTC (rev 2241)
@@ -5,7 +5,7 @@
<Option Name="Personality">Delphi.Personality</Option>
<Option Name="ProjectType"></Option>
<Option Name="Version">1.0</Option>
- <Option Name="GUID"></Option>
+ <Option Name="GUID">{44DB645B-C167-410D-9334-38AF9F0C7913}</Option>
</Option>
</PersonalityInfo>
<Delphi.Personality>
Modified: trunk/jcl/packages/d9/Jcl.bdsproj
===================================================================
--- trunk/jcl/packages/d9/Jcl.bdsproj 2007-11-28 10:37:40 UTC (rev 2240)
+++ trunk/jcl/packages/d9/Jcl.bdsproj 2007-11-30 16:25:11 UTC (rev 2241)
@@ -5,7 +5,7 @@
<Option Name="Personality">Delphi.Personality</Option>
<Option Name="ProjectType"></Option>
<Option Name="Version">1.0</Option>
- <Option Name="GUID"></Option>
+ <Option Name="GUID">{44DB645B-C167-410D-9334-38AF9F0C7913}</Option>
</Option>
</PersonalityInfo>
<Delphi.Personality>
Modified: trunk/jcl/packages/d9.net/Jedi.Jcl.bdsproj
===================================================================
--- trunk/jcl/packages/d9.net/Jedi.Jcl.bdsproj 2007-11-28 10:37:40 UTC (rev 2240)
+++ trunk/jcl/packages/d9.net/Jedi.Jcl.bdsproj 2007-11-30 16:25:11 UTC (rev 2241)
@@ -10,7 +10,7 @@
</PersonalityInfo>
<DelphiDotNet.Personality>
<Source>
- <Source Name="MainSource">Jedi.Jcl.dpr</Source>
+ <Source Name="MainSource">Jedi.Jcl.dpk</Source>
</Source>
<FileVersion>
<FileVersion Name="Version">7.0</FileVersion>
@@ -160,7 +160,7 @@
<VersionInfo Name="PreRelease">False</VersionInfo>
<VersionInfo Name="Special">False</VersionInfo>
<VersionInfo Name="Private">False</VersionInfo>
- <VersionInfo Name="DLL">True</VersionInfo>
+ <VersionInfo Name="DLL">False</VersionInfo>
<VersionInfo Name="Locale">1031</VersionInfo>
<VersionInfo Name="CodePage">1252</VersionInfo>
</VersionInfo>
@@ -171,14 +171,14 @@
<VersionInfoKeys Name="InternalName">Jedi.Jcl</VersionInfoKeys>
<VersionInfoKeys Name="LegalCopyright">Copyright (C) 1999, 2007 Project JEDI</VersionInfoKeys>
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
- <VersionInfoKeys Name="OriginalFilename">Jedi.Jcl9.dll</VersionInfoKeys>
+ <VersionInfoKeys Name="OriginalFilename">Jedi.Jcl9.bpl</VersionInfoKeys>
<VersionInfoKeys Name="ProductName">JEDI Code Library</VersionInfoKeys>
<VersionInfoKeys Name="ProductVersion">1.102 Build 2726</VersionInfoKeys>
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
</VersionInfoKeys>
<FileList>
- <File FileName="" ContainerId="" ModuleName="System.Reflection"/>
- <File FileName="" ContainerId="" ModuleName="System.Runtime.InteropServices"/>
+ <File FileName="" ContainerId="" ModuleName="Borland.Delphi"/>
+ <File FileName="" ContainerId="" ModuleName="Borland.VclRtl"/>
<File FileName="..\..\source\common\JclAbstractContainers.pas" ContainerId="" ModuleName="JclAbstractContainers"/>
<File FileName="..\..\source\common\JclAlgorithms.pas" ContainerId="" ModuleName="JclAlgorithms"/>
<File FileName="..\..\source\common\JclAnsiStrings.pas" ContainerId="" ModuleName="JclAnsiStrings"/>
@@ -188,7 +188,16 @@
<File FileName="..\..\source\common\JclBinaryTrees.pas" ContainerId="" ModuleName="JclBinaryTrees"/>
<File FileName="..\..\source\common\JclComplex.pas" ContainerId="" ModuleName="JclComplex"/>
<File FileName="..\..\source\common\JclContainerIntf.pas" ContainerId="" ModuleName="JclContainerIntf"/>
+ <File FileName="..\..\source\common\JclCounter.pas" ContainerId="" ModuleName="JclCounter"/>
<File FileName="..\..\source\common\JclDateTime.pas" ContainerId="" ModuleName="JclDateTime"/>
+ <File FileName="..\..\source\common\JclEDI.pas" ContainerId="" ModuleName="JclEDI"/>
+ <File FileName="..\..\source\common\JclEDISEF.pas" ContainerId="" ModuleName="JclEDISEF"/>
+ <File FileName="..\..\source\common\JclEDITranslators.pas" ContainerId="" ModuleName="JclEDITranslators"/>
+ <File FileName="..\..\source\common\JclEDIXML.pas" ContainerId="" ModuleName="JclEDIXML"/>
+ <File FileName="..\..\source\common\JclEDI_ANSIX12.pas" ContainerId="" ModuleName="JclEDI_ANSIX12"/>
+ <File FileName="..\..\source\common\JclEDI_ANSIX12_Ext.pas" ContainerId="" ModuleName="JclEDI_ANSIX12_Ext"/>
+ <File FileName="..\..\source\common\JclEDI_UNEDIFACT.pas" ContainerId="" ModuleName="JclEDI_UNEDIFACT"/>
+ <File FileName="..\..\source\common\JclEDI_UNEDIFACT_Ext.pas" ContainerId="" ModuleName="JclEDI_UNEDIFACT_Ext"/>
<File FileName="..\..\source\common\JclFileUtils.pas" ContainerId="" ModuleName="JclFileUtils"/>
<File FileName="..\..\source\common\JclHashMaps.pas" ContainerId="" ModuleName="JclHashMaps"/>
<File FileName="..\..\source\common\JclHashSets.pas" ContainerId="" ModuleName="JclHashSets"/>
@@ -200,6 +209,7 @@
<File FileName="..\..\source\common\JclQueues.pas" ContainerId="" ModuleName="JclQueues"/>
<File FileName="..\..\source\common\JclResources.pas" ContainerId="" ModuleName="JclResources"/>
<File FileName="..\..\source\common\JclRTTI.pas" ContainerId="" ModuleName="JclRTTI"/>
+ <File FileName="..\..\source\common\JclSimpleXml.pas" ContainerId="" ModuleName="JclSimpleXml"/>
<File FileName="..\..\source\common\JclSortedMaps.pas" ContainerId="" ModuleName="JclSortedMaps"/>
<File FileName="..\..\source\common\JclStacks.pas" ContainerId="" ModuleName="JclStacks"/>
<File FileName="..\..\source\common\JclStatistics.pas" ContainerId="" ModuleName="JclStatistics"/>
@@ -211,6 +221,7 @@
<File FileName="..\..\source\common\JclUnitConv.pas" ContainerId="" ModuleName="JclUnitConv"/>
<File FileName="..\..\source\common\JclValidation.pas" ContainerId="" ModuleName="JclValidation"/>
<File FileName="..\..\source\common\JclVectors.pas" ContainerId="" ModuleName="JclVectors"/>
+ <File FileName="..\..\source\windows\JclSynch.pas" ContainerId="" ModuleName="JclSynch"/>
</FileList>
</DelphiDotNet.Personality>
</BorlandProject>
Modified: trunk/jcl/packages/d9.net/Jedi.Jcl.dpr
===================================================================
--- trunk/jcl/packages/d9.net/Jedi.Jcl.dpr 2007-11-28 10:37:40 UTC (rev 2240)
+++ trunk/jcl/packages/d9.net/Jedi.Jcl.dpr 2007-11-30 16:25:11 UTC (rev 2241)
@@ -1,8 +1,8 @@
-Library Jedi.Jcl;
+Package Jedi.Jcl;
uses
- System.Reflection,
- System.Runtime.InteropServices
+ Borland.Delphi,
+ Borland.VclRtl
,
JclAbstractContainers in '..\..\source\common\JclAbstractContainers.pas' ,
JclAlgorithms in '..\..\source\common\JclAlgorithms.pas' ,
@@ -13,7 +13,16 @@
JclBinaryTrees in '..\..\source\common\JclBinaryTrees.pas' ,
JclComplex in '..\..\source\common\JclComplex.pas' ,
JclContainerIntf in '..\..\source\common\JclContainerIntf.pas' ,
+ JclCounter in '..\..\source\common\JclCounter.pas' ,
JclDateTime in '..\..\source\common\JclDateTime.pas' ,
+ JclEDI in '..\..\source\common\JclEDI.pas' ,
+ JclEDISEF in '..\..\source\common\JclEDISEF.pas' ,
+ JclEDITranslators in '..\..\source\common\JclEDITranslators.pas' ,
+ JclEDIXML in '..\..\source\common\JclEDIXML.pas' ,
+ JclEDI_ANSIX12 in '..\..\source\common\JclEDI_ANSIX12.pas' ,
+ JclEDI_ANSIX12_Ext in '..\..\source\common\JclEDI_ANSIX12_Ext.pas' ,
+ JclEDI_UNEDIFACT in '..\..\source\common\JclEDI_UNEDIFACT.pas' ,
+ JclEDI_UNEDIFACT_Ext in '..\..\source\common\JclEDI_UNEDIFACT_Ext.pas' ,
JclFileUtils in '..\..\source\common\JclFileUtils.pas' ,
JclHashMaps in '..\..\source\common\JclHashMaps.pas' ,
JclHashSets in '..\..\source\common\JclHashSets.pas' ,
@@ -25,6 +34,7 @@
JclQueues in '..\..\source\common\JclQueues.pas' ,
JclResources in '..\..\source\common\JclResources.pas' ,
JclRTTI in '..\..\source\common\JclRTTI.pas' ,
+ JclSimpleXml in '..\..\source\common\JclSimpleXml.pas' ,
JclSortedMaps in '..\..\source\common\JclSortedMaps.pas' ,
JclStacks in '..\..\source\common\JclStacks.pas' ,
JclStatistics in '..\..\source\common\JclStatistics.pas' ,
@@ -35,7 +45,8 @@
JclTrees in '..\..\source\common\JclTrees.pas' ,
JclUnitConv in '..\..\source\common\JclUnitConv.pas' ,
JclValidation in '..\..\source\common\JclValidation.pas' ,
- JclVectors in '..\..\source\common\JclVectors.pas'
+ JclVectors in '..\..\source\common\JclVectors.pas' ,
+ JclSynch in '..\..\source\windows\JclSynch.pas'
;
{$LIBSUFFIX '9'}
Deleted: trunk/jcl/packages/xml/Jcl-L.xml
===================================================================
--- trunk/jcl/packages/xml/Jcl-L.xml 2007-11-28 10:37:40 UTC (rev 2240)
+++ trunk/jcl/packages/xml/Jcl-L.xml 2007-11-30 16:25:11 UTC (rev 2241)
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<Package Name="Jcl" Type="L">
- <Description>JEDI Code Library RTL package</Description>
- <GUID>{44DB645B-C167-410D-9334-38AF9F0C7913}</GUID>
- <C5PFlags/>
- <C6PFlags/>
- <C5Libs/>
- <C6Libs/>
- <ImageBase>48000000</ImageBase>
- <VersionMajorNumber/>
- <VersionMinorNumber/>
- <ReleaseNumber/>
- <BuildNumber/>
- <Requires>
- <Package Name="System.Reflection" Targets="JclDotNet" Condition=""/>
- <Package Name="System.Runtime.InteropServices" Targets="JclDotNet" Condition=""/>
- </Requires>
- <Contains>
- <File Name="..\..\source\common\JclAbstractContainers.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclAlgorithms.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclAnsiStrings.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclArrayLists.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclArraySets.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclBase.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclBinaryTrees.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclComplex.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclContainerIntf.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclDateTime.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclFileUtils.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclHashMaps.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclHashSets.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclIniFiles.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclLinkedLists.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclLogic.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclMath.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclMime.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclQueues.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclResources.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclRTTI.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclSortedMaps.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclStacks.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclStatistics.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclStreams.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclStrings.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclSysInfo.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclSysUtils.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclTrees.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclUnitConv.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclValidation.pas" Targets="JclDotNet" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclVectors.pas" Targets="JclDotNet" Formname="" Condition=""/>
- </Contains>
-</Package>
Modified: trunk/jcl/packages/xml/Jcl-R.xml
===================================================================
--- trunk/jcl/packages/xml/Jcl-R.xml 2007-11-28 10:37:40 UTC (rev 2240)
+++ trunk/jcl/packages/xml/Jcl-R.xml 2007-11-30 16:25:11 UTC (rev 2241)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<Package Name="Jcl" Design="0">
<Description>JEDI Code Library RTL package</Description>
- <GUID/>
+ <GUID>{44DB645B-C167-410D-9334-38AF9F0C7913}</GUID>
<C5PFlags>-LUvcl50</C5PFlags>
<C6PFlags/>
<C5Libs/>
@@ -15,61 +15,63 @@
<Package Name="rtl" Targets="allLibSuffix" Condition=""/>
<Package Name="vcl50" Targets="c5,d5" Condition=""/>
<Package Name="vcljpg50" Targets="c5,d5" Condition=""/>
+ <Package Name="Borland.Delphi" Targets="JclDotNet" Condition=""/>
+ <Package Name="Borland.VclRtl" Targets="JclDotNet" Condition=""/>
</Requires>
<Contains>
<File Name="..\..\source\common\bzip2.pas" Targets="JclDev" Formname="" Condition=""/>
<File Name="..\..\source\common\Jcl8087.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclAbstractContainers.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclAlgorithms.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclAnsiStrings.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclArrayLists.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclArraySets.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclBase.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclBinaryTrees.pas" Targets="JclDev" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclAbstractContainers.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclAlgorithms.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclAnsiStrings.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclArrayLists.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclArraySets.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclBase.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclBinaryTrees.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
<File Name="..\..\source\common\JclBorlandTools.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclComplex.pas" Targets="JclDev" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclComplex.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
<File Name="..\..\source\common\JclCompression.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclContainerIntf.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclCounter.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclDateTime.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclEDI.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclEDISEF.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclEDITranslators.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclEDIXML.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclEDI_ANSIX12.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclEDI_ANSIX12_Ext.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclEDI_UNEDIFACT.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclEDI_UNEDIFACT_Ext.pas" Targets="JclDev" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclContainerIntf.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclCounter.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclDateTime.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclEDI.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclEDISEF.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclEDITranslators.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclEDIXML.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclEDI_ANSIX12.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclEDI_ANSIX12_Ext.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclEDI_UNEDIFACT.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclEDI_UNEDIFACT_Ext.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
<File Name="..\..\source\common\JclExprEval.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclFileUtils.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclHashMaps.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclHashSets.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclIniFiles.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclLinkedLists.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclLogic.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclMath.pas" Targets="JclDev" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclFileUtils.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclHashMaps.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclHashSets.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclIniFiles.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclLinkedLists.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclLogic.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclMath.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
<File Name="..\..\source\common\JclMIDI.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclMime.pas" Targets="JclDev" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclMime.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
<File Name="..\..\source\common\JclPCRE.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclQueues.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclResources.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclRTTI.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclSimpleXml.pas" Targets="JclDev" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclQueues.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclResources.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclRTTI.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclSimpleXml.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
<File Name="..\..\source\common\JclSchedule.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclSortedMaps.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclStacks.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclStatistics.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclStreams.pas" Targets="JclDev" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclSortedMaps.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclStacks.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclStatistics.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclStreams.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
<File Name="..\..\source\common\JclStrHashMap.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclStrings.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclSysInfo.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclSysUtils.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclTrees.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclUnitConv.pas" Targets="JclDev" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclStrings.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclSysInfo.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclSysUtils.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclTrees.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclUnitConv.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
<File Name="..\..\source\common\JclUnitVersioning.pas" Targets="JclDev" Formname="" Condition=""/>
<File Name="..\..\source\common\JclUnitVersioningProviders.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclValidation.pas" Targets="JclDev" Formname="" Condition=""/>
- <File Name="..\..\source\common\JclVectors.pas" Targets="JclDev" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclValidation.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
+ <File Name="..\..\source\common\JclVectors.pas" Targets="JclDev,JclDotNet" Formname="" Condition=""/>
<File Name="..\..\source\common\JclWideStrings.pas" Targets="JclDev" Formname="" Condition=""/>
<File Name="..\..\source\common\pcre.pas" Targets="JclDev" Formname="" Condition=""/>
<File Name="..\..\source\windows\Hardlinks.pas" Targets="WinDev" Formname="" Condition=""/>
@@ -95,7 +97,7 @@
<File Name="..\..\source\windows\JclShell.pas" Targets="WinDev" Formname="" Condition=""/>
<File Name="..\..\source\windows\JclStructStorage.pas" Targets="WinDev" Formname="" Condition=""/>
<File Name="..\..\source\windows\JclSvcCtrl.pas" Targets="WinDev" Formname="" Condition=""/>
- <File Name="..\..\source\windows\JclSynch.pas" Targets="WinDev" Formname="" Condition=""/>
+ <File Name="..\..\source\windows\JclSynch.pas" Targets="WinDev,JclDotNet" Formname="" Condition=""/>
<File Name="..\..\source\windows\JclTask.pas" Targets="WinDev" Formname="" Condition=""/>
<File Name="..\..\source\windows\JclTD32.pas" Targets="WinDev" Formname="" Condition=""/>
<File Name="..\..\source\windows\JclUnicode.pas" Targets="WinDev" Formname="" Condition=""/>
Modified: trunk/jcl/source/common/JclBorlandTools.pas
===================================================================
--- trunk/jcl/source/common/JclBorlandTools.pas 2007-11-28 10:37:40 UTC (rev 2240)
+++ trunk/jcl/source/common/JclBorlandTools.pas 2007-11-30 16:25:11 UTC (rev 2241)
@@ -844,8 +844,7 @@
function UnregisterPackage(const BinaryFileName: string): Boolean; override;
function CleanPackageCache(const BinaryFileName: string): Boolean;
- function CompileDelphiDotNetProject(const ProjectName, OutputDir: string;
- PEFormat: TJclBorPlatform = bp32bit;
+ function CompileDelphiDotNetProject(const ProjectName, OutputDir: string; PEFormat: TJclBorPlatform = bp32bit;
const CLRVersion: string = ''; const ExtraOptions: string = ''): Boolean;
property DualPackageInstallation: Boolean read FDualPackageInstallation write SetDualPackageInstallation;
@@ -4820,9 +4819,12 @@
begin
if VersionNumber >= 2 then // C#Builder 1 doesn't have any Delphi.net compiler
begin
- OutputString(Format(RsCompilingProject, [ProjectName]));
-
- if not IsDelphiProject(ProjectName) then
+ if IsDelphiProject(ProjectName) then
+ OutputString(Format(RsCompilingProject, [ProjectName]))
+ else
+ if IsDelphiPackage(ProjectName) then
+ OutputString(Format(RsCompilingPackage, [ProjectName]))
+ else
raise EJclBorRADException.CreateResFmt(@RsENotADelphiProject, [ProjectName]);
PlatformOption := '';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mo...@us...> - 2007-11-28 10:37:42
|
Revision: 2240
http://jcl.svn.sourceforge.net/jcl/?rev=2240&view=rev
Author: morrac
Date: 2007-11-28 02:37:40 -0800 (Wed, 28 Nov 2007)
Log Message:
-----------
- Fix the format of the updated ignore expression.
- Also ignore the *.rst files generated by FPC.
Property Changed:
----------------
trunk/jcl/source/common/
trunk/jcl/source/unix/
Property changes on: trunk/jcl/source/common
___________________________________________________________________
Name: svn:ignore
- *.~*
*.hpp
*.dcu *.o *.ppu
__history
+ *.~*
*.hpp
*.dcu
*.o
*.ppu
*.rst
__history
Property changes on: trunk/jcl/source/unix
___________________________________________________________________
Name: svn:ignore
- *.~*
*.hpp
*.dcu
*.o *.ppu __history
+ *.~*
*.hpp
*.dcu
*.o
*.ppu
*.rst
__history
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mo...@us...> - 2007-11-28 10:30:46
|
Revision: 2239
http://jcl.svn.sourceforge.net/jcl/?rev=2239&view=rev
Author: morrac
Date: 2007-11-28 02:30:42 -0800 (Wed, 28 Nov 2007)
Log Message:
-----------
- Ignore object files created by FPC.
Property Changed:
----------------
trunk/jcl/source/common/
trunk/jcl/source/unix/
Property changes on: trunk/jcl/source/common
___________________________________________________________________
Name: svn:ignore
- *.~*
*.hpp
*.dcu
__history
+ *.~*
*.hpp
*.dcu *.o *.ppu
__history
Property changes on: trunk/jcl/source/unix
___________________________________________________________________
Name: svn:ignore
- *.~*
*.hpp
*.dcu
__history
+ *.~*
*.hpp
*.dcu
*.o *.ppu __history
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ou...@us...> - 2007-11-27 21:29:58
|
Revision: 2238
http://jcl.svn.sourceforge.net/jcl/?rev=2238&view=rev
Author: outchy
Date: 2007-11-27 13:29:56 -0800 (Tue, 27 Nov 2007)
Log Message:
-----------
Placing compilation progression form in the middle of the installer main form.
Modified Paths:
--------------
trunk/jcl/install/VclGui/FrmCompile.dfm
Modified: trunk/jcl/install/VclGui/FrmCompile.dfm
===================================================================
--- trunk/jcl/install/VclGui/FrmCompile.dfm 2007-11-27 20:57:00 UTC (rev 2237)
+++ trunk/jcl/install/VclGui/FrmCompile.dfm 2007-11-27 21:29:56 UTC (rev 2238)
@@ -13,7 +13,7 @@
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
- Position = poScreenCenter
+ Position = poMainFormCenter
OnCloseQuery = FormCloseQuery
PixelsPerInch = 96
TextHeight = 13
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|