Ignore:
Timestamp:
May 8, 2012, 10:24:35 PM (13 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • PersistentData/UPDClient.pas

    r345 r361  
    8080  { TPDClient }
    8181
    82   TPDClient = class
     82  TPDClient = class(TComponent)
    8383  private
     84    FSchema: string;
     85    procedure SetConnected(AValue: Boolean);
    8486  protected
    8587    procedure InitSystemTypes; virtual;
    8688    procedure Init; virtual;
    8789    function GetConnected: Boolean; virtual;
     90    function GetConnectionString: string; virtual;
     91    procedure SetConnectionString(AValue: string); virtual;
    8892  public
    89     Host: string;
    90     Port: Word;
    91     Schema: string;
    92     User: string;
    93     Password: string;
    9493    Types: TPDTypeList;
    9594    Version: string;
     95    BackendName: string;
    9696    procedure ObjectLoad(AObject: TObjectProxy); virtual; abstract;
    9797    procedure ObjectSave(AObject: TObjectProxy); virtual; abstract;
     
    104104    procedure CheckTypes;
    105105    function TypeExists(Name: string): Boolean; virtual; abstract;
    106     constructor Create; virtual;
     106    constructor Create(AOwner: TComponent); override;
    107107    destructor Destroy; override;
    108108    procedure Connect; virtual;
     
    111111    procedure Uninstall; virtual;
    112112    procedure Update; virtual;
    113     property Connected: Boolean read GetConnected;
    114   end;
     113  published
     114    property Schema: string read FSchema write FSchema;
     115    property Connected: Boolean read GetConnected write SetConnected;
     116    property ConnectionString: string read GetConnectionString
     117      write SetConnectionString;
     118  end;
     119
     120  TPDClientClass = class of TPDClient;
    115121
    116122implementation
     
    238244
    239245{ TPDClient }
     246
     247function TPDClient.GetConnectionString: string;
     248begin
     249  Result := '';
     250end;
     251
     252procedure TPDClient.SetConnectionString(AValue: string);
     253begin
     254
     255end;
     256
     257procedure TPDClient.SetConnected(AValue: Boolean);
     258begin
     259  if AValue then Connect else Disconnect;
     260end;
    240261
    241262procedure TPDClient.InitSystemTypes;
     
    330351end;
    331352
    332 constructor TPDClient.Create;
    333 begin
     353constructor TPDClient.Create(AOwner: TComponent);
     354begin
     355  inherited;
    334356  Types := TPDTypeList.Create;
    335357  Types.Client := Self;
     
    345367procedure TPDClient.Connect;
    346368begin
    347   raise Exception.Create(SNotSupported);
    348369end;
    349370
    350371procedure TPDClient.Disconnect;
    351372begin
    352   raise Exception.Create(SNotSupported);
    353373end;
    354374
Note: See TracChangeset for help on using the changeset viewer.