epoc32/include/stdapis/stlport/stl/_numpunct.c
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     1 #ifndef _STLP_NUMPUNCT_C
     2 #define _STLP_NUMPUNCT_C
     3 #ifndef _STLP_INTERNAL_NUMPUNCT_H
     4 # include <stl/_numpunct.h>
     5 #endif
     6 
     7 
     8 template<class _CharT>
     9  numpunct<_CharT>::~numpunct() { }
    10 
    11 template<class _CharT>
    12 _CharT numpunct<_CharT>::do_decimal_point() const
    13 {
    14 	return (_CharT)'.'; 
    15 }
    16 
    17 template<class _CharT>
    18  _CharT numpunct<_CharT>::do_thousands_sep() const
    19 {
    20 	return (_CharT)','; 
    21 }
    22 
    23 
    24 template<class _CharT>
    25 string numpunct<_CharT>::do_grouping() const
    26 {
    27 	return _M_grouping;
    28 }
    29 
    30 template<class _CharT>
    31 basic_string<_CharT> numpunct<_CharT>::do_truename() const
    32 {
    33 	return _M_truename;
    34 }
    35 
    36 template<class _CharT>
    37 basic_string<_CharT> numpunct<_CharT>::do_falsename() const
    38 {
    39 	return _M_falsename;
    40 }
    41 
    42 
    43 template<class _CharT>
    44 numpunct_byname<_CharT>::numpunct_byname(const char* name, size_t refs)
    45 	: numpunct<_CharT> (refs),
    46     _M_numeric(__acquire_numericE(name))
    47 {
    48   if (!_M_numeric)
    49     locale::_M_throw_runtime_error();
    50 
    51   const char* truename  = _Locale_trueE(_M_numeric);
    52   const char* falsename = _Locale_falseE(_M_numeric);
    53 	
    54 }
    55 
    56 template<class _CharT>
    57 numpunct_byname<_CharT>::~numpunct_byname()
    58 { 	
    59 	__release_numericE(_M_numeric);
    60 }
    61 
    62 template<class _CharT>
    63 _CharT   numpunct_byname<_CharT>::do_decimal_point() const 
    64 { 
    65 	return (_CharT ) _Locale_decimal_pointE(_M_numeric);
    66 }
    67 template<class _CharT>
    68 _CharT   numpunct_byname<_CharT>::do_thousands_sep() const 
    69 {
    70 	return (_CharT) _Locale_thousands_sepE(_M_numeric); 
    71 }
    72 
    73 template<class _CharT>
    74 string numpunct_byname<_CharT>::do_grouping()      const 
    75 {  
    76 		const char * __grouping = _Locale_groupingE(_M_numeric);
    77   		if (__grouping != NULL && __grouping[0] == CHAR_MAX)
    78     		__grouping = "";
    79 		
    80   		return NULL;
    81 }
    82 
    83 
    84 
    85 
    86 //----------------------------------------------------------------------
    87 
    88 #endif //#ifndef _STLP_NUMPUNCT_C
    89