Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > bfea28f33e7373c31a33dc7387b2a0be > files > 178

loki-lib-doc-0.1.7-2.fc12.noarch.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>Loki: Loki::SafeBitConst&lt; unique_index, word_t &gt; Class Template Reference</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.8 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="a00192.html">Loki</a>::<a class="el" href="a00110.html">SafeBitConst</a>
  </div>
</div>
<div class="contents">
<h1>Loki::SafeBitConst&lt; unique_index, word_t &gt; Class Template Reference</h1><!-- doxytag: class="Loki::SafeBitConst" -->
<p>
<a href="a00347.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2b7673100bcc441e25b2a63c1ad8ca79"></a><!-- doxytag: member="Loki::SafeBitConst::bit_word_t" ref="2b7673100bcc441e25b2a63c1ad8ca79" args="" -->
typedef word_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#2b7673100bcc441e25b2a63c1ad8ca79">bit_word_t</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Type of the bit field is available if needed. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fc37803aa81f3704a2cef0ece9e8948c"></a><!-- doxytag: member="Loki::SafeBitConst::field_t" ref="fc37803aa81f3704a2cef0ece9e8948c" args="" -->
typedef SafeBitField<br class="typebreak">
&lt; unique_index, word_t &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#fc37803aa81f3704a2cef0ece9e8948c">field_t</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Corresponding field type. <br></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5ca867866c32c41efd30b5912daf48ba"></a><!-- doxytag: member="Loki::SafeBitConst::SafeBitConst" ref="5ca867866c32c41efd30b5912daf48ba" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#5ca867866c32c41efd30b5912daf48ba">SafeBitConst</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor allows client code to construct bit fields on the stack. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ffc6ec193df68bc5888c3e0249318b09"></a><!-- doxytag: member="Loki::SafeBitConst::SafeBitConst" ref="ffc6ec193df68bc5888c3e0249318b09" args="(const SafeBitConst &amp;rhs)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#ffc6ec193df68bc5888c3e0249318b09">SafeBitConst</a> (const <a class="el" href="a00110.html">SafeBitConst</a> &amp;rhs)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fa999efd984ef43c0e8c1a637df87412"></a><!-- doxytag: member="Loki::SafeBitConst::operator==" ref="fa999efd984ef43c0e8c1a637df87412" args="(const SafeBitConst &amp;rhs) const " -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#fa999efd984ef43c0e8c1a637df87412">operator==</a> (const <a class="el" href="a00110.html">SafeBitConst</a> &amp;rhs) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Comparison operators which take a constant bit value. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3a78c04cbdd258c1cb54c959ffd3741a"></a><!-- doxytag: member="Loki::SafeBitConst::operator==" ref="3a78c04cbdd258c1cb54c959ffd3741a" args="(const field_t &amp;rhs) const " -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#3a78c04cbdd258c1cb54c959ffd3741a">operator==</a> (const <a class="el" href="a00110.html#fc37803aa81f3704a2cef0ece9e8948c">field_t</a> &amp;rhs) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Comparision operators for mutable bit fields. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="a00110.html">SafeBitConst</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#aefcf0a24311e7cd30a7ab66f5281661">operator|</a> (const <a class="el" href="a00110.html">SafeBitConst</a> &amp;rhs) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="35fc6eef31a04e669ca1846ae9909dae"></a><!-- doxytag: member="Loki::SafeBitConst::operator|" ref="35fc6eef31a04e669ca1846ae9909dae" args="(const field_t &amp;rhs) const " -->
<a class="el" href="a00110.html#fc37803aa81f3704a2cef0ece9e8948c">field_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#35fc6eef31a04e669ca1846ae9909dae">operator|</a> (const <a class="el" href="a00110.html#fc37803aa81f3704a2cef0ece9e8948c">field_t</a> &amp;rhs) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">These bitwise operators return a bit-field instead of a bit-const. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="a00110.html">SafeBitConst</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#70a37a966ba91fe89ac6f5f661f04279">operator&lt;&lt;</a> (unsigned int s) const </td></tr>

<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dca153e32459cb1bcc34b7406ec7a2fc"></a><!-- doxytag: member="Loki::SafeBitConst::size" ref="dca153e32459cb1bcc34b7406ec7a2fc" args="()" -->
static size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#dca153e32459cb1bcc34b7406ec7a2fc">size</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Word size is also the maximum number of different bit fields for a given word type. <br></td></tr>
<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="14541da61dccc9821659cd1ce5d3dff1"></a><!-- doxytag: member="Loki::SafeBitConst::SafeBitField&lt; unique_index, word_t &gt;" ref="14541da61dccc9821659cd1ce5d3dff1" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#14541da61dccc9821659cd1ce5d3dff1">SafeBitField&lt; unique_index, word_t &gt;</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Typedef is not allowed in friendship declaration. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;unsigned int unique_index, typename word_t = unsigned long&gt;<br>
 class Loki::SafeBitConst&lt; unique_index, word_t &gt;</h3>

This class defines a bit-field constant - a collection of unchanging bits used to compare to bit-fields. Instances of this class are intended to act as labels for bit-fields.<p>
<dl class="user" compact><dt><b>Safety</b></dt><dd><ul>
<li>This class provides operations used for comparisons and conversions, but no operations which may modify the value.</li><li>As a templated class, it provides type-safety so bit values and constants used for different reasons may not be unknowingly compared to each other.</li><li>The unique_index template parameter insures the unique type of each bit bit-field. It shares the unique_index with a similar SafeBitField.</li><li>Its operations only allow comparisons to other bit-constants and bit-fields of the same type.</li></ul>
</dd></dl>
This class defines a bit-field constant - a collection of unchanging bits used to compare to bit-fields. Instances of this class are intended to store bit values.<p>
<dl class="user" compact><dt><b>Safety</b></dt><dd><ul>
<li>This class provides operations used for comparisons and conversions, and also operations which may safely modify the value.</li><li>As a templated class, it provides type-safety so bit values and constants used for different reasons may not be unknowingly compared to each other.</li><li>The unique_index template parameter insures the unique type of each bit bit-field. It shares the unique_index with a similar <a class="el" href="a00110.html">SafeBitConst</a>.</li><li>Its operations only allow comparisons to other bit-constants and bit-fields of the same type. </li></ul>
</dd></dl>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="70a37a966ba91fe89ac6f5f661f04279"></a><!-- doxytag: member="Loki::SafeBitConst::operator&lt;&lt;" ref="70a37a966ba91fe89ac6f5f661f04279" args="(unsigned int s) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;unsigned int unique_index, typename word_t  = unsigned long&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="a00110.html">SafeBitConst</a> <a class="el" href="a00110.html">Loki::SafeBitConst</a>&lt; unique_index, word_t &gt;::operator&lt;&lt;           </td>
          <td>(</td>
          <td class="paramtype">unsigned int&nbsp;</td>
          <td class="paramname"> <em>s</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The shift operators move bits inside the bit field. These are useful in loops which act over bit fields and increment them. 
<p>References <a class="el" href="a00254.html#l00190">Loki::SafeBitConst&lt; unique_index, word_t &gt;::SafeBitConst()</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
</div>

</div>
</div><p>
<a class="anchor" name="aefcf0a24311e7cd30a7ab66f5281661"></a><!-- doxytag: member="Loki::SafeBitConst::operator|" ref="aefcf0a24311e7cd30a7ab66f5281661" args="(const SafeBitConst &amp;rhs) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;unsigned int unique_index, typename word_t  = unsigned long&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="a00110.html">SafeBitConst</a> <a class="el" href="a00110.html">Loki::SafeBitConst</a>&lt; unique_index, word_t &gt;::operator|           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00110.html">SafeBitConst</a>&lt; unique_index, word_t &gt; &amp;&nbsp;</td>
          <td class="paramname"> <em>rhs</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Bitwise operations. Operation-assignment operators are not needed, since bit constants cannot be changed after they are initialized. 
<p>References <a class="el" href="a00254.html#l00190">Loki::SafeBitConst&lt; unique_index, word_t &gt;::SafeBitConst()</a>, and <a class="el" href="a00254.html#l00242">Loki::SafeBitConst&lt; unique_index, word_t &gt;::word</a>.</p>

<p>
<div class="dynheader">
Here is the call graph for this function:</div>
<div class="dynsection">
</div>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li>SafeBits.h</ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Thu Jan 29 18:51:43 2009 for Loki by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
</body>
</html>