home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 May / PCFMay2001.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / Rw / money.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  20.8 KB  |  589 lines

  1. #ifndef __MONEY_H
  2. #define __MONEY_H
  3. #pragma option push -b -a8 -pc -Vx- -Ve- -w-inl -w-aus -w-sig
  4. // -*- C++ -*-
  5. /***************************************************************************
  6.  *
  7.  * money - Declarations for the Standard Library money facets
  8.  *
  9.  ***************************************************************************
  10.  *
  11.  * Copyright (c) 1994-1999 Rogue Wave Software, Inc.  All Rights Reserved.
  12.  *
  13.  * This computer software is owned by Rogue Wave Software, Inc. and is
  14.  * protected by U.S. copyright laws and other laws and by international
  15.  * treaties.  This computer software is furnished by Rogue Wave Software,
  16.  * Inc. pursuant to a written license agreement and may be used, copied,
  17.  * transmitted, and stored only in accordance with the terms of such
  18.  * license and with the inclusion of the above copyright notice.  This
  19.  * computer software or any other copies thereof may not be provided or
  20.  * otherwise made available to any other person.
  21.  *
  22.  * U.S. Government Restricted Rights.  This computer software is provided
  23.  * with Restricted Rights.  Use, duplication, or disclosure by the
  24.  * Government is subject to restrictions as set forth in subparagraph (c)
  25.  * (1) (ii) of The Rights in Technical Data and Computer Software clause
  26.  * at DFARS 252.227-7013 or subparagraphs (c) (1) and (2) of the
  27.  * Commercial Computer Software รป Restricted Rights at 48 CFR 52.227-19,
  28.  * as applicable.  Manufacturer is Rogue Wave Software, Inc., 5500
  29.  * Flatiron Parkway, Boulder, Colorado 80301 USA.
  30.  *
  31.  **************************************************************************/
  32.  
  33. #ifndef __STD_MONEY__
  34. #define __STD_MONEY__
  35.  
  36. #ifndef __STD_RWLOCALE__
  37. #include <rw/rwlocale> 
  38. #endif
  39.  
  40. #ifndef __STD_RW_LOCNUMRW__
  41. #include <rw/numbrw>
  42. #endif
  43.  
  44. #ifndef _RWSTD_NO_NAMESPACE
  45. namespace std {
  46. #endif
  47.  
  48. struct _RWSTDExport money_base {
  49.   enum part { none, space, symbol, sign, value };
  50.   struct pattern { char field[4]; };
  51. };
  52.  
  53. #ifndef _RWSTD_NO_NAMESPACE
  54. } namespace __rwstd {
  55. #endif
  56.  
  57. template <class charT> class money_handler_base_1;
  58. template <class charT> class money_reader_base_1;
  59. template <class charT> class money_writer_base_1;
  60. template <class charT,class OutputIterator> class money_reader_base_2;
  61. template <class charT,class OutputIterator> class money_writer_base_2;
  62.  
  63. // --------------------------------------------------------
  64. // Implementation class template -- moneypunct_init<charT>.
  65. // --------------------------------------------------------
  66.  
  67. // Structure used to initialize a rwstd::moneypunct_data<charT>.
  68.  
  69. template <class charT>
  70. class moneypunct_init {
  71.  public:
  72.   bool del_;                         // Delete when initialization is done
  73.   charT dp_, ts_;                    // Decimal point and thousands separator
  74.   const char *gr_;                   // Grouping pattern
  75.   const charT *cs_;                  // Currency symbol string
  76.   const charT *ps_, *ns_;            // Positive and negative sign strings
  77.   int fd_;                           // Number of fractional digits
  78.   _RW_STD::money_base::pattern pf_;  // Positive format pattern
  79.   _RW_STD::money_base::pattern nf_;  // Negative format pattern
  80. };
  81.  
  82. // ----------------------------------------
  83. // Implementation class -- moneypunct_base.
  84. // ----------------------------------------
  85.  
  86. // Contains parts of moneypunct_data<charT> that do not depend on the template
  87. // parameter.
  88.  
  89. class _RWSTDExport moneypunct_base {
  90.  public:
  91.   static __RWSTD::moneypunct_init<char> *__get_named_init
  92.       (const char*,bool);
  93. };
  94.  
  95. // --------------------------------------------------------
  96. // Implementation class template -- moneypunct_data<charT>.
  97. // --------------------------------------------------------
  98.  
  99. // moneypunct<charT,Intl> derives from this (via moneypunct_impl<charT,Intl>)
  100. // to get its private data members.
  101.  
  102. template <class charT>
  103. class moneypunct_data :
  104.     public moneypunct_base,
  105.     public punct_data<charT>
  106. {
  107.   friend class money_handler_base_1<charT>;
  108. #ifndef _RWSTD_NO_NAMESPACE
  109.   friend class _RW_STD::moneypunct<charT,false>;
  110.   friend class _RW_STD::moneypunct<charT,true>;
  111. #else
  112.   friend class moneypunct<charT,false>;
  113.   friend class moneypunct<charT,true>;
  114. #endif
  115.  
  116.   typedef _RW_STD::basic_string<charT,_RW_STD::char_traits<charT>,_RW_STD::allocator<charT> > string_type;
  117.  
  118.   string_type cs_;                  // Currency symbol
  119.   string_type ps_, ns_;             // Positive and negative sign strings
  120.   int fd_;                          // Number of fractional digits
  121.   _RW_STD::money_base::pattern pf_, nf_;     // Positive and negative format patterns
  122.  
  123.  protected:
  124.   moneypunct_data (moneypunct_init<charT>*);
  125.  
  126.   void __initfacetbase (const locale*);
  127.   moneypunct_init<charT> *get_init_by_name_ (const char*,bool);
  128. };
  129. // -------------------------------------------------------------
  130. // Implementation class template -- money_handler_base_1<charT>.
  131. // -------------------------------------------------------------
  132.  
  133. // Contains common money_reader and money_writer functionality that depends
  134. // only on the charT template parameter.
  135.  
  136. template <class charT>
  137. class money_handler_base_1
  138. {
  139.   const moneypunct_data<charT> &mpunct;
  140.  protected:
  141.   typedef _RW_STD::basic_string<charT,_RW_STD::char_traits<charT>,_RW_STD::allocator<charT> > string_type;
  142.  
  143.   money_handler_base_1
  144.       (const moneypunct_data<charT> &p): mpunct(p) { }
  145.  
  146.   inline static const moneypunct_data<charT>&
  147.       get_punct_data (const _RW_STD::locale &loc,bool intl);
  148.  
  149.   const _RW_STD::money_base::pattern &get_pos_format() const { return mpunct.pf_; }
  150.   const _RW_STD::money_base::pattern &get_neg_format() const { return mpunct.nf_; }
  151.   const string_type &get_positive_sign() const      { return mpunct.ps_; }
  152.   const string_type &get_negative_sign() const      { return mpunct.ns_; }
  153.   const string_type &get_curr_symbol() const        { return mpunct.cs_; }
  154.   int get_frac_digits() const                       { return mpunct.fd_; }
  155. };
  156.  
  157. // ------------------------------------------------------------
  158. // Implementation class template -- money_reader_base_1<charT>.
  159. // ------------------------------------------------------------
  160.  
  161. // Contains parts of money_reader<charT,InputIterator> that depend only on the
  162. // charT template parameter.
  163.  
  164. template <class charT>
  165. class money_reader_base_1:
  166.     public money_handler_base_1<charT>
  167. {
  168.  protected:
  169.   typedef _RW_STD::basic_string<charT,_RW_STD::char_traits<charT>,_RW_STD::allocator<charT> > string_type;
  170.  
  171.   digit_reader_base_1<charT> &reader;
  172.  
  173.   money_reader_base_1
  174.       (digit_reader_base_1<charT> &r,
  175.        const moneypunct_data<charT> &mp);
  176.  
  177.  public:
  178.   void get_money_string (string_type&,const char*);
  179. };
  180.  
  181. // --------------------------------------------------------------------------
  182. // Implementation class template -- money_reader_base_2<charT,InputIterator>.
  183. // --------------------------------------------------------------------------
  184.  
  185. // Contains parts of money_reader<charT,InputIterator> that do not depend on
  186. // the intl constructor parameter.
  187.  
  188. template <class charT, class InputIterator>
  189. class money_reader_base_2 :
  190.     public digit_reader<charT,InputIterator>,
  191.     public money_reader_base_1<charT>
  192. {
  193.  protected:
  194.   typedef _RW_STD::basic_string<charT,_RW_STD::char_traits<charT>,
  195.                                 _RW_STD::allocator<charT> > string_type;
  196.  
  197.   money_reader_base_2 (InputIterator &i,InputIterator &e,
  198.       _RW_STD::ios_base &b,const moneypunct_data<charT> &mp);
  199.  
  200.   inline digit_reader_base_1<charT> &this_as_digit_reader () { return *this; }
  201.  
  202.  public:
  203.   char *get_money_digits (void);    // Get monetary-format digits
  204. };
  205.  
  206. // -------------------------------------------------------------------
  207. // Implementation class template -- money_reader<charT,InputIterator>.
  208. // -------------------------------------------------------------------
  209.  
  210. template <class charT, class InputIterator>
  211. class money_reader :
  212.     public money_reader_base_2<charT,InputIterator>
  213. {
  214.  public:
  215.   money_reader (InputIterator &i,InputIterator &e,
  216.       _RW_STD::ios_base &b,bool intl);
  217. };
  218. // ------------------------------------------------------------
  219. // Implementation class template -- money_writer_base_1<charT>.
  220. // ------------------------------------------------------------
  221.  
  222. // Contains parts of money_writer<charT,Intl,OutputIterator> that depend only
  223. // on the charT template parameter.
  224.  
  225. template <class charT>
  226. class money_writer_base_1 :
  227.     public money_handler_base_1<charT>
  228. {
  229.  public:
  230.   typedef _RW_STD::basic_string<charT,_RW_STD::char_traits<charT>,_RW_STD::allocator<charT> > string_type;
  231.  
  232.   void put_money (charT fill);
  233.   void put_money (const string_type&,charT fill);
  234.  
  235.  protected:
  236.   digit_writer_base_1<charT> &writer;
  237.  
  238.   money_writer_base_1
  239.       (digit_writer_base_1<charT> &w,
  240.        const moneypunct_data<charT> &mp);
  241.  
  242.   virtual void put_money_sub (const charT*,const charT*,bool,charT)=0;
  243. };
  244.  
  245. // ---------------------------------------------------------------------------
  246. // Implementation class template -- money_writer_base_2<charT,OutputIterator>.
  247. // ---------------------------------------------------------------------------
  248.  
  249. // Contains parts of money_writer<charT,OutputIterator> that do not depend on
  250. // the intl constructor parameter.
  251.  
  252. template <class charT,class OutputIterator>
  253. class money_writer_base_2:
  254.     public digit_writer<charT,OutputIterator>,
  255.     public money_writer_base_1<charT>
  256. {
  257.  protected:
  258.   typedef _RW_STD::basic_string<charT,_RW_STD::char_traits<charT>,
  259.                                 _RW_STD::allocator<charT> > string_type;
  260.  
  261.   money_writer_base_2 (OutputIterator &os,_RW_STD::ios_base &io,
  262.       const moneypunct_data<charT> &mp);
  263.  
  264.   inline digit_writer_base_1<charT> &this_as_digit_writer () { return *this; }
  265.  
  266.   virtual void put_money_sub (const charT*,const charT*,bool,charT fill);
  267. };
  268.  
  269. // --------------------------------------------------------------------
  270. // Implementation class template -- money_writer<charT,OutputIterator>.
  271. // --------------------------------------------------------------------
  272.  
  273. template <class charT,class OutputIterator>
  274. class money_writer :
  275.     public money_writer_base_2<charT,OutputIterator>
  276. {
  277.  public:
  278.   money_writer (OutputIterator &os,_RW_STD::ios_base &io,bool intl);
  279. };
  280.  
  281. template <class charT>
  282. moneypunct_init<charT>* _RWSTDExportTemplate
  283. fixup_moneypunct_init (moneypunct_init<char>*,charT*);
  284.  
  285. #ifndef _RWSTD_NO_NEW_TEMPLATE_SYNTAX
  286. template <>
  287. inline moneypunct_init<char>* fixup_moneypunct_init<char>
  288.     (moneypunct_init<char> *init,char*)
  289. #else
  290. inline moneypunct_init<char>* fixup_moneypunct_init
  291.     (moneypunct_init<char> *init,char*)
  292. #endif // _RWSTD_NO_NEW_TEMPLATE_SYNTAX
  293. {
  294.   return init;
  295. }
  296.  
  297. // -------------------------------------------------------------
  298. // Implementation class template -- moneypunct_impl<charT,Intl>.
  299. // -------------------------------------------------------------
  300.  
  301. // moneypunct<charT,Intl> derives from this to get the parts of its behavior
  302. // that are specialized for the character type and the Intl format selection.
  303.  
  304. template <class charT,bool Intl>
  305. class moneypunct_impl:
  306.     public moneypunct_data<charT>
  307. {
  308.  protected:
  309.   moneypunct_impl (void);
  310. };
  311.  
  312. _RWSTD_TEMPLATE
  313. class _RWSTDExport moneypunct_impl<char,false>:          // Specialization
  314.     public moneypunct_data<char>
  315. {
  316.   friend class moneypunct_base;
  317.  protected:
  318.   typedef moneypunct_data<char> parent_type;
  319.   static _RWSTDExportStatic moneypunct_init<char> ivals_; // Vendor-supplied
  320.   moneypunct_impl
  321.       ( moneypunct_init<char> *init=&ivals_ ):
  322.         parent_type(init) { }
  323. };
  324.  
  325. _RWSTD_TEMPLATE
  326. class _RWSTDExport moneypunct_impl<char,true>:           // Specialization
  327.     public moneypunct_data<char>
  328. {
  329.   friend class moneypunct_base;
  330.  protected:
  331.   typedef moneypunct_data<char> parent_type;
  332.   static _RWSTDExportStatic moneypunct_init<char> ivals_; // Vendor-supplied
  333.   moneypunct_impl
  334.       ( moneypunct_init<char> *init=&ivals_ ):
  335.         parent_type(init) { }
  336. };
  337.  
  338. #ifndef _RWSTD_NO_WIDE_CHAR
  339. _RWSTD_TEMPLATE
  340. class _RWSTDExport moneypunct_impl<wchar_t,false>:       // Specialization
  341.     public moneypunct_data<wchar_t>
  342. {
  343.  protected:
  344.   typedef moneypunct_data<wchar_t> parent_type;
  345.   static _RWSTDExportStatic moneypunct_init<wchar_t> ivals_; // Vendor-supplied
  346.   moneypunct_impl
  347.       ( moneypunct_init<wchar_t> *init=&ivals_ ):
  348.         parent_type(init) { }
  349. };
  350.  
  351. _RWSTD_TEMPLATE
  352. class _RWSTDExport moneypunct_impl<wchar_t,true>:        // Specialization
  353.     public moneypunct_data<wchar_t>
  354. {
  355.  protected:
  356.   typedef moneypunct_data<wchar_t> parent_type;
  357.   static _RWSTDExportStatic moneypunct_init<wchar_t> ivals_; // Vendor-supplied
  358.   moneypunct_impl
  359.       ( moneypunct_init<wchar_t> *init=&ivals_ ):
  360.         parent_type(init) { }
  361. };
  362. #endif // _RWSTD_NO_WIDE_CHAR
  363.  
  364. #ifndef _RWSTD_NO_NAMESPACE
  365. } namespace std {
  366. #endif
  367.  
  368. // ---------------------------------------------------------------
  369. // Standard money parsing facet -- money_get<charT,InputIterator>.
  370. // ---------------------------------------------------------------
  371.  
  372. template <class charT, class InputIterator>
  373. class _RWSTDExportTemplate money_get: public locale::facet {
  374.  public:
  375.   typedef charT char_type;
  376.   typedef InputIterator iter_type;
  377.   typedef basic_string<charT,char_traits<charT>,allocator<charT> > string_type;
  378.  
  379.   _EXPLICIT money_get (size_t refs=0): locale::facet(refs,locale::monetary) { }
  380.  
  381.   iter_type get (iter_type s,  iter_type e, bool intl, ios_base& f,
  382.                  ios_base::iostate& err, long double& units) const
  383.   { return do_get(s,e,intl,f,err,units); }
  384.  
  385.   iter_type get (iter_type s, iter_type e,  bool intl, ios_base& f,
  386.                  ios_base::iostate& err, string_type& digits) const
  387.   { return do_get(s,e,intl,f,err,digits); }
  388.  
  389.   static locale::id id;
  390.  
  391.   // Implementation:
  392.   enum { __facet_cat = locale::monetary, __ok_implicit = 1 };
  393.  
  394.  protected:
  395.   virtual ~money_get();
  396.  
  397.   virtual iter_type do_get (iter_type, iter_type,  bool, ios_base&,
  398.                             ios_base::iostate&, long double& units) const;
  399.   virtual iter_type do_get (iter_type, iter_type,  bool, ios_base&,
  400.                             ios_base::iostate&, string_type& digits) const;
  401.  
  402.  private:
  403.   #ifdef _RWSTD_NO_MEMBER_TEMPLATES
  404.   locale::id &__get_id (void) const { return id; }
  405.   #endif
  406. };
  407.  
  408. // -------------------------------------------------------------------
  409. // Standard money formatting facet -- money_put<charT,OutputIterator>.
  410. // -------------------------------------------------------------------
  411.  
  412. template <class charT, class OutputIterator>
  413. class _RWSTDExportTemplate money_put: public locale::facet {
  414.  public:
  415.   typedef charT char_type;
  416.   typedef OutputIterator iter_type;
  417.   typedef basic_string<charT,char_traits<charT>,allocator<charT> > string_type;
  418.  
  419.   _EXPLICIT money_put (size_t refs=0): locale::facet(refs,locale::monetary) { }
  420.  
  421. #ifndef _RWSTD_NO_LONG_DOUBLE
  422.   iter_type put (iter_type out, bool intl, ios_base& io, char_type fill,
  423.                  long double quant) const
  424. #else
  425.   iter_type put (iter_type out, bool intl, ios_base& io, char_type fill,
  426.                  double quant) const
  427. #endif
  428.      { return do_put(out,intl,io,fill,quant); }
  429.  
  430.   iter_type put (iter_type out, bool intl, ios_base& io, char_type fill,
  431.                  const string_type& digits) const
  432.      { return do_put(out,intl,io,fill,digits); }
  433.  
  434.   static locale::id  id;
  435.  
  436.   // Implementation:
  437.   enum { __facet_cat = locale::monetary, __ok_implicit = 1 };
  438.  
  439.  protected:
  440.   virtual ~money_put();
  441.  
  442. #ifndef _RWSTD_NO_LONG_DOUBLE
  443.   virtual iter_type do_put (iter_type out, bool intl, ios_base& io,
  444.                             char_type fill, long double quant) const;
  445. #else
  446.   virtual iter_type do_put (iter_type out, bool intl, ios_base& io,
  447.                             char_type fill, double quant) const;
  448. #endif
  449.  
  450.   virtual iter_type do_put (iter_type out, bool intl, ios_base& io,
  451.                             char_type fill, const string_type &digits) const;
  452.  
  453.  private:
  454.   #ifdef _RWSTD_NO_MEMBER_TEMPLATES
  455.   locale::id &__get_id (void) const { return id; }
  456.   #endif
  457. };
  458.  
  459. // -----------------------------------------------------------
  460. // Standard money punctuation facet -- moneypunct<charT,bool>.
  461. // -----------------------------------------------------------
  462.  
  463. template <class charT, bool Intl>
  464. class _RWSTDExportTemplate moneypunct: public locale::facet, public money_base,
  465.     public __RWSTD::moneypunct_impl<charT,Intl>
  466. {
  467.  public:
  468.   typedef charT char_type;
  469.   typedef basic_string<charT,char_traits<charT>,allocator<charT> > string_type;
  470.  
  471.   #ifndef _RWSTD_NO_STI_SIMPLE
  472.   static const bool intl = Intl;
  473.   #else
  474.   enum { intl = Intl };
  475.   #endif
  476.  
  477.   // The second parameter (i) to the constructor is implementation specific.
  478.   // For portable code, always let it default as shown.
  479.   _EXPLICIT moneypunct (size_t refs=0,
  480.       __RWSTD::moneypunct_init<charT> *i = get_ivals_());
  481.  
  482.   char_type    decimal_point() const  { return do_decimal_point(); }
  483.   char_type    thousands_sep() const  { return do_thousands_sep(); }
  484.   string       grouping()      const  { return do_grouping(); }
  485.   string_type  curr_symbol()   const  { return do_curr_symbol(); };
  486.   string_type  positive_sign() const  { return do_positive_sign(); }
  487.   string_type  negative_sign() const  { return do_negative_sign(); }
  488.   int          frac_digits()   const  { return do_frac_digits(); }
  489.   pattern      pos_format()    const  { return do_pos_format(); }
  490.   pattern      neg_format()    const  { return do_neg_format(); }
  491.  
  492.   static locale::id id;
  493.  
  494.   // Implementation:
  495.   enum { __facet_cat = locale::monetary, __ok_implicit = 1 };
  496.  
  497.  protected:
  498.   virtual ~moneypunct();
  499.  
  500.   virtual char_type    do_decimal_point()  const;
  501.   virtual char_type    do_thousands_sep()  const;
  502.   virtual string       do_grouping()       const;
  503.   virtual string_type  do_curr_symbol()    const;
  504.   virtual string_type  do_positive_sign()  const;
  505.   virtual string_type  do_negative_sign()  const;
  506.   virtual int          do_frac_digits()    const;
  507.   virtual pattern      do_pos_format()     const;
  508.   virtual pattern      do_neg_format()     const;
  509.  
  510.  private:
  511.   void __initfacet (const locale*);
  512.  
  513.   #ifdef _RWSTD_NO_MEMBER_TEMPLATES
  514.   locale::id &__get_id (void) const { return id; }
  515.   #endif
  516.  
  517.  public:
  518.   static __RWSTD::moneypunct_init<charT> *get_ivals_ ()
  519.     { return &__RWSTD::moneypunct_impl<charT,Intl>::ivals_; }
  520. };
  521.  
  522. template <class charT,bool Intl>
  523. inline moneypunct<charT,Intl>::moneypunct
  524.     (size_t refs,__RWSTD::moneypunct_init<charT> *init):
  525.      locale::facet(refs,locale::monetary),
  526.      __RWSTD::moneypunct_impl<charT,Intl>(init) { }
  527. // --------------------------------------------------------
  528. // Standard derived facet -- moneypunct_byname<charT,Intl>.
  529. // --------------------------------------------------------
  530.  
  531. template <class charT, bool Intl>
  532. class moneypunct_byname: public moneypunct<charT,Intl> {
  533.  public:
  534.   _EXPLICIT moneypunct_byname (const char*, size_t refs=0);
  535.  
  536.  protected:
  537.   virtual ~moneypunct_byname();
  538.  
  539. // Virtual member functions inherited from moneypunct<charT,Intl>:
  540. // virtual char_type     do_decimal_point () const;
  541. // virtual char_type     do_thousands_sep () const;
  542. // virtual string        do_grouping ()      const;
  543. // virtual string_type   do_curr_symbol ()   const;
  544. // virtual string_type   do_positive_sign () const;
  545. // virtual string_type   do_negative_sign () const;
  546. // virtual int           do_frac_digits ()   const;
  547. // virtual pattern       do_pos_format ()    const;
  548. // virtual pattern       do_neg_format ()    const;
  549. };
  550.  
  551. #ifndef _RWSTD_NO_NAMESPACE
  552. } namespace __rwstd {
  553. #endif
  554.  
  555. #ifndef _RWSTD_NO_FUNC_PARTIAL_SPEC
  556. template <class charT,bool Intl>
  557. inline _RW_STD::moneypunct<charT,Intl>* create_named_facet
  558.     (_RW_STD::moneypunct<charT,Intl>*,const char *name,size_t refs)
  559. { return new _RW_STD::moneypunct_byname<charT,Intl>(name,refs); }
  560. #else
  561.  
  562. inline _RW_STD::moneypunct<char,false>* create_named_facet
  563.     (_RW_STD::moneypunct<char,false>*,const char *name,size_t refs)
  564. { return new _RW_STD::moneypunct_byname<char,false>(name,refs); }
  565. inline _RW_STD::moneypunct<char,true>* create_named_facet
  566.     (_RW_STD::moneypunct<char,true>*,const char *name,size_t refs)
  567. { return new _RW_STD::moneypunct_byname<char,true>(name,refs); }
  568.  
  569. #ifndef _RWSTD_NO_WIDE_CHAR
  570. inline _RW_STD::moneypunct<wchar_t,false>* create_named_facet
  571.     (_RW_STD::moneypunct<wchar_t,false>*,const char *name,size_t refs)
  572. { return new _RW_STD::moneypunct_byname<wchar_t,false>(name,refs); }
  573.  
  574. inline _RW_STD::moneypunct<wchar_t,true>* create_named_facet
  575.     (_RW_STD::moneypunct<wchar_t,true>*,const char *name,size_t refs)
  576. { return new _RW_STD::moneypunct_byname<wchar_t,true>(name,refs); }
  577. #endif
  578. #endif
  579. #ifndef _RWSTD_NO_NAMESPACE
  580. }
  581. #endif
  582.  
  583. #ifdef _RWSTD_COMPILE_INSTANTIATE
  584. #include <rw/money.cc>
  585. #endif
  586. #endif // __STD_MONEY__
  587. #pragma option pop
  588. #endif /* __MONEY_H */
  589.