unit uoddface_cnt_terminar;

{$mode delphi}

interface

uses
  Classes, SysUtils, xmatdefs, ubtree, uoddface_table_nid;


(*

 CREATE TABLE ofe_cnt_terminar (
    problema integer DEFAULT 0, // ATENCION; cambio problema por nid en la implementación
    cnt integer DEFAULT 0,
);



  *)

  type

    { ofe_cnt_terminar }

    ofe_cnt_terminar = class( TRec_Nid )
      cnt: integer;

      constructor Create(
        nid: integer; cnt: integer );

      procedure WriteToBin( f: TStream );  override;
      constructor LoadFromBin( f: TStream ); override;

      procedure CopyRec(a: TRec_key); override;

    end;



    { ofe_cnt_terminars }

    ofe_cnt_terminars = class( TTable_nid )
      constructor Create;
      constructor LoadFromBin( f: TStream );
    end;

implementation

{ ofe_cnt_terminars }

constructor ofe_cnt_terminars.Create;
begin
  inherited Create( ofe_cnt_terminar );
end;

constructor ofe_cnt_terminars.LoadFromBin(f: TStream);
begin
  inherited LoadFromBin( f, ofe_cnt_terminar  );
end;


{ ofe_cnt_terminar }

constructor ofe_cnt_terminar.Create(nid: integer; cnt: integer);
begin
  inherited Create( nid );
  self.cnt:= cnt;
end;


procedure ofe_cnt_terminar.WriteToBin(f: TStream);
begin
  inherited WriteToBin( f );
  f.Write( cnt, sizeOf( cnt ) );
end;

constructor ofe_cnt_terminar.LoadFromBin(f: TStream);
begin
  inherited LoadFromBin( f );
  f.Read( cnt, sizeOf( cnt ) );
end;

procedure ofe_cnt_terminar.CopyRec(a: TRec_key);
var
  a_: ofe_cnt_terminar;
begin
  a_:= a as ofe_cnt_terminar;
  inherited CopyRec( a_);
  cnt:= a_.cnt;
end;

end.

