unit uMyTypes;
interface
uses System.Classes,System.Generics.Collections;
type
TDetailClass = class
private
FWert1: String;
FCaption: String;
FWert2: String;
FWert3: String;
procedure SetCaption(const Value: String);
procedure SetWert1(const Value: String);
procedure SetWert2(const Value: String);
procedure SetWert3(const Value: String);
public
property Caption: String read FCaption write SetCaption;
property Wert1: String read FWert1 write SetWert1;
property Wert2: String read FWert2 write SetWert2;
property Wert3: String read FWert3 write SetWert3;
end;
TDataClass = class
private
FZeitraum: String;
FDetail1: TDetailClass;
FDetail2: TDetailClass;
procedure SetZeitraum(const Value: String);
procedure SetDetail1(const Value: TDetailClass);
procedure SetDetail2(const Value: TDetailClass);
public
constructor Create;
destructor destroy;
property Zeitraum: String read FZeitraum write SetZeitraum;
property Detail1: TDetailClass read FDetail1 write SetDetail1;
property Detail2: TDetailClass read FDetail2 write SetDetail2;
end;
PDataClass = ^TDataClass;
TDataLst = TObjectList<TDataClass>;
implementation
{ TDetail }
procedure TDetailClass.SetCaption(const Value: String);
begin
FCaption := Value;
end;
procedure TDetailClass.SetWert1(const Value: String);
begin
FWert1 := Value;
end;
procedure TDetailClass.SetWert2(const Value: String);
begin
FWert2 := Value;
end;
procedure TDetailClass.SetWert3(const Value: String);
begin
FWert3 := Value;
end;
{ TData }
constructor TDataClass.Create;
begin
FDetail1 := TDetailClass.Create;
FDetail2 := TDetailClass.Create;
end;
destructor TDataClass.destroy;
begin
FDetail1.Free;
FDetail2.Free;
end;
procedure TDataClass.SetDetail1(const Value: TDetailClass);
begin
FDetail1 := Value;
end;
procedure TDataClass.SetDetail2(const Value: TDetailClass);
begin
FDetail2 := Value;
end;
procedure TDataClass.SetZeitraum(const Value: String);
begin
FZeitraum := value;
end;
end.