2
0
mirror of https://github.com/boostorg/locale.git synced 2026-02-27 17:12:20 +00:00
Files
locale/doc/html/info_8hpp_source.html
Artyom Beilis 48ff4519b8 - Updates according to library requirements
- cleanup of inspect warnings
  - various requiremets like libraries.htm and maintainers.txt


[SVN r73786]
2011-08-15 19:04:34 +00:00

156 lines
12 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Boost.Locale: boost/locale/info.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" type="text/css" href="../style/section-basic.css">
</head>
<body>
<div id="boost-common-heading-doc">
<div class="heading-inner">
<div class="heading-placard"></div>
<h1 class="heading-title">
<a href="http://www.boost.org/">
<img src="../style/space.png" alt= "Boost C++ Libraries" class="heading-logo" />
<span class="heading-boost">Boost</span>
<span class="heading-cpplibraries">C++ Libraries</span>
</a>
</h1>
<p class="heading-quote">
<q>...one of the most highly
regarded and expertly designed C++ library projects in the
world.</q>
<span class="heading-attribution">&mdash; <a href=
"http://www.gotw.ca/" class="external">Herb Sutter</a> and <a href=
"http://en.wikipedia.org/wiki/Andrei_Alexandrescu" class="external">Andrei
Alexandrescu</a>, <a href=
"http://safari.awprofessional.com/?XmlId=0321113586" class="external">C++
Coding Standards</a></span>
</p>
</div>
</div>
<div id="boost-common-heading-doc-spacer"></div>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<h1>boost/locale/info.hpp</h1> </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//</span>
<a name="l00002"></a>00002 <span class="comment">// Copyright (c) 2009-2011 Artyom Beilis (Tonkikh)</span>
<a name="l00003"></a>00003 <span class="comment">//</span>
<a name="l00004"></a>00004 <span class="comment">// Distributed under the Boost Software License, Version 1.0. (See</span>
<a name="l00005"></a>00005 <span class="comment">// accompanying file LICENSE_1_0.txt or copy at</span>
<a name="l00006"></a>00006 <span class="comment">// http://www.boost.org/LICENSE_1_0.txt)</span>
<a name="l00007"></a>00007 <span class="comment">//</span>
<a name="l00008"></a>00008 <span class="preprocessor">#ifndef BOOST_LOCALE_INFO_HPP_INCLUDED</span>
<a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define BOOST_LOCALE_INFO_HPP_INCLUDED</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#include &lt;boost/locale/config.hpp&gt;</span>
<a name="l00011"></a>00011 <span class="preprocessor">#ifdef BOOST_MSVC</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span><span class="preprocessor"># pragma warning(push)</span>
<a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor"># pragma warning(disable : 4275 4251 4231 4660)</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#include &lt;locale&gt;</span>
<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00017"></a>00017
<a name="l00018"></a>00018
<a name="l00019"></a>00019 <span class="keyword">namespace </span>boost {
<a name="l00020"></a>00020 <span class="keyword">namespace </span>locale {
<a name="l00021"></a>00021
<a name="l00027"></a><a class="code" href="classboost_1_1locale_1_1info.html">00027</a> <span class="keyword">class </span>BOOST_LOCALE_DECL <a class="code" href="classboost_1_1locale_1_1info.html" title="a facet that holds general information about locale">info</a> : <span class="keyword">public</span> std::locale::facet
<a name="l00028"></a>00028 {
<a name="l00029"></a>00029 <span class="keyword">public</span>:
<a name="l00030"></a><a class="code" href="classboost_1_1locale_1_1info.html#a01c274323da1367b153952ee1f056572">00030</a> <span class="keyword">static</span> std::locale::id id;
<a name="l00031"></a>00031
<a name="l00035"></a><a class="code" href="classboost_1_1locale_1_1info.html#ac79e3924b5473862ab15a3290b1c8d15">00035</a> <span class="keyword">enum</span> <a class="code" href="classboost_1_1locale_1_1info.html#ac79e3924b5473862ab15a3290b1c8d15">string_propery</a> {
<a name="l00036"></a><a class="code" href="classboost_1_1locale_1_1info.html#ac79e3924b5473862ab15a3290b1c8d15a51e81de8c364b3734f4e2baf1abaddcf">00036</a> language_property,
<a name="l00037"></a><a class="code" href="classboost_1_1locale_1_1info.html#ac79e3924b5473862ab15a3290b1c8d15ab59b95580bc749f21c832a70d4b73c61">00037</a> country_property,
<a name="l00038"></a><a class="code" href="classboost_1_1locale_1_1info.html#ac79e3924b5473862ab15a3290b1c8d15a2b38cb5c60ed931f21fc9bec4984900c">00038</a> variant_property,
<a name="l00039"></a><a class="code" href="classboost_1_1locale_1_1info.html#ac79e3924b5473862ab15a3290b1c8d15a1aa0567014d09df594b4a616f20c9b26">00039</a> encoding_property,
<a name="l00040"></a><a class="code" href="classboost_1_1locale_1_1info.html#ac79e3924b5473862ab15a3290b1c8d15ab68bcb824a19b6cfd95ad3c714369369">00040</a> name_property
<a name="l00041"></a>00041 };
<a name="l00042"></a>00042
<a name="l00046"></a><a class="code" href="classboost_1_1locale_1_1info.html#a53d7aa756e1b74f360913a9c9d41bb6d">00046</a> <span class="keyword">enum</span> <a class="code" href="classboost_1_1locale_1_1info.html#a53d7aa756e1b74f360913a9c9d41bb6d">integer_property</a> {
<a name="l00047"></a><a class="code" href="classboost_1_1locale_1_1info.html#a53d7aa756e1b74f360913a9c9d41bb6da4d27d781e7da56cb9b94bfd8cdcab5ea">00047</a> utf8_property
<a name="l00048"></a>00048 };
<a name="l00049"></a>00049
<a name="l00050"></a>00050
<a name="l00054"></a><a class="code" href="classboost_1_1locale_1_1info.html#a5545bf33988c859b3b864d4d65178134">00054</a> <a class="code" href="classboost_1_1locale_1_1info.html" title="a facet that holds general information about locale">info</a>(<span class="keywordtype">size_t</span> refs = 0) : std::locale::facet(refs)
<a name="l00055"></a>00055 {
<a name="l00056"></a>00056 }
<a name="l00060"></a><a class="code" href="classboost_1_1locale_1_1info.html#a7c56b9df3aba82649afc66c06192c7df">00060</a> std::string language()<span class="keyword"> const </span>
<a name="l00061"></a>00061 <span class="keyword"> </span>{
<a name="l00062"></a>00062 <span class="keywordflow">return</span> get_string_property(language_property);
<a name="l00063"></a>00063 }
<a name="l00067"></a><a class="code" href="classboost_1_1locale_1_1info.html#a249c20e36da6827a8dc8b12a8342a7dc">00067</a> std::string country()<span class="keyword"> const</span>
<a name="l00068"></a>00068 <span class="keyword"> </span>{
<a name="l00069"></a>00069 <span class="keywordflow">return</span> get_string_property(country_property);
<a name="l00070"></a>00070 }
<a name="l00074"></a><a class="code" href="classboost_1_1locale_1_1info.html#a2e949e4362c8f0195e2a645fe875f1b4">00074</a> std::string variant()<span class="keyword"> const</span>
<a name="l00075"></a>00075 <span class="keyword"> </span>{
<a name="l00076"></a>00076 <span class="keywordflow">return</span> get_string_property(variant_property);
<a name="l00077"></a>00077 }
<a name="l00081"></a><a class="code" href="classboost_1_1locale_1_1info.html#a1979a5d7b90604c45e856a139c68f5ba">00081</a> std::string encoding()<span class="keyword"> const</span>
<a name="l00082"></a>00082 <span class="keyword"> </span>{
<a name="l00083"></a>00083 <span class="keywordflow">return</span> get_string_property(encoding_property);
<a name="l00084"></a>00084 }
<a name="l00085"></a>00085
<a name="l00089"></a><a class="code" href="classboost_1_1locale_1_1info.html#af8181bf226f369548c030220932323b9">00089</a> std::string name()<span class="keyword"> const</span>
<a name="l00090"></a>00090 <span class="keyword"> </span>{
<a name="l00091"></a>00091 <span class="keywordflow">return</span> get_string_property(name_property);
<a name="l00092"></a>00092 }
<a name="l00093"></a>00093
<a name="l00097"></a><a class="code" href="classboost_1_1locale_1_1info.html#aafbbb5c291f60ce6fc3bc056859ba181">00097</a> <span class="keywordtype">bool</span> utf8()<span class="keyword"> const</span>
<a name="l00098"></a>00098 <span class="keyword"> </span>{
<a name="l00099"></a>00099 <span class="keywordflow">return</span> get_integer_property(utf8_property) != 0;
<a name="l00100"></a>00100 }
<a name="l00101"></a>00101
<a name="l00102"></a>00102 <span class="preprocessor">#if defined (__SUNPRO_CC) &amp;&amp; defined (_RWSTD_VER)</span>
<a name="l00103"></a>00103 <span class="preprocessor"></span> std::locale::id&amp; __get_id (<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> id; }
<a name="l00104"></a>00104 <span class="preprocessor">#endif</span>
<a name="l00105"></a>00105 <span class="preprocessor"></span> <span class="keyword">protected</span>:
<a name="l00109"></a>00109 <span class="keyword">virtual</span> std::string get_string_property(string_propery v) <span class="keyword">const</span> = 0;
<a name="l00113"></a>00113 <span class="keyword">virtual</span> <span class="keywordtype">int</span> get_integer_property(integer_property v) <span class="keyword">const</span> = 0;
<a name="l00114"></a>00114 };
<a name="l00115"></a>00115
<a name="l00116"></a>00116 }
<a name="l00117"></a>00117 }
<a name="l00118"></a>00118
<a name="l00119"></a>00119 <span class="preprocessor">#ifdef BOOST_MSVC</span>
<a name="l00120"></a>00120 <span class="preprocessor"></span><span class="preprocessor">#pragma warning(pop)</span>
<a name="l00121"></a>00121 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00122"></a>00122 <span class="preprocessor"></span>
<a name="l00123"></a>00123 <span class="preprocessor">#endif</span>
<a name="l00124"></a>00124 <span class="preprocessor"></span>
<a name="l00125"></a>00125 <span class="comment">// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4</span>
</pre></div></div>
</div>
<hr class="footer"/><address class="footer"><small>
&copy; Copyright 2009-2011 Artyom Beilis, Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License</a>, Version 1.0.
</small></address>
</body>
</html>