Namespaces
Variants
Views
Actions

std::messages

From cppreference.com
< cpp‎ | locale
Revision as of 02:05, 23 April 2013 by P12 (Talk | contribs)

Template:ddcl list begin <tr class="t-dsc-header">

<td>
Defined in header <locale>
</td>

<td></td> <td></td> <tr class="t-dcl ">

<td class="t-dcl-nopad">
template< class CharT >
class messages;
</td>

<td class="t-dcl-nopad"> </td> <td class="t-dcl-nopad"> </td> </tr> Template:ddcl list end

Class template std::messages encapsulates retrieval of strings from message catalogs, such as the ones provided by GNU gettext or by POSIX catgets.

cpp/locale/messages basecpp/locale/locale/facetstd-messages-inheritance.svg
About this image

Inheritance diagram

Two specializations are provided by the standard library and are implemented by all locale objects created in a C++ program:

Defined in header <locale>
std::messages<char> accesses narrow string message catalog
std::messages<wchar_t> accesses wide string message catalog

Contents

Member types

Member type Definition
char_type CharT
string_type std::basic_string<CharT>

Member functions

Template:cpp/locale/messages/dcl list openTemplate:cpp/locale/messages/dcl list getTemplate:cpp/locale/messages/dcl list close
constructs a new messages facet
(public member function)
destructs a messages facet
(protected member function)

Member objects

static std::locale::id id
id of the locale
(public member object)

Protected member functions

Template:cpp/locale/messages/dcl list do openTemplate:cpp/locale/messages/dcl list do getTemplate:cpp/locale/messages/dcl list do close

Inherited from std::messages_base

Type Definition
catalog int

See also

defines messages catalog type
(class template)
creates a messages facet for the named locale
(class template)