Files
geometry/doc/doxygen_output/html/circular__iterator_8hpp_source.html
Barend Gehrels 363580fbf6 Added old doxygen docs
[SVN r59777]
2010-02-20 15:57:12 +00:00

152 lines
8.8 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Boost.Geometry (aka GGL, Generic Geometry Library)</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head>
<table cellpadding="2" width="100%">
<tbody>
<tr>
<td valign="top">
<img alt="Boost.Geometry" src="images/ggl-logo-big.png" height="80" width="200">
&nbsp;&nbsp;
</td>
<td valign="top" align="right">
<a href="http://www.boost.org">
<img alt="Boost C++ Libraries" src="images/accepted_by_boost.png" height="80" width="230" border="0">
</a>
</td>
</tr>
</tbody>
</table>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<h1>boost/geometry/iterators/circular_iterator.hpp</h1><a href="circular__iterator_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Boost.Geometry (aka GGL, Generic Geometry Library)</span>
<a name="l00002"></a>00002 <span class="comment">//</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright Barend Gehrels 2007-2009, Geodan, Amsterdam, the Netherlands.</span>
<a name="l00004"></a>00004 <span class="comment">// Copyright Bruno Lalande 2008, 2009</span>
<a name="l00005"></a>00005 <span class="comment">// Use, modification and distribution is subject to the Boost Software License,</span>
<a name="l00006"></a>00006 <span class="comment">// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at</span>
<a name="l00007"></a>00007 <span class="comment">// http://www.boost.org/LICENSE_1_0.txt)</span>
<a name="l00008"></a>00008
<a name="l00009"></a>00009 <span class="preprocessor">#ifndef BOOST_GEOMETRY_ITERATORS_CIRCULAR_ITERATOR_HPP</span>
<a name="l00010"></a>00010 <span class="preprocessor"></span><span class="preprocessor">#define BOOST_GEOMETRY_ITERATORS_CIRCULAR_ITERATOR_HPP</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span>
<a name="l00012"></a>00012 <span class="preprocessor">#include &lt;boost/iterator.hpp&gt;</span>
<a name="l00013"></a>00013 <span class="preprocessor">#include &lt;boost/iterator/iterator_adaptor.hpp&gt;</span>
<a name="l00014"></a>00014 <span class="preprocessor">#include &lt;boost/iterator/iterator_categories.hpp&gt;</span>
<a name="l00015"></a>00015
<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;<a class="code" href="base_8hpp.html">boost/geometry/iterators/base.hpp</a>&gt;</span>
<a name="l00017"></a>00017
<a name="l00018"></a>00018 <span class="keyword">namespace </span>boost { <span class="keyword">namespace </span>geometry
<a name="l00019"></a>00019 {
<a name="l00020"></a>00020
<a name="l00026"></a>00026 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> Iterator&gt;
<a name="l00027"></a><a class="code" href="structboost_1_1geometry_1_1circular__iterator.html">00027</a> <span class="keyword">struct </span><a class="code" href="structboost_1_1geometry_1_1circular__iterator.html" title="Iterator which goes circular through a range, starting at a point, ending at that...">circular_iterator</a> :
<a name="l00028"></a>00028 <span class="keyword">public</span> detail::iterators::iterator_base
<a name="l00029"></a>00029 &lt;
<a name="l00030"></a>00030 circular_iterator&lt;Iterator&gt;,
<a name="l00031"></a>00031 Iterator
<a name="l00032"></a>00032 &gt;
<a name="l00033"></a>00033 {
<a name="l00034"></a><a class="code" href="structboost_1_1geometry_1_1circular__iterator.html#c09f73e325921cc50ebcd96bed0f8096">00034</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="structboost_1_1geometry_1_1circular__iterator.html#c09f73e325921cc50ebcd96bed0f8096">boost::iterator_core_access</a>;
<a name="l00035"></a>00035
<a name="l00036"></a><a class="code" href="structboost_1_1geometry_1_1circular__iterator.html#bc9ce5ea9dd894132e92b4668d6c880e">00036</a> <span class="keyword">explicit</span> <span class="keyword">inline</span> <a class="code" href="structboost_1_1geometry_1_1circular__iterator.html#bc9ce5ea9dd894132e92b4668d6c880e">circular_iterator</a>(Iterator begin, Iterator end, Iterator start)
<a name="l00037"></a>00037 : m_begin(begin)
<a name="l00038"></a>00038 , m_end(end)
<a name="l00039"></a>00039 , m_start(start)
<a name="l00040"></a>00040 {
<a name="l00041"></a>00041 this-&gt;base_reference() = start;
<a name="l00042"></a>00042 }
<a name="l00043"></a>00043
<a name="l00044"></a>00044 <span class="comment">// Constructor to indicate the end of a range, to enable e.g. std::copy</span>
<a name="l00045"></a><a class="code" href="structboost_1_1geometry_1_1circular__iterator.html#69592ddc4ba6324e30d9503931122aa3">00045</a> <span class="keyword">explicit</span> <span class="keyword">inline</span> <a class="code" href="structboost_1_1geometry_1_1circular__iterator.html#bc9ce5ea9dd894132e92b4668d6c880e">circular_iterator</a>(Iterator end)
<a name="l00046"></a>00046 : m_begin(end)
<a name="l00047"></a>00047 , m_end(end)
<a name="l00048"></a>00048 , m_start(end)
<a name="l00049"></a>00049 {
<a name="l00050"></a>00050 this-&gt;base_reference() = end;
<a name="l00051"></a>00051 }
<a name="l00052"></a>00052
<a name="l00055"></a><a class="code" href="structboost_1_1geometry_1_1circular__iterator.html#442a413a5cd2292375cde22ee010afb0">00055</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="structboost_1_1geometry_1_1circular__iterator.html#442a413a5cd2292375cde22ee010afb0">moveto</a>(Iterator it)
<a name="l00056"></a>00056 {
<a name="l00057"></a>00057 this-&gt;base_reference() = it;
<a name="l00058"></a>00058 check_end();
<a name="l00059"></a>00059 }
<a name="l00060"></a>00060
<a name="l00061"></a>00061 <span class="keyword">private</span>:
<a name="l00062"></a>00062
<a name="l00063"></a>00063 <span class="keyword">inline</span> <span class="keywordtype">void</span> increment()
<a name="l00064"></a>00064 {
<a name="l00065"></a>00065 <span class="keywordflow">if</span> (this-&gt;base() != m_end)
<a name="l00066"></a>00066 {
<a name="l00067"></a>00067 (this-&gt;base_reference())++;
<a name="l00068"></a>00068 check_end();
<a name="l00069"></a>00069 }
<a name="l00070"></a>00070 }
<a name="l00071"></a>00071
<a name="l00072"></a>00072 <span class="keyword">inline</span> <span class="keywordtype">void</span> check_end()
<a name="l00073"></a>00073 {
<a name="l00074"></a>00074 <span class="keywordflow">if</span> (this-&gt;base() == this-&gt;m_end)
<a name="l00075"></a>00075 {
<a name="l00076"></a>00076 this-&gt;base_reference() = this-&gt;m_begin;
<a name="l00077"></a>00077 }
<a name="l00078"></a>00078
<a name="l00079"></a>00079 <span class="keywordflow">if</span> (this-&gt;base() == m_start)
<a name="l00080"></a>00080 {
<a name="l00081"></a>00081 this-&gt;base_reference() = this-&gt;m_end;
<a name="l00082"></a>00082 }
<a name="l00083"></a>00083 }
<a name="l00084"></a>00084
<a name="l00085"></a>00085 Iterator m_begin;
<a name="l00086"></a>00086 Iterator m_end;
<a name="l00087"></a>00087 Iterator m_start;
<a name="l00088"></a>00088 };
<a name="l00089"></a>00089
<a name="l00090"></a>00090 }} <span class="comment">// namespace boost::geometry</span>
<a name="l00091"></a>00091
<a name="l00092"></a>00092 <span class="preprocessor">#endif // BOOST_GEOMETRY_ITERATORS_CIRCULAR_ITERATOR_HPP</span>
</pre></div></div>
<hr size="1">
<table width="100%">
<tbody>
<tr>
<td align="left"><small>
<p>December 1, 2009</p>
</small></td>
<td align="right">
<small>Copyright © 1995-2009 Barend Gehrels, Geodan, Amsterdam<br>
Copyright © 2008-2009 Bruno Lalande, Paris<br>
Copyright © 2009 Mateusz Loskot, Cadcorp, London<br>
</small>
</td>
</tr>
</tbody>
</table>
<address style="text-align: right;"><small>
Documentation is generated by&nbsp;<a href="http://www.doxygen.org/index.html">Doxygen</a>
</small></address>
</body>
</html>