Previous fileTop of DocumentContentsIndex pageNext file
Apache C++ Standard Library Reference Guide

messages, messages_byname

Library:  Localization


messages_base messages_byname messages locale::facet

Local Index

Members

Summary

Messaging facets

Synopsis

#include <locale>

namespace std {
  class messages_base;
  template <class charT> 
  class messages;
}

Specializations

Description

The class messages gives access to a localized messaging facility. The messages facet is used with the C locale, while the messages_byname facet is used with named locales.

The messages_base class includes a catalog type for use by the derived messages and messages_byname classes.

Interface

Member Types

char_type
string_type

Constructors

explicit messages(size_t refs = 0) 
explicit messages_byname(const char* name, 
                         size_t refs = 0); 

Facet ID

static locale::id id;

Public Member Functions

The public members of the messages facet include an interface to protected members. Each public member function xxx() calls the corresponding protected virtual member do_xxx(). For instance, the public member function open() function calls its protected cousin do_open().

void
close(catalog c) const; 
string_type 
get(catalog c, int set, int msgid, 
    const string_type& dfault) const; 
catalog 
open(const basic_string<char>& fn, const locale&) const; 

Protected Member Functions

virtual void    
do_close(catalog cat) const; 
virtual string_type 
do_get(catalog cat, int set, int msgid, 
       const string_type& dfault) const; 
virtual catalog
do_open(const basic_string<char>& name, const locale &loc)
        const;

Example

See Also

locale, Facets

Standards Conformance

ISO/IEC 14882:1998 -- International Standard for Information Systems -- Programming Language C++, Section 22.2.7



Previous fileTop of DocumentContentsIndex pageNext file