namespace std {
class messages_base {
public:
using catalog = unspecified signed integer type;
};
template <class charT>
class messages : public locale::facet, public messages_base {
public:
using char_type = charT;
using string_type = basic_string<charT>;
explicit messages(size_t refs = 0);
catalog open(const basic_string<char>& fn, const locale&) const;
string_type get(catalog c, int set, int msgid,
const string_type& dfault) const;
void close(catalog c) const;
static locale::id id;
protected:
~messages();
virtual catalog do_open(const basic_string<char>&, const locale&) const;
virtual string_type do_get(catalog, int set, int msgid,
const string_type& dfault) const;
virtual void do_close(catalog) const;
};
}
Values of type messages_base::catalog usable as arguments to members get and close can be obtained only by calling member open.
catalog open(const basic_string<char>& name, const locale& loc) const;
string_type get(catalog cat, int set, int msgid, const string_type& dfault) const;
void close(catalog cat) const;
catalog do_open(const basic_string<char>& name, const locale& loc) const;
Remarks: The locale argument loc is used for character set code conversion when retrieving messages, if needed.
string_type do_get(catalog cat, int set, int msgid, const string_type& dfault) const;
void do_close(catalog cat) const;
namespace std { template <class charT> class messages_byname : public messages<charT> { public: using catalog = messages_base::catalog; using string_type = basic_string<charT>; explicit messages_byname(const char*, size_t refs = 0); explicit messages_byname(const string&, size_t refs = 0); protected: ~messages_byname(); }; }