1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Class template closed_interval</title> 5<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../../index.html" title="Chapter 1. Boost.Icl"> 8<link rel="up" href="../../interval_container_library_reference.html#header.boost.icl.closed_interval_hpp" title="Header <boost/icl/closed_interval.hpp>"> 9<link rel="prev" href="../../interval_container_library_reference.html" title="Interval Container Library Reference"> 10<link rel="next" href="interval_idm46087634062464.html" title="Struct template interval_bound_type<closed_interval< DomainT, Compare >>"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td> 15<td align="center"><a href="../../../../../../index.html">Home</a></td> 16<td align="center"><a href="../../../../../libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="../../interval_container_library_reference.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../interval_container_library_reference.html#header.boost.icl.closed_interval_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="interval_idm46087634062464.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="refentry"> 26<a name="boost.icl.closed_interval"></a><div class="titlepage"></div> 27<div class="refnamediv"> 28<h2><span class="refentrytitle">Class template closed_interval</span></h2> 29<p>boost::icl::closed_interval</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="comment">// In header: <<a class="link" href="../../interval_container_library_reference.html#header.boost.icl.closed_interval_hpp" title="Header <boost/icl/closed_interval.hpp>">boost/icl/closed_interval.hpp</a>> 33 34</span><span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> DomainT<span class="special">,</span> 35 <span class="identifier">ICL_COMPARE</span> Compare <span class="special">=</span> <span class="identifier">ICL_COMPARE_INSTANCE</span><span class="special">(</span><span class="identifier">ICL_COMPARE_DEFAULT</span><span class="special">,</span> <span class="identifier">DomainT</span><span class="special">)</span><span class="special">></span> 36<span class="keyword">class</span> <a class="link" href="closed_interval.html" title="Class template closed_interval">closed_interval</a> <span class="special">{</span> 37<span class="keyword">public</span><span class="special">:</span> 38 <span class="comment">// types</span> 39 <span class="keyword">typedef</span> <a class="link" href="closed_interval.html" title="Class template closed_interval">closed_interval</a><span class="special"><</span> <span class="identifier">DomainT</span><span class="special">,</span> <span class="identifier">Compare</span> <span class="special">></span> <a name="boost.icl.closed_interval.type"></a><span class="identifier">type</span><span class="special">;</span> 40 <span class="keyword">typedef</span> <span class="identifier">DomainT</span> <a name="boost.icl.closed_interval.domain_type"></a><span class="identifier">domain_type</span><span class="special">;</span> 41 42 <span class="comment">// <a class="link" href="closed_interval.html#boost.icl.closed_intervalconstruct-copy-destruct">construct/copy/destruct</a></span> 43 <a class="link" href="closed_interval.html#idm46087634069616-bb"><span class="identifier">closed_interval</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span> 44 <span class="keyword">explicit</span> <a class="link" href="closed_interval.html#idm46087634068496-bb"><span class="identifier">closed_interval</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">DomainT</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> 45 <a class="link" href="closed_interval.html#idm46087634065888-bb"><span class="identifier">closed_interval</span></a><span class="special">(</span><span class="keyword">const</span> <span class="identifier">DomainT</span> <span class="special">&</span><span class="special">,</span> <span class="keyword">const</span> <span class="identifier">DomainT</span> <span class="special">&</span><span class="special">)</span><span class="special">;</span> 46 47 <span class="comment">// <a class="link" href="closed_interval.html#idm46087634036544-bb">public member functions</a></span> 48 <span class="keyword">typedef</span> <a class="link" href="closed_interval.html#idm46087634035984-bb"><span class="identifier">ICL_COMPARE_DOMAIN</span></a><span class="special">(</span><span class="identifier">Compare</span><span class="special">,</span> <span class="identifier">DomainT</span><span class="special">)</span><span class="special">;</span> 49 <span class="identifier">DomainT</span> <a class="link" href="closed_interval.html#idm46087634074256-bb"><span class="identifier">lower</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 50 <span class="identifier">DomainT</span> <a class="link" href="closed_interval.html#idm46087634073136-bb"><span class="identifier">upper</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 51 <span class="identifier">DomainT</span> <a class="link" href="closed_interval.html#idm46087634072016-bb"><span class="identifier">first</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 52 <span class="identifier">DomainT</span> <a class="link" href="closed_interval.html#idm46087634070896-bb"><span class="identifier">last</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span> 53<span class="special">}</span><span class="special">;</span></pre></div> 54<div class="refsect1"> 55<a name="idm45714043034208"></a><h2>Description</h2> 56<div class="refsect2"> 57<a name="idm45714043033792"></a><h3> 58<a name="boost.icl.closed_intervalconstruct-copy-destruct"></a><code class="computeroutput">closed_interval</code> 59 public 60 construct/copy/destruct</h3> 61<div class="orderedlist"><ol class="orderedlist" type="1"> 62<li class="listitem"> 63<pre class="literallayout"><a name="idm46087634069616-bb"></a><span class="identifier">closed_interval</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre> 64<p>Default constructor; yields an empty interval <code class="computeroutput">[0,0)</code>. </p> 65</li> 66<li class="listitem"> 67<pre class="literallayout"><span class="keyword">explicit</span> <a name="idm46087634068496-bb"></a><span class="identifier">closed_interval</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">DomainT</span> <span class="special">&</span> val<span class="special">)</span><span class="special">;</span></pre> 68<p>Constructor for a closed singleton interval <code class="computeroutput">[val,val]</code> </p> 69</li> 70<li class="listitem"> 71<pre class="literallayout"><a name="idm46087634065888-bb"></a><span class="identifier">closed_interval</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">DomainT</span> <span class="special">&</span> low<span class="special">,</span> <span class="keyword">const</span> <span class="identifier">DomainT</span> <span class="special">&</span> up<span class="special">)</span><span class="special">;</span></pre> 72<p>Interval from <code class="computeroutput">low</code> to <code class="computeroutput">up</code> with bounds <code class="computeroutput">bounds</code> </p> 73</li> 74</ol></div> 75</div> 76<div class="refsect2"> 77<a name="idm45714043008640"></a><h3> 78<a name="idm46087634036544-bb"></a><code class="computeroutput">closed_interval</code> public member functions</h3> 79<div class="orderedlist"><ol class="orderedlist" type="1"> 80<li class="listitem"><pre class="literallayout"><span class="keyword">typedef</span> <a name="idm46087634035984-bb"></a><span class="identifier">ICL_COMPARE_DOMAIN</span><span class="special">(</span><span class="identifier">Compare</span><span class="special">,</span> <span class="identifier">DomainT</span><span class="special">)</span><span class="special">;</span></pre></li> 81<li class="listitem"><pre class="literallayout"><span class="identifier">DomainT</span> <a name="idm46087634074256-bb"></a><span class="identifier">lower</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li> 82<li class="listitem"><pre class="literallayout"><span class="identifier">DomainT</span> <a name="idm46087634073136-bb"></a><span class="identifier">upper</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li> 83<li class="listitem"><pre class="literallayout"><span class="identifier">DomainT</span> <a name="idm46087634072016-bb"></a><span class="identifier">first</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li> 84<li class="listitem"><pre class="literallayout"><span class="identifier">DomainT</span> <a name="idm46087634070896-bb"></a><span class="identifier">last</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre></li> 85</ol></div> 86</div> 87</div> 88</div> 89<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 90<td align="left"></td> 91<td align="right"><div class="copyright-footer">Copyright © 2007-2010 Joachim 92 Faulhaber<br>Copyright © 1999-2006 Cortex Software 93 GmbH<p> 94 Distributed under the Boost Software License, Version 1.0. (See accompanying 95 file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) 96 </p> 97</div></td> 98</tr></table> 99<hr> 100<div class="spirit-nav"> 101<a accesskey="p" href="../../interval_container_library_reference.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../interval_container_library_reference.html#header.boost.icl.closed_interval_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="interval_idm46087634062464.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a> 102</div> 103</body> 104</html> 105