Rogue Wave banner
Previous fileTop of documentContentsIndexNext file

locale


Localization Container

Summary

A localization class containing a polymorphic set of facets.

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

Synopsis

#include <locale> 
class locale;

Description

locale is a localization interface and a set of indexed facets, each of which covers one particular localization issue. The default locale object is constructed on the "C" locale. Locales can also be constructed on named locales.

A calling program can determine whether a particular facet is contained in a locale by using the has_facet function, and the program can obtain a reference to that facet with the use_facet function. These are not member functions, but instead take a locale object as an argument.

locale has several important characteristics.

First, successive calls to member functions always return the same result. This allows a calling program to safely cache the results of a call.

Only a locale constructed from a name, from parts of two named locales, or from a stream, has a name. All other locales are unnamed. Only named locales may be compared for equality. An unnamed locale is equal only to itself.

Interface

Types

category
facet
id

Constructors

locale()
  throw()
locale(const locale& other)
  throw()
explicit locale(const char* std_name); 
locale(const locale& other, const char* std_name,
       category cat); 
template <class Facet> 
locale(const locale& other, Facet* f); 
locale(const locale& other, const locale& one, 
       category cat); 

Destructors

~locale();

Public Member Operators

const locale& 
operator=(const locale& other) throw();
template <class Facet> 
locale combine(const locale& other); 
bool 
operator==(const locale& other) const; 
bool 
operator!=(const locale& other) const; 
template <class charT,Traits>
bool 
operator()(const basic_string<charT,Traits>& s1,
           const basic_string<charT,Traits>& s2) const; 

Public Member Functions

basic_string<char> 
name() const; 

Static Public Member Functions

static const locale& 
classic();
static locale 
global(const locale& loc); 

Example

See Also

facets, has_facet, use_facet, specific facet reference sections



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