sl@0: /* sl@0: * Portions Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. sl@0: * sl@0: * Copyright (c) 1999 sl@0: * Silicon Graphics Computer Systems, Inc. sl@0: * sl@0: * Copyright (c) 1999 sl@0: * Boris Fomitchev sl@0: * sl@0: * This material is provided "as is", with absolutely no warranty expressed sl@0: * or implied. Any use is at your own risk. sl@0: * sl@0: * Permission to use or copy this software for any purpose is hereby granted sl@0: * without fee, provided the above notices are retained on all copies. sl@0: * Permission to modify the code and to distribute modified code is granted, sl@0: * provided the above notices are retained, and a notice that the code was sl@0: * modified is included with the above copyright notice. sl@0: * sl@0: */ sl@0: #include "stlport_prefix.h" sl@0: sl@0: #include sl@0: #include sl@0: sl@0: #if defined(__SYMBIAN32__WSD__) sl@0: #include "libstdcppwsd.h" sl@0: sl@0: void monetary_empty_string_init() sl@0: { sl@0: get_monetary_S_empty_string().copy("", 1); sl@0: # ifndef _STLP_NO_WCHAR_T sl@0: get_monetary_S_empty_wstring().copy(L"", 1); sl@0: # endif //_STLP_NO_WCHAR_T sl@0: } sl@0: #define _S_empty_string get_monetary_S_empty_string() sl@0: #define _S_empty_wstring get_monetary_S_empty_wstring() sl@0: sl@0: #endif sl@0: sl@0: _STLP_BEGIN_NAMESPACE sl@0: sl@0: static void _Init_monetary_formats(money_base::pattern& pos_format, sl@0: money_base::pattern& neg_format) { sl@0: pos_format.field[0] = (char) money_base::symbol; sl@0: pos_format.field[1] = (char) money_base::sign; sl@0: pos_format.field[2] = (char) money_base::none; sl@0: pos_format.field[3] = (char) money_base::value; sl@0: sl@0: neg_format.field[0] = (char) money_base::symbol; sl@0: neg_format.field[1] = (char) money_base::sign; sl@0: neg_format.field[2] = (char) money_base::none; sl@0: neg_format.field[3] = (char) money_base::value; sl@0: } sl@0: sl@0: // This is being used throughout the library sl@0: #if !defined(__SYMBIAN32__WSD__) sl@0: static const string _S_empty_string; sl@0: #ifndef _STLP_NO_WCHAR_T sl@0: static const wstring _S_empty_wstring; sl@0: #endif sl@0: #endif //__SYMBIAN32__WSD__ sl@0: // sl@0: // moneypunct<> sl@0: // sl@0: sl@0: _STLP_DECLSPEC moneypunct::moneypunct(size_t __refs) : locale::facet(__refs) sl@0: { _Init_monetary_formats(_M_pos_format, _M_neg_format); } sl@0: _STLP_DECLSPEC moneypunct::~moneypunct() {} sl@0: sl@0: _STLP_DECLSPEC char moneypunct::do_decimal_point() const {return ' ';} sl@0: _STLP_DECLSPEC char moneypunct::do_thousands_sep() const {return ' ';} sl@0: _STLP_DECLSPEC string moneypunct::do_grouping() const { return _S_empty_string; } sl@0: _STLP_DECLSPEC string moneypunct::do_curr_symbol() const { return _S_empty_string; } sl@0: _STLP_DECLSPEC string moneypunct::do_positive_sign() const { return _S_empty_string; } sl@0: _STLP_DECLSPEC string moneypunct::do_negative_sign() const { return _S_empty_string; } sl@0: _STLP_DECLSPEC money_base::pattern moneypunct::do_pos_format() const {return _M_pos_format;} sl@0: _STLP_DECLSPEC money_base::pattern moneypunct::do_neg_format() const {return _M_neg_format;} sl@0: _STLP_DECLSPEC int moneypunct::do_frac_digits() const {return 0;} sl@0: sl@0: _STLP_DECLSPEC moneypunct::moneypunct(size_t __refs) : locale::facet(__refs) sl@0: { _Init_monetary_formats(_M_pos_format, _M_neg_format); } sl@0: _STLP_DECLSPEC moneypunct::~moneypunct() {} sl@0: sl@0: _STLP_DECLSPEC char moneypunct::do_decimal_point() const {return ' ';} sl@0: _STLP_DECLSPEC char moneypunct::do_thousands_sep() const {return ' ';} sl@0: sl@0: _STLP_DECLSPEC string moneypunct::do_grouping() const { return _S_empty_string; } sl@0: _STLP_DECLSPEC string moneypunct::do_curr_symbol() const { return _S_empty_string; } sl@0: _STLP_DECLSPEC string moneypunct::do_positive_sign() const { return _S_empty_string; } sl@0: _STLP_DECLSPEC string moneypunct::do_negative_sign() const { return _S_empty_string; } sl@0: _STLP_DECLSPEC money_base::pattern moneypunct::do_pos_format() const {return _M_pos_format;} sl@0: _STLP_DECLSPEC money_base::pattern moneypunct::do_neg_format() const {return _M_neg_format;} sl@0: _STLP_DECLSPEC int moneypunct::do_frac_digits() const {return 0;} sl@0: sl@0: #ifndef _STLP_NO_WCHAR_T sl@0: _STLP_DECLSPEC moneypunct::moneypunct(size_t __refs) : locale::facet(__refs) sl@0: { _Init_monetary_formats(_M_pos_format, _M_neg_format); } sl@0: _STLP_DECLSPEC moneypunct::~moneypunct() {} sl@0: sl@0: _STLP_DECLSPEC wchar_t moneypunct::do_decimal_point() const {return L' ';} sl@0: _STLP_DECLSPEC wchar_t moneypunct::do_thousands_sep() const {return L' ';} sl@0: _STLP_DECLSPEC string moneypunct::do_grouping() const {return _S_empty_string;} sl@0: sl@0: _STLP_DECLSPEC wstring moneypunct::do_curr_symbol() const sl@0: {return _S_empty_wstring;} sl@0: _STLP_DECLSPEC wstring moneypunct::do_positive_sign() const sl@0: {return _S_empty_wstring;} sl@0: _STLP_DECLSPEC wstring moneypunct::do_negative_sign() const sl@0: {return _S_empty_wstring;} sl@0: _STLP_DECLSPEC int moneypunct::do_frac_digits() const {return 0;} sl@0: _STLP_DECLSPEC money_base::pattern moneypunct::do_pos_format() const sl@0: {return _M_pos_format;} sl@0: _STLP_DECLSPEC money_base::pattern moneypunct::do_neg_format() const sl@0: {return _M_neg_format;} sl@0: sl@0: _STLP_DECLSPEC moneypunct::moneypunct(size_t __refs) : locale::facet(__refs) sl@0: { _Init_monetary_formats(_M_pos_format, _M_neg_format); } sl@0: _STLP_DECLSPEC moneypunct::~moneypunct() {} sl@0: sl@0: _STLP_DECLSPEC wchar_t moneypunct::do_decimal_point() const {return L' ';} sl@0: _STLP_DECLSPEC wchar_t moneypunct::do_thousands_sep() const {return L' ';} sl@0: _STLP_DECLSPEC string moneypunct::do_grouping() const { return _S_empty_string;} sl@0: _STLP_DECLSPEC wstring moneypunct::do_curr_symbol() const sl@0: {return _S_empty_wstring;} sl@0: _STLP_DECLSPEC wstring moneypunct::do_positive_sign() const sl@0: {return _S_empty_wstring;} sl@0: _STLP_DECLSPEC wstring moneypunct::do_negative_sign() const sl@0: {return _S_empty_wstring;} sl@0: _STLP_DECLSPEC int moneypunct::do_frac_digits() const {return 0;} sl@0: sl@0: _STLP_DECLSPEC money_base::pattern moneypunct::do_pos_format() const sl@0: {return _M_pos_format;} sl@0: _STLP_DECLSPEC money_base::pattern moneypunct::do_neg_format() const sl@0: {return _M_neg_format;} sl@0: sl@0: #endif /* WCHAR_T */ sl@0: sl@0: #if defined (__SYMBIAN32__WSD__) sl@0: template <> sl@0: _STLP_DECLSPEC locale::id& money_get > >::GetFacetLocaleId() sl@0: { sl@0: return get_libcpp_wsd().money_get_char_istreambuf_iterator_id; sl@0: } sl@0: template <> sl@0: _STLP_DECLSPEC locale::id& money_put > >::GetFacetLocaleId() sl@0: { sl@0: return get_libcpp_wsd().money_put_char_ostreambuf_iterator_id; sl@0: } sl@0: # ifndef _STLP_NO_WCHAR_T sl@0: template <> sl@0: _STLP_DECLSPEC locale::id& money_get > >::GetFacetLocaleId() sl@0: { sl@0: return get_libcpp_wsd().money_get_wchar_istreambuf_iterator_id; sl@0: } sl@0: template <> sl@0: _STLP_DECLSPEC locale::id& money_put > >::GetFacetLocaleId() sl@0: { sl@0: return get_libcpp_wsd().money_put_wchar_ostreambuf_iterator_id; sl@0: } sl@0: # endif /* _STLP_NO_WCHAR_T */ sl@0: #endif /* __SYMBIAN32__WSD__ */ sl@0: sl@0: // sl@0: // Instantiations sl@0: // sl@0: sl@0: #if !defined(_STLP_NO_FORCE_INSTANTIATE) sl@0: sl@0: template class _STLP_CLASS_DECLSPEC money_get > >; sl@0: template class _STLP_CLASS_DECLSPEC money_put > >; sl@0: // template class money_put; sl@0: sl@0: # ifndef _STLP_NO_WCHAR_T sl@0: template class _STLP_CLASS_DECLSPEC money_get > >; sl@0: template class _STLP_CLASS_DECLSPEC money_put > >; sl@0: // template class money_put; sl@0: // template class money_get; sl@0: # endif sl@0: sl@0: #endif sl@0: sl@0: #if defined (__EPOC32__) sl@0: template <> sl@0: locale::id money_get > >::id={8}; sl@0: sl@0: template <> sl@0: locale::id money_put > >::id={10}; sl@0: template <> sl@0: locale::id money_put::id; sl@0: sl@0: # if !defined (_STLP_NO_WCHAR_T) sl@0: template <> sl@0: locale::id money_get > >::id={27}; sl@0: template <> sl@0: locale::id money_get::id; sl@0: sl@0: template <> sl@0: locale::id money_put > >::id={29}; sl@0: # endif sl@0: #endif // __EPOC32__ sl@0: sl@0: sl@0: _STLP_END_NAMESPACE sl@0: sl@0: // Local Variables: sl@0: // mode:C++ sl@0: // End: