From 2b232e3d18ad7ec697e3a9dbfdce208ad85337a5 Mon Sep 17 00:00:00 2001 From: inoussa Date: Tue, 8 Jan 2008 17:07:55 +0000 Subject: [PATCH] git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@310 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- wst/trunk/base_service_intf.pas | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/wst/trunk/base_service_intf.pas b/wst/trunk/base_service_intf.pas index 14f9bb9a8..b448adf3c 100644 --- a/wst/trunk/base_service_intf.pas +++ b/wst/trunk/base_service_intf.pas @@ -591,6 +591,7 @@ type class procedure SaveValue(AObject : TBaseRemotable; AStore : IFormatterBase);override; class procedure LoadValue(var AObject : TObject; AStore : IFormatterBase);override; public + procedure Assign(Source: TPersistent); override; function Equal(const ACompareTo : TBaseRemotable) : Boolean;override; property BinaryData : string read FBinaryData write FBinaryData; property EncodedString : string read GetEncodedString write SetEncodedString; @@ -674,6 +675,7 @@ type constructor Create();override; procedure Assign(Source: TPersistent); override; function Equal(const ACompareTo : TBaseRemotable) : Boolean;override; + procedure Exchange(const Index1,Index2 : Integer); procedure SetLength(Const ANewSize : Integer);override; Property Item[AIndex:Integer] : TBaseRemotable Read GetItem;Default; @@ -1105,8 +1107,8 @@ type TSimpleFactoryItemClass = class of TSimpleFactoryItem; { TSimpleItemFactory } - - TSimpleItemFactory = class(TInterfacedPersistent,IInterface,IItemFactory) +{$TYPEINFO ON} + TSimpleItemFactory = class(TInterfacedObject,IInterface,IItemFactory) private FItemClass : TSimpleFactoryItemClass; protected @@ -1115,7 +1117,7 @@ type public constructor Create(AItemClass : TSimpleFactoryItemClass); End; - +{$TYPEINFO OFF} { TIntfPoolItem } TIntfPoolItem = class @@ -2223,6 +2225,19 @@ begin end; end; +procedure TBaseObjectArrayRemotable.Exchange(const Index1, Index2: Integer); +var + tmp : TBaseRemotable; +begin + if ( Index1 <> Index2 ) then begin + CheckIndex(Index1); + CheckIndex(Index2); + tmp := FArray[Index1]; + FArray[Index1] := FArray[Index2]; + FArray[Index2] := tmp; + end; +end; + { TBaseFactoryRegistryItem } constructor TBaseFactoryRegistryItem.Create( @@ -5366,6 +5381,14 @@ begin ( TBase64StringExtRemotable(ACompareTo).BinaryData = Self.BinaryData ); end; +procedure TBase64StringExtRemotable.Assign(Source: TPersistent); +begin + if Assigned(Source) and Source.InheritsFrom(TBase64StringExtRemotable) then begin + Self.BinaryData := TBase64StringExtRemotable(Source).BinaryData; + end; + inherited; +end; + initialization {$IFDEF HAS_FORMAT_SETTINGS} {$IFDEF FPC}