Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Rogue Wave C++ Standard Library Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

collate, collate_byname

Module:  Standard C++ Library   Library:  Localization


collate_byname collate locale::facet

Local Index

Members

Summary

A string collation, comparison, and hashing facet.

Synopsis

#include <locale>

namespace std {
  template <class charT> class collate;
  template <class charT> class collate_byname;
}

Specializations

Description

The collate and collate_byname facets allow for string collation, comparison, and hashing. Use the collate facet for the C locale, and use the collate_byname facet for named locales.

Interface

Member Types

char_type
string_type

Constructors

explicit collate(size_t refs = 0) 
explicit collate_byname(const char* name, size_t refs = 0); 

Destructors

virtual ~collate(); 
virtual ~collate_byname();

Facet ID

static locale::id id; 

Public Member Functions

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

int 
compare(const charT* low1, const charT* high1,
        const charT* low2, const charT* high2) const; 
long 
hash(const charT* low, const charT* high) const; 
string_type 
transform(const charT* low, const charT* high) const; 

Protected Member Functions

virtual int    
do_compare(const charT* low1, const charT* high1,
           const charT* low2, const charT* high2) const; 
virtual long   
do_hash( const charT* low, const charT* high) const; 
virtual string_type 
do_transform(const charT* low, const charT* high) const; 

Example

See Also

locale, Facets, ctype

Standards Conformance

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



Previous fileTop of DocumentContentsIndex pageNext file

Copyright (c) 1994-2006 Rogue Wave Software, a Quovadx Division.
Licensed under the Apache License, Version 2.0.
Contact Rogue Wave about documentation or support issues. You can also seek help from other developers through the Apache stdcxx community (see below).

For more information on the Rogue Wave Standard C++ Library under open source, see Section 1.2 of the user's guide.