home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 February / Chip_2000-02_cd.bin / zkuste / Delphi / navody / tt / objvm.exe / SAMPLE / uObjVM.pas < prev    next >
Pascal/Delphi Source File  |  1998-03-13  |  597b  |  28 lines

  1. unit uObjVM;
  2.  
  3. interface
  4. uses Classes,
  5.      Code,uExecution,LangValue,RootValue,OpList;
  6. type IObjVM=class(IValueOwner)
  7.      public
  8.         Ops:TOpList;
  9.         Root:TRootValue;
  10.         function StartExecution(c:TCode):IExecution;virtual;abstract;
  11.         procedure Run(c:TCode);virtual;
  12.      end;
  13. implementation
  14. procedure IObjVM.Run;
  15.           Var e:IExecution;
  16.           begin
  17.             e:=StartExecution(c);
  18.             try
  19.               e.Run;
  20.               e.Free;
  21.             except
  22.               e.Free;
  23.               raise;
  24.             end;
  25.           end;
  26.  
  27. end.
  28.