home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Source / Vcl / CURRENCY.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  1.1 KB  |  53 lines

  1. #include  <system.hpp>
  2. #include  <sysutils.hpp>
  3.  
  4. #pragma inline
  5.  
  6. #ifdef near
  7. #undef near
  8. #endif
  9.  
  10. namespace System
  11. {
  12.   __fastcall Currency::Currency(const AnsiString& src)
  13.   {
  14.     *this = Sysutils::StrToCurr(src);
  15.   }
  16.  
  17.   __fastcall Currency::operator AnsiString() const
  18.   {
  19.     return CurrToStr(*this);
  20.   }
  21.  
  22.   #pragma argsused
  23.   void __fastcall VarClear(Variant& v)
  24.   {
  25.     asm
  26.     {
  27.       extrn   @System@@VarClear$qqrr14System@Variant:near
  28.       call    @System@@VarClear$qqrr14System@Variant
  29.     }
  30.   }
  31.  
  32.   #pragma argsused
  33.   void __fastcall VarCast(Variant &dest, const Variant& source, int type)
  34.   {
  35.     // XXX 97.05.01: what about a cast where lhs is OleVariant? Do we support OleVariant?
  36.     asm
  37.     {
  38.       extrn   @System@@VarCast$qqrr14System@Variantrx14System@Varianti:near
  39.       call    @System@@VarCast$qqrr14System@Variantrx14System@Varianti
  40.     }
  41.   }
  42.  
  43.   #pragma argsused
  44.   void __fastcall VarArrayRedim(Variant& a, int high)
  45.   {
  46.     asm
  47.     {
  48.       extrn   @System@@VarArrayRedim$qqrr14System@Varianti:near
  49.       call    @System@@VarArrayRedim$qqrr14System@Varianti
  50.     }
  51.   }
  52. }
  53.