1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericopenlibs/cppstdlib/stl/src/messages.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,98 @@
1.4 +/*
1.5 + * Copyright (c) 1999
1.6 + * Silicon Graphics Computer Systems, Inc.
1.7 + *
1.8 + * Copyright (c) 1999
1.9 + * Boris Fomitchev
1.10 + *
1.11 + * This material is provided "as is", with absolutely no warranty expressed
1.12 + * or implied. Any use is at your own risk.
1.13 + *
1.14 + * Permission to use or copy this software for any purpose is hereby granted
1.15 + * without fee, provided the above notices are retained on all copies.
1.16 + * Permission to modify the code and to distribute modified code is granted,
1.17 + * provided the above notices are retained, and a notice that the code was
1.18 + * modified is included with the above copyright notice.
1.19 + *
1.20 + */
1.21 +#include "stlport_prefix.h"
1.22 +
1.23 +#include "message_facets.h"
1.24 +
1.25 +_STLP_BEGIN_NAMESPACE
1.26 +
1.27 +//----------------------------------------------------------------------
1.28 +// messages<char>
1.29 +
1.30 +_STLP_DECLSPEC messages<char>::messages(_STLP_PRIV _Messages* imp) :
1.31 + locale::facet(1), _M_impl(imp) { if (imp) imp->_M_delete = true; }
1.32 +
1.33 +_STLP_DECLSPEC messages<char>::~messages()
1.34 +{ if (_M_impl && _M_impl->_M_delete) delete _M_impl; }
1.35 +
1.36 +_STLP_DECLSPEC messages<char>::catalog
1.37 +messages<char>::do_open(const string& filename, const locale& l) const
1.38 +{ return _M_impl->do_open(filename, l); }
1.39 +
1.40 +_STLP_DECLSPEC string
1.41 +messages<char>::do_get(catalog cat, int set, int p_id,
1.42 + const string& dfault) const
1.43 +{ return _M_impl->do_get(cat, set, p_id, dfault); }
1.44 +
1.45 +_STLP_DECLSPEC void messages<char>::do_close(catalog cat) const
1.46 +{ _M_impl->do_close(cat); }
1.47 +
1.48 +_STLP_MOVE_TO_PRIV_NAMESPACE
1.49 +
1.50 +_Messages::_Messages()
1.51 +{}
1.52 +
1.53 +_Messages::~_Messages()
1.54 +{}
1.55 +
1.56 +_STLP_DECLSPEC _Messages::catalog _Messages::do_open(const string&, const locale&) const
1.57 +{ return -1; }
1.58 +
1.59 +_STLP_DECLSPEC string _Messages::do_get(catalog, int, int, const string& dfault) const
1.60 +{ return dfault; }
1.61 +
1.62 +_STLP_DECLSPEC void _Messages::do_close(catalog) const
1.63 +{}
1.64 +
1.65 +_STLP_MOVE_TO_STD_NAMESPACE
1.66 +
1.67 +#if !defined (_STLP_NO_WCHAR_T)
1.68 +
1.69 +_STLP_DECLSPEC messages<wchar_t>::messages(_STLP_PRIV _Messages* imp) :
1.70 + locale::facet(1), _M_impl(imp) { if (imp) imp->_M_delete = true; }
1.71 +
1.72 +_STLP_DECLSPEC messages<wchar_t>::~messages()
1.73 +{ if (_M_impl && _M_impl->_M_delete) delete _M_impl; }
1.74 +
1.75 +_STLP_DECLSPEC messages<wchar_t>::catalog
1.76 +messages<wchar_t>::do_open(const string& filename, const locale& L) const
1.77 +{ return _M_impl->do_open(filename, L); }
1.78 +
1.79 +_STLP_DECLSPEC wstring
1.80 +messages<wchar_t>::do_get(catalog thecat,
1.81 + int set, int p_id, const wstring& dfault) const
1.82 +{ return _M_impl->do_get(thecat, set, p_id, dfault); }
1.83 +
1.84 +_STLP_DECLSPEC void messages<wchar_t>::do_close(catalog cat) const
1.85 +{ _M_impl->do_close(cat); }
1.86 +
1.87 +_STLP_MOVE_TO_PRIV_NAMESPACE
1.88 +
1.89 +wstring
1.90 +_Messages::do_get(catalog, int, int, const wstring& dfault) const
1.91 +{ return dfault; }
1.92 +
1.93 +_STLP_MOVE_TO_STD_NAMESPACE
1.94 +
1.95 +#endif
1.96 +
1.97 +_STLP_END_NAMESPACE
1.98 +
1.99 +// Local Variables:
1.100 +// mode:C++
1.101 +// End: