Skip to content. Skip to navigation

ICTP Portal

Sections
You are here: Home Manuals on-line PGI Compiler pgC_lib ctype_byname
Personal tools
Document Actions

ctype_byname



Click on the banner to return to the class reference home page.

ctype_byname


ctype_base ctype_bynamectype locale::facet

Summary

A facet that provides character classification facilities based on the named locales.

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

None

Synopsis

#include <locale>
template <class charT> class ctype_byname;
template <> class ctype_byname<char>;

Description

ctype_byname<charT> template and ctype_byname<char> specialization provide the same functionality as the ctype<charT> template, but specific to a particular named locale. For a description of the member functions of ctype_byname, see the reference for ctype<charT>. Only the constructor is described here.

Interface

template <class charT>
class ctype_byname : public ctype<charT> {
public:
  explicit ctype_byname(const char*, size_t = 0);
protected:
  ~ctype_byname();  // virtual
  virtual bool         do_is(mask, charT) const;
  virtual const charT* do_is(const charT*, const charT*, 
                             mask*) const;
  virtual const char*  do_scan_is(mask,
                                  const charT*, 
                                  const charT*) const;
  virtual const char*  do_scan_not(mask,
                                   const charT*, 
                                   const charT*) const;
  virtual charT        do_toupper(charT) const;
  virtual const charT* do_toupper(charT*, 
                                  const charT*) const;
  virtual charT        do_tolower(charT) const;
  virtual const charT* do_tolower(charT*, 
                                  const charT*) const;
  virtual charT        do_widen(char) const;
  virtual const char*  do_widen(const char*, const char*,
                                charT*) const;
  virtual char         do_narrow(charT, char) const;
  virtual const charT* do_narrow(const charT*, const charT*,
                                 char, char*) const;
};

class ctype_byname<char> : public ctype<charT> {
public:
  explicit ctype_byname(const char*, size_t = 0);
protected:
  ~ctype_byname();  // virtual
  virtual char        do_toupper(char) const;
  virtual const char* do_toupper(char*, const char*) const;
  virtual char        do_tolower(char) const;
  virtual const char* do_tolower(char*, const char*) const;
};

Constructor

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

    Construct a ctype_byname facet. The facet will provide character classification relative to the named locale specified by the name argument. If the refs argument is 0 then destruction of the object is delegated to the locale, or locales, containing it. This allows the user to ignore lifetime management issues. On the other had, if refs is 1 then the object must be explicitly deleted; the locale will not do so. In this case, the object can be maintained across the lifetime of multiple locales.

See Also

locale, facets, collate, ctype<char>

©Copyright 1996, Rogue Wave Software, Inc.

Weather
No information available
 

Powered by Plone This site conforms to the following standards: