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

type
  TUCFRObj = class(TULObj)
  protected
    function GetFileName: string;
    procedure SetFileName(AFileName: string);
    function GetWeight: single;
    procedure SetWeight(AWeight: single);
    function GetNote: string;
    procedure SetNote(ANote: string);
    function GetMinRecLen: TULRecLen; override;
  public
    constructor Create(AOwner:TULObj);
    function GetULRecDesc: PULRecDesc; override;
  published
    property FileName: string
      read GetFileName write SetFileName;
    property Weight: single
      read GetWeight write SetWeight;
    property Note: string
      read GetNote write SetNote;
  end;

const
  UCFRFldDescs: array[0..2] of TULFldDesc = (
    (
     Caption: 'Data File';
     Hint: '';
     EditWidth: 0;
     BrowseWidth: 0;
     Flags: 4132;
     UserCoef: 0.00;
     NumDec: 0;
     ValuesSourceRecID: 0;
     FieldColorCount : 0;
     FieldColors : nil;
     Filter: 'Data File (*.ULF)|*.ULF';
     DefDir: '';
     StripPrefix: '';
     EditMask: '';
     MaxID: 0;
     FieldName: 'FileName';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'string';
    ),
    (
     Caption: '';
     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: 'Weight';
     KeyFieldName: '';
     ListFieldName: '';
     Typ: '';
     VarSize: false;
     PasType: 'single';
    ),
    (
     Caption: '';
     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';
    )
  );

  UCFRRecDesc: TULRecDesc = (
    Caption: 'Calib.Src.File';
    ChildRecIDsStr: '';
    ChildRecIDs: nil;
    ChildRecIDCount: 0;
    FldCount: 3;
    Flds: @UCFRFldDescs;
    Flags: rfEnabled OR rfVisible;
    SortExp: '';
    EditFieldList: '';
    BrowseFieldList: '';
    MenuFieldList: '';
    BrowseChildRecIDs: '';
    NameProp: '';
    MainProp: '';
    DefDir: '';
    OpenFilter: '';
    SaveFilter: '';
    Table: '';
    Indexes: ''
   );

implementation

{TUCFRObj}
function TUCFRObj.GetMinRecLen: TULRecLen;
begin
  GetMinRecLen := sizeof(TUCFRRec);
end;

constructor TUCFRObj.Create(AOwner: TULObj);
begin
  inherited Create(TComponent(AOwner), UCFRID);
  Weight := 1;
end;

function TUCFRObj.GetULRecDesc: PULRecDesc;
begin
  Result := @UCFRRecDesc;
end;

procedure TUCFRObj.SetFileName(AFileName: string);
begin
  if PUCFRRec(Rec)^.FileName <> AFileName then begin
    PUCFRRec(Rec)^.FileName := AFileName;
    if UCFRFldDescs[0].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TUCFRObj.GetFileName: string;
begin
  GetFileName := PUCFRRec(Rec)^.FileName;
end;

procedure TUCFRObj.SetWeight(AWeight: single);
begin
  if PUCFRRec(Rec)^.Weight <> AWeight then begin
    PUCFRRec(Rec)^.Weight := AWeight;
    if UCFRFldDescs[1].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TUCFRObj.GetWeight: single;
begin
  GetWeight := PUCFRRec(Rec)^.Weight;
end;

procedure TUCFRObj.SetNote(ANote: string);
begin
  if PUCFRRec(Rec)^.Note <> ANote then begin
    PUCFRRec(Rec)^.Note := ANote;
    if UCFRFldDescs[2].VarSize then 
      ClearFieldsLen;
    DoChange;
  end;
end;

function TUCFRObj.GetNote: string;
begin
  GetNote := PUCFRRec(Rec)^.Note;
end;

{/TUCFRObj}

end.
