libstdc++
|
Public Types | |
typedef int | catalog |
typedef _CharT | char_type |
typedef basic_string< _CharT > | string_type |
Public Member Functions | |
messages (size_t __refs=0) | |
messages (__c_locale __cloc, const char *__s, size_t __refs=0) | |
void | close (catalog __c) const |
string_type | get (catalog __c, int __set, int __msgid, const string_type &__s) const |
catalog | open (const basic_string< char > &__s, const locale &__loc) const |
catalog | open (const basic_string< char > &, const locale &, const char *) const |
Static Public Attributes | |
static locale::id | id |
Protected Member Functions | |
virtual | ~messages () |
string_type | _M_convert_from_char (char *) const |
char * | _M_convert_to_char (const string_type &__msg) const |
template<> | |
void | do_close (catalog) const |
template<> | |
void | do_close (catalog) const |
virtual void | do_close (catalog) const |
virtual string_type | do_get (catalog, int, int, const string_type &__dfault) const |
template<> | |
string | do_get (catalog, int, int, const string &) const |
template<> | |
wstring | do_get (catalog, int, int, const wstring &) const |
template<> | |
messages< char >::catalog | do_open (const basic_string< char > &, const locale &) const |
template<> | |
messages< wchar_t >::catalog | do_open (const basic_string< char > &, const locale &) const |
virtual catalog | do_open (const basic_string< char > &, const locale &) const |
Protected Attributes | |
__c_locale | _M_c_locale_messages |
const char * | _M_name_messages |
Primary class template messages.
This facet encapsulates the code to retrieve messages from message catalogs. The only thing defined by the standard for this facet is the interface. All underlying functionality is implementation-defined.
This library currently implements 3 versions of the message facet. The first version (gnu) is a wrapper around gettext, provided by libintl. The second version (ieee) is a wrapper around catgets. The final version (default) does no actual translation. These implementations are only provided for char and wchar_t instantiations.
The messages template uses protected virtual functions to provide the actual results. The public accessors forward the call to the virtual functions. These virtual functions are hooks for developers to implement the behavior they require from the messages facet.
Definition at line 1797 of file locale_facets_nonio.h.
typedef _CharT std::messages< _CharT >::char_type |
Public typedefs.
Definition at line 1803 of file locale_facets_nonio.h.
typedef basic_string<_CharT> std::messages< _CharT >::string_type |
Public typedefs.
Definition at line 1804 of file locale_facets_nonio.h.
|
explicit |
Constructor performs initialization.
This is the constructor provided by the standard.
__refs | Passed to the base facet class. |
Definition at line 44 of file messages_members.h.
|
explicit |
Internal constructor. Not for general use.
This is a constructor for use by the library itself to set up new locales.
__cloc | The C locale. |
__s | The name of a locale. |
__refs | Refcount to pass to the base class. |
Definition at line 50 of file messages_members.h.
References std::basic_string< _CharT, _Traits, _Alloc >::c_str().
|
protectedvirtual |
Destructor.
Definition at line 79 of file messages_members.h.
References std::basic_string< _CharT, _Traits, _Alloc >::c_str().
|
protected |
Specializations for required instantiations.
|
static |
Numpunct facet id.
Definition at line 1815 of file locale_facets_nonio.h.