summaryrefslogtreecommitdiff
path: root/doc/html/time_input_facet.html
blob: 38b40b5b074b354c0d78151a0edb2fef64003e70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Class template time_input_facet</title>
<link rel="stylesheet" href="boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
<link rel="start" href="index.html" title="The Boost C++ Libraries">
<link rel="up" href="date_time/doxy.html#id695070" title="Header &lt;boost/date_time/time_facet.hpp&gt;">
<link rel="prev" href="time_facet.html" title="Class template time_facet">
<link rel="next" href="id838605.html" title="Class template ostream_time_duration_formatter">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%">
<td valign="top"><img alt="boost.png (6897 bytes)" width="277" height="86" src="../../boost.png"></td>
<td align="center"><a href="../../index.htm">Home</a></td>
<td align="center"><a href="../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="../../people/people.htm">People</a></td>
<td align="center"><a href="../../more/faq.htm">FAQ</a></td>
<td align="center"><a href="../../more/index.htm">More</a></td>
</table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="time_facet.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id695070"><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="id838605.html"><img src="images/next.png" alt="Next"></a>
</div>
<div class="refentry" lang="en">
<a name="time_input_facet"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class template time_input_facet</span></h2>
<p>boost::date_time::time_input_facet &#8212; Facet for format-based input. </p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<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>&lt;<span class="bold"><strong>typename</strong></span> time_type, <span class="bold"><strong>typename</strong></span> CharT, 
         <span class="bold"><strong>typename</strong></span> InItrT = std::istreambuf_iterator&lt;CharT, std::char_traits&lt;CharT&gt; &gt; &gt; 
<span class="bold"><strong>class</strong></span> time_input_facet : <span class="bold"><strong>public</strong></span> boost::date_time::date_input_facet&lt; time_type::date_type, CharT, InItrT &gt;
{
<span class="bold"><strong>public</strong></span>:
  <span class="emphasis"><em>// types</em></span>
  <span class="bold"><strong>typedef</strong></span> time_type::date_type                                                               date_type;                 
  <span class="bold"><strong>typedef</strong></span> time_type::time_duration_type                                                      time_duration_type;        
  <span class="bold"><strong>typedef</strong></span> time_duration_type::fractional_seconds_type                                        fracional_seconds_type;    
  <span class="bold"><strong>typedef</strong></span> <a href="period.html" title="Class template period">boost::date_time::period</a>&lt; time_type, time_duration_type &gt;                          period_type;               
  <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>&lt; <span class="bold"><strong>typename</strong></span> time_type::date_type, CharT, InItrT &gt; base_type;                 
  <span class="bold"><strong>typedef</strong></span> base_type::duration_type                                                           date_duration_type;        
  <span class="bold"><strong>typedef</strong></span> base_type::year_type                                                               year_type;                 
  <span class="bold"><strong>typedef</strong></span> base_type::month_type                                                              month_type;                
  <span class="bold"><strong>typedef</strong></span> base_type::day_type                                                                day_type;                  
  <span class="bold"><strong>typedef</strong></span> base_type::string_type                                                             string_type;               
  <span class="bold"><strong>typedef</strong></span> string_type::const_iterator                                                        const_itr;                 
  <span class="bold"><strong>typedef</strong></span> base_type::char_type                                                               char_type;                 
  <span class="bold"><strong>typedef</strong></span> base_type::format_date_parser_type                                                 format_date_parser_type;   
  <span class="bold"><strong>typedef</strong></span> base_type::period_parser_type                                                      period_parser_type;        
  <span class="bold"><strong>typedef</strong></span> base_type::special_values_parser_type                                              special_values_parser_type;
  <span class="bold"><strong>typedef</strong></span> base_type::date_gen_parser_type                                                    date_gen_parser_type;      
  <span class="bold"><strong>typedef</strong></span> base_type::special_values_parser_type::match_results                               match_results;             

  <span class="emphasis"><em>// <a href="time_input_facet.html#time_input_facetconstruct-copy-destruct">construct/copy/destruct</a></em></span>
  <a href="time_input_facet.html#id943564-bb">time_input_facet</a>(<span class="bold"><strong>const</strong></span> string_type &amp;, ::size_t = 0);
  <a href="time_input_facet.html#id943598-bb">time_input_facet</a>(<span class="bold"><strong>const</strong></span> string_type &amp;, <span class="bold"><strong>const</strong></span> format_date_parser_type &amp;, 
                   <span class="bold"><strong>const</strong></span> special_values_parser_type &amp;, 
                   <span class="bold"><strong>const</strong></span> period_parser_type &amp;, <span class="bold"><strong>const</strong></span> date_gen_parser_type &amp;, 
                   ::size_t = 0);
  <a href="time_input_facet.html#id943670-bb">time_input_facet</a>(::size_t = 0);

  <span class="emphasis"><em>// <a href="time_input_facet.html#id733135-bb">public member functions</a></em></span>
  <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="time_input_facet.html#id733140-bb">time_duration_format</a>(<span class="bold"><strong>const</strong></span> char_type *<span class="bold"><strong>const</strong></span>) ;
  <span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a href="time_input_facet.html#id863470-bb">set_iso_format</a>() ;
  <span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a href="time_input_facet.html#id863482-bb">set_iso_extended_format</a>() ;
  <span class="type">InItrT</span> <a href="time_input_facet.html#id863496-bb">get</a>(InItrT &amp;, InItrT &amp;, std::ios_base &amp;, period_type &amp;) <span class="bold"><strong>const</strong></span>;
  <span class="type">InItrT</span> <a href="time_input_facet.html#id723093-bb">get</a>(InItrT &amp;, InItrT &amp;, std::ios_base &amp;, time_duration_type &amp;) <span class="bold"><strong>const</strong></span>;
  <span class="type">InItrT</span> <a href="time_input_facet.html#id829901-bb">get</a>(InItrT &amp;, InItrT &amp;, std::ios_base &amp;, time_type &amp;) <span class="bold"><strong>const</strong></span>;
  <span class="type">InItrT</span> <a href="time_input_facet.html#id752089-bb">get_local_time</a>(InItrT &amp;, InItrT &amp;, std::ios_base &amp;, time_type &amp;, 
                        string_type &amp;) <span class="bold"><strong>const</strong></span>;

  <span class="emphasis"><em>// <a href="time_input_facet.html#id728170-bb">protected member functions</a></em></span>
  <span class="type">InItrT</span> <a href="time_input_facet.html#id728176-bb">get</a>(InItrT &amp;, InItrT &amp;, std::ios_base &amp;, time_type &amp;, string_type &amp;, 
             <span class="bold"><strong>bool</strong></span>) <span class="bold"><strong>const</strong></span>;
  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> temporal_type&gt; 
    <span class="type">InItrT</span> <a href="time_input_facet.html#id857169-bb">check_special_value</a>(InItrT &amp;, InItrT &amp;, temporal_type &amp;, 
                               char_type = '\0') <span class="bold"><strong>const</strong></span>;
  <span class="type"><span class="bold"><strong>void</strong></span></span> <a href="time_input_facet.html#id870128-bb">parse_frac_type</a>(InItrT &amp;, InItrT &amp;, fracional_seconds_type &amp;) <span class="bold"><strong>const</strong></span>;

  <span class="emphasis"><em>// <a href="time_input_facet.html#id827432-bb">private member functions</a></em></span>
  <span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> int_type&gt; 
    <span class="type">int_type</span> <a href="time_input_facet.html#id827438-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>;

  <span class="bold"><strong>static</strong></span> const char_type * fractional_seconds_format;
  <span class="bold"><strong>static</strong></span> const char_type * fractional_seconds_or_none_format;
  <span class="bold"><strong>static</strong></span> const char_type * seconds_with_fractional_seconds_format;
  <span class="bold"><strong>static</strong></span> const char_type * seconds_format;
  <span class="bold"><strong>static</strong></span> const char_type * standard_format;
  <span class="bold"><strong>static</strong></span> const char_type * zone_abbrev_format;
  <span class="bold"><strong>static</strong></span> const char_type * zone_name_format;
  <span class="bold"><strong>static</strong></span> const char_type * zone_iso_format;
  <span class="bold"><strong>static</strong></span> const char_type * zone_iso_extended_format;
  <span class="bold"><strong>static</strong></span> const char_type * duration_seperator;
  <span class="bold"><strong>static</strong></span> const char_type * iso_time_format_specifier;
  <span class="bold"><strong>static</strong></span> const char_type * iso_time_format_extended_specifier;
  <span class="bold"><strong>static</strong></span> const char_type * default_time_input_format;
  <span class="bold"><strong>static</strong></span> const char_type * default_time_duration_format;
  <span class="bold"><strong>static</strong></span> std::locale::id id;
};</pre></div>
<div class="refsect1" lang="en">
<a name="id1139761"></a><h2>Description</h2>
<div class="refsect2" lang="en">
<a name="id1139764"></a><h3>
<a name="time_input_facetconstruct-copy-destruct"></a><code class="computeroutput">time_input_facet</code> construct/copy/destruct</h3>
<div class="orderedlist"><ol type="1">
<li><pre class="literallayout"><a name="id943564-bb"></a>time_input_facet(<span class="bold"><strong>const</strong></span> string_type &amp; format, ::size_t a_ref = 0);</pre></li>
<li><pre class="literallayout"><a name="id943598-bb"></a>time_input_facet(<span class="bold"><strong>const</strong></span> string_type &amp; format, 
                 <span class="bold"><strong>const</strong></span> format_date_parser_type &amp; date_parser, 
                 <span class="bold"><strong>const</strong></span> special_values_parser_type &amp; sv_parser, 
                 <span class="bold"><strong>const</strong></span> period_parser_type &amp; per_parser, 
                 <span class="bold"><strong>const</strong></span> date_gen_parser_type &amp; date_gen_parser, 
                 ::size_t a_ref = 0);</pre></li>
<li><pre class="literallayout"><a name="id943670-bb"></a>time_input_facet(::size_t a_ref = 0);</pre></li>
</ol></div>
</div>
<div class="refsect2" lang="en">
<a name="id1139856"></a><h3>
<a name="id733135-bb"></a><code class="computeroutput">time_input_facet</code> public member functions</h3>
<div class="orderedlist"><ol type="1">
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id733140-bb"></a>time_duration_format(<span class="bold"><strong>const</strong></span> char_type *<span class="bold"><strong>const</strong></span> format) ;</pre></li>
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a name="id863470-bb"></a>set_iso_format() ;</pre></li>
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>virtual</strong></span> <span class="bold"><strong>void</strong></span></span> <a name="id863482-bb"></a>set_iso_extended_format() ;</pre></li>
<li><pre class="literallayout"><span class="type">InItrT</span> <a name="id863496-bb"></a>get(InItrT &amp; sitr, InItrT &amp; stream_end, std::ios_base &amp; a_ios, 
           period_type &amp; p) <span class="bold"><strong>const</strong></span>;</pre></li>
<li><pre class="literallayout"><span class="type">InItrT</span> <a name="id723093-bb"></a>get(InItrT &amp; sitr, InItrT &amp; stream_end, std::ios_base &amp; a_ios, 
           time_duration_type &amp; td) <span class="bold"><strong>const</strong></span>;</pre></li>
<li><pre class="literallayout"><span class="type">InItrT</span> <a name="id829901-bb"></a>get(InItrT &amp; sitr, InItrT &amp; stream_end, std::ios_base &amp; a_ios, 
           time_type &amp; t) <span class="bold"><strong>const</strong></span>;</pre></li>
<li><pre class="literallayout"><span class="type">InItrT</span> <a name="id752089-bb"></a>get_local_time(InItrT &amp; sitr, InItrT &amp; stream_end, 
                      std::ios_base &amp; a_ios, time_type &amp; t, 
                      string_type &amp; tz_str) <span class="bold"><strong>const</strong></span>;</pre></li>
</ol></div>
</div>
<div class="refsect2" lang="en">
<a name="id1140036"></a><h3>
<a name="id728170-bb"></a><code class="computeroutput">time_input_facet</code> protected member functions</h3>
<div class="orderedlist"><ol type="1">
<li><pre class="literallayout"><span class="type">InItrT</span> <a name="id728176-bb"></a>get(InItrT &amp; sitr, InItrT &amp; stream_end, std::ios_base &amp; a_ios, 
           time_type &amp; t, string_type &amp; tz_str, <span class="bold"><strong>bool</strong></span> time_is_local) <span class="bold"><strong>const</strong></span>;</pre></li>
<li>
<pre class="literallayout"><span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> temporal_type&gt; 
  <span class="type">InItrT</span> <a name="id857169-bb"></a>check_special_value(InItrT &amp; sitr, InItrT &amp; stream_end, 
                             temporal_type &amp; tt, char_type c = '\0') <span class="bold"><strong>const</strong></span>;</pre>
<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>
</li>
<li><pre class="literallayout"><span class="type"><span class="bold"><strong>void</strong></span></span> <a name="id870128-bb"></a>parse_frac_type(InItrT &amp; sitr, InItrT &amp; stream_end, 
                     fracional_seconds_type &amp; frac) <span class="bold"><strong>const</strong></span>;</pre></li>
</ol></div>
</div>
<div class="refsect2" lang="en">
<a name="id1140139"></a><h3>
<a name="id827432-bb"></a><code class="computeroutput">time_input_facet</code> private member functions</h3>
<div class="orderedlist"><ol type="1"><li><pre class="literallayout"><span class="bold"><strong>template</strong></span>&lt;<span class="bold"><strong>typename</strong></span> int_type&gt; 
  <span class="type">int_type</span> <a name="id827438-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>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="time_facet.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id695070"><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="id838605.html"><img src="images/next.png" alt="Next"></a>
</div>
</body>
</html>