home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 February / Chip_2000-02_cd.bin / zkuste / Delphi / navody / tt / objvm.exe / UNITS / LangRef.pas < prev    next >
Pascal/Delphi Source File  |  1998-06-26  |  857b  |  34 lines

  1. unit LangRef;
  2.  
  3. interface
  4. uses LangValue;
  5. type
  6.      {TLangRef is need to implement .Ref value}
  7.      TLangRef=class(ILangValue)
  8.      public
  9.        Target:ILangValue;
  10.        constructor Create(aTarget:ILangValue);
  11.        procedure Exec(S:IValStack;MustReturn:boolean);override;
  12.        function  CreateEqu:ILangValue;override;
  13.      end;
  14. implementation
  15. uses ProxyValue;
  16. constructor TLangRef.Create(aTarget:ILangValue);
  17.             begin
  18.               Inherited Create(nil);
  19.               Target:=aTarget;
  20.             end;
  21. procedure TLangRef.Exec;
  22.           begin
  23.             S.DropFrame;
  24.             if MustReturn then
  25.             begin
  26.               S.Push(TProxyValue.CreateFrom(Target));
  27.             end;
  28.           end;
  29. function TLangRef.CreateEqu;
  30.          begin
  31.            Result:=TLangRef.Create(Self);
  32.          end;
  33. end.
  34.