3 * Silicon Graphics Computer Systems, Inc.
8 * This material is provided "as is", with absolutely no warranty expressed
9 * or implied. Any use is at your own risk.
11 * Permission to use or copy this software for any purpose is hereby granted
12 * without fee, provided the above notices are retained on all copies.
13 * Permission to modify the code and to distribute modified code is granted,
14 * provided the above notices are retained, and a notice that the code was
15 * modified is included with the above copyright notice.
18 #include "stlport_prefix.h"
20 #include "message_facets.h"
24 //----------------------------------------------------------------------
27 messages<char>::messages(_STLP_PRIV _Messages* imp) :
28 locale::facet(1), _M_impl(imp) { if (imp) imp->_M_delete = true; }
30 messages<char>::~messages()
31 { if (_M_impl && _M_impl->_M_delete) delete _M_impl; }
33 messages<char>::catalog
34 messages<char>::do_open(const string& filename, const locale& l) const
35 { return _M_impl->do_open(filename, l); }
38 messages<char>::do_get(catalog cat, int set, int p_id,
39 const string& dfault) const
40 { return _M_impl->do_get(cat, set, p_id, dfault); }
42 void messages<char>::do_close(catalog cat) const
43 { _M_impl->do_close(cat); }
45 _STLP_MOVE_TO_PRIV_NAMESPACE
47 _Messages::_Messages()
50 _Messages::~_Messages()
53 _Messages::catalog _Messages::do_open(const string&, const locale&) const
56 string _Messages::do_get(catalog, int, int, const string& dfault) const
59 void _Messages::do_close(catalog) const
62 _STLP_MOVE_TO_STD_NAMESPACE
64 #if !defined (_STLP_NO_WCHAR_T)
66 messages<wchar_t>::messages(_STLP_PRIV _Messages* imp) :
67 locale::facet(1), _M_impl(imp) { if (imp) imp->_M_delete = true; }
69 messages<wchar_t>::~messages()
70 { if (_M_impl && _M_impl->_M_delete) delete _M_impl; }
72 messages<wchar_t>::catalog
73 messages<wchar_t>::do_open(const string& filename, const locale& L) const
74 { return _M_impl->do_open(filename, L); }
77 messages<wchar_t>::do_get(catalog thecat,
78 int set, int p_id, const wstring& dfault) const
79 { return _M_impl->do_get(thecat, set, p_id, dfault); }
81 void messages<wchar_t>::do_close(catalog cat) const
82 { _M_impl->do_close(cat); }
84 _STLP_MOVE_TO_PRIV_NAMESPACE
87 _Messages::do_get(catalog, int, int, const wstring& dfault) const
90 _STLP_MOVE_TO_STD_NAMESPACE