Rogue Wave banner
Previous fileTop of documentContentsIndexNext file

messages, messages_byname


inherits frommessages_base messages_bynameinherits frommessages inherits from locale::facet

Summary

Messaging facets.

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

#include<locale>
class messages_base;
template <class charT> class messages;

Description

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.

Note that the default messages facet uses catopen, catclose, etc., to implement the message database. If your platform does not support these, then you need to imbue your own messages facet by implementing whatever database is available.

Interface

Types

char_type
string_type

Constructors

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

Destructors

~messages();  // virtual and protected

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 xxx has a corresponding virtual protected member do_xxx. All work is delegated to these protected members. For instance, the long version of the public open function simply calls its protected cousin do_open.

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&) const; 

Example

See Also

locale, facets



Previous fileTop of documentContentsIndexNext file
©Copyright 1998, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.
OEM Release, June 1998