unit fwObject;

{$IFDEF FPC}
  {$MODE DELPHI}
{$ENDIF}

interface

type
  TfwObject        = class(TObject)
  private
    fID              : Integer;
  public
    constructor Create();
    function IsSame(aObject : TfwObject) : Boolean;
    property ID : Integer read fID;
  end;

implementation

var
  MaxObjectID      : Integer = 0;

// -----------------------------------------------------------------------
// fwObject
// -----------------------------------------------------------------------
constructor TfwObject.Create();

begin
  inherited Create;

  Inc(MaxObjectID);
  fID := MaxObjectID;
end;

function TfwObject.IsSame(aObject : TfwObject) : Boolean;
begin
  Result := False;
  if Assigned(aObject) then begin
    Result := (fID = aObject.ID);
  end;
end;

end.
