Sophie

Sophie

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

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: BooleConstant.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>BooleConstant.h</h1><a href="BooleConstant_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="l00028"></a>00028 <span class="comment"></span><span class="comment">//*****************************************************************************</span>
<a name="l00029"></a>00029 
<a name="l00030"></a>00030 <span class="comment">// include basic definitions</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include "<a class="code" href="pbori__defs_8h.html">pbori_defs.h</a>"</span>
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 <span class="preprocessor">#ifndef BooleConstant_h_</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#define BooleConstant_h_</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span>
<a name="l00036"></a>00036 <a class="code" href="pbori__defs_8h.html#6ae360a591580558f31b6157ee792a10" title="Start project&amp;#39;s namespace.">BEGIN_NAMESPACE_PBORI</a>
<a name="l00037"></a>00037 
<a name="l00047"></a><a class="code" href="classpolybori_1_1BooleConstant.html">00047</a> <span class="keyword">class </span><a class="code" href="classpolybori_1_1BooleConstant.html" title="This class wraps a bool value, which was not converted to a boolean polynomial or...">BooleConstant</a> {
<a name="l00048"></a>00048 
<a name="l00049"></a>00049 <span class="keyword">public</span>:
<a name="l00051"></a><a class="code" href="classpolybori_1_1BooleConstant.html#8e13a2bc48c0b7d42a6a0b0caa1f28f9">00051</a>   <a class="code" href="classpolybori_1_1BooleConstant.html#8e13a2bc48c0b7d42a6a0b0caa1f28f9" title="Default constructor.">BooleConstant</a>(): m_value(false) {}
<a name="l00052"></a>00052 
<a name="l00054"></a><a class="code" href="classpolybori_1_1BooleConstant.html#441fb8449f8f8256f18df9a793ef8c2a">00054</a>   <a class="code" href="classpolybori_1_1BooleConstant.html#441fb8449f8f8256f18df9a793ef8c2a" title="constructor for bool values">BooleConstant</a>(<span class="keywordtype">bool</span> value): m_value(value) {}
<a name="l00055"></a>00055 
<a name="l00057"></a><a class="code" href="classpolybori_1_1BooleConstant.html#51bf3dd0bca6fe999bb915d4c2fbf912">00057</a>   <a class="code" href="classpolybori_1_1BooleConstant.html#51bf3dd0bca6fe999bb915d4c2fbf912" title="Cosntructor for integer values (nontrivial conversion).">BooleConstant</a>(<span class="keywordtype">int</span> value): m_value(value % 2) {}
<a name="l00058"></a>00058 
<a name="l00060"></a><a class="code" href="classpolybori_1_1BooleConstant.html#55de61db11128cb4100eb8f160143c4e">00060</a>   <a class="code" href="classpolybori_1_1BooleConstant.html#55de61db11128cb4100eb8f160143c4e" title="Convert to bool value.">operator bool</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_value; }
<a name="l00061"></a>00061 
<a name="l00063"></a><a class="code" href="classpolybori_1_1BooleConstant.html#52ec966e5549fbdfe1c9d7d3b290fe2e">00063</a>   <a class="code" href="classpolybori_1_1BooleConstant.html" title="This class wraps a bool value, which was not converted to a boolean polynomial or...">BooleConstant</a> <a class="code" href="classpolybori_1_1BooleConstant.html#52ec966e5549fbdfe1c9d7d3b290fe2e" title="Negation operation.">operator!</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> !m_value; }
<a name="l00064"></a>00064 
<a name="l00065"></a>00065 <span class="keyword">protected</span>:
<a name="l00067"></a><a class="code" href="classpolybori_1_1BooleConstant.html#66a102ed6d4698d5eb974460011bde98">00067</a>   <span class="keyword">const</span> <span class="keywordtype">bool</span> m_value;
<a name="l00068"></a>00068 };
<a name="l00069"></a>00069 
<a name="l00071"></a>00071 <span class="keyword">inline</span> CTypes::ostream_type&amp; 
<a name="l00072"></a><a class="code" href="namespacepolybori.html#6a2252bb702be1219454e5782c3132d0">00072</a> <a class="code" href="namespacepolybori.html#6a2252bb702be1219454e5782c3132d0" title="Stream output operator.">operator&lt;&lt;</a>(CTypes::ostream_type&amp; os, <span class="keyword">const</span> <a class="code" href="classpolybori_1_1BooleConstant.html" title="This class wraps a bool value, which was not converted to a boolean polynomial or...">BooleConstant</a>&amp; rhs) {
<a name="l00073"></a>00073   <span class="keywordflow">return</span> (os &lt;&lt; (<span class="keywordtype">int</span>) rhs);
<a name="l00074"></a>00074 }
<a name="l00075"></a>00075 
<a name="l00076"></a>00076 
<a name="l00077"></a>00077 <a class="code" href="pbori__defs_8h.html#faf094fde6c1a7f1aad18bcb455f3b06" title="Finish project&amp;#39;s namespace.">END_NAMESPACE_PBORI</a>
<a name="l00078"></a>00078 
<a name="l00079"></a>00079 <span class="preprocessor">#endif // BooleConstant_h_</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Sep 9 14:30:52 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>