unit AAPLObju;
{ Generated by MakeComp 1.03 from AAPLTYPE.PAS. Don't modify manually !!! }
interface
uses Classes, SysUtils, Graphics, UlanType, ULRecTyp, ULObju, 
  AAPLType;

type
  TAAPLObj = class(TULObj)
  protected
    function GetPrgTime: TAcqTime;
    procedure SetPrgTime(APrgTime: TAcqTime);
    function GetTemperature: TTemperature;
    procedure SetTemperature(ATemperature: TTemperature);
    function GetBufferNr: TAABufferNr;
    procedure SetBufferNr(ABufferNr: TAABufferNr);
    function GetCommand: TAACommand;
    procedure SetCommand(ACommand: TAACommand);
    function GetNote: string;
    procedure SetNote(ANote: string);
    function GetState: TPrgLineState;
    procedure SetState(AState: TPrgLineState);
    function GetDuration: TAcqTime;
    procedure SetDuration(ADuration: TAcqTime);
    function GetMinRecLen: TULRecLen; override;
  public
    constructor Create(AOwner:TULObj);
    function GetULRecDesc: PULRecDesc; override;
    function GetSortNum: extended; override;
  published
    property PrgTime: TAcqTime
      read GetPrgTime write SetPrgTime;
    property Temperature: TTemperature
      read GetTemperature write SetTemperature;
    property BufferNr: TAABufferNr
      read GetBufferNr write SetBufferNr;
    property Command: TAACommand
      read GetCommand write SetCommand;
    property Note: string
      read GetNote write SetNote;
    property State: TPrgLineState
      read GetState write SetState;
    property Duration: TAcqTime
      read GetDuration write SetDuration;
  end;

const
     FieldColors5 : array[0..5] of TULFieldColor = (
      (clWhite,clWhite),
      (clWhite,clGreen),
      (clBlack,clYellow),
      (clBlack,clGray),
      (clWhite,clRed),
      (clBlack,clWhite)
     );

  AAPLFldDescs: array[0..6] of TULFldDesc = (
    (
     Caption: 'Time [min]';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 6145;
     UserCoef: 60.00;
     NumDec: 2;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'PrgTime';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TAcqTime';
    ),
    (
     Caption: 'Column T[°C]';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4097;
     UserCoef: 0.00;
     NumDec: 2;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'Temperature';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TTemperature';
    ),
    (
     Caption: 'Buffer Nr.';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4097;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: 'bn';
     EditMask: '';
     MaxID: 0;
     FieldName: 'BufferNr';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TAABufferNr';
    ),
    (
     Caption: 'AA Command';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4097;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: 'ac';
     EditMask: '';
     MaxID: 0;
     FieldName: 'Command';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TAACommand';
    ),
    (
     Caption: 'Note';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4097;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'Note';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'string';
    ),
    (
     Caption: '';
     Hint: 'State of the program line';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4096;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 6;
     FieldColors : @FieldColors5;
     Filter: '';
     DefDir: '';
     StripPrefix: 'pls';
     EditMask: '';
     MaxID: 0;
     FieldName: 'State';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TPrgLineState';
    ),
    (
     Caption: 'Duration [min]';
     Hint: 'What time interval this program line should run';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4097;
     UserCoef: 60.00;
     NumDec: 2;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'Duration';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TAcqTime';
    )
  );

  AAPLRecDesc: TULRecDesc = (
    Caption: 'AA Prg.Line';
    ChildRecIDsStr: '';
    ChildRecIDs: nil;
    ChildRecIDCount: 0;
    FldCount: 7;
    Flds: @AAPLFldDescs;
    Flags: rfUsingColors OR rfEnabled OR rfEditModal OR rfVisible OR rfSortedByNumber;
    SortExp: 'PrgTime';
    EditFieldList: '';
    BrowseFieldList: '';
    MenuFieldList: '';
    BrowseChildRecIDs: '';
    NameProp: '';
    MainProp: '';
    DefDir: '';
    OpenFilter: '';
    SaveFilter: '';
    Table: '';
    Indexes: ''
   );

implementation

{TAAPLObj}
function TAAPLObj.GetMinRecLen: TULRecLen;
begin
  GetMinRecLen := sizeof(TAAPLRec);
end;

constructor TAAPLObj.Create(AOwner: TULObj);
begin
  inherited Create(TComponent(AOwner), AAPLID);
end;

function TAAPLObj.GetULRecDesc: PULRecDesc;
begin
  Result := @AAPLRecDesc;
end;

function TAAPLObj.GetSortNum: Extended;
begin
  Result := PrgTime;
end;
procedure TAAPLObj.SetPrgTime(APrgTime: TAcqTime);
begin
  if PAAPLRec(Rec)^.PrgTime <> APrgTime then begin
    PAAPLRec(Rec)^.PrgTime := APrgTime;
    if AAPLFldDescs[0].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TAAPLObj.GetPrgTime: TAcqTime;
begin
  GetPrgTime := PAAPLRec(Rec)^.PrgTime;
end;

procedure TAAPLObj.SetTemperature(ATemperature: TTemperature);
begin
  if PAAPLRec(Rec)^.Temperature <> ATemperature then begin
    PAAPLRec(Rec)^.Temperature := ATemperature;
    if AAPLFldDescs[1].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TAAPLObj.GetTemperature: TTemperature;
begin
  GetTemperature := PAAPLRec(Rec)^.Temperature;
end;

procedure TAAPLObj.SetBufferNr(ABufferNr: TAABufferNr);
begin
  if PAAPLRec(Rec)^.BufferNr <> ABufferNr then begin
    PAAPLRec(Rec)^.BufferNr := ABufferNr;
    if AAPLFldDescs[2].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TAAPLObj.GetBufferNr: TAABufferNr;
begin
  GetBufferNr := PAAPLRec(Rec)^.BufferNr;
end;

procedure TAAPLObj.SetCommand(ACommand: TAACommand);
begin
  if PAAPLRec(Rec)^.Command <> ACommand then begin
    PAAPLRec(Rec)^.Command := ACommand;
    if AAPLFldDescs[3].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TAAPLObj.GetCommand: TAACommand;
begin
  GetCommand := PAAPLRec(Rec)^.Command;
end;

procedure TAAPLObj.SetNote(ANote: string);
begin
  if PAAPLRec(Rec)^.Note <> ANote then begin
    PAAPLRec(Rec)^.Note := ANote;
    if AAPLFldDescs[4].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TAAPLObj.GetNote: string;
begin
  GetNote := PAAPLRec(Rec)^.Note;
end;

procedure TAAPLObj.SetState(AState: TPrgLineState);
begin
  if PAAPLRec(Rec)^.State <> AState then begin
    PAAPLRec(Rec)^.State := AState;
    if AAPLFldDescs[5].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TAAPLObj.GetState: TPrgLineState;
begin
  GetState := PAAPLRec(Rec)^.State;
end;

procedure TAAPLObj.SetDuration(ADuration: TAcqTime);
begin
  if PAAPLRec(Rec)^.Duration <> ADuration then begin
    PAAPLRec(Rec)^.Duration := ADuration;
    if AAPLFldDescs[6].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TAAPLObj.GetDuration: TAcqTime;
begin
  GetDuration := PAAPLRec(Rec)^.Duration;
end;

{/TAAPLObj}

end.
