32#ifndef _RWSTD_LOC_MESSAGES_H_INCLUDED
33#define _RWSTD_LOC_MESSAGES_H_INCLUDED
37# pragma GCC system_header
52int __rw_cat_open (
const _STD::string&,
const _STD::locale&);
54const char* __rw_get_message (
int,
int,
int);
56const _STD::locale& __rw_get_locale (
int);
58void __rw_cat_close (
int);
74template <
class _CharT>
75class messages:
public _RW::__rw_facet,
79 typedef _CharT char_type;
81 typedef basic_string<char_type, char_traits<char_type>,
82 allocator<char_type> > string_type;
84 explicit messages (_RWSTD_SIZE_T __refs = 0)
85 : _RW::__rw_facet (__refs) { }
89 catalog
open (
const string& __fun,
const locale& __loc)
const {
90 return do_open (__fun, __loc);
93 string_type get (catalog __c,
int __set,
int __msgid,
94 const string_type& __df)
const {
95 return do_get (__c, __set, __msgid, __df);
98 void close (catalog __c)
const {
102 static _RW::__rw_facet_id id;
106 virtual catalog do_open (
const string&,
const locale&)
const;
108 virtual string_type do_get (catalog,
int,
int,
const string_type&)
const;
110 virtual void do_close (catalog)
const;
114#ifndef _RWSTD_NO_SPECIALIZED_FACET_ID
117_RW::__rw_facet_id messages<char>::id;
119# ifndef _RWSTD_NO_WCHAR_T
122_RW::__rw_facet_id messages<wchar_t>::id;
129template <
class _CharT>
130class messages_byname:
public messages<_CharT>
132 char _C_namebuf [32];
136 explicit messages_byname (
const char *__name, _RWSTD_SIZE_T __refs = 0)
137 : messages<_CharT>(__refs) {
138 this->_C_set_name (__name, _C_namebuf,
sizeof _C_namebuf);
147#if _RWSTD_DEFINE_TEMPLATE_FIRST (_MESSAGES)
153# pragma warning (push)
154# pragma warning (disable: 4231)
160#if _RWSTD_INSTANTIATE (_MESSAGES, _CHAR)
166#if _RWSTD_INSTANTIATE (_MESSAGES, _WCHAR_T)
176# pragma warning (pop)
180#if _RWSTD_DEFINE_TEMPLATE_LAST (_MESSAGES)
#define _RWSTD_SPECIALIZED_CLASS
#define _RWSTD_INSTANTIATE_1(arg)
#define _RWSTD_NAMESPACE(name)
#define _RWSTD_ATTRIBUTE_NOTHROW