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

  1. unit VarLangValue;
  2.  
  3. interface
  4. uses LangValue;
  5. { Variant value }
  6. type TVarLangValue=class(ILangValue)
  7.      protected
  8.         Value:Variant;
  9.         function rdAsInteger:integer;override;
  10.         procedure wrAsInteger(a:integer);override;
  11.         function rdAsBoolean:boolean;override;
  12.         procedure wrAsBoolean(a:boolean);override;
  13.         function rdAsVariant:variant;override;
  14.         procedure wrAsVariant(a:variant);override;
  15.         function rdAsFloat:Extended;override;
  16.         procedure wrAsFloat(a:Extended);override;
  17.         function rdAsString:string;override;
  18.         procedure wrAsString(a:string);override;
  19.      public
  20.         function CreateEqu:ILangValue;override;
  21.      end;
  22. implementation
  23. function  TVarLangValue.rdAsInteger;
  24.           begin
  25.             Result:=Value;
  26.           end;
  27. procedure TVarLangValue.wrAsInteger;
  28.           begin
  29.             Value:=a;
  30.           end;
  31. function  TVarLangValue.rdAsBoolean;
  32.           begin
  33.             Result:=Value;
  34.           end;
  35. procedure TVarLangValue.wrAsBoolean;
  36.           begin
  37.             Value:=a;
  38.           end;
  39. function  TVarLangValue.rdAsVariant;
  40.           begin
  41.             Result:=Value;
  42.           end;
  43. procedure TVarLangValue.wrAsVariant;
  44.           begin
  45.             Value:=a;
  46.           end;
  47. function  TVarLangValue.rdAsFloat;
  48.           begin
  49.             Result:=Value;
  50.           end;
  51. procedure TVarLangValue.wrAsFloat;
  52.           begin
  53.             Value:=a;
  54.           end;
  55. function  TVarLangValue.CreateEqu;
  56.           begin
  57.             Result:=TVarLangValue.Create(Owner);
  58.             Result.AsVariant:=AsVariant;
  59.           end;
  60. function  TVarLangValue.rdAsString;
  61.           begin
  62.             Result:=Value;
  63.           end;
  64. procedure TVarLangValue.wrAsString;
  65.           begin
  66.             Value:=a;
  67.           end;
  68. end.
  69.