• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>Customization</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="../index.html" title="Chapter 1. Boost.Icl">
9<link rel="prev" href="interface/function_synopsis.html" title="Function Synopsis">
10<link rel="next" href="implementation.html" title="Implementation">
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="interface/function_synopsis.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><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="implementation.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h2 class="title" style="clear: both">
27<a name="boost_icl.customization"></a><a class="link" href="customization.html" title="Customization">Customization</a>
28</h2></div></div></div>
29<div class="toc"><dl class="toc"><dt><span class="section"><a href="customization.html#boost_icl.customization.intervals">Intervals</a></span></dt></dl></div>
30<div class="section">
31<div class="titlepage"><div><div><h3 class="title">
32<a name="boost_icl.customization.intervals"></a><a class="link" href="customization.html#boost_icl.customization.intervals" title="Intervals">Intervals</a>
33</h3></div></div></div>
34<p>
35        The <span class="bold"><strong>icl</strong></span> provides the possibility of customizing
36        user defined interval class templates and class types with static interval
37        borders to be used with interval containers.
38      </p>
39<p>
40        There is a template <code class="computeroutput"><a class="link" href="../boost/icl/interval_traits.html" title="Struct template interval_traits">interval_traits</a></code>,
41        that has to be instatiated for the user defined interval type, in order to
42        provide associated types and basic functions. Bound types of the interval
43        are assigned by specializing the template <code class="computeroutput"><span class="identifier">interval_bound_type</span></code>.
44      </p>
45<div class="informaltable"><table class="table">
46<colgroup>
47<col>
48<col>
49<col>
50</colgroup>
51<thead><tr>
52<th>
53                <p>
54                  Customize
55                </p>
56              </th>
57<th>
58                <p>
59                  Name
60                </p>
61              </th>
62<th>
63                <p>
64                  Description
65                </p>
66              </th>
67</tr></thead>
68<tbody>
69<tr>
70<td>
71                <p>
72                  associated types
73                </p>
74              </td>
75<td>
76                <p>
77                  <code class="computeroutput"><span class="identifier">interval_type</span></code>
78                </p>
79              </td>
80<td>
81                <p>
82                  interval type of the partial specialisation for the user defined
83                  type
84                </p>
85              </td>
86</tr>
87<tr>
88<td>
89              </td>
90<td>
91                <p>
92                  <code class="computeroutput"><span class="identifier">domain_type</span></code>
93                </p>
94              </td>
95<td>
96                <p>
97                  the domain or element type of the interval
98                </p>
99              </td>
100</tr>
101<tr>
102<td>
103              </td>
104<td>
105                <p>
106                  <code class="computeroutput"><span class="identifier">domain_compare</span></code>
107                </p>
108              </td>
109<td>
110                <p>
111                  the ordering on the elements
112                </p>
113              </td>
114</tr>
115<tr>
116<td>
117                <p>
118                  basic functions
119                </p>
120              </td>
121<td>
122                <p>
123                  <code class="computeroutput"><span class="identifier">construct</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">domain_type</span><span class="special">&amp;,</span> <span class="keyword">const</span>
124                  <span class="identifier">domain_type</span><span class="special">&amp;)</span></code>
125                </p>
126              </td>
127<td>
128                <p>
129                  construct an interval
130                </p>
131              </td>
132</tr>
133<tr>
134<td>
135              </td>
136<td>
137                <p>
138                  <code class="computeroutput"><span class="identifier">lower</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">interval_type</span><span class="special">&amp;)</span></code>
139                </p>
140              </td>
141<td>
142                <p>
143                  select the interval's lower bound
144                </p>
145              </td>
146</tr>
147<tr>
148<td>
149              </td>
150<td>
151                <p>
152                  <code class="computeroutput"><span class="identifier">upper</span><span class="special">(</span><span class="keyword">const</span> <span class="identifier">interval_type</span><span class="special">&amp;)</span></code>
153                </p>
154              </td>
155<td>
156                <p>
157                  select the interval's upper bound
158                </p>
159              </td>
160</tr>
161<tr>
162<td>
163                <p>
164                  interval bounds
165                </p>
166              </td>
167<td>
168                <p>
169                  <code class="computeroutput"><span class="identifier">interval_bound_type</span><span class="special">&lt;</span><span class="identifier">interval_type</span><span class="special">&gt;{...}</span></code>
170                </p>
171              </td>
172<td>
173                <p>
174                  specialize meta function <code class="computeroutput"><span class="identifier">interval_bound_type</span></code>
175                  to assign one of the 4 bound types to the user defined interval.
176                </p>
177              </td>
178</tr>
179</tbody>
180</table></div>
181<p>
182        How to do the customization in detail is shown in example <a class="link" href="examples/custom_interval.html" title="Custom interval">custom
183        interval</a>.
184      </p>
185</div>
186</div>
187<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
188<td align="left"></td>
189<td align="right"><div class="copyright-footer">Copyright © 2007-2010 Joachim
190      Faulhaber<br>Copyright © 1999-2006 Cortex Software
191      GmbH<p>
192        Distributed under the Boost Software License, Version 1.0. (See accompanying
193        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>)
194      </p>
195</div></td>
196</tr></table>
197<hr>
198<div class="spirit-nav">
199<a accesskey="p" href="interface/function_synopsis.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><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="implementation.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
200</div>
201</body>
202</html>
203