unit USPObju;
{ Generated by MakeComp 1.03 from USPTYPE.PAS. Don't modify manually !!! }
interface
uses Classes, SysUtils, Graphics, UlanType, ULRecTyp, ULObju, 
  USPTType,USPEType,USPDType,
  USPType;

type
  TUSPObj = class(TULObj)
  protected
    function GetPrgName: TSeqPrgName;
    procedure SetPrgName(APrgName: TSeqPrgName);
    function GetPrgDesc: TSeqPrgDesc;
    procedure SetPrgDesc(APrgDesc: TSeqPrgDesc);
    function GetWaitingFor: string;
    procedure SetWaitingFor(AWaitingFor: string);
    function GetMinRecLen: TULRecLen; override;
  public
    constructor Create(AOwner:TULObj);
    function GetULRecDesc: PULRecDesc; override;
  published
    property PrgName: TSeqPrgName
      read GetPrgName write SetPrgName;
    property PrgDesc: TSeqPrgDesc
      read GetPrgDesc write SetPrgDesc;
    property WaitingFor: string
      read GetWaitingFor write SetWaitingFor;
  end;

const
  USPChildRecIDs: array[0..2] of TULRecID = (
    USPTID,USPEID,USPDID
  );
  USPFldDescs: array[0..2] of TULFldDesc = (
    (
     Caption: 'Sequence Program Name';
     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: 'PrgName';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TSeqPrgName';
    ),
    (
     Caption: 'Sequence Program Desc.';
     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: 'PrgDesc';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'TSeqPrgDesc';
    ),
    (
     Caption: '';
     Hint: 'Named event for which is the program waiting to occur';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4096;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: '';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'WaitingFor';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'string';
    )
  );

  USPRecDesc: TULRecDesc = (
    Caption: 'Sequence Program';
    ChildRecIDsStr: 'USPTID,USPEID,USPDID';
    ChildRecIDs: @USPChildRecIDs;
    ChildRecIDCount: 3;
    FldCount: 3;
    Flds: @USPFldDescs;
    Flags: rfChildAllowed OR rfRootChild OR rfChildSorted OR rfHasRecName OR rfAskForSave OR rfEnabled OR rfVisible OR rfSortedByNumber;
    SortExp: '';
    EditFieldList: '';
    BrowseFieldList: '';
    MenuFieldList: '';
    BrowseChildRecIDs: '';
    NameProp: '';
    MainProp: '';
    DefDir: '';
    OpenFilter: '';
    SaveFilter: '';
    Table: '';
    Indexes: ''
   );

implementation

{TUSPObj}
function TUSPObj.GetMinRecLen: TULRecLen;
begin
  GetMinRecLen := sizeof(TUSPRec);
end;

constructor TUSPObj.Create(AOwner: TULObj);
begin
  inherited Create(TComponent(AOwner), USPID);
end;

function TUSPObj.GetULRecDesc: PULRecDesc;
begin
  Result := @USPRecDesc;
end;

procedure TUSPObj.SetPrgName(APrgName: TSeqPrgName);
begin
  if PUSPRec(Rec)^.PrgName <> APrgName then begin
    PUSPRec(Rec)^.PrgName := APrgName;
    if USPFldDescs[0].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TUSPObj.GetPrgName: TSeqPrgName;
begin
  GetPrgName := PUSPRec(Rec)^.PrgName;
end;

procedure TUSPObj.SetPrgDesc(APrgDesc: TSeqPrgDesc);
begin
  if PUSPRec(Rec)^.PrgDesc <> APrgDesc then begin
    PUSPRec(Rec)^.PrgDesc := APrgDesc;
    if USPFldDescs[1].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TUSPObj.GetPrgDesc: TSeqPrgDesc;
begin
  GetPrgDesc := PUSPRec(Rec)^.PrgDesc;
end;

procedure TUSPObj.SetWaitingFor(AWaitingFor: string);
begin
  if PUSPRec(Rec)^.WaitingFor <> AWaitingFor then begin
    PUSPRec(Rec)^.WaitingFor := AWaitingFor;
    if USPFldDescs[2].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TUSPObj.GetWaitingFor: string;
begin
  GetWaitingFor := PUSPRec(Rec)^.WaitingFor;
end;

{/TUSPObj}

end.
