Constructing C++ locales does not change the C library locale.
This library supports efficient construction and copying of locales through a reference counting implementation of the locale class.
Definition at line 66 of file locale_classes.h.
|
Definition of locale::category.
Definition at line 71 of file locale_classes.h. |
|
Default constructor. Constructs a copy of the global locale. If no locale has been explicitly set, this is the "C" locale. |
|
Copy constructor. Constructs a copy of other.
|
|
Named locale constructor. Constructs a copy of the named C library locale.
|
|
Construct locale with facets from another locale. Constructs a copy of the locale base. The facets specified by cat are replaced with those from the locale named by s. If base is named, this locale instance will also be named.
|
|
Construct locale with facets from another locale. Constructs a copy of the locale base. The facets specified by cat are replaced with those from the locale add. If base and add are named, this locale instance will also be named.
|
|
Construct locale with another facet. Constructs a copy of the locale other. The facet is added to , replacing an existing facet of type Facet if there is one. If is null, this locale is a copy of other.
Definition at line 565 of file locale_classes.h. |
|
Locale destructor.
|
|
Return reference to the "C" locale.
|
|
Construct locale with another facet. Constructs and returns a new copy of this locale. Adds or replaces an existing facet of type Facet from the locale other into the new locale.
Definition at line 51 of file locale_facets.tcc. References std::locale::_Impl::_M_remove_reference(), and std::locale::_Impl::_M_replace_facet(). |
|
Set global locale. This function sets the global locale to the argument and returns a copy of the previous global locale. If the argument has a name, it will also call std::setlocale(LC_ALL, loc.name()).
|
|
Return locale name.
|
|
Locale inequality.
Definition at line 240 of file locale_classes.h. References std::operator==(). |
|
Compare two strings according to collate. Template operator to compare two strings using the compare function of the collate facet in this locale. One use is to provide the locale to the sort function. For example, a vector v of strings could be sorted according to locale loc by doing: std::sort(v.begin(), v.end(), loc);
Definition at line 68 of file locale_facets.tcc. References std::basic_string< _CharT, _Traits, _Alloc >::data(), and std::basic_string< _CharT, _Traits, _Alloc >::length(). |
|
Assignment operator. Set this locale to be a copy of other.
|
|
Locale equality.
|
|
Test for the presence of a facet. has_facet tests the locale argument for the presence of the facet type provided as the template parameter. Facets derived from the facet parameter will also return true.
Definition at line 90 of file locale_facets.tcc. |
|
Return a facet. use_facet looks for and returns a reference to a facet of type Facet where Facet is the template parameter. If has_facet(locale) is true, there is a suitable facet to return. It throws std::bad_cast if the locale doesn't contain a facet of type Facet.
Definition at line 112 of file locale_facets.tcc. |
|
Category values. The standard category values are none, ctype, numeric, collate, time, monetary, and messages. They form a bitmask that supports union and intersection. The category all is the union of these values. Definition at line 104 of file locale_classes.h. |