Skip to content. Skip to navigation

ICTP Portal

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

codecvt_byname



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

codecvt_byname


...codecvt_base codecvt_bynamecode_cvt ... ...locale::facet

Summary

A facet that provides code set conversion 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 codecvt_byname;

Description

The codecvt_byname template provides the same functionality as the codecvt template, but specific to a particular named locale. For a description of the member functions of codecvt_byname, see the reference for codecvt. Only the constructor is described here.

Interface

template <class fromT, class toT, class stateT>
class codecvt_byname : public codecvt<fromT, toT, stateT> {
public:
  explicit codecvt_byname(const char*, size_t refs = 0);
protected:
  ~codecvt_byname();  // virtual
  virtual result do_out(stateT&,
                        const internT*, 
                        const internT*, 
                        const internT*&,
                        externT*, externT*,
                        externT*&) const;
  virtual result do_in(stateT&,
                       const externT*, 
                       const externT*, 
                       const externT*&,
                       internT*, internT*,
                       internT*&) const;

  virtual bool do_always_noconv() const throw();
  virtual int do_length(const stateT&, const internT*, 
                        const internT*,
  virtual int do_max_length() const throw();
  virtual int do_encoding() const throw();
};

Constructor

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

    Construct a codecvt_byname facet. The facet will provide codeset conversion relative to the named locale specified by the name argument. If the refs argument is 0, 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, 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, codecvt


©Copyright 1996, Rogue Wave Software, Inc.


Powered by Plone This site conforms to the following standards: