1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170
|
<!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< unique_index, word_t > 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 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> <u>S</u>earch for </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 List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class 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< unique_index, word_t > 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 </td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#2b7673100bcc441e25b2a63c1ad8ca79">bit_word_t</a></td></tr>
<tr><td class="mdescLeft"> </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">
< unique_index, word_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#fc37803aa81f3704a2cef0ece9e8948c">field_t</a></td></tr>
<tr><td class="mdescLeft"> </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="()" -->
</td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#5ca867866c32c41efd30b5912daf48ba">SafeBitConst</a> ()</td></tr>
<tr><td class="mdescLeft"> </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 &rhs)" -->
</td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#ffc6ec193df68bc5888c3e0249318b09">SafeBitConst</a> (const <a class="el" href="a00110.html">SafeBitConst</a> &rhs)</td></tr>
<tr><td class="mdescLeft"> </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 &rhs) const " -->
bool </td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#fa999efd984ef43c0e8c1a637df87412">operator==</a> (const <a class="el" href="a00110.html">SafeBitConst</a> &rhs) const </td></tr>
<tr><td class="mdescLeft"> </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 &rhs) const " -->
bool </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> &rhs) const </td></tr>
<tr><td class="mdescLeft"> </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> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#aefcf0a24311e7cd30a7ab66f5281661">operator|</a> (const <a class="el" href="a00110.html">SafeBitConst</a> &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 &rhs) const " -->
<a class="el" href="a00110.html#fc37803aa81f3704a2cef0ece9e8948c">field_t</a> </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> &rhs) const </td></tr>
<tr><td class="mdescLeft"> </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> </td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#70a37a966ba91fe89ac6f5f661f04279">operator<<</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 </td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#dca153e32459cb1bcc34b7406ec7a2fc">size</a> ()</td></tr>
<tr><td class="mdescLeft"> </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< unique_index, word_t >" ref="14541da61dccc9821659cd1ce5d3dff1" args="" -->
class </td><td class="memItemRight" valign="bottom"><a class="el" href="a00110.html#14541da61dccc9821659cd1ce5d3dff1">SafeBitField< unique_index, word_t ></a></td></tr>
<tr><td class="mdescLeft"> </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<unsigned int unique_index, typename word_t = unsigned long><br>
class Loki::SafeBitConst< unique_index, word_t ></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<<" ref="70a37a966ba91fe89ac6f5f661f04279" args="(unsigned int s) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<unsigned int unique_index, typename word_t = unsigned long> </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>< unique_index, word_t >::operator<< </td>
<td>(</td>
<td class="paramtype">unsigned int </td>
<td class="paramname"> <em>s</em> </td>
<td> ) </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< unique_index, word_t >::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 &rhs) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template<unsigned int unique_index, typename word_t = unsigned long> </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>< unique_index, word_t >::operator| </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="a00110.html">SafeBitConst</a>< unique_index, word_t > & </td>
<td class="paramname"> <em>rhs</em> </td>
<td> ) </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< unique_index, word_t >::SafeBitConst()</a>, and <a class="el" href="a00254.html#l00242">Loki::SafeBitConst< unique_index, word_t >::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
<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>
|