Changeset 362


Ignore:
Timestamp:
May 10, 2012, 1:18:25 PM (12 years ago)
Author:
chronos
Message:
  • Modified: PersistentData Memory backend partial implementation.
  • Modified: Some persistent type system modifications.
Location:
PersistentData
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • PersistentData/Backend/UPDClientMemory.pas

    r361 r362  
    1414  TPDClientMemory = class(TPDClient)
    1515  protected
     16    FLastObjectId: Integer;
    1617    procedure InitSystemTypes; override;
    1718    function GetConnected: Boolean; override;
    1819    procedure Init; override;
     20    function GetNewObjectId: Integer;
     21    function SearchObject(Id: Integer): TObjectProxy;
    1922  public
    2023    Objects: TListObject;
     
    3538  end;
    3639
     40resourcestring
     41  SObjectNotFound = 'Object with id %s not found';
     42
    3743implementation
    3844
     
    5460end;
    5561
     62function TPDClientMemory.GetNewObjectId: Integer;
     63begin
     64  Inc(FLastObjectId);
     65  Result := FLastObjectId;
     66end;
     67
     68function TPDClientMemory.SearchObject(Id: Integer): TObjectProxy;
     69var
     70  I: Integer;
     71begin
     72  I := 0;
     73  while (I < Objects.Count) and
     74    (TObjectProxy(Objects[I]).Id <> Id) do Inc(I);
     75  if I < Objects.Count then Result := TObjectProxy(Objects[I])
     76    else Result := nil;
     77end;
     78
    5679procedure TPDClientMemory.ObjectLoad(AObject: TObjectProxy);
    57 begin
    58 
     80var
     81  Obj: TObjectProxy;
     82begin
     83  if AObject.Id = 0 then raise Exception.Create(SCantLoadObjectWithoutId);
     84  Obj := SearchObject(AObject.Id);
     85  if Assigned(Obj) then AObject.Assign(Obj)
     86    else raise Exception.CreateFmt(SObjectNotFound, [AObject.Id]);
    5987end;
    6088
    6189procedure TPDClientMemory.ObjectSave(AObject: TObjectProxy);
    62 begin
    63 
     90var
     91  I: Integer;
     92  Obj: TObjectProxy;
     93begin
     94  if AObject.Id = 0 then raise Exception.Create(SCantLoadObjectWithoutId);
     95  Obj := SearchObject(AObject.Id);
     96  if Assigned(Obj) then Obj.Assign(AObject)
     97    else begin
     98      AObject.Id := GetNewObjectId;
     99      Obj := TObjectProxy(Objects.AddNew(TObjectProxy.Create));
     100      Obj.Assign(AObject);
     101    end;
    64102end;
    65103
    66104procedure TPDClientMemory.ObjectDelete(AObject: TObjectProxy);
    67 begin
    68 
     105var
     106  Obj: TObjectProxy;
     107begin
     108  Obj := SearchObject(AObject.Id);
     109  if Assigned(Obj) then Objects.Delete(Objects.IndexOf(Obj))
     110    else raise Exception.CreateFmt(SObjectNotFound, [AObject.Id])
    69111end;
    70112
    71113procedure TPDClientMemory.ListLoad(AList: TListProxy);
    72 begin
    73 
     114var
     115  Filter: string;
     116  DbCondition: string;
     117  I: Integer;
     118  P: Integer;
     119  NewObject: TObjectProxy;
     120  Table: string;
     121begin
     122  AList.Objects.Clear;
     123  for I := 0 to Objects.Count - 1 do
     124  with TObjectProxy(Objects[I]) do begin
     125    if 1 = 1 then begin
     126      NewObject := TObjectProxy.Create;
     127      NewObject.Properties.Assign(Properties);
     128      NewObject.Client := AList.Client;
     129      NewObject.ObjectName := AList.ObjectName;
     130      NewObject.Path := AList.Path;
     131      AList.Objects.Add(NewObject);
     132
     133      if AList.ColummsFilterUse then begin
     134        for P := 0 to Properties.Count - 1 do
     135        if AList.ColumnsFilter.IndexOf(Properties.Keys[I]) <> -1 then
     136          NewObject.Properties.Add(Properties.Keys[I], Properties[I].Value);
     137      end else NewObject.Properties.Assign(Properties);
     138    end;
     139  end;
     140  if AList.OrderUse then begin
     141
     142  end;
     143  if AList.PageUse then begin
     144  end;
    74145end;
    75146
  • PersistentData/Backend/UPDClientMySQL.pas

    r361 r362  
    5050resourcestring
    5151  SMissingBaseType = 'Missing base typ for %s';
    52   SUndefinedType = 'Undefinned type %s';
    53   SCantLoadObjectWithoutId = 'Can''t load object without id';
     52  SUndefinedType = 'Undefined type in %0:s.%1:s';
    5453
    5554
     
    172171    for I := 0 to AType.Properties.Count - 1 do
    173172    with AType.Properties do begin
    174       RefType := Types.SearchByName(Items[I].Value);
     173      RefType := TPDTypeProperty(Items[I]).DbType;
    175174      if not Assigned(RefType) then
    176         raise Exception.Create(Format(SUndefinedType, [Items[I].Value]));
     175        raise Exception.Create(Format(SUndefinedType, [AType.Name, TPDTypeProperty(Items[I]).Name]));
    177176      if RefType.DbType = '' then
    178177        raise Exception.Create(Format(SMissingBaseType, [RefType.Name]));
    179178
    180       Query := Query + '`' + Items[I].Key + '` ' + RefType.DbType + ' NULL,';
     179      Query := Query + '`' + TPDTypeProperty(Items[I]).Name + '` ' + RefType.DbType + ' NULL,';
    181180    end;
    182181    Query := Query + 'PRIMARY KEY (`Id`)' +
  • PersistentData/Demo

    • Property svn:ignore
      •  

        old new  
        11lib
        22Demo
         3Demo.exe
  • PersistentData/Demo/Demo.lps

    r361 r362  
    44    <Version Value="9"/>
    55    <BuildModes Active="Default"/>
    6     <Units Count="17">
     6    <Units Count="20">
    77      <Unit0>
    88        <Filename Value="Demo.lpr"/>
     
    1212        <TopLine Value="1"/>
    1313        <CursorPos X="1" Y="1"/>
    14         <UsageCount Value="42"/>
     14        <UsageCount Value="45"/>
    1515        <DefaultSyntaxHighlighter Value="Delphi"/>
    1616      </Unit0>
     
    2525        <WindowIndex Value="0"/>
    2626        <TopLine Value="26"/>
    27         <CursorPos X="62" Y="45"/>
    28         <UsageCount Value="42"/>
     27        <CursorPos X="40" Y="36"/>
     28        <UsageCount Value="45"/>
    2929        <Loaded Value="True"/>
    3030        <LoadedDesigner Value="True"/>
     
    3737        <EditorIndex Value="1"/>
    3838        <WindowIndex Value="0"/>
    39         <TopLine Value="356"/>
    40         <CursorPos X="1" Y="363"/>
    41         <UsageCount Value="21"/>
     39        <TopLine Value="34"/>
     40        <CursorPos X="1" Y="45"/>
     41        <UsageCount Value="22"/>
    4242        <Loaded Value="True"/>
    4343      </Unit2>
     
    5353        <Filename Value="../Backend/UPDClientMySQL.pas"/>
    5454        <UnitName Value="UPDClientMySQL"/>
    55         <EditorIndex Value="3"/>
    56         <WindowIndex Value="0"/>
    57         <TopLine Value="245"/>
    58         <CursorPos X="51" Y="272"/>
    59         <UsageCount Value="21"/>
     55        <EditorIndex Value="4"/>
     56        <WindowIndex Value="0"/>
     57        <TopLine Value="155"/>
     58        <CursorPos X="3" Y="157"/>
     59        <UsageCount Value="22"/>
    6060        <Loaded Value="True"/>
    6161      </Unit4>
     
    9494        <Filename Value="../Backend/UPDClientMemory.pas"/>
    9595        <UnitName Value="UPDClientMemory"/>
    96         <EditorIndex Value="5"/>
    97         <WindowIndex Value="0"/>
    98         <TopLine Value="95"/>
    99         <CursorPos X="18" Y="126"/>
    100         <UsageCount Value="21"/>
     96        <EditorIndex Value="6"/>
     97        <WindowIndex Value="0"/>
     98        <TopLine Value="125"/>
     99        <CursorPos X="1" Y="145"/>
     100        <UsageCount Value="22"/>
    101101        <Loaded Value="True"/>
    102102      </Unit9>
     
    112112        <Filename Value="../UPersistentData.pas"/>
    113113        <UnitName Value="UPersistentData"/>
    114         <EditorIndex Value="4"/>
     114        <EditorIndex Value="5"/>
    115115        <WindowIndex Value="0"/>
    116116        <TopLine Value="35"/>
    117117        <CursorPos X="94" Y="52"/>
    118         <UsageCount Value="20"/>
     118        <UsageCount Value="21"/>
    119119        <Loaded Value="True"/>
    120120      </Unit11>
     
    130130        <Filename Value="../../Network/CoolWeb/Persistence/USqlDatabase.pas"/>
    131131        <UnitName Value="USqlDatabase"/>
    132         <EditorIndex Value="2"/>
     132        <EditorIndex Value="3"/>
    133133        <WindowIndex Value="0"/>
    134134        <TopLine Value="332"/>
    135135        <CursorPos X="20" Y="350"/>
    136         <UsageCount Value="20"/>
     136        <UsageCount Value="21"/>
    137137        <Loaded Value="True"/>
    138138        <DefaultSyntaxHighlighter Value="Delphi"/>
     
    160160        <UsageCount Value="10"/>
    161161      </Unit16>
     162      <Unit17>
     163        <Filename Value="../../Generics/TemplateGenerics/Specialized/SpecializedDictionary.pas"/>
     164        <UnitName Value="SpecializedDictionary"/>
     165        <EditorIndex Value="2"/>
     166        <WindowIndex Value="0"/>
     167        <TopLine Value="8"/>
     168        <CursorPos X="3" Y="12"/>
     169        <UsageCount Value="11"/>
     170        <Loaded Value="True"/>
     171      </Unit17>
     172      <Unit18>
     173        <Filename Value="../../Generics/TemplateGenerics/Generic/GenericDictionary.inc"/>
     174        <EditorIndex Value="8"/>
     175        <WindowIndex Value="0"/>
     176        <TopLine Value="13"/>
     177        <CursorPos X="25" Y="29"/>
     178        <UsageCount Value="11"/>
     179        <Loaded Value="True"/>
     180      </Unit18>
     181      <Unit19>
     182        <Filename Value="../../Generics/TemplateGenerics/Generic/GenericList.inc"/>
     183        <EditorIndex Value="7"/>
     184        <WindowIndex Value="0"/>
     185        <TopLine Value="64"/>
     186        <CursorPos X="1" Y="1"/>
     187        <UsageCount Value="11"/>
     188        <Loaded Value="True"/>
     189      </Unit19>
    162190    </Units>
    163191    <General>
    164192      <ActiveWindowIndexAtStart Value="0"/>
    165193    </General>
    166     <JumpHistory Count="30" HistoryIndex="29">
     194    <JumpHistory Count="30" HistoryIndex="28">
    167195      <Position1>
    168196        <Filename Value="../UPDClient.pas"/>
    169         <Caret Line="352" Column="1" TopLine="330"/>
     197        <Caret Line="370" Column="1" TopLine="357"/>
    170198      </Position1>
    171199      <Position2>
    172         <Filename Value="../UPDClient.pas"/>
    173         <Caret Line="353" Column="1" TopLine="330"/>
     200        <Filename Value="../../Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     201        <Caret Line="349" Column="13" TopLine="332"/>
    174202      </Position2>
    175203      <Position3>
    176         <Filename Value="../UPersistentData.pas"/>
    177         <Caret Line="53" Column="1" TopLine="35"/>
     204        <Filename Value="../Backend/UPDClientMySQL.pas"/>
     205        <Caret Line="74" Column="1" TopLine="56"/>
    178206      </Position3>
    179207      <Position4>
    180         <Filename Value="../UPersistentData.pas"/>
    181         <Caret Line="54" Column="1" TopLine="35"/>
     208        <Filename Value="../../Network/CoolWeb/Persistence/USqlDatabase.pas"/>
     209        <Caret Line="350" Column="1" TopLine="332"/>
    182210      </Position4>
    183211      <Position5>
    184         <Filename Value="../UPersistentData.pas"/>
    185         <Caret Line="52" Column="1" TopLine="35"/>
     212        <Filename Value="../Backend/UPDClientMySQL.pas"/>
     213        <Caret Line="74" Column="1" TopLine="56"/>
    186214      </Position5>
    187215      <Position6>
    188         <Filename Value="UFormMain.pas"/>
    189         <Caret Line="21" Column="23" TopLine="1"/>
     216        <Filename Value="../Backend/UPDClientMySQL.pas"/>
     217        <Caret Line="272" Column="51" TopLine="245"/>
    190218      </Position6>
    191219      <Position7>
    192         <Filename Value="UFormMain.pas"/>
    193         <Caret Line="22" Column="23" TopLine="1"/>
     220        <Filename Value="../Backend/UPDClientMemory.pas"/>
     221        <Caret Line="21" Column="35" TopLine="8"/>
    194222      </Position7>
    195223      <Position8>
    196         <Filename Value="UFormMain.pas"/>
    197         <Caret Line="21" Column="23" TopLine="1"/>
     224        <Filename Value="../Backend/UPDClientMySQL.pas"/>
     225        <Caret Line="53" Column="1" TopLine="43"/>
    198226      </Position8>
    199227      <Position9>
    200         <Filename Value="UFormMain.pas"/>
    201         <Caret Line="23" Column="23" TopLine="1"/>
     228        <Filename Value="../Backend/UPDClientMemory.pas"/>
     229        <Caret Line="58" Column="49" TopLine="45"/>
    202230      </Position9>
    203231      <Position10>
    204         <Filename Value="UFormMain.pas"/>
    205         <Caret Line="25" Column="23" TopLine="1"/>
     232        <Filename Value="../Backend/UPDClientMemory.pas"/>
     233        <Caret Line="39" Column="3" TopLine="21"/>
    206234      </Position10>
    207235      <Position11>
    208         <Filename Value="UFormMain.pas"/>
    209         <Caret Line="48" Column="18" TopLine="17"/>
     236        <Filename Value="../Backend/UPDClientMemory.pas"/>
     237        <Caret Line="61" Column="14" TopLine="49"/>
    210238      </Position11>
    211239      <Position12>
    212         <Filename Value="../UPDClient.pas"/>
    213         <Caret Line="115" Column="70" TopLine="90"/>
     240        <Filename Value="../Backend/UPDClientMemory.pas"/>
     241        <Caret Line="67" Column="37" TopLine="54"/>
    214242      </Position12>
    215243      <Position13>
    216         <Filename Value="../UPDClient.pas"/>
    217         <Caret Line="259" Column="42" TopLine="257"/>
     244        <Filename Value="../Backend/UPDClientMemory.pas"/>
     245        <Caret Line="59" Column="38" TopLine="46"/>
    218246      </Position13>
    219247      <Position14>
    220         <Filename Value="UFormMain.pas"/>
    221         <Caret Line="39" Column="39" TopLine="17"/>
     248        <Filename Value="../UPDClient.pas"/>
     249        <Caret Line="34" Column="44" TopLine="13"/>
    222250      </Position14>
    223251      <Position15>
    224         <Filename Value="UFormMain.pas"/>
    225         <Caret Line="51" Column="19" TopLine="19"/>
     252        <Filename Value="../Backend/UPDClientMemory.pas"/>
     253        <Caret Line="20" Column="28" TopLine="9"/>
    226254      </Position15>
    227255      <Position16>
    228         <Filename Value="UFormMain.pas"/>
    229         <Caret Line="57" Column="86" TopLine="25"/>
     256        <Filename Value="../Backend/UPDClientMemory.pas"/>
     257        <Caret Line="21" Column="52" TopLine="10"/>
    230258      </Position16>
    231259      <Position17>
    232         <Filename Value="UFormMain.pas"/>
    233         <Caret Line="56" Column="1" TopLine="26"/>
     260        <Filename Value="../Backend/UPDClientMemory.pas"/>
     261        <Caret Line="82" Column="1" TopLine="79"/>
    234262      </Position17>
    235263      <Position18>
    236         <Filename Value="UFormMain.pas"/>
    237         <Caret Line="57" Column="1" TopLine="26"/>
     264        <Filename Value="../Backend/UPDClientMemory.pas"/>
     265        <Caret Line="74" Column="37" TopLine="61"/>
    238266      </Position18>
    239267      <Position19>
    240         <Filename Value="UFormMain.pas"/>
    241         <Caret Line="45" Column="49" TopLine="26"/>
     268        <Filename Value="../Backend/UPDClientMemory.pas"/>
     269        <Caret Line="81" Column="20" TopLine="68"/>
    242270      </Position19>
    243271      <Position20>
    244         <Filename Value="../UPDClient.pas"/>
    245         <Caret Line="385" Column="14" TopLine="358"/>
     272        <Filename Value="../Backend/UPDClientMemory.pas"/>
     273        <Caret Line="99" Column="63" TopLine="86"/>
    246274      </Position20>
    247275      <Position21>
    248         <Filename Value="UFormMain.pas"/>
    249         <Caret Line="56" Column="20" TopLine="26"/>
     276        <Filename Value="../Backend/UPDClientMemory.pas"/>
     277        <Caret Line="128" Column="15" TopLine="112"/>
    250278      </Position21>
    251279      <Position22>
    252         <Filename Value="UFormMain.pas"/>
    253         <Caret Line="57" Column="20" TopLine="27"/>
     280        <Filename Value="../Backend/UPDClientMemory.pas"/>
     281        <Caret Line="83" Column="3" TopLine="79"/>
    254282      </Position22>
    255283      <Position23>
    256         <Filename Value="UFormMain.pas"/>
    257         <Caret Line="56" Column="20" TopLine="26"/>
     284        <Filename Value="../Backend/UPDClientMemory.pas"/>
     285        <Caret Line="121" Column="3" TopLine="113"/>
    258286      </Position23>
    259287      <Position24>
    260         <Filename Value="UFormMain.pas"/>
    261         <Caret Line="45" Column="62" TopLine="26"/>
     288        <Filename Value="../Backend/UPDClientMemory.pas"/>
     289        <Caret Line="128" Column="24" TopLine="113"/>
    262290      </Position24>
    263291      <Position25>
    264         <Filename Value="../UPDClient.pas"/>
    265         <Caret Line="370" Column="1" TopLine="357"/>
     292        <Filename Value="../Backend/UPDClientMemory.pas"/>
     293        <Caret Line="129" Column="54" TopLine="112"/>
    266294      </Position25>
    267295      <Position26>
    268         <Filename Value="../../Network/CoolWeb/Persistence/USqlDatabase.pas"/>
    269         <Caret Line="349" Column="13" TopLine="332"/>
     296        <Filename Value="../Backend/UPDClientMemory.pas"/>
     297        <Caret Line="128" Column="66" TopLine="115"/>
    270298      </Position26>
    271299      <Position27>
    272         <Filename Value="../Backend/UPDClientMySQL.pas"/>
    273         <Caret Line="74" Column="1" TopLine="56"/>
     300        <Filename Value="../UPDClient.pas"/>
     301        <Caret Line="25" Column="5" TopLine="12"/>
    274302      </Position27>
    275303      <Position28>
    276         <Filename Value="../../Network/CoolWeb/Persistence/USqlDatabase.pas"/>
    277         <Caret Line="350" Column="1" TopLine="332"/>
     304        <Filename Value="../Backend/UPDClientMemory.pas"/>
     305        <Caret Line="128" Column="75" TopLine="115"/>
    278306      </Position28>
    279307      <Position29>
    280         <Filename Value="../Backend/UPDClientMySQL.pas"/>
    281         <Caret Line="74" Column="1" TopLine="56"/>
     308        <Filename Value="../UPDClient.pas"/>
     309        <Caret Line="47" Column="17" TopLine="33"/>
    282310      </Position29>
    283311      <Position30>
    284         <Filename Value="../Backend/UPDClientMySQL.pas"/>
    285         <Caret Line="272" Column="51" TopLine="245"/>
     312        <Filename Value="../UPDClient.pas"/>
     313        <Caret Line="456" Column="1" TopLine="431"/>
    286314      </Position30>
    287315    </JumpHistory>
  • PersistentData/PersistentData.lpk

    r361 r362  
    5656      </Item6>
    5757      <Item7>
     58        <Filename Value="Backend\UPDClientMemory.pas"/>
     59        <UnitName Value="UPDClientMemory"/>
     60      </Item7>
     61      <Item8>
    5862        <Filename Value="UPersistentData.pas"/>
    5963        <HasRegisterProc Value="True"/>
    6064        <UnitName Value="UPersistentData"/>
    61       </Item7>
    62       <Item8>
    63         <Filename Value="Backend\UPDClientMemory.pas"/>
    64         <UnitName Value="UPDClientMemory"/>
    6565      </Item8>
    6666    </Files>
  • PersistentData/PersistentData.pas

    r361 r362  
    99uses
    1010  UPDServer, UPDClient, UPDClientXMLRPC, UPDClientINI, UPDClientMySQL,
    11   UPDClientRegistry, UPersistentData, UPDClientMemory, LazarusPackageIntf;
     11  UPDClientRegistry, UPDClientMemory, UPersistentData, LazarusPackageIntf;
    1212
    1313implementation
  • PersistentData/UPDClient.pas

    r361 r362  
    1515
    1616  TPDClient = class;
     17  TPDType = class;
    1718
    1819  TOrderDirection = (odNone, odAscending, odDescending);
     
    3132    constructor Create;
    3233    destructor Destroy; override;
     34    procedure Assign(Source: TObjectProxy);
     35  end;
     36
     37  TOperation = (opUndefined, opDefined, opEqual, opNotEqual,
     38    opLess, opMore, opLessOrEqual, opMoreOrEqual);
     39
     40  TCondition = class
     41    Column: string;
     42    Operation: TOperation;
     43    Value: string;
    3344  end;
    3445
     
    5667  end;
    5768
     69  TPDTypeProperty = class
     70    Name: string;
     71    DbType: TPDType;
     72    Unique: Boolean;
     73    Index: Boolean;
     74  end;
     75
     76  { TPDTypePropertyList }
     77
     78  TPDTypePropertyList = class(TListObject)
     79    Client: TPDClient;
     80    procedure AddSimple(Name: string; TypeName: string; Unique: Boolean = False;
     81      Index: Boolean = False);
     82  end;
     83
    5884  { TPDType }
    5985
    6086  TPDType = class
    61     Client: TPDClient;
     87  private
     88    FClient: TPDClient;
     89    procedure SetClient(AValue: TPDClient);
     90  public
    6291    Name: string;
    6392    DbType: string;
    64     Properties: TDictionaryStringString;
     93    Properties: TPDTypePropertyList;
    6594    function IsDefined: Boolean;
    6695    procedure Define;
     
    6897    constructor Create;
    6998    destructor Destroy; override;
     99    property Client: TPDClient read FClient write SetClient;
    70100  end;
    71101
     
    103133    procedure TypeUndefine(AType: TPDType); virtual; abstract;
    104134    procedure CheckTypes;
    105     function TypeExists(Name: string): Boolean; virtual; abstract;
    106135    constructor Create(AOwner: TComponent); override;
    107136    destructor Destroy; override;
     
    120149  TPDClientClass = class of TPDClient;
    121150
     151  resourcestring
     152    SClientNotSet = 'Client not set';
     153    SNotSupported = 'Not supported';
     154    SVersionMismatch = 'Version mismatch, client: %0:s, server: %1:s. Please upgrade database.';
     155    SCantLoadObjectWithoutId = 'Can''t load object without id';
     156
     157
    122158implementation
    123159
    124 resourcestring
    125   SClientNotSet = 'Client not set';
    126   SNotSupported = 'Not supported';
    127   SVersionMismatch = 'Version mismatch, client: %0:s, server: %1:s. Please upgrade database.';
     160{ TPDTypePropertyList }
     161
     162procedure TPDTypePropertyList.AddSimple(Name: string; TypeName: string;
     163  Unique: Boolean; Index: Boolean);
     164var
     165  NewProperty: TPDTypeProperty;
     166begin
     167  NewProperty := TPDTypeProperty(AddNew(TPDTypeProperty.Create));
     168  NewProperty.Name := Name;
     169  NewProperty.DbType := Client.Types.SearchByName(TypeName);
     170  NewProperty.Unique := Unique;
     171  NewProperty.Index := Index;
     172end;
    128173
    129174
     
    148193end;
    149194
     195procedure TPDType.SetClient(AValue: TPDClient);
     196begin
     197  if FClient = AValue then Exit;
     198  FClient := AValue;
     199  Properties.Client := AValue;
     200end;
     201
    150202function TPDType.IsDefined: Boolean;
    151203begin
     
    168220constructor TPDType.Create;
    169221begin
    170   Properties := TDictionaryStringString.Create;
     222  Properties := TPDTypePropertyList.Create;
    171223end;
    172224
     
    206258  Properties.Free;
    207259  inherited Destroy;
     260end;
     261
     262procedure TObjectProxy.Assign(Source: TObjectProxy);
     263begin
     264  Path := Source.Path;
     265  Client := Source.Client;
     266  ObjectName := Source.ObjectName;
     267  Id := Source.Id;
     268  Properties.Assign(Source.Properties);
    208269end;
    209270
     
    293354    NewType.Client := Self;
    294355    NewType.Name := SystemVersionObject;
    295     NewType.Properties.Add('Version', 'String');
    296     NewType.Properties.Add('Time', 'DateTime');
     356    NewType.Properties.AddSimple('Version', 'String');
     357    NewType.Properties.AddSimple('Time', 'DateTime');
    297358    NewType.Define;
    298359
     
    380441procedure TPDClient.Uninstall;
    381442begin
    382 
     443  //Types.Uninstall;
    383444end;
    384445
Note: See TracChangeset for help on using the changeset viewer.