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 "message_facets.h" sl@0: sl@0: _STLP_BEGIN_NAMESPACE sl@0: sl@0: //---------------------------------------------------------------------- sl@0: // messages sl@0: sl@0: _STLP_DECLSPEC messages::messages(_STLP_PRIV _Messages* imp) : sl@0: locale::facet(1), _M_impl(imp) { if (imp) imp->_M_delete = true; } sl@0: sl@0: _STLP_DECLSPEC messages::~messages() sl@0: { if (_M_impl && _M_impl->_M_delete) delete _M_impl; } sl@0: sl@0: _STLP_DECLSPEC messages::catalog sl@0: messages::do_open(const string& filename, const locale& l) const sl@0: { return _M_impl->do_open(filename, l); } sl@0: sl@0: _STLP_DECLSPEC string sl@0: messages::do_get(catalog cat, int set, int p_id, sl@0: const string& dfault) const sl@0: { return _M_impl->do_get(cat, set, p_id, dfault); } sl@0: sl@0: _STLP_DECLSPEC void messages::do_close(catalog cat) const sl@0: { _M_impl->do_close(cat); } sl@0: sl@0: _STLP_MOVE_TO_PRIV_NAMESPACE sl@0: sl@0: _Messages::_Messages() sl@0: {} sl@0: sl@0: _Messages::~_Messages() sl@0: {} sl@0: sl@0: _STLP_DECLSPEC _Messages::catalog _Messages::do_open(const string&, const locale&) const sl@0: { return -1; } sl@0: sl@0: _STLP_DECLSPEC string _Messages::do_get(catalog, int, int, const string& dfault) const sl@0: { return dfault; } sl@0: sl@0: _STLP_DECLSPEC void _Messages::do_close(catalog) const sl@0: {} sl@0: sl@0: _STLP_MOVE_TO_STD_NAMESPACE sl@0: sl@0: #if !defined (_STLP_NO_WCHAR_T) sl@0: sl@0: _STLP_DECLSPEC messages::messages(_STLP_PRIV _Messages* imp) : sl@0: locale::facet(1), _M_impl(imp) { if (imp) imp->_M_delete = true; } sl@0: sl@0: _STLP_DECLSPEC messages::~messages() sl@0: { if (_M_impl && _M_impl->_M_delete) delete _M_impl; } sl@0: sl@0: _STLP_DECLSPEC messages::catalog sl@0: messages::do_open(const string& filename, const locale& L) const sl@0: { return _M_impl->do_open(filename, L); } sl@0: sl@0: _STLP_DECLSPEC wstring sl@0: messages::do_get(catalog thecat, sl@0: int set, int p_id, const wstring& dfault) const sl@0: { return _M_impl->do_get(thecat, set, p_id, dfault); } sl@0: sl@0: _STLP_DECLSPEC void messages::do_close(catalog cat) const sl@0: { _M_impl->do_close(cat); } sl@0: sl@0: _STLP_MOVE_TO_PRIV_NAMESPACE sl@0: sl@0: wstring sl@0: _Messages::do_get(catalog, int, int, const wstring& dfault) const sl@0: { return dfault; } sl@0: sl@0: _STLP_MOVE_TO_STD_NAMESPACE sl@0: sl@0: #endif sl@0: sl@0: _STLP_END_NAMESPACE sl@0: sl@0: // Local Variables: sl@0: // mode:C++ sl@0: // End: