epoc32/include/stdapis/stlport/stl/_monetary.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 /*
     2  * © Portions copyright (c) 2006-2007 Nokia Corporation.  All rights reserved.
     3  *
     4  * Copyright (c) 1999
     5  * Silicon Graphics Computer Systems, Inc.
     6  *
     7  * Copyright (c) 1999 
     8  * Boris Fomitchev
     9  *
    10  * This material is provided "as is", with absolutely no warranty expressed
    11  * or implied. Any use is at your own risk.
    12  *
    13  * Permission to use or copy this software for any purpose is hereby granted 
    14  * without fee, provided the above notices are retained on all copies.
    15  * Permission to modify the code and to distribute modified code is granted,
    16  * provided the above notices are retained, and a notice that the code was
    17  * modified is included with the above copyright notice.
    18  *
    19  */ 
    20 // WARNING: This is an internal header file, included by other C++
    21 // standard library headers.  You should not attempt to use this header
    22 // file directly.
    23 
    24 
    25 #ifndef _STLP_INTERNAL_MONETARY_H
    26 #define _STLP_INTERNAL_MONETARY_H
    27 
    28 #ifndef _STLP_INTERNAL_CTYPE_H
    29 # include <stl/_ctype.h>
    30 #endif
    31 
    32 #ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H
    33 # include <stl/_ostreambuf_iterator.h>
    34 #endif
    35 
    36 #ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H
    37 # include <stl/_istreambuf_iterator.h>
    38 #endif
    39 
    40 _STLP_BEGIN_NAMESPACE
    41 
    42 class money_base {
    43 public:
    44   enum part {none, space, symbol, sign, value};
    45   struct pattern {
    46     char field[4];
    47   };
    48 };
    49 
    50 
    51 #ifdef __SYMBIAN32__
    52 
    53 extern locale::id& Moneypunct_charT_GetFacetLocaleId(const char* type);
    54 _STLP_DECLSPEC void _Init_monetary_formatsE(money_base::pattern& pos_format,
    55 				   money_base::pattern& neg_format);
    56 
    57 template <class _CharT, __DFL_NON_TYPE_PARAM(bool, _International, false) > 
    58 class moneypunct : public locale::facet , public money_base
    59 {
    60 public:
    61   typedef _CharT                 		char_type;
    62   typedef basic_string<_CharT>		string_type;
    63   explicit moneypunct _STLP_PSPEC2(_CharT, _International) (size_t __refs = 0)
    64   	{
    65   		_Init_monetary_formatsE(_M_pos_format, _M_neg_format);
    66   	}
    67   _CharT        decimal_point() const { return do_decimal_point(); }
    68   _CharT         thousands_sep() const { return do_thousands_sep(); }
    69   string      grouping()      const { return do_grouping(); }
    70   string_type curr_symbol()   const { return do_curr_symbol(); }
    71   string_type positive_sign() const { return do_positive_sign(); }
    72   string_type negative_sign() const { return do_negative_sign(); }
    73   int         frac_digits()   const { return do_frac_digits(); }
    74   pattern     pos_format()    const { return do_pos_format(); }
    75   pattern     neg_format()    const { return do_neg_format(); }
    76   #if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_)
    77     static locale::id& GetFacetLocaleId(){return Moneypunct_charT_GetFacetLocaleId(typeid(_CharT).name());  };
    78 #else
    79    static locale::id id;
    80 #endif
    81 # if defined (_STLP_STATIC_CONST_INIT_BUG)
    82   enum _IntlVal { intl = _International } ;
    83 # else
    84   static const bool intl = _International;
    85 # endif
    86 
    87 protected:
    88   pattern _M_pos_format;
    89   pattern _M_neg_format;
    90   
    91   static string_type	 _M_psign, _M_nsign, _M_currSym;
    92   static string _M_group;
    93  ~moneypunct _STLP_PSPEC2(char, true) () { };
    94 
    95  virtual _CharT        do_decimal_point() const;
    96  virtual _CharT        do_thousands_sep() const;
    97  virtual string      do_grouping()      const;
    98 
    99  virtual basic_string<_CharT>      do_curr_symbol()   const;
   100 
   101  virtual basic_string<_CharT>      do_positive_sign() const;
   102  virtual basic_string<_CharT>      do_negative_sign() const;
   103  virtual int         do_frac_digits()   const;
   104  virtual pattern     do_pos_format()    const;
   105  virtual pattern     do_neg_format()    const;
   106 
   107   friend class _Locale;
   108 
   109 };
   110 template <class _CharT, bool  _International> 
   111 string	moneypunct<_CharT, _International>::_M_group;
   112 template <class _CharT, bool  _International> 
   113 basic_string<_CharT>	moneypunct<_CharT, _International>::_M_psign;
   114 template <class _CharT, bool  _International> 
   115 basic_string<_CharT>	moneypunct<_CharT, _International>::_M_nsign;
   116 template <class _CharT, bool  _International> 
   117 basic_string<_CharT>	moneypunct<_CharT, _International>::_M_currSym;
   118 
   119 
   120 #else
   121 // moneypunct facets: forward declaration
   122 template <class _charT, __DFL_NON_TYPE_PARAM(bool, _International, false) > class moneypunct {};
   123 #endif
   124 
   125 // money_get facets
   126 
   127 template <class _CharT, __DFL_TMPL_PARAM(_InputIter , istreambuf_iterator<_CharT>) >
   128 class money_get : public locale::facet 
   129 {
   130   friend class _Locale;
   131 public:
   132   typedef _CharT               char_type;
   133   typedef _InputIter           iter_type;
   134   typedef basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > string_type;
   135 
   136   money_get(size_t __refs = 0) : _BaseFacet(__refs) {}
   137 # ifndef _STLP_NO_LONG_DOUBLE
   138   iter_type get(iter_type __s, iter_type  __end, bool __intl,
   139                 ios_base&  __str, ios_base::iostate&  __err,
   140                 long double& __units) const
   141     { return do_get(__s,  __end, __intl,  __str,  __err, __units); }
   142 # endif  
   143   iter_type get(iter_type __s, iter_type  __end, bool __intl,
   144                 ios_base&  __str, ios_base::iostate& __err,
   145                 string_type& __digits) const
   146     { return do_get(__s,  __end, __intl,  __str,  __err, __digits); }
   147 
   148 #if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_)
   149 	_STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId();
   150     _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(istreambuf_iterator<wchar_t, char_traits<wchar_t> >* );
   151     _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(const wchar_t**);
   152     _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(istreambuf_iterator<char, char_traits<char> >* );
   153     _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(const char **);
   154 #else
   155   _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
   156 #endif
   157 
   158 protected:
   159   ~money_get() {}
   160 # ifndef _STLP_NO_LONG_DOUBLE
   161   virtual iter_type do_get(iter_type __s, iter_type  __end, bool  __intl,
   162                            ios_base&  __str, ios_base::iostate& __err,
   163                            long double& __units) const;
   164 # endif
   165   virtual iter_type do_get(iter_type __s, iter_type __end, bool __intl,
   166                            ios_base&  __str, ios_base::iostate& __err,
   167                            string_type& __digits) const;
   168 };
   169 
   170 
   171 // moneypunct facets: definition of specializations
   172 
   173 _STLP_TEMPLATE_NULL
   174 #ifdef __SYMBIAN32__
   175 class moneypunct<char, true> : public locale::facet, public money_base
   176 #else
   177 class _STLP_CLASS_DECLSPEC moneypunct<char, true> : public locale::facet, public money_base
   178 #endif
   179 {
   180 
   181 public:
   182   typedef char                 char_type;
   183   typedef string               string_type;
   184 _STLP_DECLSPEC   explicit moneypunct _STLP_PSPEC2(char, true) (size_t __refs = 0);
   185 
   186   char        decimal_point() const { return do_decimal_point(); }
   187   char        thousands_sep() const { return do_thousands_sep(); }
   188   string      grouping()      const { return do_grouping(); }
   189   string_type curr_symbol()   const { return do_curr_symbol(); }
   190   string_type positive_sign() const { return do_positive_sign(); }
   191   string_type negative_sign() const { return do_negative_sign(); }
   192   int         frac_digits()   const { return do_frac_digits(); }
   193   pattern     pos_format()    const { return do_pos_format(); }
   194   pattern     neg_format()    const { return do_neg_format(); }
   195 
   196 #if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_)
   197     _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId();
   198 #else
   199   _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
   200 #endif
   201 # if defined (_STLP_STATIC_CONST_INIT_BUG)
   202   enum _IntlVal { intl = 1 } ;
   203 # else
   204   static const bool intl = true;
   205 # endif
   206 
   207 protected:
   208   pattern _M_pos_format;
   209   pattern _M_neg_format;
   210 
   211 _STLP_DECLSPEC   ~moneypunct _STLP_PSPEC2(char, true) ();
   212 
   213 _STLP_DECLSPEC   virtual char        do_decimal_point() const;
   214   _STLP_DECLSPEC virtual char        do_thousands_sep() const;
   215 _STLP_DECLSPEC   virtual string      do_grouping()      const;
   216 
   217 _STLP_DECLSPEC   virtual string      do_curr_symbol()   const;
   218 
   219 _STLP_DECLSPEC   virtual string      do_positive_sign() const;
   220 _STLP_DECLSPEC   virtual string      do_negative_sign() const;
   221 _STLP_DECLSPEC   virtual int         do_frac_digits()   const;
   222 _STLP_DECLSPEC   virtual pattern     do_pos_format()    const;
   223 _STLP_DECLSPEC   virtual pattern     do_neg_format()    const;
   224 
   225   friend class _Locale;
   226 
   227 };
   228 
   229 _STLP_TEMPLATE_NULL
   230 #ifdef __SYMBIAN32__
   231 class moneypunct<char, false> : public locale::facet, public money_base
   232 #else
   233 class _STLP_CLASS_DECLSPEC moneypunct<char, false> : public locale::facet, public money_base
   234 #endif
   235 {
   236 public:
   237   typedef char                 char_type;
   238   typedef string               string_type;
   239 
   240 _STLP_DECLSPEC   explicit moneypunct _STLP_PSPEC2(char, false) (size_t __refs = 0);
   241 
   242   char        decimal_point() const { return do_decimal_point(); }
   243   char        thousands_sep() const { return do_thousands_sep(); }
   244   string      grouping()      const { return do_grouping(); }
   245   string_type curr_symbol()   const { return do_curr_symbol(); }
   246   string_type positive_sign() const { return do_positive_sign(); }
   247   string_type negative_sign() const { return do_negative_sign(); }
   248   int         frac_digits()   const { return do_frac_digits(); }
   249   pattern     pos_format()    const { return do_pos_format(); }
   250   pattern     neg_format()    const { return do_neg_format(); }
   251 
   252 #if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_)
   253     _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId();
   254 #else
   255   _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
   256 #endif
   257 # if defined (_STLP_STATIC_CONST_INIT_BUG)
   258   enum _IntlVal { intl = 0 } ;
   259 # else
   260   static const bool intl = false;
   261 # endif
   262 
   263 protected:
   264   pattern _M_pos_format;
   265   pattern _M_neg_format;
   266 
   267 _STLP_DECLSPEC   ~moneypunct _STLP_PSPEC2(char, false) ();
   268 
   269 _STLP_DECLSPEC   virtual char        do_decimal_point() const;
   270   _STLP_DECLSPEC virtual char        do_thousands_sep() const;
   271 _STLP_DECLSPEC   virtual string      do_grouping()      const;
   272 
   273 _STLP_DECLSPEC   virtual string      do_curr_symbol()   const;
   274 
   275 _STLP_DECLSPEC   virtual string      do_positive_sign() const;
   276 _STLP_DECLSPEC   virtual string      do_negative_sign() const;
   277 _STLP_DECLSPEC   virtual int         do_frac_digits()   const;
   278 _STLP_DECLSPEC   virtual pattern     do_pos_format()    const;
   279 _STLP_DECLSPEC   virtual pattern     do_neg_format()    const;
   280 
   281   friend class _Locale;
   282 };
   283 
   284 
   285 # ifndef _STLP_NO_WCHAR_T
   286 
   287 _STLP_TEMPLATE_NULL
   288 #ifdef __SYMBIAN32__
   289 class moneypunct<wchar_t, true> : public locale::facet, public money_base
   290 #else
   291 class _STLP_CLASS_DECLSPEC moneypunct<wchar_t, true> : public locale::facet, public money_base
   292 #endif
   293 {
   294   friend class _Locale;
   295 public:
   296   typedef wchar_t                 char_type;
   297   typedef wstring                 string_type;
   298 _STLP_DECLSPEC   explicit moneypunct _STLP_PSPEC2(wchar_t, true) (size_t __refs = 0);
   299   wchar_t     decimal_point() const { return do_decimal_point(); }
   300   wchar_t     thousands_sep() const { return do_thousands_sep(); }
   301   string      grouping()      const { return do_grouping(); }
   302   string_type curr_symbol()   const { return do_curr_symbol(); }
   303   string_type positive_sign() const { return do_positive_sign(); }
   304   string_type negative_sign() const { return do_negative_sign(); }
   305   int         frac_digits()   const { return do_frac_digits(); }
   306   pattern     pos_format()    const { return do_pos_format(); }
   307   pattern     neg_format()    const { return do_neg_format(); }
   308 
   309 #if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_)
   310 	_STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId();
   311 #else
   312   _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
   313 #endif
   314 # if defined (_STLP_STATIC_CONST_INIT_BUG)
   315   enum _IntlVal { intl = 1 } ;
   316 # else
   317   static const bool intl = true;
   318 # endif
   319 
   320 protected:
   321   pattern _M_pos_format;
   322   pattern _M_neg_format;
   323 
   324 _STLP_DECLSPEC   ~moneypunct _STLP_PSPEC2(wchar_t, true) ();
   325 
   326 _STLP_DECLSPEC   virtual wchar_t     do_decimal_point() const;
   327   _STLP_DECLSPEC virtual wchar_t     do_thousands_sep() const;
   328 _STLP_DECLSPEC   virtual string      do_grouping()      const;
   329 
   330 _STLP_DECLSPEC   virtual string_type do_curr_symbol()   const;
   331 
   332 _STLP_DECLSPEC   virtual string_type do_positive_sign() const;
   333 _STLP_DECLSPEC   virtual string_type do_negative_sign() const;
   334 _STLP_DECLSPEC   virtual int         do_frac_digits()   const;
   335 _STLP_DECLSPEC   virtual pattern     do_pos_format()    const;
   336 _STLP_DECLSPEC   virtual pattern     do_neg_format()    const;
   337 };
   338 
   339 
   340 _STLP_TEMPLATE_NULL
   341 #ifdef __SYMBIAN32__
   342 class moneypunct<wchar_t, false> : public locale::facet, public money_base
   343 #else
   344 class _STLP_CLASS_DECLSPEC moneypunct<wchar_t, false> : public locale::facet, public money_base
   345 #endif
   346 {
   347   friend class _Locale;
   348 public:
   349   typedef wchar_t                 char_type;
   350   typedef wstring                 string_type;
   351 _STLP_DECLSPEC   explicit moneypunct _STLP_PSPEC2(wchar_t, false) (size_t __refs = 0);
   352   wchar_t     decimal_point() const { return do_decimal_point(); }
   353   wchar_t     thousands_sep() const { return do_thousands_sep(); }
   354   string      grouping()      const { return do_grouping(); }
   355   string_type curr_symbol()   const { return do_curr_symbol(); }
   356   string_type positive_sign() const { return do_positive_sign(); }
   357   string_type negative_sign() const { return do_negative_sign(); }
   358   int         frac_digits()   const { return do_frac_digits(); }
   359   pattern     pos_format()    const { return do_pos_format(); }
   360   pattern     neg_format()    const { return do_neg_format(); }
   361 
   362 #if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_)
   363 	_STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId();
   364 #else
   365 	_STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
   366 #endif
   367 # if defined (_STLP_STATIC_CONST_INIT_BUG)
   368   enum _IntlVal { intl = 0 } ;
   369 # else
   370   static const bool intl = false;
   371 # endif
   372 
   373 protected:
   374   pattern _M_pos_format;
   375   pattern _M_neg_format;
   376 
   377 _STLP_DECLSPEC   ~moneypunct _STLP_PSPEC2(wchar_t, false) ();
   378 
   379 _STLP_DECLSPEC   virtual wchar_t     do_decimal_point() const;
   380   _STLP_DECLSPEC virtual wchar_t     do_thousands_sep() const;
   381 _STLP_DECLSPEC   virtual string      do_grouping()      const;
   382 
   383 _STLP_DECLSPEC   virtual string_type do_curr_symbol()   const;
   384 
   385 _STLP_DECLSPEC   virtual string_type do_positive_sign() const;
   386 _STLP_DECLSPEC   virtual string_type do_negative_sign() const;
   387 _STLP_DECLSPEC   virtual int         do_frac_digits()   const;
   388 _STLP_DECLSPEC   virtual pattern     do_pos_format()    const;
   389 _STLP_DECLSPEC   virtual pattern     do_neg_format()    const;
   390 };
   391 
   392 # endif
   393 
   394 
   395 #ifdef __SYMBIAN32__
   396 _STLP_DECLSPEC  _Locale_monetary* __acquire_monetaryE(const char* );
   397 _STLP_DECLSPEC void __release_monetaryE (_Locale_monetary* );
   398 
   399 
   400 _STLP_DECLSPEC char _Locale_mon_decimal_pointE(_Locale_monetary* _M_monetary);
   401 
   402 _STLP_DECLSPEC char _Locale_mon_thousands_sepE(_Locale_monetary* _M_monetary);
   403 
   404 _STLP_DECLSPEC string _Locale_mon_groupingE(_Locale_monetary* _M_monetary);
   405 
   406 _STLP_DECLSPEC string _Locale_int_curr_symbolE(_Locale_monetary* _M_monetary);
   407 
   408 
   409 _STLP_DECLSPEC string _Locale_positive_signE(_Locale_monetary* _M_monetary);
   410 
   411 _STLP_DECLSPEC string _Locale_negative_signE(_Locale_monetary* _M_monetary);
   412 
   413 _STLP_DECLSPEC int _Locale_int_frac_digitsE(_Locale_monetary* _M_monetary);
   414 
   415 
   416 template <class _CharT, __DFL_NON_TYPE_PARAM(bool , _International , false) > 
   417 class moneypunct_byname: public  moneypunct<_CharT, _International>
   418 {
   419 public:
   420   typedef money_base::pattern   pattern;
   421   typedef char                  char_type;
   422   typedef basic_string<_CharT>                string_type;
   423 
   424   explicit moneypunct_byname _STLP_PSPEC2(char, _International) (const char * __name, size_t __refs = 0);
   425   
   426 protected:
   427   _Locale_monetary* _M_monetary;
   428   ~moneypunct_byname _STLP_PSPEC2(_CharT, _International) ();
   429   virtual _CharT        do_decimal_point() const;
   430   virtual _CharT        do_thousands_sep() const;
   431   virtual string      do_grouping()      const;
   432 
   433   virtual string_type do_curr_symbol()   const;
   434 
   435   virtual string_type do_positive_sign() const;
   436  virtual string_type do_negative_sign() const;
   437  virtual int         do_frac_digits()   const;
   438  private: 
   439  void Convert_string2_string_chart(basic_string<_CharT> &dst, string src);
   440  	
   441 };
   442 
   443 #else
   444 
   445 template <class _charT, __DFL_NON_TYPE_PARAM(bool , _International , false) > class moneypunct_byname {};
   446 
   447 #endif
   448 
   449 _STLP_TEMPLATE_NULL
   450 class _STLP_CLASS_DECLSPEC moneypunct_byname<char, true> : public moneypunct<char, true> 
   451 {
   452 public:
   453   typedef money_base::pattern   pattern;
   454   typedef char                  char_type;
   455   typedef string                string_type;
   456 
   457   explicit _STLP_DECLSPEC moneypunct_byname _STLP_PSPEC2(char, true) (const char * __name, size_t __refs = 0);
   458 
   459 protected:
   460   _Locale_monetary* _M_monetary;
   461 _STLP_DECLSPEC   ~moneypunct_byname _STLP_PSPEC2(char, true) ();
   462 _STLP_DECLSPEC   virtual char        do_decimal_point() const;
   463   _STLP_DECLSPEC virtual char        do_thousands_sep() const;
   464 _STLP_DECLSPEC   virtual string      do_grouping()      const;
   465 
   466 _STLP_DECLSPEC   virtual string_type do_curr_symbol()   const;
   467 
   468 _STLP_DECLSPEC   virtual string_type do_positive_sign() const;
   469 _STLP_DECLSPEC   virtual string_type do_negative_sign() const;
   470 _STLP_DECLSPEC   virtual int         do_frac_digits()   const;
   471 };
   472 
   473 _STLP_TEMPLATE_NULL
   474 class _STLP_CLASS_DECLSPEC moneypunct_byname<char, false> : public moneypunct<char, false> 
   475 {
   476 public:
   477   typedef money_base::pattern   pattern;
   478   typedef char                  char_type;
   479   typedef string                string_type;
   480 
   481   explicit _STLP_DECLSPEC moneypunct_byname _STLP_PSPEC2(char, false) (const char * __name, size_t __refs = 0);
   482 
   483 protected:
   484   _Locale_monetary* _M_monetary;
   485 _STLP_DECLSPEC   ~moneypunct_byname _STLP_PSPEC2(char, false) ();
   486 _STLP_DECLSPEC   virtual char        do_decimal_point() const;
   487   _STLP_DECLSPEC virtual char        do_thousands_sep() const;
   488 _STLP_DECLSPEC   virtual string      do_grouping()      const;
   489 
   490 _STLP_DECLSPEC   virtual string_type do_curr_symbol()   const;
   491 
   492 _STLP_DECLSPEC   virtual string_type do_positive_sign() const;
   493 _STLP_DECLSPEC   virtual string_type do_negative_sign() const;
   494 _STLP_DECLSPEC   virtual int         do_frac_digits()   const;
   495 };
   496 
   497 # ifndef _STLP_NO_WCHAR_T
   498 _STLP_TEMPLATE_NULL
   499 class _STLP_CLASS_DECLSPEC moneypunct_byname<wchar_t, true> : public moneypunct<wchar_t, true> 
   500 {
   501 public:
   502   typedef money_base::pattern   pattern;
   503   typedef wchar_t               char_type;
   504   typedef wstring               string_type;
   505 
   506   explicit _STLP_DECLSPEC moneypunct_byname _STLP_PSPEC2(wchar_t, true) (const char * __name, size_t __refs = 0);
   507 
   508 protected:
   509   _Locale_monetary* _M_monetary;
   510 _STLP_DECLSPEC   ~moneypunct_byname _STLP_PSPEC2(wchar_t, true) ();
   511 _STLP_DECLSPEC   virtual wchar_t     do_decimal_point() const;
   512   _STLP_DECLSPEC virtual wchar_t     do_thousands_sep() const;
   513 _STLP_DECLSPEC   virtual string      do_grouping()      const;
   514 
   515 _STLP_DECLSPEC   virtual string_type do_curr_symbol()   const;
   516 
   517 _STLP_DECLSPEC   virtual string_type do_positive_sign() const;
   518 _STLP_DECLSPEC   virtual string_type do_negative_sign() const;
   519 _STLP_DECLSPEC   virtual int         do_frac_digits()   const;
   520 };
   521 
   522 _STLP_TEMPLATE_NULL
   523 class _STLP_CLASS_DECLSPEC moneypunct_byname<wchar_t, false> : public moneypunct<wchar_t, false> 
   524 {
   525 public:
   526   typedef money_base::pattern   pattern;
   527   typedef wchar_t               char_type;
   528   typedef wstring               string_type;
   529 
   530   explicit _STLP_DECLSPEC moneypunct_byname _STLP_PSPEC2(wchar_t, false) (const char * __name, size_t __refs = 0);
   531 
   532 protected:
   533   _Locale_monetary* _M_monetary;
   534 _STLP_DECLSPEC   ~moneypunct_byname _STLP_PSPEC2(wchar_t, false) ();
   535 _STLP_DECLSPEC   virtual wchar_t     do_decimal_point() const;
   536   _STLP_DECLSPEC virtual wchar_t     do_thousands_sep() const;
   537 _STLP_DECLSPEC   virtual string      do_grouping()      const;
   538 
   539 _STLP_DECLSPEC   virtual string_type do_curr_symbol()   const;
   540 
   541 _STLP_DECLSPEC   virtual string_type do_positive_sign() const;
   542 _STLP_DECLSPEC   virtual string_type do_negative_sign() const;
   543 _STLP_DECLSPEC   virtual int         do_frac_digits()   const;
   544 };
   545 # endif
   546 
   547 //===== methods ======
   548 
   549 
   550 // money_put facets
   551 
   552 template <class _CharT, __DFL_TMPL_PARAM( _OutputIter , ostreambuf_iterator<_CharT>) >
   553 class money_put : public locale::facet {
   554   friend class _Locale;
   555 
   556 public:
   557   typedef _CharT               char_type;
   558   typedef _OutputIter          iter_type;
   559   typedef basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > string_type;
   560 
   561    money_put(size_t __refs = 0) : _BaseFacet(__refs) {}
   562 # ifndef _STLP_NO_LONG_DOUBLE
   563   iter_type put(iter_type __s, bool __intl, ios_base& __str,
   564                 char_type  __fill, long double __units) const
   565     { return do_put(__s, __intl, __str, __fill, __units); }
   566 # endif
   567   iter_type put(iter_type __s, bool __intl, ios_base& __str,
   568                 char_type  __fill, 
   569                 const string_type& __digits) const
   570     { return do_put(__s, __intl, __str, __fill, __digits); }
   571 
   572 #if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_)
   573 	_STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId();
   574     _STLP_STATIC_MEMBER_DECLSPEC static locale::id& 
   575                 GetFacetLocaleId(ostreambuf_iterator<wchar_t, char_traits<wchar_t> > *);
   576     _STLP_STATIC_MEMBER_DECLSPEC static locale::id& 
   577                 GetFacetLocaleId(wchar_t**);
   578     _STLP_STATIC_MEMBER_DECLSPEC static locale::id& 
   579                 GetFacetLocaleId(ostreambuf_iterator<char, char_traits<char> > *);
   580     _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(char**);
   581 #else
   582   _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
   583 #endif
   584 
   585 protected:
   586   ~money_put() {}
   587 # ifndef _STLP_NO_LONG_DOUBLE
   588   virtual iter_type do_put(iter_type __s, bool  __intl, ios_base&  __str,
   589                            char_type __fill, long double /*  __units */ ) const {
   590 
   591     locale __loc = __str.getloc();
   592     _CharT  __buf[64];
   593     return do_put(__s, __intl, __str, __fill, __buf + 0);
   594   }
   595 # endif    
   596   virtual iter_type do_put(iter_type __s, bool  __intl, ios_base&  __str,
   597                            char_type __fill,
   598                            const string_type& __digits) const;
   599 };
   600 
   601 # if defined (_STLP_USE_TEMPLATE_EXPORT)
   602 _STLP_EXPORT_TEMPLATE_CLASS money_get<char, istreambuf_iterator<char, char_traits<char> > >;
   603 _STLP_EXPORT_TEMPLATE_CLASS money_put<char, ostreambuf_iterator<char, char_traits<char> > >;
   604 // _STLP_EXPORT_TEMPLATE_CLASS money_get<char, const char* >;
   605 // _STLP_EXPORT_TEMPLATE_CLASS money_put<char, char* >;
   606 #  if ! defined (_STLP_NO_WCHAR_T)
   607 _STLP_EXPORT_TEMPLATE_CLASS money_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > >;
   608 _STLP_EXPORT_TEMPLATE_CLASS money_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > >;
   609 // _STLP_EXPORT_TEMPLATE_CLASS money_get<wchar_t, const wchar_t* >;
   610 // _STLP_EXPORT_TEMPLATE_CLASS money_put<wchar_t, wchar_t* >;
   611 #  endif
   612 # endif /* _STLP_USE_TEMPLATE_EXPORT */
   613 
   614 # if defined (__BORLANDC__) && defined (_RTLDLL)
   615 inline void _Stl_loc_init_monetary() {
   616   money_get<char, istreambuf_iterator<char, char_traits<char> > >::id._M_index                     = 8;
   617   money_get<char, const char*>::id._M_index        = 9;
   618   money_put<char, ostreambuf_iterator<char, char_traits<char> > >::id._M_index                     = 10;
   619   money_put<char, char*>::id._M_index              = 11;
   620 # ifndef _STLP_NO_WCHAR_T
   621   money_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > >::id._M_index                  = 27;
   622   money_get<wchar_t, const wchar_t*>::id._M_index  = 28;
   623   money_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > >::id._M_index                  = 29;
   624   money_put<wchar_t, wchar_t*>::id._M_index        = 30;
   625 # endif  
   626 }
   627 #endif
   628 
   629 _STLP_END_NAMESPACE
   630 
   631 # if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
   632 #  include <stl/_monetary.c>
   633 # endif
   634 
   635 #endif /* _STLP_INTERNAL_MONETARY_H */
   636 
   637 // Local Variables:
   638 // mode:C++
   639 // End:
   640 
   641