Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_33_1/doc/html/date_duration.html @ 12

Last change on this file since 12 was 12, checked in by landauf, 17 years ago

added boost

File size: 11.5 KB
Line 
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4<title>Class template date_duration</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#id2412320" title="Header &lt;boost/date_time/date_duration.hpp&gt;">
9<link rel="prev" href="day_clock.html" title="Class template day_clock">
10<link rel="next" href="duration_traits_long.html" title="Struct duration_traits_long">
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="day_clock.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id2412320"><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="duration_traits_long.html"><img src="images/next.png" alt="Next"></a>
24</div>
25<div class="refentry" lang="en">
26<a name="date_duration"></a><div class="titlepage"></div>
27<div class="refnamediv">
28<h2><span class="refentrytitle">Class template date_duration</span></h2>
29<p>boost::date_time::date_duration &#8212; Duration type with date level resolution. </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>&lt;<span class="bold"><strong>typename</strong></span> duration_rep_traits&gt; 
33<span class="bold"><strong>class</strong></span> date_duration {
34<span class="bold"><strong>public</strong></span>:
35  <span class="emphasis"><em>// types</em></span>
36  <span class="bold"><strong>typedef</strong></span> duration_rep_traits::int_type  duration_rep_type;
37  <span class="bold"><strong>typedef</strong></span> duration_rep_traits::impl_type duration_rep;     
38
39  <span class="emphasis"><em>// <a href="date_duration.html#date_durationconstruct-copy-destruct">construct/copy/destruct</a></em></span>
40  <a href="date_duration.html#id2509673-bb">date_duration</a>(duration_rep);
41  <a href="date_duration.html#id2484453-bb">date_duration</a>(special_values);
42  <a href="date_duration.html#id2519240-bb">date_duration</a>(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a>&lt; duration_rep_traits &gt; &amp;);
43
44  <span class="emphasis"><em>// <a href="date_duration.html#id2507074-bb">public member functions</a></em></span>
45  <span class="type">duration_rep</span> <a href="date_duration.html#id2507079-bb">get_rep</a>() <span class="bold"><strong>const</strong></span>;
46  <span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="date_duration.html#id2415898-bb">is_special</a>() <span class="bold"><strong>const</strong></span>;
47  <span class="type">duration_rep_type</span> <a href="date_duration.html#id2485339-bb">days</a>() <span class="bold"><strong>const</strong></span>;
48  <span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="date_duration.html#id2422529-bb"><span class="bold"><strong>operator</strong></span>==</a>(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a> &amp;) <span class="bold"><strong>const</strong></span>;
49  <span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="date_duration.html#id2385742-bb"><span class="bold"><strong>operator</strong></span>&lt;</a>(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a> &amp;) <span class="bold"><strong>const</strong></span>;
50  <span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a></span> <a href="date_duration.html#id2485398-bb"><span class="bold"><strong>operator</strong></span>-=</a>(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a> &amp;) ;
51  <span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a></span> <a href="date_duration.html#id2493103-bb"><span class="bold"><strong>operator</strong></span>+=</a>(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a> &amp;) ;
52  <span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a></span> <a href="date_duration.html#id2407391-bb"><span class="bold"><strong>operator</strong></span>-</a>() <span class="bold"><strong>const</strong></span>;
53  <span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a>&lt; duration_rep_traits &gt;</span> <a href="date_duration.html#id2497458-bb"><span class="bold"><strong>operator</strong></span>/=</a>(<span class="bold"><strong>int</strong></span>) ;
54  <span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a>&lt; duration_rep_traits &gt;</span> <a href="date_duration.html#id2464165-bb"><span class="bold"><strong>operator</strong></span>/</a>(<span class="bold"><strong>int</strong></span>) ;
55  <span class="type"><span class="bold"><strong>bool</strong></span></span> <a href="date_duration.html#id2445593-bb">is_negative</a>() <span class="bold"><strong>const</strong></span>;
56
57  <span class="emphasis"><em>// <a href="date_duration.html#id2483511-bb">public static functions</a></em></span>
58  <span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a></span> <a href="date_duration.html#id2483515-bb">unit</a>() ;
59};</pre></div>
60<div class="refsect1" lang="en">
61<a name="id2610135"></a><h2>Description</h2>
62<div class="refsect2" lang="en">
63<a name="id2610138"></a><h3>
64<a name="date_durationconstruct-copy-destruct"></a><code class="computeroutput">date_duration</code> construct/copy/destruct</h3>
65<div class="orderedlist"><ol type="1">
66<li><pre class="literallayout"><a name="id2509673-bb"></a>date_duration(duration_rep day_count);</pre></li>
67<li>
68<pre class="literallayout"><a name="id2484453-bb"></a>date_duration(special_values sv);</pre>
69<p>construct from special_values - only works when instantiated with duration_traits_adapted </p>
70</li>
71<li><pre class="literallayout"><a name="id2519240-bb"></a>date_duration(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a>&lt; duration_rep_traits &gt; &amp; other);</pre></li>
72</ol></div>
73</div>
74<div class="refsect2" lang="en">
75<a name="id2610218"></a><h3>
76<a name="id2507074-bb"></a><code class="computeroutput">date_duration</code> public member functions</h3>
77<div class="orderedlist"><ol type="1">
78<li><pre class="literallayout"><span class="type">duration_rep</span> <a name="id2507079-bb"></a>get_rep() <span class="bold"><strong>const</strong></span>;</pre></li>
79<li><pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id2415898-bb"></a>is_special() <span class="bold"><strong>const</strong></span>;</pre></li>
80<li><pre class="literallayout"><span class="type">duration_rep_type</span> <a name="id2485339-bb"></a>days() <span class="bold"><strong>const</strong></span>;</pre></li>
81<li><pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id2422529-bb"></a><span class="bold"><strong>operator</strong></span>==(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a> &amp; rhs) <span class="bold"><strong>const</strong></span>;</pre></li>
82<li><pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id2385742-bb"></a><span class="bold"><strong>operator</strong></span>&lt;(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a> &amp; rhs) <span class="bold"><strong>const</strong></span>;</pre></li>
83<li><pre class="literallayout"><span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a></span> <a name="id2485398-bb"></a><span class="bold"><strong>operator</strong></span>-=(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a> &amp; rhs) ;</pre></li>
84<li><pre class="literallayout"><span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a></span> <a name="id2493103-bb"></a><span class="bold"><strong>operator</strong></span>+=(<span class="bold"><strong>const</strong></span> <a href="date_duration.html" title="Class template date_duration">date_duration</a> &amp; rhs) ;</pre></li>
85<li><pre class="literallayout"><span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a></span> <a name="id2407391-bb"></a><span class="bold"><strong>operator</strong></span>-() <span class="bold"><strong>const</strong></span>;</pre></li>
86<li><pre class="literallayout"><span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a>&lt; duration_rep_traits &gt;</span> <a name="id2497458-bb"></a><span class="bold"><strong>operator</strong></span>/=(<span class="bold"><strong>int</strong></span> divisor) ;</pre></li>
87<li><pre class="literallayout"><span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a>&lt; duration_rep_traits &gt;</span> <a name="id2464165-bb"></a><span class="bold"><strong>operator</strong></span>/(<span class="bold"><strong>int</strong></span> divisor) ;</pre></li>
88<li><pre class="literallayout"><span class="type"><span class="bold"><strong>bool</strong></span></span> <a name="id2445593-bb"></a>is_negative() <span class="bold"><strong>const</strong></span>;</pre></li>
89</ol></div>
90</div>
91<div class="refsect2" lang="en">
92<a name="id2610606"></a><h3>
93<a name="id2483511-bb"></a><code class="computeroutput">date_duration</code> public static functions</h3>
94<div class="orderedlist"><ol type="1"><li><pre class="literallayout"><span class="type"><a href="date_duration.html" title="Class template date_duration">date_duration</a></span> <a name="id2483515-bb"></a>unit() ;</pre></li></ol></div>
95</div>
96</div>
97</div>
98<table width="100%"><tr>
99<td align="left"></td>
100<td align="right"><small>Copyright © 2001-2005 CrystalClear Software, Inc</small></td>
101</tr></table>
102<hr>
103<div class="spirit-nav">
104<a accesskey="p" href="day_clock.html"><img src="images/prev.png" alt="Prev"></a><a accesskey="u" href="date_time/doxy.html#id2412320"><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="duration_traits_long.html"><img src="images/next.png" alt="Next"></a>
105</div>
106</body>
107</html>
Note: See TracBrowser for help on using the repository browser.