| <!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"/> |
| <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| <title>Boost.Locale: boost/locale/formatting.hpp Source File</title> |
| |
| <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="jquery.js"></script> |
| <script type="text/javascript" src="resize.js"></script> |
| <script type="text/javascript" src="navtree.js"></script> |
| <script type="text/javascript"> |
| $(document).ready(initResizable); |
| </script> |
| |
| |
| </head> |
| <body> |
| <div id="top"><!-- do not remove this div! --> |
| |
| |
| <div id="titlearea"> |
| <table cellspacing="0" cellpadding="0"> |
| <tbody> |
| <tr style="height: 56px;"> |
| |
| <td id="projectlogo"><img alt="Logo" src="boost-small.png"/></td> |
| |
| |
| <td style="padding-left: 0.5em;"> |
| <div id="projectname">Boost.Locale |
| |
| </div> |
| |
| </td> |
| |
| |
| |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| |
| <!-- Generated by Doxygen 1.7.6.1 --> |
| <div id="navrow1" class="tabs"> |
| <ul class="tablist"> |
| <li><a href="index.html"><span>Main 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 id="navrow2" class="tabs2"> |
| <ul class="tablist"> |
| <li><a href="files.html"><span>File List</span></a></li> |
| </ul> |
| </div> |
| </div> |
| <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| <div id="nav-tree"> |
| <div id="nav-tree-contents"> |
| </div> |
| </div> |
| <div id="splitbar" style="-moz-user-select:none;" |
| class="ui-resizable-handle"> |
| </div> |
| </div> |
| <script type="text/javascript"> |
| initNavTree('formatting_8hpp.html',''); |
| </script> |
| <div id="doc-content"> |
| <div class="header"> |
| <div class="headertitle"> |
| <div class="title">boost/locale/formatting.hpp</div> </div> |
| </div><!--header--> |
| <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_FORMATTING_HPP_INCLUDED</span> |
| <a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define BOOST_LOCALE_FORMATTING_HPP_INCLUDED</span> |
| <a name="l00010"></a>00010 <span class="preprocessor"></span> |
| <a name="l00011"></a>00011 <span class="preprocessor">#include <boost/locale/config.hpp></span> |
| <a name="l00012"></a>00012 <span class="preprocessor">#ifdef BOOST_MSVC</span> |
| <a name="l00013"></a>00013 <span class="preprocessor"></span><span class="preprocessor"># pragma warning(push)</span> |
| <a name="l00014"></a>00014 <span class="preprocessor"></span><span class="preprocessor"># pragma warning(disable : 4275 4251 4231 4660)</span> |
| <a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#endif</span> |
| <a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#include <boost/cstdint.hpp></span> |
| <a name="l00017"></a>00017 <span class="preprocessor">#include <boost/locale/time_zone.hpp></span> |
| <a name="l00018"></a>00018 <span class="preprocessor">#include <ostream></span> |
| <a name="l00019"></a>00019 <span class="preprocessor">#include <istream></span> |
| <a name="l00020"></a>00020 <span class="preprocessor">#include <string></span> |
| <a name="l00021"></a>00021 <span class="preprocessor">#include <string.h></span> |
| <a name="l00022"></a>00022 <span class="preprocessor">#include <typeinfo></span> |
| <a name="l00023"></a>00023 |
| <a name="l00024"></a>00024 <span class="keyword">namespace </span>boost { |
| <a name="l00025"></a>00025 <span class="keyword">namespace </span>locale { |
| <a name="l00030"></a><a class="code" href="namespaceboost_1_1locale_1_1flags.html">00030</a> <span class="keyword">namespace </span>flags { |
| <a name="l00035"></a><a class="code" href="namespaceboost_1_1locale_1_1flags.html#ab0255a81e609e12040ca07dda4434a99">00035</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> { |
| <a name="l00036"></a>00036 posix = 0, |
| <a name="l00037"></a>00037 number = 1, |
| <a name="l00038"></a>00038 currency = 2, |
| <a name="l00039"></a>00039 percent = 3, |
| <a name="l00040"></a>00040 date = 4, |
| <a name="l00041"></a>00041 time = 5, |
| <a name="l00042"></a>00042 datetime = 6, |
| <a name="l00043"></a>00043 strftime = 7, |
| <a name="l00044"></a>00044 spellout = 8, |
| <a name="l00045"></a>00045 ordinal = 9, |
| <a name="l00046"></a>00046 |
| <a name="l00047"></a>00047 display_flags_mask = 31, |
| <a name="l00048"></a>00048 |
| <a name="l00049"></a>00049 currency_default = 0 << 5, |
| <a name="l00050"></a>00050 currency_iso = 1 << 5, |
| <a name="l00051"></a>00051 currency_national = 2 << 5, |
| <a name="l00052"></a>00052 |
| <a name="l00053"></a>00053 currency_flags_mask = 3 << 5, |
| <a name="l00054"></a>00054 |
| <a name="l00055"></a>00055 time_default = 0 << 7, |
| <a name="l00056"></a>00056 time_short = 1 << 7, |
| <a name="l00057"></a>00057 time_medium = 2 << 7, |
| <a name="l00058"></a>00058 time_long = 3 << 7, |
| <a name="l00059"></a>00059 time_full = 4 << 7, |
| <a name="l00060"></a>00060 time_flags_mask = 7 << 7, |
| <a name="l00061"></a>00061 |
| <a name="l00062"></a>00062 date_default = 0 << 10, |
| <a name="l00063"></a>00063 date_short = 1 << 10, |
| <a name="l00064"></a>00064 date_medium = 2 << 10, |
| <a name="l00065"></a>00065 date_long = 3 << 10, |
| <a name="l00066"></a>00066 date_full = 4 << 10, |
| <a name="l00067"></a>00067 date_flags_mask = 7 << 10, |
| <a name="l00068"></a>00068 |
| <a name="l00069"></a>00069 datetime_flags_mask = date_flags_mask | time_flags_mask |
| <a name="l00070"></a>00070 |
| <a name="l00071"></a>00071 } <a class="code" href="namespaceboost_1_1locale_1_1flags.html#ab0255a81e609e12040ca07dda4434a99">display_flags_type</a>; |
| <a name="l00072"></a>00072 |
| <a name="l00077"></a><a class="code" href="namespaceboost_1_1locale_1_1flags.html#a730fd2868b4d25412c9fba7239ce277e">00077</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> { |
| <a name="l00078"></a><a class="code" href="namespaceboost_1_1locale_1_1flags.html#a730fd2868b4d25412c9fba7239ce277eaa4cbe9c3e0cd744c7543755e51029387">00078</a> <a class="code" href="namespaceboost_1_1locale_1_1flags.html#a730fd2868b4d25412c9fba7239ce277eaa4cbe9c3e0cd744c7543755e51029387" title="strftime like formatting">datetime_pattern</a>, |
| <a name="l00079"></a><a class="code" href="namespaceboost_1_1locale_1_1flags.html#a730fd2868b4d25412c9fba7239ce277eaeb4698e4d169fa7bd13d35fb861cc4fb">00079</a> <a class="code" href="namespaceboost_1_1locale_1_1flags.html#a730fd2868b4d25412c9fba7239ce277eaeb4698e4d169fa7bd13d35fb861cc4fb" title="time zone name">time_zone_id</a> |
| <a name="l00080"></a>00080 } <a class="code" href="namespaceboost_1_1locale_1_1flags.html#a730fd2868b4d25412c9fba7239ce277e">pattern_type</a>; |
| <a name="l00081"></a>00081 |
| <a name="l00085"></a><a class="code" href="namespaceboost_1_1locale_1_1flags.html#aa8bc4e6a6419c16479ea037b9fd05d06">00085</a> <span class="keyword">typedef</span> <span class="keyword">enum</span> { |
| <a name="l00086"></a><a class="code" href="namespaceboost_1_1locale_1_1flags.html#aa8bc4e6a6419c16479ea037b9fd05d06a43aa65d05606f54a48b3848fdd4218c0">00086</a> <a class="code" href="namespaceboost_1_1locale_1_1flags.html#aa8bc4e6a6419c16479ea037b9fd05d06a43aa65d05606f54a48b3848fdd4218c0" title="Domain code - for message formatting.">domain_id</a> |
| <a name="l00087"></a>00087 } <a class="code" href="namespaceboost_1_1locale_1_1flags.html#aa8bc4e6a6419c16479ea037b9fd05d06">value_type</a>; |
| <a name="l00088"></a>00088 |
| <a name="l00089"></a>00089 |
| <a name="l00090"></a>00090 } <span class="comment">// flags</span> |
| <a name="l00091"></a>00091 |
| <a name="l00098"></a><a class="code" href="classboost_1_1locale_1_1ios__info.html">00098</a> <span class="keyword">class </span>BOOST_LOCALE_DECL <a class="code" href="classboost_1_1locale_1_1ios__info.html" title="This class holds an external data - beyond existing fmtflags that std::ios_base holds.">ios_info</a> { |
| <a name="l00099"></a>00099 <span class="keyword">public</span>: |
| <a name="l00100"></a>00100 |
| <a name="l00102"></a>00102 |
| <a name="l00103"></a>00103 <a class="code" href="classboost_1_1locale_1_1ios__info.html" title="This class holds an external data - beyond existing fmtflags that std::ios_base holds.">ios_info</a>(); |
| <a name="l00104"></a>00104 <a class="code" href="classboost_1_1locale_1_1ios__info.html" title="This class holds an external data - beyond existing fmtflags that std::ios_base holds.">ios_info</a>(<a class="code" href="classboost_1_1locale_1_1ios__info.html" title="This class holds an external data - beyond existing fmtflags that std::ios_base holds.">ios_info</a> <span class="keyword">const</span> &); |
| <a name="l00105"></a>00105 <a class="code" href="classboost_1_1locale_1_1ios__info.html" title="This class holds an external data - beyond existing fmtflags that std::ios_base holds.">ios_info</a> <span class="keyword">const</span> &operator=(<a class="code" href="classboost_1_1locale_1_1ios__info.html" title="This class holds an external data - beyond existing fmtflags that std::ios_base holds.">ios_info</a> <span class="keyword">const</span> &); |
| <a name="l00106"></a>00106 ~<a class="code" href="classboost_1_1locale_1_1ios__info.html" title="This class holds an external data - beyond existing fmtflags that std::ios_base holds.">ios_info</a>(); |
| <a name="l00107"></a>00107 |
| <a name="l00109"></a>00109 |
| <a name="l00113"></a>00113 <span class="keyword">static</span> <a class="code" href="classboost_1_1locale_1_1ios__info.html" title="This class holds an external data - beyond existing fmtflags that std::ios_base holds.">ios_info</a> &<span class="keyword">get</span>(std::ios_base &ios); |
| <a name="l00114"></a>00114 |
| <a name="l00118"></a>00118 <span class="keywordtype">void</span> display_flags(uint64_t flags); |
| <a name="l00119"></a>00119 |
| <a name="l00123"></a>00123 <span class="keywordtype">void</span> currency_flags(uint64_t flags); |
| <a name="l00124"></a>00124 |
| <a name="l00128"></a>00128 <span class="keywordtype">void</span> date_flags(uint64_t flags); |
| <a name="l00129"></a>00129 |
| <a name="l00133"></a>00133 <span class="keywordtype">void</span> time_flags(uint64_t flags); |
| <a name="l00134"></a>00134 |
| <a name="l00138"></a>00138 <span class="keywordtype">void</span> datetime_flags(uint64_t flags); |
| <a name="l00139"></a>00139 |
| <a name="l00143"></a>00143 <span class="keywordtype">void</span> domain_id(<span class="keywordtype">int</span>); |
| <a name="l00144"></a>00144 |
| <a name="l00148"></a>00148 <span class="keywordtype">void</span> <a class="code" href="group__manipulators.html#gad51fbdc634fe0c81e5183915e9eeb238">time_zone</a>(std::string <span class="keyword">const</span> &); |
| <a name="l00149"></a>00149 |
| <a name="l00150"></a>00150 |
| <a name="l00154"></a>00154 <span class="keyword">template</span><<span class="keyword">typename</span> CharType> |
| <a name="l00155"></a><a class="code" href="classboost_1_1locale_1_1ios__info.html#a41bc55992899be3af94de29a8e78edf7">00155</a> <span class="keywordtype">void</span> date_time_pattern(std::basic_string<CharType> <span class="keyword">const</span> &str) |
| <a name="l00156"></a>00156 { |
| <a name="l00157"></a>00157 string_set &s = date_time_pattern_set(); |
| <a name="l00158"></a>00158 s.set<CharType>(str.c_str()); |
| <a name="l00159"></a>00159 } |
| <a name="l00160"></a>00160 |
| <a name="l00161"></a>00161 |
| <a name="l00165"></a>00165 uint64_t display_flags() <span class="keyword">const</span>; |
| <a name="l00166"></a>00166 |
| <a name="l00170"></a>00170 uint64_t currency_flags() <span class="keyword">const</span>; |
| <a name="l00171"></a>00171 |
| <a name="l00172"></a>00172 |
| <a name="l00176"></a>00176 uint64_t date_flags() <span class="keyword">const</span>; |
| <a name="l00177"></a>00177 |
| <a name="l00181"></a>00181 uint64_t time_flags() <span class="keyword">const</span>; |
| <a name="l00182"></a>00182 |
| <a name="l00186"></a>00186 uint64_t datetime_flags() <span class="keyword">const</span>; |
| <a name="l00187"></a>00187 |
| <a name="l00191"></a>00191 <span class="keywordtype">int</span> domain_id() <span class="keyword">const</span>; |
| <a name="l00192"></a>00192 |
| <a name="l00196"></a>00196 std::string <a class="code" href="group__manipulators.html#gad51fbdc634fe0c81e5183915e9eeb238">time_zone</a>() <span class="keyword">const</span>; |
| <a name="l00197"></a>00197 |
| <a name="l00201"></a>00201 <span class="keyword">template</span><<span class="keyword">typename</span> CharType> |
| <a name="l00202"></a><a class="code" href="classboost_1_1locale_1_1ios__info.html#ac0f1059742e489433fd53500c747d30c">00202</a> std::basic_string<CharType> date_time_pattern()<span class="keyword"> const</span> |
| <a name="l00203"></a>00203 <span class="keyword"> </span>{ |
| <a name="l00204"></a>00204 string_set <span class="keyword">const</span> &s = date_time_pattern_set(); |
| <a name="l00205"></a>00205 <span class="keywordflow">return</span> s.get<CharType>(); |
| <a name="l00206"></a>00206 } |
| <a name="l00207"></a>00207 |
| <a name="l00209"></a>00209 <span class="keywordtype">void</span> on_imbue(); |
| <a name="l00211"></a>00211 |
| <a name="l00212"></a>00212 <span class="keyword">private</span>: |
| <a name="l00213"></a>00213 |
| <a name="l00214"></a>00214 <span class="keyword">class </span>string_set; |
| <a name="l00215"></a>00215 |
| <a name="l00216"></a>00216 string_set <span class="keyword">const</span> &date_time_pattern_set() <span class="keyword">const</span>; |
| <a name="l00217"></a>00217 string_set &date_time_pattern_set(); |
| <a name="l00218"></a>00218 |
| <a name="l00219"></a>00219 <span class="keyword">class </span>BOOST_LOCALE_DECL string_set { |
| <a name="l00220"></a>00220 <span class="keyword">public</span>: |
| <a name="l00221"></a>00221 string_set(); |
| <a name="l00222"></a>00222 ~string_set(); |
| <a name="l00223"></a>00223 string_set(string_set <span class="keyword">const</span> &other); |
| <a name="l00224"></a>00224 string_set <span class="keyword">const</span> &operator=(string_set <span class="keyword">const</span> &other); |
| <a name="l00225"></a>00225 <span class="keywordtype">void</span> swap(string_set &other); |
| <a name="l00226"></a>00226 |
| <a name="l00227"></a>00227 <span class="keyword">template</span><<span class="keyword">typename</span> Char> |
| <a name="l00228"></a>00228 <span class="keywordtype">void</span> <span class="keyword">set</span>(Char <span class="keyword">const</span> *s) |
| <a name="l00229"></a>00229 { |
| <a name="l00230"></a>00230 <span class="keyword">delete</span> [] ptr; |
| <a name="l00231"></a>00231 ptr = 0; |
| <a name="l00232"></a>00232 type=&<span class="keyword">typeid</span>(Char); |
| <a name="l00233"></a>00233 Char <span class="keyword">const</span> *end = s; |
| <a name="l00234"></a>00234 <span class="keywordflow">while</span>(*end!=0) end++; |
| <a name="l00235"></a>00235 <span class="comment">// if ptr = 0 it does not matter what is value of size</span> |
| <a name="l00236"></a>00236 size = <span class="keyword">sizeof</span>(Char)*(end - s+1); |
| <a name="l00237"></a>00237 ptr = <span class="keyword">new</span> <span class="keywordtype">char</span>[size]; |
| <a name="l00238"></a>00238 memcpy(ptr,s,size); |
| <a name="l00239"></a>00239 } |
| <a name="l00240"></a>00240 |
| <a name="l00241"></a>00241 <span class="keyword">template</span><<span class="keyword">typename</span> Char> |
| <a name="l00242"></a>00242 std::basic_string<Char> <span class="keyword">get</span>() <span class="keyword">const</span> |
| <a name="l00243"></a>00243 { |
| <a name="l00244"></a>00244 <span class="keywordflow">if</span>(type==0 || *type!=<span class="keyword">typeid</span>(Char)) |
| <a name="l00245"></a>00245 <span class="keywordflow">throw</span> std::bad_cast(); |
| <a name="l00246"></a>00246 std::basic_string<Char> result = <span class="keyword">reinterpret_cast<</span>Char <span class="keyword">const </span>*<span class="keyword">></span>(ptr); |
| <a name="l00247"></a>00247 <span class="keywordflow">return</span> result; |
| <a name="l00248"></a>00248 } |
| <a name="l00249"></a>00249 |
| <a name="l00250"></a>00250 <span class="keyword">private</span>: |
| <a name="l00251"></a>00251 std::type_info <span class="keyword">const</span> *type; |
| <a name="l00252"></a>00252 <span class="keywordtype">size_t</span> size; |
| <a name="l00253"></a>00253 <span class="keywordtype">char</span> *ptr; |
| <a name="l00254"></a>00254 }; |
| <a name="l00255"></a>00255 |
| <a name="l00256"></a>00256 uint64_t flags_; |
| <a name="l00257"></a>00257 <span class="keywordtype">int</span> domain_id_; |
| <a name="l00258"></a>00258 std::string time_zone_; |
| <a name="l00259"></a>00259 string_set datetime_; |
| <a name="l00260"></a>00260 |
| <a name="l00261"></a>00261 <span class="keyword">struct </span>data; |
| <a name="l00262"></a>00262 data *d; |
| <a name="l00263"></a>00263 |
| <a name="l00264"></a>00264 }; |
| <a name="l00265"></a>00265 |
| <a name="l00266"></a>00266 |
| <a name="l00270"></a><a class="code" href="namespaceboost_1_1locale_1_1as.html">00270</a> <span class="keyword">namespace </span>as { |
| <a name="l00276"></a>00276 |
| <a name="l00281"></a>00281 |
| <a name="l00282"></a><a class="code" href="group__manipulators.html#ga879b679c0a88b7af9ac059a6e8f67c0a">00282</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#ga879b679c0a88b7af9ac059a6e8f67c0a">posix</a>(std::ios_base & ios) |
| <a name="l00283"></a>00283 { |
| <a name="l00284"></a>00284 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a18b06a5cf88e25361bf188f64216edf2">display_flags</a>(flags::posix); |
| <a name="l00285"></a>00285 <span class="keywordflow">return</span> ios; |
| <a name="l00286"></a>00286 } |
| <a name="l00287"></a>00287 |
| <a name="l00292"></a><a class="code" href="group__manipulators.html#gaee05db73f5525d9a010cdc3aa02f634f">00292</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#gaee05db73f5525d9a010cdc3aa02f634f">number</a>(std::ios_base & ios) |
| <a name="l00293"></a>00293 { |
| <a name="l00294"></a>00294 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a18b06a5cf88e25361bf188f64216edf2">display_flags</a>(flags::number); |
| <a name="l00295"></a>00295 <span class="keywordflow">return</span> ios; |
| <a name="l00296"></a>00296 } |
| <a name="l00297"></a>00297 |
| <a name="l00301"></a><a class="code" href="group__manipulators.html#ga97c4997f9692834ea7b5ed3e8137d5fd">00301</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#ga97c4997f9692834ea7b5ed3e8137d5fd">currency</a>(std::ios_base & ios) |
| <a name="l00302"></a>00302 { |
| <a name="l00303"></a>00303 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a18b06a5cf88e25361bf188f64216edf2">display_flags</a>(flags::currency); |
| <a name="l00304"></a>00304 <span class="keywordflow">return</span> ios; |
| <a name="l00305"></a>00305 } |
| <a name="l00306"></a>00306 |
| <a name="l00310"></a><a class="code" href="group__manipulators.html#ga365767c66c9c82fb646458f5eace8534">00310</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#ga365767c66c9c82fb646458f5eace8534">percent</a>(std::ios_base & ios) |
| <a name="l00311"></a>00311 { |
| <a name="l00312"></a>00312 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a18b06a5cf88e25361bf188f64216edf2">display_flags</a>(flags::percent); |
| <a name="l00313"></a>00313 <span class="keywordflow">return</span> ios; |
| <a name="l00314"></a>00314 } |
| <a name="l00315"></a>00315 |
| <a name="l00319"></a><a class="code" href="group__manipulators.html#gae05b82e6658dc573521518fed5f5c77f">00319</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#gae05b82e6658dc573521518fed5f5c77f">date</a>(std::ios_base & ios) |
| <a name="l00320"></a>00320 { |
| <a name="l00321"></a>00321 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a18b06a5cf88e25361bf188f64216edf2">display_flags</a>(flags::date); |
| <a name="l00322"></a>00322 <span class="keywordflow">return</span> ios; |
| <a name="l00323"></a>00323 } |
| <a name="l00324"></a>00324 |
| <a name="l00328"></a><a class="code" href="group__manipulators.html#gae669b101cbeaed6f6d246ebdcaa8f39c">00328</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#gae669b101cbeaed6f6d246ebdcaa8f39c">time</a>(std::ios_base & ios) |
| <a name="l00329"></a>00329 { |
| <a name="l00330"></a>00330 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a18b06a5cf88e25361bf188f64216edf2">display_flags</a>(flags::time); |
| <a name="l00331"></a>00331 <span class="keywordflow">return</span> ios; |
| <a name="l00332"></a>00332 } |
| <a name="l00333"></a>00333 |
| <a name="l00337"></a><a class="code" href="group__manipulators.html#ga820edf843e20847a0c4ccb8da0c4acd8">00337</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#ga820edf843e20847a0c4ccb8da0c4acd8">datetime</a>(std::ios_base & ios) |
| <a name="l00338"></a>00338 { |
| <a name="l00339"></a>00339 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a18b06a5cf88e25361bf188f64216edf2">display_flags</a>(flags::datetime); |
| <a name="l00340"></a>00340 <span class="keywordflow">return</span> ios; |
| <a name="l00341"></a>00341 } |
| <a name="l00342"></a>00342 |
| <a name="l00347"></a><a class="code" href="group__manipulators.html#ga782b256b82922e6a5f32446787a6f7dc">00347</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#ga782b256b82922e6a5f32446787a6f7dc">strftime</a>(std::ios_base & ios) |
| <a name="l00348"></a>00348 { |
| <a name="l00349"></a>00349 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a18b06a5cf88e25361bf188f64216edf2">display_flags</a>(flags::strftime); |
| <a name="l00350"></a>00350 <span class="keywordflow">return</span> ios; |
| <a name="l00351"></a>00351 } |
| <a name="l00352"></a>00352 |
| <a name="l00356"></a><a class="code" href="group__manipulators.html#gac65e6cd9619db80d60793bbd86a3bd77">00356</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#gac65e6cd9619db80d60793bbd86a3bd77">spellout</a>(std::ios_base & ios) |
| <a name="l00357"></a>00357 { |
| <a name="l00358"></a>00358 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a18b06a5cf88e25361bf188f64216edf2">display_flags</a>(flags::spellout); |
| <a name="l00359"></a>00359 <span class="keywordflow">return</span> ios; |
| <a name="l00360"></a>00360 } |
| <a name="l00361"></a>00361 |
| <a name="l00365"></a><a class="code" href="group__manipulators.html#ga50cc23779fd846809182e50345b4eb7c">00365</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#ga50cc23779fd846809182e50345b4eb7c">ordinal</a>(std::ios_base & ios) |
| <a name="l00366"></a>00366 { |
| <a name="l00367"></a>00367 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a18b06a5cf88e25361bf188f64216edf2">display_flags</a>(flags::ordinal); |
| <a name="l00368"></a>00368 <span class="keywordflow">return</span> ios; |
| <a name="l00369"></a>00369 } |
| <a name="l00370"></a>00370 |
| <a name="l00374"></a><a class="code" href="group__manipulators.html#ga18f1cb392e5b26c12a9deaff816e7998">00374</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#ga18f1cb392e5b26c12a9deaff816e7998">currency_default</a>(std::ios_base & ios) |
| <a name="l00375"></a>00375 { |
| <a name="l00376"></a>00376 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#ad31ea1190ae882f20eea582312c6c573">currency_flags</a>(flags::currency_default); |
| <a name="l00377"></a>00377 <span class="keywordflow">return</span> ios; |
| <a name="l00378"></a>00378 } |
| <a name="l00379"></a>00379 |
| <a name="l00383"></a><a class="code" href="group__manipulators.html#gab8bc145e8147e45e9b9dc0ee9edd9fbe">00383</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#gab8bc145e8147e45e9b9dc0ee9edd9fbe">currency_iso</a>(std::ios_base & ios) |
| <a name="l00384"></a>00384 { |
| <a name="l00385"></a>00385 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#ad31ea1190ae882f20eea582312c6c573">currency_flags</a>(flags::currency_iso); |
| <a name="l00386"></a>00386 <span class="keywordflow">return</span> ios; |
| <a name="l00387"></a>00387 } |
| <a name="l00388"></a>00388 |
| <a name="l00392"></a><a class="code" href="group__manipulators.html#ga2b1ea6b22e2c6f3a162264d9e59d3f95">00392</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#ga2b1ea6b22e2c6f3a162264d9e59d3f95">currency_national</a>(std::ios_base & ios) |
| <a name="l00393"></a>00393 { |
| <a name="l00394"></a>00394 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#ad31ea1190ae882f20eea582312c6c573">currency_flags</a>(flags::currency_national); |
| <a name="l00395"></a>00395 <span class="keywordflow">return</span> ios; |
| <a name="l00396"></a>00396 } |
| <a name="l00397"></a>00397 |
| <a name="l00401"></a><a class="code" href="group__manipulators.html#ga0970bc4cb3a4ab8070faa04808f65052">00401</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#ga0970bc4cb3a4ab8070faa04808f65052">time_default</a>(std::ios_base & ios) |
| <a name="l00402"></a>00402 { |
| <a name="l00403"></a>00403 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a06bdad5c9b11e57c16ad623776ce5096">time_flags</a>(flags::time_default); |
| <a name="l00404"></a>00404 <span class="keywordflow">return</span> ios; |
| <a name="l00405"></a>00405 } |
| <a name="l00406"></a>00406 |
| <a name="l00410"></a><a class="code" href="group__manipulators.html#gada3d88eef293c9495a3f7d756d369fd3">00410</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#gada3d88eef293c9495a3f7d756d369fd3">time_short</a>(std::ios_base & ios) |
| <a name="l00411"></a>00411 { |
| <a name="l00412"></a>00412 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a06bdad5c9b11e57c16ad623776ce5096">time_flags</a>(flags::time_short); |
| <a name="l00413"></a>00413 <span class="keywordflow">return</span> ios; |
| <a name="l00414"></a>00414 } |
| <a name="l00415"></a>00415 |
| <a name="l00419"></a><a class="code" href="group__manipulators.html#ga3f3cc44eeeaffc3b90bebe7660b3e853">00419</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#ga3f3cc44eeeaffc3b90bebe7660b3e853">time_medium</a>(std::ios_base & ios) |
| <a name="l00420"></a>00420 { |
| <a name="l00421"></a>00421 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a06bdad5c9b11e57c16ad623776ce5096">time_flags</a>(flags::time_medium); |
| <a name="l00422"></a>00422 <span class="keywordflow">return</span> ios; |
| <a name="l00423"></a>00423 } |
| <a name="l00424"></a>00424 |
| <a name="l00428"></a><a class="code" href="group__manipulators.html#gad6590ea48c57d53899b90d3464cf3c0b">00428</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#gad6590ea48c57d53899b90d3464cf3c0b">time_long</a>(std::ios_base & ios) |
| <a name="l00429"></a>00429 { |
| <a name="l00430"></a>00430 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a06bdad5c9b11e57c16ad623776ce5096">time_flags</a>(flags::time_long); |
| <a name="l00431"></a>00431 <span class="keywordflow">return</span> ios; |
| <a name="l00432"></a>00432 } |
| <a name="l00433"></a>00433 |
| <a name="l00437"></a><a class="code" href="group__manipulators.html#ga9a8bd936176e3c81dfa07748e1cbabd4">00437</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#ga9a8bd936176e3c81dfa07748e1cbabd4">time_full</a>(std::ios_base & ios) |
| <a name="l00438"></a>00438 { |
| <a name="l00439"></a>00439 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a06bdad5c9b11e57c16ad623776ce5096">time_flags</a>(flags::time_full); |
| <a name="l00440"></a>00440 <span class="keywordflow">return</span> ios; |
| <a name="l00441"></a>00441 } |
| <a name="l00442"></a>00442 |
| <a name="l00446"></a><a class="code" href="group__manipulators.html#gacb5b9243e6537a9378e2d020a4e6a57a">00446</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#gacb5b9243e6537a9378e2d020a4e6a57a">date_default</a>(std::ios_base & ios) |
| <a name="l00447"></a>00447 { |
| <a name="l00448"></a>00448 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#aec16372d284296c63ebd282121fa0005">date_flags</a>(flags::date_default); |
| <a name="l00449"></a>00449 <span class="keywordflow">return</span> ios; |
| <a name="l00450"></a>00450 } |
| <a name="l00451"></a>00451 |
| <a name="l00455"></a><a class="code" href="group__manipulators.html#ga295c7b48ce2732c196df31a70660b7b9">00455</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#ga295c7b48ce2732c196df31a70660b7b9">date_short</a>(std::ios_base & ios) |
| <a name="l00456"></a>00456 { |
| <a name="l00457"></a>00457 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#aec16372d284296c63ebd282121fa0005">date_flags</a>(flags::date_short); |
| <a name="l00458"></a>00458 <span class="keywordflow">return</span> ios; |
| <a name="l00459"></a>00459 } |
| <a name="l00460"></a>00460 |
| <a name="l00464"></a><a class="code" href="group__manipulators.html#ga3b9dcc64afbd67883603cfa7bb67e6c4">00464</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#ga3b9dcc64afbd67883603cfa7bb67e6c4">date_medium</a>(std::ios_base & ios) |
| <a name="l00465"></a>00465 { |
| <a name="l00466"></a>00466 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#aec16372d284296c63ebd282121fa0005">date_flags</a>(flags::date_medium); |
| <a name="l00467"></a>00467 <span class="keywordflow">return</span> ios; |
| <a name="l00468"></a>00468 } |
| <a name="l00469"></a>00469 |
| <a name="l00473"></a><a class="code" href="group__manipulators.html#gac553a86e8d0606c4a6f6d75c3cb104e7">00473</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#gac553a86e8d0606c4a6f6d75c3cb104e7">date_long</a>(std::ios_base & ios) |
| <a name="l00474"></a>00474 { |
| <a name="l00475"></a>00475 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#aec16372d284296c63ebd282121fa0005">date_flags</a>(flags::date_long); |
| <a name="l00476"></a>00476 <span class="keywordflow">return</span> ios; |
| <a name="l00477"></a>00477 } |
| <a name="l00478"></a>00478 |
| <a name="l00482"></a><a class="code" href="group__manipulators.html#gad8d6858ec18524c9a993da387c896d0e">00482</a> <span class="keyword">inline</span> std::ios_base & <a class="code" href="group__manipulators.html#gad8d6858ec18524c9a993da387c896d0e">date_full</a>(std::ios_base & ios) |
| <a name="l00483"></a>00483 { |
| <a name="l00484"></a>00484 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#aec16372d284296c63ebd282121fa0005">date_flags</a>(flags::date_full); |
| <a name="l00485"></a>00485 <span class="keywordflow">return</span> ios; |
| <a name="l00486"></a>00486 } |
| <a name="l00487"></a>00487 |
| <a name="l00488"></a>00488 |
| <a name="l00490"></a>00490 <span class="keyword">namespace </span>details { |
| <a name="l00491"></a>00491 <span class="keyword">template</span><<span class="keyword">typename</span> CharType> |
| <a name="l00492"></a>00492 <span class="keyword">struct </span>add_ftime { |
| <a name="l00493"></a>00493 |
| <a name="l00494"></a>00494 std::basic_string<CharType> <a class="code" href="group__manipulators.html#ga84cc8985e5305ef54394e84c10223866">ftime</a>; |
| <a name="l00495"></a>00495 |
| <a name="l00496"></a>00496 <span class="keywordtype">void</span> apply(std::basic_ios<CharType> &ios)<span class="keyword"> const</span> |
| <a name="l00497"></a>00497 <span class="keyword"> </span>{ |
| <a name="l00498"></a>00498 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a41bc55992899be3af94de29a8e78edf7">date_time_pattern</a>(<a class="code" href="group__manipulators.html#ga84cc8985e5305ef54394e84c10223866">ftime</a>); |
| <a name="l00499"></a>00499 <a class="code" href="group__manipulators.html#ga782b256b82922e6a5f32446787a6f7dc">as::strftime</a>(ios); |
| <a name="l00500"></a>00500 } |
| <a name="l00501"></a>00501 |
| <a name="l00502"></a>00502 }; |
| <a name="l00503"></a>00503 |
| <a name="l00504"></a>00504 <span class="keyword">template</span><<span class="keyword">typename</span> CharType> |
| <a name="l00505"></a>00505 std::basic_ostream<CharType> &operator<<(std::basic_ostream<CharType> &out,add_ftime<CharType> <span class="keyword">const</span> &fmt) |
| <a name="l00506"></a>00506 { |
| <a name="l00507"></a>00507 fmt.apply(out); |
| <a name="l00508"></a>00508 <span class="keywordflow">return</span> out; |
| <a name="l00509"></a>00509 } |
| <a name="l00510"></a>00510 |
| <a name="l00511"></a>00511 <span class="keyword">template</span><<span class="keyword">typename</span> CharType> |
| <a name="l00512"></a>00512 std::basic_istream<CharType> &<a class="code" href="group__date__time.html#gaf6e30351fc67e887e37853723c228484">operator>></a>(std::basic_istream<CharType> &in,add_ftime<CharType> <span class="keyword">const</span> &fmt) |
| <a name="l00513"></a>00513 { |
| <a name="l00514"></a>00514 fmt.apply(in); |
| <a name="l00515"></a>00515 <span class="keywordflow">return</span> in; |
| <a name="l00516"></a>00516 } |
| <a name="l00517"></a>00517 |
| <a name="l00518"></a>00518 } |
| <a name="l00520"></a>00520 |
| <a name="l00555"></a>00555 |
| <a name="l00556"></a>00556 |
| <a name="l00557"></a>00557 <span class="keyword">template</span><<span class="keyword">typename</span> CharType> |
| <a name="l00558"></a>00558 <span class="preprocessor"> #ifdef BOOST_LOCALE_DOXYGEN</span> |
| <a name="l00559"></a>00559 <span class="preprocessor"></span> unspecified_type |
| <a name="l00560"></a>00560 <span class="preprocessor"> #else</span> |
| <a name="l00561"></a>00561 <span class="preprocessor"></span> details::add_ftime<CharType> |
| <a name="l00562"></a>00562 <span class="preprocessor"> #endif</span> |
| <a name="l00563"></a><a class="code" href="group__manipulators.html#ga84cc8985e5305ef54394e84c10223866">00563</a> <span class="preprocessor"></span> <a class="code" href="group__manipulators.html#ga84cc8985e5305ef54394e84c10223866">ftime</a>(std::basic_string<CharType> <span class="keyword">const</span> &<a class="code" href="classboost_1_1locale_1_1basic__format.html" title="a printf like class that allows type-safe and locale aware message formatting">format</a>) |
| <a name="l00564"></a>00564 { |
| <a name="l00565"></a>00565 details::add_ftime<CharType> fmt; |
| <a name="l00566"></a>00566 fmt.ftime=<a class="code" href="group__format.html#gad7914df7b54382c1ad7f5360676fe2e8">format</a>; |
| <a name="l00567"></a>00567 <span class="keywordflow">return</span> fmt; |
| <a name="l00568"></a>00568 } |
| <a name="l00569"></a>00569 |
| <a name="l00573"></a>00573 <span class="keyword">template</span><<span class="keyword">typename</span> CharType> |
| <a name="l00574"></a>00574 <span class="preprocessor"> #ifdef BOOST_LOCALE_DOXYGEN</span> |
| <a name="l00575"></a>00575 <span class="preprocessor"></span> unspecified_type |
| <a name="l00576"></a>00576 <span class="preprocessor"> #else</span> |
| <a name="l00577"></a>00577 <span class="preprocessor"></span> details::add_ftime<CharType> |
| <a name="l00578"></a>00578 <span class="preprocessor"> #endif</span> |
| <a name="l00579"></a><a class="code" href="group__manipulators.html#gae7814e66e9b73b632c28f9cdc58592eb">00579</a> <span class="preprocessor"></span> <a class="code" href="group__manipulators.html#ga84cc8985e5305ef54394e84c10223866">ftime</a>(CharType <span class="keyword">const</span> *<a class="code" href="classboost_1_1locale_1_1basic__format.html" title="a printf like class that allows type-safe and locale aware message formatting">format</a>) |
| <a name="l00580"></a>00580 { |
| <a name="l00581"></a>00581 details::add_ftime<CharType> fmt; |
| <a name="l00582"></a>00582 fmt.ftime=<a class="code" href="group__format.html#gad7914df7b54382c1ad7f5360676fe2e8">format</a>; |
| <a name="l00583"></a>00583 <span class="keywordflow">return</span> fmt; |
| <a name="l00584"></a>00584 } |
| <a name="l00585"></a>00585 |
| <a name="l00587"></a>00587 <span class="keyword">namespace </span>details { |
| <a name="l00588"></a>00588 <span class="keyword">struct </span>set_timezone { |
| <a name="l00589"></a>00589 std::string id; |
| <a name="l00590"></a>00590 }; |
| <a name="l00591"></a>00591 <span class="keyword">template</span><<span class="keyword">typename</span> CharType> |
| <a name="l00592"></a>00592 std::basic_ostream<CharType> &operator<<(std::basic_ostream<CharType> &out,set_timezone <span class="keyword">const</span> &fmt) |
| <a name="l00593"></a>00593 { |
| <a name="l00594"></a>00594 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(out).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a3f140278815b521f1568c52d0a9fea11">time_zone</a>(fmt.id); |
| <a name="l00595"></a>00595 <span class="keywordflow">return</span> out; |
| <a name="l00596"></a>00596 } |
| <a name="l00597"></a>00597 |
| <a name="l00598"></a>00598 <span class="keyword">template</span><<span class="keyword">typename</span> CharType> |
| <a name="l00599"></a>00599 std::basic_istream<CharType> &<a class="code" href="group__date__time.html#gaf6e30351fc67e887e37853723c228484">operator>></a>(std::basic_istream<CharType> &in,set_timezone <span class="keyword">const</span> &fmt) |
| <a name="l00600"></a>00600 { |
| <a name="l00601"></a>00601 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(in).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a3f140278815b521f1568c52d0a9fea11">time_zone</a>(fmt.id); |
| <a name="l00602"></a>00602 <span class="keywordflow">return</span> in; |
| <a name="l00603"></a>00603 } |
| <a name="l00604"></a>00604 } |
| <a name="l00606"></a>00606 |
| <a name="l00610"></a><a class="code" href="group__manipulators.html#gac90c969d876305b8584def8632ae1808">00610</a> <span class="keyword">inline</span> std::ios_base &<a class="code" href="group__manipulators.html#gac90c969d876305b8584def8632ae1808">gmt</a>(std::ios_base &ios) |
| <a name="l00611"></a>00611 { |
| <a name="l00612"></a>00612 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a3f140278815b521f1568c52d0a9fea11">time_zone</a>(<span class="stringliteral">"GMT"</span>); |
| <a name="l00613"></a>00613 <span class="keywordflow">return</span> ios; |
| <a name="l00614"></a>00614 } |
| <a name="l00615"></a>00615 |
| <a name="l00619"></a><a class="code" href="group__manipulators.html#gac6cb5458543daf651cd6b48812891541">00619</a> <span class="keyword">inline</span> std::ios_base &<a class="code" href="group__manipulators.html#gac6cb5458543daf651cd6b48812891541">local_time</a>(std::ios_base &ios) |
| <a name="l00620"></a>00620 { |
| <a name="l00621"></a>00621 <a class="code" href="classboost_1_1locale_1_1ios__info.html#a02f6979dffc2df97c3612d72b7c7241b">ios_info::get</a>(ios).<a class="code" href="classboost_1_1locale_1_1ios__info.html#a3f140278815b521f1568c52d0a9fea11">time_zone</a>(<a class="code" href="namespaceboost_1_1locale_1_1time__zone.html#a41f0e37ead92b29f6d09377070bbe398">time_zone::global</a>()); |
| <a name="l00622"></a>00622 <span class="keywordflow">return</span> ios; |
| <a name="l00623"></a>00623 } |
| <a name="l00624"></a>00624 |
| <a name="l00628"></a>00628 <span class="keyword">inline</span> |
| <a name="l00629"></a>00629 <span class="preprocessor"> #ifdef BOOST_LOCALE_DOXYGEN</span> |
| <a name="l00630"></a>00630 <span class="preprocessor"></span> unspecified_type |
| <a name="l00631"></a>00631 <span class="preprocessor"> #else</span> |
| <a name="l00632"></a>00632 <span class="preprocessor"></span> details::set_timezone |
| <a name="l00633"></a>00633 <span class="preprocessor"> #endif</span> |
| <a name="l00634"></a><a class="code" href="group__manipulators.html#gad51fbdc634fe0c81e5183915e9eeb238">00634</a> <span class="preprocessor"></span> <a class="code" href="group__manipulators.html#gad51fbdc634fe0c81e5183915e9eeb238">time_zone</a>(<span class="keywordtype">char</span> <span class="keyword">const</span> *<span class="keywordtype">id</span>) |
| <a name="l00635"></a>00635 { |
| <a name="l00636"></a>00636 details::set_timezone tz; |
| <a name="l00637"></a>00637 tz.id=id; |
| <a name="l00638"></a>00638 <span class="keywordflow">return</span> tz; |
| <a name="l00639"></a>00639 } |
| <a name="l00640"></a>00640 |
| <a name="l00644"></a>00644 <span class="keyword">inline</span> |
| <a name="l00645"></a>00645 <span class="preprocessor"> #ifdef BOOST_LOCALE_DOXYGEN</span> |
| <a name="l00646"></a>00646 <span class="preprocessor"></span> unspecified_type |
| <a name="l00647"></a>00647 <span class="preprocessor"> #else</span> |
| <a name="l00648"></a>00648 <span class="preprocessor"></span> details::set_timezone |
| <a name="l00649"></a>00649 <span class="preprocessor"> #endif </span> |
| <a name="l00650"></a><a class="code" href="group__manipulators.html#ga4348099506fc7c52945e639683398a20">00650</a> <span class="preprocessor"></span> <a class="code" href="group__manipulators.html#gad51fbdc634fe0c81e5183915e9eeb238">time_zone</a>(std::string <span class="keyword">const</span> &<span class="keywordtype">id</span>) |
| <a name="l00651"></a>00651 { |
| <a name="l00652"></a>00652 details::set_timezone tz; |
| <a name="l00653"></a>00653 tz.id=id; |
| <a name="l00654"></a>00654 <span class="keywordflow">return</span> tz; |
| <a name="l00655"></a>00655 } |
| <a name="l00656"></a>00656 |
| <a name="l00657"></a>00657 |
| <a name="l00661"></a>00661 |
| <a name="l00662"></a>00662 } <span class="comment">// as manipulators</span> |
| <a name="l00663"></a>00663 |
| <a name="l00664"></a>00664 } <span class="comment">// locale</span> |
| <a name="l00665"></a>00665 } <span class="comment">// boost</span> |
| <a name="l00666"></a>00666 |
| <a name="l00667"></a>00667 <span class="preprocessor">#ifdef BOOST_MSVC</span> |
| <a name="l00668"></a>00668 <span class="preprocessor"></span><span class="preprocessor">#pragma warning(pop)</span> |
| <a name="l00669"></a>00669 <span class="preprocessor"></span><span class="preprocessor">#endif</span> |
| <a name="l00670"></a>00670 <span class="preprocessor"></span> |
| <a name="l00671"></a>00671 |
| <a name="l00672"></a>00672 <span class="preprocessor">#endif</span> |
| <a name="l00673"></a>00673 <span class="preprocessor"></span><span class="comment">// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4</span> |
| </pre></div></div><!-- contents --> |
| </div> |
| <div id="nav-path" class="navpath"> |
| <ul> |
| <li class="navelem"><b>formatting.hpp</b> </li> |
| |
| <li class="footer"> |
| © Copyright 2009-2012 Artyom Beilis, Distributed under the <a href="http://www.boost.org/LICENSE_1_0.txt">Boost Software License</a>, Version 1.0. |
| </li> |
| </ul> |
| </div> |
| |
| |
| </body> |
| </html> |