Ignore:
Timestamp:
Mar 8, 2012, 3:11:10 PM (13 years ago)
Author:
chronos
Message:
  • Modified: Direct acces using Database: TSqlDatabase replaced by TChronisClient interface.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Application/UChronisClient.pas

    r34 r37  
    1919    Properties: TDictionaryStringString;
    2020    Client: TChronisClient;
     21    ObjectName: string;
     22    SchemaName: string;
    2123    procedure Load;
    2224    procedure Save;
     
    3941    ColumnsFilter: TListString;
    4042    ColummsFilterUse: Boolean;
    41     ConditionColumn: string;
    42     ConditionValue: string;
    43     ConditionUse: Boolean;
     43    Condition: string;
    4444    ObjectName: string;
    4545    SchemaName: string;
    4646    Objects: TListObject; // TListObject<TObjectProxy>
    47     procedure SetCondition(ColumnName: string; Value: string);
    4847    procedure Clear;
    4948    constructor Create;
     
    5352  end;
    5453
     54  TChronisType = class
     55    OID: Integer;
     56    Name: string;
     57  end;
     58
     59  TChronisTypeRecordItem = class
     60    Name: string;
     61    ItemType: TChronisType;
     62  end;
     63
     64  { TChronisTypeRecord }
     65
     66  TChronisTypeRecord = class(TChronisType)
     67    Items: TListObject; // TListObject<TChronisTypeRecordItem>
     68    constructor Create;
     69    destructor Destroy; override;
     70  end;
     71
    5572  { TChronisClient }
    5673
    5774  TChronisClient = class
     75  protected
     76    function GetConnected: Boolean; virtual;
     77  public
    5878    Host: string;
    5979    Port: Word;
     
    6787    procedure ListLoad(AList: TListProxy); virtual; abstract;
    6888    procedure ListSave(AList: TListProxy); virtual; abstract;
     89    procedure DefineType(AType: TChronisType); virtual; abstract;
     90    procedure UndefineType(AType: TChronisType); virtual; abstract;
    6991    constructor Create; virtual;
     92    procedure Connect; virtual; abstract;
     93    procedure Disconnect; virtual; abstract;
     94    property Connected: Boolean read GetConnected;
    7095  end;
    7196
    7297implementation
     98
     99{ TChronisTypeRecord }
     100
     101constructor TChronisTypeRecord.Create;
     102begin
     103  Items := TListObject.Create;
     104end;
     105
     106destructor TChronisTypeRecord.Destroy;
     107begin
     108  Items.Free;
     109  inherited Destroy;
     110end;
    73111
    74112{ TObjectProxy }
     
    107145{ TListProxy }
    108146
    109 procedure TListProxy.SetCondition(ColumnName: string; Value: string);
    110 begin
    111   ConditionColumn := ColumnName;
    112   ConditionValue := Value;
    113   ConditionUse := True;
    114 end;
    115 
    116147procedure TListProxy.Clear;
    117148begin
    118   ConditionUse := False;
    119149  PageUse := False;
    120150  ColummsFilterUse := False;
     
    148178{ TChronisClient }
    149179
     180function TChronisClient.GetConnected: Boolean;
     181begin
     182  Result := False;
     183end;
     184
    150185constructor TChronisClient.Create;
    151186begin
Note: See TracChangeset for help on using the changeset viewer.