Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::locale::info Class Referenceabstract

a facet that holds general information about locale More...

#include <info.hpp>

Inheritance diagram for boost::locale::info:
Collaboration diagram for boost::locale::info:

Public Types

enum  string_propery {
  language_property,
  country_property,
  variant_property,
  encoding_property,
  name_property
}
 String information about the locale. More...
 
enum  integer_property { utf8_property }
 Integer information about locale. More...
 

Public Member Functions

 info (size_t refs=0)
 Standard facet's constructor. More...
 
std::string language () const
 Get language name. More...
 
std::string country () const
 Get country name. More...
 
std::string variant () const
 Get locale variant. More...
 
std::string encoding () const
 Get encoding. More...
 
std::string name () const
 Get the name of the locale, like en_US.UTF-8. More...
 
bool utf8 () const
 True if the underlying encoding is UTF-8 (for char streams and strings) More...
 

Static Public Attributes

static std::locale::id id
 This member uniquely defines this facet, required by STL. More...
 

Protected Member Functions

virtual std::string get_string_property (string_propery v) const =0
 Get string property by its id v. More...
 
virtual int get_integer_property (integer_property v) const =0
 Get integer property by its id v. More...
 

Detailed Description

a facet that holds general information about locale

This facet should be always created in order to make all Boost.Locale functions work

Member Enumeration Documentation

Integer information about locale.

Enumerator
utf8_property 

Non zero value if uses UTF-8 encoding.

String information about the locale.

Enumerator
language_property 

ISO 639 language id.

country_property 

ISO 3166 country id.

variant_property 

Variant for locale.

encoding_property 

encoding name

name_property 

locale name

Constructor & Destructor Documentation

boost::locale::info::info ( size_t  refs = 0)
inline

Standard facet's constructor.

Member Function Documentation

std::string boost::locale::info::country ( ) const
inline

Get country name.

std::string boost::locale::info::encoding ( ) const
inline

Get encoding.

virtual int boost::locale::info::get_integer_property ( integer_property  v) const
protectedpure virtual

Get integer property by its id v.

virtual std::string boost::locale::info::get_string_property ( string_propery  v) const
protectedpure virtual

Get string property by its id v.

std::string boost::locale::info::language ( ) const
inline

Get language name.

std::string boost::locale::info::name ( ) const
inline

Get the name of the locale, like en_US.UTF-8.

bool boost::locale::info::utf8 ( ) const
inline

True if the underlying encoding is UTF-8 (for char streams and strings)

std::string boost::locale::info::variant ( ) const
inline

Get locale variant.

Member Data Documentation

std::locale::id boost::locale::info::id
static

This member uniquely defines this facet, required by STL.


The documentation for this class was generated from the following file: