Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > a24e1a39141f9b4ca49bd1e2e23a54ba > files > 102

polybori-doc-0.5rc.p9-6mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>PolyBoRi: CVariableIter.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- 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="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>
    </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>CVariableIter.h</h1><a href="CVariableIter_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// -*- c++ -*-</span>
<a name="l00002"></a>00002 <span class="comment">//*****************************************************************************</span>
<a name="l00033"></a>00033 <span class="comment"></span><span class="comment">//*****************************************************************************</span>
<a name="l00034"></a>00034 
<a name="l00035"></a>00035 <span class="comment">// include basic definitions</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include "<a class="code" href="pbori__defs_8h.html">pbori_defs.h</a>"</span>
<a name="l00037"></a>00037 
<a name="l00038"></a>00038 <span class="preprocessor">#ifndef CVariableIter_h_</span>
<a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#define CVariableIter_h_</span>
<a name="l00040"></a>00040 <span class="preprocessor"></span>
<a name="l00041"></a>00041 <a class="code" href="pbori__defs_8h.html#6ae360a591580558f31b6157ee792a10" title="Start project&amp;#39;s namespace.">BEGIN_NAMESPACE_PBORI</a>
<a name="l00042"></a>00042 
<a name="l00051"></a>00051 <span class="keyword">template</span> &lt;<span class="keyword">class</span> Iterator, <span class="keyword">class</span> VariableType&gt; 
<a name="l00052"></a><a class="code" href="classpolybori_1_1CVariableIter.html">00052</a> <span class="keyword">class </span><a class="code" href="classpolybori_1_1CVariableIter.html" title="This template class defines an iterator for monomial types.">CVariableIter</a> : 
<a name="l00053"></a>00053   <span class="keyword">public</span> boost::<a class="code" href="classboost_1_1iterator__facade.html">iterator_facade</a>&lt;
<a name="l00054"></a>00054   CVariableIter&lt;Iterator, VariableType&gt;,
<a name="l00055"></a>00055   VariableType,
<a name="l00056"></a>00056   typename Iterator::iterator_category,
<a name="l00057"></a>00057   VariableType
<a name="l00058"></a>00058   &gt; {
<a name="l00059"></a>00059 
<a name="l00060"></a>00060 <span class="keyword">public</span>:
<a name="l00062"></a><a class="code" href="classpolybori_1_1CVariableIter.html#f72119850a18993d6e1ed062b289cdb4">00062</a>   <span class="keyword">typedef</span> Iterator iterator_type;
<a name="l00063"></a>00063 
<a name="l00065"></a><a class="code" href="classpolybori_1_1CVariableIter.html#4492ee5ab445557129897915a9e5a678">00065</a>   <span class="keyword">typedef</span> VariableType var_type;
<a name="l00066"></a>00066 
<a name="l00068"></a><a class="code" href="classpolybori_1_1CVariableIter.html#13831ef3d7efe4f506608c8fd7ae8b0f">00068</a>   <span class="keyword">typedef</span> <span class="keyword">typename</span> var_type::ring_type ring_type;
<a name="l00069"></a>00069 
<a name="l00071"></a><a class="code" href="classpolybori_1_1CVariableIter.html#5c48a77b1ada726f8cac7fbdbb66f822">00071</a>   <span class="keyword">typedef</span> <a class="code" href="classpolybori_1_1CVariableIter.html" title="This template class defines an iterator for monomial types.">CVariableIter&lt;iterator_type, var_type&gt;</a> <span class="keyword">self</span>;
<a name="l00072"></a>00072 
<a name="l00074"></a><a class="code" href="classpolybori_1_1CVariableIter.html#d9b3fced9957ec29bd8ddd74e32dd3d9">00074</a>   <a class="code" href="classpolybori_1_1CVariableIter.html#d9b3fced9957ec29bd8ddd74e32dd3d9" title="Default constructor.">CVariableIter</a>(): m_iter(), m_ring() {}
<a name="l00075"></a>00075 
<a name="l00077"></a><a class="code" href="classpolybori_1_1CVariableIter.html#d8d9ea4d88e1bae5fa14803c615f912a">00077</a>   <a class="code" href="classpolybori_1_1CVariableIter.html" title="This template class defines an iterator for monomial types.">CVariableIter</a>(<span class="keyword">const</span> iterator_type&amp; rhs, <span class="keyword">const</span> ring_type&amp; ring): 
<a name="l00078"></a>00078     m_iter(rhs), m_ring(ring) {}
<a name="l00079"></a>00079 
<a name="l00081"></a><a class="code" href="classpolybori_1_1CVariableIter.html#7e892532cf9b47b96f835e3662b1fb32">00081</a>   <span class="keywordtype">bool</span> <a class="code" href="classpolybori_1_1CVariableIter.html#7e892532cf9b47b96f835e3662b1fb32" title="Check, whether end of iteration is reached.">isEnd</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_iter.isEnd(); }
<a name="l00082"></a>00082 
<a name="l00084"></a><a class="code" href="classpolybori_1_1CVariableIter.html#c276f662076a58e2a2e0f1e3c64d7fe8">00084</a>   <span class="keywordtype">void</span> <a class="code" href="classpolybori_1_1CVariableIter.html#c276f662076a58e2a2e0f1e3c64d7fe8" title="Increment operation.">increment</a>() { ++m_iter; }
<a name="l00085"></a>00085 
<a name="l00087"></a><a class="code" href="classpolybori_1_1CVariableIter.html#8b8cfdc35b1d665374716737ddf96e65">00087</a>   var_type <a class="code" href="classpolybori_1_1CVariableIter.html#8b8cfdc35b1d665374716737ddf96e65" title="Constant dereference operator.">dereference</a>()<span class="keyword"> const </span>{  <span class="keywordflow">return</span> var_type(*m_iter, m_ring); }
<a name="l00088"></a>00088 
<a name="l00090"></a><a class="code" href="classpolybori_1_1CVariableIter.html#aa15d35e80fe96ccb9d2fc8fc4706b4a">00090</a>   <span class="keywordtype">bool</span> <a class="code" href="classpolybori_1_1CVariableIter.html#aa15d35e80fe96ccb9d2fc8fc4706b4a" title="Equality check.">equal</a>(<span class="keyword">const</span> <span class="keyword">self</span>&amp; rhs)<span class="keyword"> const </span>{ <span class="keywordflow">return</span>  m_iter == rhs.m_iter; }
<a name="l00091"></a>00091 
<a name="l00092"></a>00092 <span class="keyword">private</span>:
<a name="l00094"></a>00094   iterator_type m_iter;
<a name="l00095"></a>00095 
<a name="l00097"></a>00097   ring_type m_ring;
<a name="l00098"></a>00098 };
<a name="l00099"></a>00099 
<a name="l00100"></a>00100 <a class="code" href="pbori__defs_8h.html#faf094fde6c1a7f1aad18bcb455f3b06" title="Finish project&amp;#39;s namespace.">END_NAMESPACE_PBORI</a>
<a name="l00101"></a>00101 
<a name="l00102"></a>00102 
<a name="l00103"></a>00103 <span class="preprocessor">#endif // CVariableIter_h_</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Sep 9 14:30:57 2009 for PolyBoRi by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>