home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 February / Chip_2000-02_cd.bin / zkuste / Delphi / navody / tt / objvm.exe / UNITS / LangValueList.pas < prev    next >
Pascal/Delphi Source File  |  1998-03-06  |  1KB  |  52 lines

  1. unit LangValueList;
  2.  
  3. interface
  4. uses
  5.      LangValue,ObjList;
  6. type TLangValueList=class
  7.      protected
  8.        fItems:TObjList;
  9.        function rdItems(No:Integer):ILangValue;
  10.      public
  11.        constructor Create;
  12.        destructor  Destroy;override;
  13.        property Items[No:Integer]:ILangValue read rdItems;default;
  14.        procedure Add(a:ILangValue);
  15.        function  Count:integer;
  16.        procedure Remove(No:Integer);
  17.        procedure Delete(No:Integer);
  18.      end;
  19. implementation
  20. constructor TLangValueList.Create;
  21.             begin
  22.               Inherited Create;
  23.               fItems:=TObjList.Create;
  24.             end;
  25. destructor  TLangValueList.Destroy;
  26.             begin
  27.               fItems.Free;
  28.               inherited Destroy;
  29.             end;
  30. procedure   TLangValueList.Add;
  31.             begin
  32.               fItems.Add(a);
  33.             end;
  34. function    TLangValueList.Count;
  35.             begin
  36.               Result:=fItems.Count;
  37.             end;
  38. function    TLangValueList.rdItems;
  39.             begin
  40.               Result:=fItems.Obj[No] as ILangValue;
  41.             end;
  42. procedure   TLangValueList.Remove;
  43.             begin
  44.               fItems.Remove(No);
  45.             end;
  46. procedure   TLangValueList.Delete;
  47.             begin
  48.               fItems.Delete(No);
  49.             end;
  50.  
  51. end.
  52.