Changeset 361 for PersistentData/UPDClient.pas
- Timestamp:
- May 8, 2012, 10:24:35 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
PersistentData/UPDClient.pas
r345 r361 80 80 { TPDClient } 81 81 82 TPDClient = class 82 TPDClient = class(TComponent) 83 83 private 84 FSchema: string; 85 procedure SetConnected(AValue: Boolean); 84 86 protected 85 87 procedure InitSystemTypes; virtual; 86 88 procedure Init; virtual; 87 89 function GetConnected: Boolean; virtual; 90 function GetConnectionString: string; virtual; 91 procedure SetConnectionString(AValue: string); virtual; 88 92 public 89 Host: string;90 Port: Word;91 Schema: string;92 User: string;93 Password: string;94 93 Types: TPDTypeList; 95 94 Version: string; 95 BackendName: string; 96 96 procedure ObjectLoad(AObject: TObjectProxy); virtual; abstract; 97 97 procedure ObjectSave(AObject: TObjectProxy); virtual; abstract; … … 104 104 procedure CheckTypes; 105 105 function TypeExists(Name: string): Boolean; virtual; abstract; 106 constructor Create ; virtual;106 constructor Create(AOwner: TComponent); override; 107 107 destructor Destroy; override; 108 108 procedure Connect; virtual; … … 111 111 procedure Uninstall; virtual; 112 112 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; 115 121 116 122 implementation … … 238 244 239 245 { TPDClient } 246 247 function TPDClient.GetConnectionString: string; 248 begin 249 Result := ''; 250 end; 251 252 procedure TPDClient.SetConnectionString(AValue: string); 253 begin 254 255 end; 256 257 procedure TPDClient.SetConnected(AValue: Boolean); 258 begin 259 if AValue then Connect else Disconnect; 260 end; 240 261 241 262 procedure TPDClient.InitSystemTypes; … … 330 351 end; 331 352 332 constructor TPDClient.Create; 333 begin 353 constructor TPDClient.Create(AOwner: TComponent); 354 begin 355 inherited; 334 356 Types := TPDTypeList.Create; 335 357 Types.Client := Self; … … 345 367 procedure TPDClient.Connect; 346 368 begin 347 raise Exception.Create(SNotSupported);348 369 end; 349 370 350 371 procedure TPDClient.Disconnect; 351 372 begin 352 raise Exception.Create(SNotSupported);353 373 end; 354 374
Note:
See TracChangeset
for help on using the changeset viewer.