1 | <html> |
---|
2 | <head> |
---|
3 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
---|
4 | <title>Class template time_input_facet</title> |
---|
5 | <link rel="stylesheet" href="boostbook.css" type="text/css"> |
---|
6 | <meta name="generator" content="DocBook XSL Stylesheets V1.69.1"> |
---|
7 | <link rel="start" href="index.html" title="The Boost C++ Libraries"> |
---|
8 | <link rel="up" href="date_time/doxy.html#id2417782" title="Header <boost/date_time/time_facet.hpp>"> |
---|
9 | <link rel="prev" href="time_facet.html" title="Class template time_facet"> |
---|
10 | <link rel="next" href="id2406096.html" title="Class template ostream_time_duration_formatter"> |
---|
11 | </head> |
---|
12 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
---|
13 | <table cellpadding="2" width="100%"> |
---|
14 | <td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td> |
---|
15 | <td align="center"><a href="../../index.htm">Home</a></td> |
---|
16 | <td align="center"><a href="../../libs/libraries.htm">Libraries</a></td> |
---|
17 | <td align="center"><a href="../../people/people.htm">People</a></td> |
---|
18 | <td align="center"><a href="../../more/faq.htm">FAQ</a></td> |
---|
19 | <td align="center"><a href="../../more/index.htm">More</a></td> |
---|
20 | </table> |
---|
21 | <hr> |
---|
22 | <div class="spirit-nav"> |
---|
23 | <a accesskey="p" href="time_facet.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id2417782"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="id2406096.html"><img src="images/next.png" alt="Next"></a> |
---|
24 | </div> |
---|
25 | <div class="refentry" lang="en"> |
---|
26 | <a name="time_input_facet"></a><div class="titlepage"></div> |
---|
27 | <div class="refnamediv"> |
---|
28 | <h2><span class="refentrytitle">Class template time_input_facet</span></h2> |
---|
29 | <p>boost::date_time::time_input_facet — Facet for format-based input. </p> |
---|
30 | </div> |
---|
31 | <h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2> |
---|
32 | <div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> time_type, <span class="bold"><strong>typename</strong></span> CharT, |
---|
33 | <span class="bold"><strong>typename</strong></span> InItrT = std::istreambuf_iterator<CharT, std::char_traits<CharT> > > |
---|
34 | <span class="bold"><strong>class</strong></span> time_input_facet : <span class="bold"><strong>public</strong></span> boost::date_time::date_input_facet< time_type::date_type, CharT, InItrT > |
---|
35 | { |
---|
36 | <span class="bold"><strong>public</strong></span>: |
---|
37 | <span class="emphasis"><em>// types</em></span> |
---|
38 | <span class="bold"><strong>typedef</strong></span> time_type::date_type date_type; |
---|
39 | <span class="bold"><strong>typedef</strong></span> time_type::time_duration_type time_duration_type; |
---|
40 | <span class="bold"><strong>typedef</strong></span> time_duration_type::fractional_seconds_type fracional_seconds_type; |
---|
41 | <span class="bold"><strong>typedef</strong></span> <a href="period.html" title="Class template period">boost::date_time::period</a>< time_type, time_duration_type > period_type; |
---|
42 | <span class="bold"><strong>typedef</strong></span> <a href="date_input_facet.html" title="Class template date_input_facet">boost::date_time::date_input_facet</a>< <span class="bold"><strong>typename</strong></span> time_type::date_type, CharT, InItrT > base_type; |
---|
43 | <span class="bold"><strong>typedef</strong></span> base_type::duration_type date_duration_type; |
---|
44 | <span class="bold"><strong>typedef</strong></span> base_type::year_type year_type; |
---|
45 | <span class="bold"><strong>typedef</strong></span> base_type::month_type month_type; |
---|
46 | <span class="bold"><strong>typedef</strong></span> base_type::day_type day_type; |
---|
47 | <span class="bold"><strong>typedef</strong></span> base_type::string_type string_type; |
---|
48 | <span class="bold"><strong>typedef</strong></span> string_type::const_iterator const_itr; |
---|
49 | <span class="bold"><strong>typedef</strong></span> base_type::char_type char_type; |
---|
50 | <span class="bold"><strong>typedef</strong></span> base_type::format_date_parser_type format_date_parser_type; |
---|
51 | <span class="bold"><strong>typedef</strong></span> base_type::period_parser_type period_parser_type; |
---|
52 | <span class="bold"><strong>typedef</strong></span> base_type::special_values_parser_type special_values_parser_type; |
---|
53 | <span class="bold"><strong>typedef</strong></span> base_type::date_gen_parser_type date_gen_parser_type; |
---|
54 | <span class="bold"><strong>typedef</strong></span> base_type::special_values_parser_type::match_results match_results; |
---|
55 | |
---|
56 | <span class="emphasis"><em>// <a href="time_input_facet.html#time_input_facetconstruct-copy-destruct">construct/copy/destruct</a></em></span> |
---|
57 | <a href="time_input_facet.html#id2471587-bb">time_input_facet</a>(<span class="bold"><strong>const</strong></span> string_type &, ::size_t = 0); |
---|
58 | <a href="time_input_facet.html#id2471619-bb">time_input_facet</a>(<span class="bold"><strong>const</strong></span> string_type &, <span class="bold"><strong>const</strong></span> format_date_parser_type &, |
---|
59 | <span class="bold"><strong>const</strong></span> special_values_parser_type &, |
---|
60 | <span class="bold"><strong>const</strong></span> period_parser_type &, <span class="bold"><strong>const</strong></span> date_gen_parser_type &, |
---|
61 | ::size_t = 0); |
---|
62 | <a href="time_input_facet.html#id2481736-bb">time_input_facet</a>(::size_t = 0); |
---|
63 | |
---|
64 | <span class="emphasis"><em>// <a href="time_input_facet.html#id2460964-bb">public member functions</a></em></span> |
---|
65 | <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="time_input_facet.html#id2460968-bb">time_duration_format</a>(<span class="bold"><strong>const</strong></span> char_type *<span class="bold"><strong>const</strong></span>) ; |
---|
66 | <span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a href="time_input_facet.html#id2460994-bb">set_iso_format</a>() ; |
---|
67 | <span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a href="time_input_facet.html#id2477532-bb">set_iso_extended_format</a>() ; |
---|
68 | <span class="type">InItrT</span> <a href="time_input_facet.html#id2477544-bb">get</a>(InItrT &, InItrT &, std::ios_base &, period_type &) <span class="bold"><strong>const</strong></span>; |
---|
69 | <span class="type">InItrT</span> <a href="time_input_facet.html#id2477599-bb">get</a>(InItrT &, InItrT &, std::ios_base &, time_duration_type &) <span class="bold"><strong>const</strong></span>; |
---|
70 | <span class="type">InItrT</span> <a href="time_input_facet.html#id2478856-bb">get</a>(InItrT &, InItrT &, std::ios_base &, time_type &) <span class="bold"><strong>const</strong></span>; |
---|
71 | <span class="type">InItrT</span> <a href="time_input_facet.html#id2478914-bb">get_local_time</a>(InItrT &, InItrT &, std::ios_base &, time_type &, |
---|
72 | string_type &) <span class="bold"><strong>const</strong></span>; |
---|
73 | |
---|
74 | <span class="emphasis"><em>// <a href="time_input_facet.html#id2444097-bb">protected member functions</a></em></span> |
---|
75 | <span class="type">InItrT</span> <a href="time_input_facet.html#id2444102-bb">get</a>(InItrT &, InItrT &, std::ios_base &, time_type &, string_type &, |
---|
76 | <span class="bold"><strong>bool</strong></span>) <span class="bold"><strong>const</strong></span>; |
---|
77 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> temporal_type> |
---|
78 | <span class="type">InItrT</span> <a href="time_input_facet.html#id2452945-bb">check_special_value</a>(InItrT &, InItrT &, temporal_type &, |
---|
79 | char_type = '\0') <span class="bold"><strong>const</strong></span>; |
---|
80 | <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="time_input_facet.html#id2453026-bb">parse_frac_type</a>(InItrT &, InItrT &, fracional_seconds_type &) <span class="bold"><strong>const</strong></span>; |
---|
81 | |
---|
82 | <span class="emphasis"><em>// <a href="time_input_facet.html#id2406025-bb">private member functions</a></em></span> |
---|
83 | <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> int_type> |
---|
84 | <span class="type">int_type</span> <a href="time_input_facet.html#id2406030-bb">decimal_adjust</a>(int_type, <span class="bold"><strong>const</strong></span> <span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>short</strong></span>) <span class="bold"><strong>const</strong></span>; |
---|
85 | |
---|
86 | <span class="bold"><strong>static</strong></span> const char_type * fractional_seconds_format; |
---|
87 | <span class="bold"><strong>static</strong></span> const char_type * fractional_seconds_or_none_format; |
---|
88 | <span class="bold"><strong>static</strong></span> const char_type * seconds_with_fractional_seconds_format; |
---|
89 | <span class="bold"><strong>static</strong></span> const char_type * seconds_format; |
---|
90 | <span class="bold"><strong>static</strong></span> const char_type * standard_format; |
---|
91 | <span class="bold"><strong>static</strong></span> const char_type * zone_abbrev_format; |
---|
92 | <span class="bold"><strong>static</strong></span> const char_type * zone_name_format; |
---|
93 | <span class="bold"><strong>static</strong></span> const char_type * zone_iso_format; |
---|
94 | <span class="bold"><strong>static</strong></span> const char_type * zone_iso_extended_format; |
---|
95 | <span class="bold"><strong>static</strong></span> const char_type * duration_seperator; |
---|
96 | <span class="bold"><strong>static</strong></span> const char_type * iso_time_format_specifier; |
---|
97 | <span class="bold"><strong>static</strong></span> const char_type * iso_time_format_extended_specifier; |
---|
98 | <span class="bold"><strong>static</strong></span> const char_type * default_time_input_format; |
---|
99 | <span class="bold"><strong>static</strong></span> const char_type * default_time_duration_format; |
---|
100 | <span class="bold"><strong>static</strong></span> std::locale::id id; |
---|
101 | };</pre></div> |
---|
102 | <div class="refsect1" lang="en"> |
---|
103 | <a name="id2657700"></a><h2>Description</h2> |
---|
104 | <div class="refsect2" lang="en"> |
---|
105 | <a name="id2657703"></a><h3> |
---|
106 | <a name="time_input_facetconstruct-copy-destruct"></a><code class="computeroutput">time_input_facet</code> construct/copy/destruct</h3> |
---|
107 | <div class="orderedlist"><ol type="1"> |
---|
108 | <li><pre class="literallayout"><a name="id2471587-bb"></a>time_input_facet(<span class="bold"><strong>const</strong></span> string_type & format, ::size_t a_ref = 0);</pre></li> |
---|
109 | <li><pre class="literallayout"><a name="id2471619-bb"></a>time_input_facet(<span class="bold"><strong>const</strong></span> string_type & format, |
---|
110 | <span class="bold"><strong>const</strong></span> format_date_parser_type & date_parser, |
---|
111 | <span class="bold"><strong>const</strong></span> special_values_parser_type & sv_parser, |
---|
112 | <span class="bold"><strong>const</strong></span> period_parser_type & per_parser, |
---|
113 | <span class="bold"><strong>const</strong></span> date_gen_parser_type & date_gen_parser, |
---|
114 | ::size_t a_ref = 0);</pre></li> |
---|
115 | <li><pre class="literallayout"><a name="id2481736-bb"></a>time_input_facet(::size_t a_ref = 0);</pre></li> |
---|
116 | </ol></div> |
---|
117 | </div> |
---|
118 | <div class="refsect2" lang="en"> |
---|
119 | <a name="id2657816"></a><h3> |
---|
120 | <a name="id2460964-bb"></a><code class="computeroutput">time_input_facet</code> public member functions</h3> |
---|
121 | <div class="orderedlist"><ol type="1"> |
---|
122 | <li><pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id2460968-bb"></a>time_duration_format(<span class="bold"><strong>const</strong></span> char_type *<span class="bold"><strong>const</strong></span> format) ;</pre></li> |
---|
123 | <li><pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a name="id2460994-bb"></a>set_iso_format() ;</pre></li> |
---|
124 | <li><pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a name="id2477532-bb"></a>set_iso_extended_format() ;</pre></li> |
---|
125 | <li><pre class="literallayout"><span class="type">InItrT</span> <a name="id2477544-bb"></a>get(InItrT & sitr, InItrT & stream_end, std::ios_base & a_ios, |
---|
126 | period_type & p) <span class="bold"><strong>const</strong></span>;</pre></li> |
---|
127 | <li><pre class="literallayout"><span class="type">InItrT</span> <a name="id2477599-bb"></a>get(InItrT & sitr, InItrT & stream_end, std::ios_base & a_ios, |
---|
128 | time_duration_type & td) <span class="bold"><strong>const</strong></span>;</pre></li> |
---|
129 | <li><pre class="literallayout"><span class="type">InItrT</span> <a name="id2478856-bb"></a>get(InItrT & sitr, InItrT & stream_end, std::ios_base & a_ios, |
---|
130 | time_type & t) <span class="bold"><strong>const</strong></span>;</pre></li> |
---|
131 | <li><pre class="literallayout"><span class="type">InItrT</span> <a name="id2478914-bb"></a>get_local_time(InItrT & sitr, InItrT & stream_end, |
---|
132 | std::ios_base & a_ios, time_type & t, |
---|
133 | string_type & tz_str) <span class="bold"><strong>const</strong></span>;</pre></li> |
---|
134 | </ol></div> |
---|
135 | </div> |
---|
136 | <div class="refsect2" lang="en"> |
---|
137 | <a name="id2658029"></a><h3> |
---|
138 | <a name="id2444097-bb"></a><code class="computeroutput">time_input_facet</code> protected member functions</h3> |
---|
139 | <div class="orderedlist"><ol type="1"> |
---|
140 | <li><pre class="literallayout"><span class="type">InItrT</span> <a name="id2444102-bb"></a>get(InItrT & sitr, InItrT & stream_end, std::ios_base & a_ios, |
---|
141 | time_type & t, string_type & tz_str, <span class="bold"><strong>bool</strong></span> time_is_local) <span class="bold"><strong>const</strong></span>;</pre></li> |
---|
142 | <li> |
---|
143 | <pre class="literallayout"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> temporal_type> |
---|
144 | <span class="type">InItrT</span> <a name="id2452945-bb"></a>check_special_value(InItrT & sitr, InItrT & stream_end, |
---|
145 | temporal_type & tt, char_type c = '\0') <span class="bold"><strong>const</strong></span>;</pre> |
---|
146 | <p>First character may have been consumed during original parse attempt. Parameter 'c' should be a copy of that character. Throws ios_base::failure if parse fails. </p> |
---|
147 | </li> |
---|
148 | <li><pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id2453026-bb"></a>parse_frac_type(InItrT & sitr, InItrT & stream_end, |
---|
149 | fracional_seconds_type & frac) <span class="bold"><strong>const</strong></span>;</pre></li> |
---|
150 | </ol></div> |
---|
151 | </div> |
---|
152 | <div class="refsect2" lang="en"> |
---|
153 | <a name="id2658153"></a><h3> |
---|
154 | <a name="id2406025-bb"></a><code class="computeroutput">time_input_facet</code> private member functions</h3> |
---|
155 | <div class="orderedlist"><ol type="1"><li><pre class="literallayout"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> int_type> |
---|
156 | <span class="type">int_type</span> <a name="id2406030-bb"></a>decimal_adjust(int_type val, <span class="bold"><strong>const</strong></span> <span class="bold"><strong>unsigned</strong></span> <span class="bold"><strong>short</strong></span> places) <span class="bold"><strong>const</strong></span>;</pre></li></ol></div> |
---|
157 | </div> |
---|
158 | </div> |
---|
159 | </div> |
---|
160 | <table width="100%"><tr> |
---|
161 | <td align="left"></td> |
---|
162 | <td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td> |
---|
163 | </tr></table> |
---|
164 | <hr> |
---|
165 | <div class="spirit-nav"> |
---|
166 | <a accesskey="p" href="time_facet.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id2417782"><img src="images/up.png" alt="Up"></a><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a><a accesskey="n" href="id2406096.html"><img src="images/next.png" alt="Next"></a> |
---|
167 | </div> |
---|
168 | </body> |
---|
169 | </html> |
---|