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