2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
17 #ifndef _STLP_NUMPUNCT_C
18 #define _STLP_NUMPUNCT_C
19 #ifndef _STLP_INTERNAL_NUMPUNCT_H
20 # include <stl/_numpunct.h>
24 template<class _CharT>
25 numpunct<_CharT>::~numpunct() { }
27 template<class _CharT>
28 _CharT numpunct<_CharT>::do_decimal_point() const
33 template<class _CharT>
34 _CharT numpunct<_CharT>::do_thousands_sep() const
40 template<class _CharT>
41 string numpunct<_CharT>::do_grouping() const
46 template<class _CharT>
47 basic_string<_CharT> numpunct<_CharT>::do_truename() const
52 template<class _CharT>
53 basic_string<_CharT> numpunct<_CharT>::do_falsename() const
59 template<class _CharT>
60 numpunct_byname<_CharT>::numpunct_byname(const char* name, size_t refs)
61 : numpunct<_CharT> (refs),
62 _M_numeric(__acquire_numericE(name))
65 locale::_M_throw_runtime_error();
67 const char* truename = _Locale_trueE(_M_numeric);
68 const char* falsename = _Locale_falseE(_M_numeric);
72 template<class _CharT>
73 numpunct_byname<_CharT>::~numpunct_byname()
75 __release_numericE(_M_numeric);
78 template<class _CharT>
79 _CharT numpunct_byname<_CharT>::do_decimal_point() const
81 return (_CharT ) _Locale_decimal_pointE(_M_numeric);
83 template<class _CharT>
84 _CharT numpunct_byname<_CharT>::do_thousands_sep() const
86 return (_CharT) _Locale_thousands_sepE(_M_numeric);
89 template<class _CharT>
90 string numpunct_byname<_CharT>::do_grouping() const
92 const char * __grouping = _Locale_groupingE(_M_numeric);
93 if (__grouping != NULL && __grouping[0] == CHAR_MAX)
102 //----------------------------------------------------------------------
104 #endif //#ifndef _STLP_NUMPUNCT_C