Standard C++ Library Reference ISO/IEC (VERSION3)
messages
template<class Elem>
class messages
: public locale::facet, public messages_base {
public:
typedef Elem char_type;
typedef basic_string<Elem> string_type;
explicit messages(size_t refs = 0);
catalog open(const string& catname,
const locale& loc) const;
string_type get(catalog catval, int set, int message,
const string_type& dflt) const;
void close(catalog catval) const;
static locale::id id;
protected:
~messages();
virtual catalog do_open(const string& catname,
const locale& loc) const;
virtual string_type do_get(catalog catval, int set,
int message, const string_type& dflt) const;
virtual void do_close(catalog catval) const;
};
The template class describes an object that can serve as a locale facet, to characterize various properties of a message
catalog that can supply messages represented as sequences of elements of type Elem.
As with any locale facet, the static object id has an initial stored value of zero. The first attempt to access its stored
value stores a unique positive value in id.
messages::char_type
typedef Elem char_type;
The type is a synonym for the template parameter Elem.
messages::close
void close(catalog catval) const;
The member function calls do_close(catval);.
messages::do_close
virtual void do_close(catalog catval) const;
The protected member function closes the message catalog catval, which must have been opened by an earlier call to
do_open.
messages::do_get
virtual string_type do_get(catalog catval, int set, int message,
const string_type& dflt) const;
The protected member function endeavors to obtain a message sequence from the message catalog catval. It may