std::messages< CharT > Class Template Reference

Facet for handling message catalogs. More...

#include <locale_facets.h>

Inheritance diagram for std::messages< CharT >:

Inheritance graph
[legend]
Collaboration diagram for std::messages< CharT >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef int catalog
typedef CharT char_type
 Public typedefs.
typedef basic_string< CharT > string_type
 Public typedefs.

Public Member Functions

 messages (size_t __refs=0)
 Constructor performs initialization.
 messages (c_locale cloc, const char *s, size_t __refs=0)
 Internal constructor. Not for general use.
catalog open (const basic_string< char > &s, const locale &__loc) const
string_type get (catalog c, int set, int __msgid, const string_type &s) const
void close (catalog c) const

Static Public Attributes

static locale::id id
 Numpunct facet id.

Protected Member Functions

virtual ~messages ()
 Destructor.
char * M_convert_to_char (const string_type &__msg) const
string_type M_convert_from_char (char *) const

Static Protected Member Functions

static c_locale S_get_c_locale ()
static const char * S_get_c_name ()

Protected Attributes

c_locale M_c_locale_messages
const char * M_name_messages

Friends

class locale::Impl

Detailed Description

template<typename CharT>
class std::messages< CharT >

Facet for handling message catalogs.

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 4251 of file locale_facets.h.


Member Typedef Documentation

template<typename CharT>
typedef CharT std::messages< CharT >::char_type

Public typedefs.

Reimplemented in std::messages_byname< CharT >.

Definition at line 4257 of file locale_facets.h.

template<typename CharT>
typedef basic_string<CharT> std::messages< CharT >::string_type

Public typedefs.

Reimplemented in std::messages_byname< CharT >.

Definition at line 4258 of file locale_facets.h.


Constructor & Destructor Documentation

template<typename CharT>
std::messages< CharT >::messages ( size_t  __refs = 0  )  [explicit]

Constructor performs initialization.

This is the constructor provided by the standard.

Parameters:
refs Passed to the base facet class.

template<typename CharT>
std::messages< CharT >::messages ( c_locale  cloc,
const char *  s,
size_t  __refs = 0 
) [explicit]

Internal constructor. Not for general use.

This is a constructor for use by the library itself to set up new locales.

Parameters:
cloc The "C" locale.
s The name of a locale.
refs Refcount to pass to the base class.

template<typename CharT>
virtual std::messages< CharT >::~messages (  )  [protected, virtual]

Destructor.


Member Data Documentation

template<typename CharT>
locale::id std::messages< CharT >::id [static]

Numpunct facet id.

Definition at line 4269 of file locale_facets.h.


The documentation for this class was generated from the following file:
Generated on Tue Jan 2 16:59:51 2007 for libstdc++-v3 Source by  doxygen 1.5.1