| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
| 2 |
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
| 3 |
<title>libqalculate-0.9.4: DecimalPrefix Class Reference</title>
|
| 4 |
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
| 5 |
</head><body>
|
| 6 |
<!-- Generated by Doxygen 1.4.3 -->
|
| 7 |
<div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a></div>
|
| 8 |
<h1>DecimalPrefix Class Reference</h1><!-- doxytag: class=<DecimalPrefix> --><!-- doxytag: inherits=<Prefix> -->A decimal (metric) prefix.
|
| 9 |
<a href="#_details">More...</a>
|
| 10 |
<p>
|
| 11 |
<code>#include <Prefix.h></code>
|
| 12 |
<p>
|
| 13 |
<p>Inheritance diagram for DecimalPrefix:
|
| 14 |
<p><center><img src="classDecimalPrefix.png" usemap="#DecimalPrefix_map" border="0" alt=""></center>
|
| 15 |
<map name="DecimalPrefix_map">
|
| 16 |
<area href="classPrefix.html" alt="Prefix" shape="rect" coords="0,0,90,24">
|
| 17 |
</map>
|
| 18 |
<a href="classDecimalPrefix-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
|
| 19 |
<tr><td></td></tr>
|
| 20 |
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
|
| 21 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDecimalPrefix.html#a0">DecimalPrefix</a> (int exp10, string long_name, string short_name="", string unicode_name="")</td></tr>
|
| 22 |
|
| 23 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classDecimalPrefix.html#a2">exponent</a> (int iexp=1) const </td></tr>
|
| 24 |
|
| 25 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classNumber.html">Number</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDecimalPrefix.html#a3">exponent</a> (const <a class="el" href="classNumber.html">Number</a> &nexp) const </td></tr>
|
| 26 |
|
| 27 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classDecimalPrefix.html#a4">setExponent</a> (int iexp)</td></tr>
|
| 28 |
|
| 29 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classNumber.html">Number</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDecimalPrefix.html#a5">value</a> (const <a class="el" href="classNumber.html">Number</a> &nexp) const </td></tr>
|
| 30 |
|
| 31 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classNumber.html">Number</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDecimalPrefix.html#a6">value</a> (int iexp) const </td></tr>
|
| 32 |
|
| 33 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classNumber.html">Number</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDecimalPrefix.html#a7">value</a> () const </td></tr>
|
| 34 |
|
| 35 |
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classDecimalPrefix.html#a8">type</a> () const </td></tr>
|
| 36 |
|
| 37 |
<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
|
| 38 |
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="p0"></a><!-- doxytag: member=<DecimalPrefix::exp> ref=<p0> args=<> -->
|
| 39 |
int </td><td class="memItemRight" valign="bottom"><b>exp</b></td></tr>
|
| 40 |
|
| 41 |
</table>
|
| 42 |
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
| 43 |
A decimal (metric) prefix.
|
| 44 |
<p>
|
| 45 |
A metric or decimal prefix has an integer exponent which with a base of ten constitutes the value of the prefix (value=10^exponent).
|
| 46 |
<p>
|
| 47 |
<hr><h2>Constructor & Destructor Documentation</h2>
|
| 48 |
<a class="anchor" name="a0"></a><!-- doxytag: member=<DecimalPrefix::DecimalPrefix> ref=<a0> args=<(int exp10, string long_name, string short_name="", string unicode_name="")> --><p>
|
| 49 |
<table class="mdTable" cellpadding="2" cellspacing="0">
|
| 50 |
<tr>
|
| 51 |
<td class="mdRow">
|
| 52 |
<table cellpadding="0" cellspacing="0" border="0">
|
| 53 |
<tr>
|
| 54 |
<td class="md" nowrap valign="top">DecimalPrefix::DecimalPrefix </td>
|
| 55 |
<td class="md" valign="top">( </td>
|
| 56 |
<td class="md" nowrap valign="top">int </td>
|
| 57 |
<td class="mdname" nowrap> <em>exp10</em>, </td>
|
| 58 |
</tr>
|
| 59 |
<tr>
|
| 60 |
<td class="md" nowrap align="right"></td>
|
| 61 |
<td class="md"></td>
|
| 62 |
<td class="md" nowrap>string </td>
|
| 63 |
<td class="mdname" nowrap> <em>long_name</em>, </td>
|
| 64 |
</tr>
|
| 65 |
<tr>
|
| 66 |
<td class="md" nowrap align="right"></td>
|
| 67 |
<td class="md"></td>
|
| 68 |
<td class="md" nowrap>string </td>
|
| 69 |
<td class="mdname" nowrap> <em>short_name</em> = <code>""</code>, </td>
|
| 70 |
</tr>
|
| 71 |
<tr>
|
| 72 |
<td class="md" nowrap align="right"></td>
|
| 73 |
<td class="md"></td>
|
| 74 |
<td class="md" nowrap>string </td>
|
| 75 |
<td class="mdname" nowrap> <em>unicode_name</em> = <code>""</code></td>
|
| 76 |
</tr>
|
| 77 |
<tr>
|
| 78 |
<td class="md"></td>
|
| 79 |
<td class="md">) </td>
|
| 80 |
<td class="md" colspan="2"></td>
|
| 81 |
</tr>
|
| 82 |
</table>
|
| 83 |
</td>
|
| 84 |
</tr>
|
| 85 |
</table>
|
| 86 |
<table cellspacing="5" cellpadding="0" border="0">
|
| 87 |
<tr>
|
| 88 |
<td>
|
| 89 |
|
| 90 |
</td>
|
| 91 |
<td>
|
| 92 |
|
| 93 |
<p>
|
| 94 |
Create a decimal prefix.<p>
|
| 95 |
<dl compact><dt><b>Parameters:</b></dt><dd>
|
| 96 |
<table border="0" cellspacing="2" cellpadding="0">
|
| 97 |
<tr><td valign="top"></td><td valign="top"><em>exp10</em> </td><td>Exponent for the value. </td></tr>
|
| 98 |
<tr><td valign="top"></td><td valign="top"><em>long_name</em> </td><td>Long name. </td></tr>
|
| 99 |
<tr><td valign="top"></td><td valign="top"><em>short_name</em> </td><td>Short name. </td></tr>
|
| 100 |
<tr><td valign="top"></td><td valign="top"><em>unicode_name</em> </td><td>Unicode name.</td></tr>
|
| 101 |
</table>
|
| 102 |
</dl>
|
| 103 |
</td>
|
| 104 |
</tr>
|
| 105 |
</table>
|
| 106 |
<hr><h2>Member Function Documentation</h2>
|
| 107 |
<a class="anchor" name="a3"></a><!-- doxytag: member=<DecimalPrefix::exponent> ref=<a3> args=<(const Number &nexp) const > --><p>
|
| 108 |
<table class="mdTable" cellpadding="2" cellspacing="0">
|
| 109 |
<tr>
|
| 110 |
<td class="mdRow">
|
| 111 |
<table cellpadding="0" cellspacing="0" border="0">
|
| 112 |
<tr>
|
| 113 |
<td class="md" nowrap valign="top"><a class="el" href="classNumber.html">Number</a> DecimalPrefix::exponent </td>
|
| 114 |
<td class="md" valign="top">( </td>
|
| 115 |
<td class="md" nowrap valign="top">const <a class="el" href="classNumber.html">Number</a> & </td>
|
| 116 |
<td class="mdname1" valign="top" nowrap> <em>nexp</em> </td>
|
| 117 |
<td class="md" valign="top"> ) </td>
|
| 118 |
<td class="md" nowrap> const</td>
|
| 119 |
</tr>
|
| 120 |
</table>
|
| 121 |
</td>
|
| 122 |
</tr>
|
| 123 |
</table>
|
| 124 |
<table cellspacing="5" cellpadding="0" border="0">
|
| 125 |
<tr>
|
| 126 |
<td>
|
| 127 |
|
| 128 |
</td>
|
| 129 |
<td>
|
| 130 |
|
| 131 |
<p>
|
| 132 |
Returns the exponent.<p>
|
| 133 |
<dl compact><dt><b>Parameters:</b></dt><dd>
|
| 134 |
<table border="0" cellspacing="2" cellpadding="0">
|
| 135 |
<tr><td valign="top"></td><td valign="top"><em>nexp</em> </td><td>Exponent of the unit. </td></tr>
|
| 136 |
</table>
|
| 137 |
</dl>
|
| 138 |
<dl compact><dt><b>Returns:</b></dt><dd>The exponent of the prefix.</dd></dl>
|
| 139 |
</td>
|
| 140 |
</tr>
|
| 141 |
</table>
|
| 142 |
<a class="anchor" name="a2"></a><!-- doxytag: member=<DecimalPrefix::exponent> ref=<a2> args=<(int iexp=1) const > --><p>
|
| 143 |
<table class="mdTable" cellpadding="2" cellspacing="0">
|
| 144 |
<tr>
|
| 145 |
<td class="mdRow">
|
| 146 |
<table cellpadding="0" cellspacing="0" border="0">
|
| 147 |
<tr>
|
| 148 |
<td class="md" nowrap valign="top">int DecimalPrefix::exponent </td>
|
| 149 |
<td class="md" valign="top">( </td>
|
| 150 |
<td class="md" nowrap valign="top">int </td>
|
| 151 |
<td class="mdname1" valign="top" nowrap> <em>iexp</em> = <code>1</code> </td>
|
| 152 |
<td class="md" valign="top"> ) </td>
|
| 153 |
<td class="md" nowrap> const</td>
|
| 154 |
</tr>
|
| 155 |
</table>
|
| 156 |
</td>
|
| 157 |
</tr>
|
| 158 |
</table>
|
| 159 |
<table cellspacing="5" cellpadding="0" border="0">
|
| 160 |
<tr>
|
| 161 |
<td>
|
| 162 |
|
| 163 |
</td>
|
| 164 |
<td>
|
| 165 |
|
| 166 |
<p>
|
| 167 |
Returns the exponent.<p>
|
| 168 |
<dl compact><dt><b>Parameters:</b></dt><dd>
|
| 169 |
<table border="0" cellspacing="2" cellpadding="0">
|
| 170 |
<tr><td valign="top"></td><td valign="top"><em>iexp</em> </td><td>Exponent of the unit. </td></tr>
|
| 171 |
</table>
|
| 172 |
</dl>
|
| 173 |
<dl compact><dt><b>Returns:</b></dt><dd>The exponent of the prefix.</dd></dl>
|
| 174 |
</td>
|
| 175 |
</tr>
|
| 176 |
</table>
|
| 177 |
<a class="anchor" name="a4"></a><!-- doxytag: member=<DecimalPrefix::setExponent> ref=<a4> args=<(int iexp)> --><p>
|
| 178 |
<table class="mdTable" cellpadding="2" cellspacing="0">
|
| 179 |
<tr>
|
| 180 |
<td class="mdRow">
|
| 181 |
<table cellpadding="0" cellspacing="0" border="0">
|
| 182 |
<tr>
|
| 183 |
<td class="md" nowrap valign="top">void DecimalPrefix::setExponent </td>
|
| 184 |
<td class="md" valign="top">( </td>
|
| 185 |
<td class="md" nowrap valign="top">int </td>
|
| 186 |
<td class="mdname1" valign="top" nowrap> <em>iexp</em> </td>
|
| 187 |
<td class="md" valign="top"> ) </td>
|
| 188 |
<td class="md" nowrap></td>
|
| 189 |
</tr>
|
| 190 |
</table>
|
| 191 |
</td>
|
| 192 |
</tr>
|
| 193 |
</table>
|
| 194 |
<table cellspacing="5" cellpadding="0" border="0">
|
| 195 |
<tr>
|
| 196 |
<td>
|
| 197 |
|
| 198 |
</td>
|
| 199 |
<td>
|
| 200 |
|
| 201 |
<p>
|
| 202 |
Sets the exponent of the prefix.<p>
|
| 203 |
<dl compact><dt><b>Parameters:</b></dt><dd>
|
| 204 |
<table border="0" cellspacing="2" cellpadding="0">
|
| 205 |
<tr><td valign="top"></td><td valign="top"><em>iexp</em> </td><td>New exponent for the prefix.</td></tr>
|
| 206 |
</table>
|
| 207 |
</dl>
|
| 208 |
</td>
|
| 209 |
</tr>
|
| 210 |
</table>
|
| 211 |
<a class="anchor" name="a8"></a><!-- doxytag: member=<DecimalPrefix::type> ref=<a8> args=<() const > --><p>
|
| 212 |
<table class="mdTable" cellpadding="2" cellspacing="0">
|
| 213 |
<tr>
|
| 214 |
<td class="mdRow">
|
| 215 |
<table cellpadding="0" cellspacing="0" border="0">
|
| 216 |
<tr>
|
| 217 |
<td class="md" nowrap valign="top">int DecimalPrefix::type </td>
|
| 218 |
<td class="md" valign="top">( </td>
|
| 219 |
<td class="mdname1" valign="top" nowrap> </td>
|
| 220 |
<td class="md" valign="top"> ) </td>
|
| 221 |
<td class="md" nowrap> const<code> [virtual]</code></td>
|
| 222 |
</tr>
|
| 223 |
</table>
|
| 224 |
</td>
|
| 225 |
</tr>
|
| 226 |
</table>
|
| 227 |
<table cellspacing="5" cellpadding="0" border="0">
|
| 228 |
<tr>
|
| 229 |
<td>
|
| 230 |
|
| 231 |
</td>
|
| 232 |
<td>
|
| 233 |
|
| 234 |
<p>
|
| 235 |
Returns type, subclass, of the prefix. This can be PREFIX_DECIMAL for prefixes of the class DecimalPrefix, PREFIX_BINARY for <a class="el" href="classBinaryPrefix.html">BinaryPrefix</a>, or PREFIX_NUMBER for <a class="el" href="classNumberPrefix.html">NumberPrefix</a>.<p>
|
| 236 |
<dl compact><dt><b>Returns:</b></dt><dd>The type of the prefix.</dd></dl>
|
| 237 |
|
| 238 |
<p>
|
| 239 |
Implements <a class="el" href="classPrefix.html#a12">Prefix</a>. </td>
|
| 240 |
</tr>
|
| 241 |
</table>
|
| 242 |
<a class="anchor" name="a7"></a><!-- doxytag: member=<DecimalPrefix::value> ref=<a7> args=<() const > --><p>
|
| 243 |
<table class="mdTable" cellpadding="2" cellspacing="0">
|
| 244 |
<tr>
|
| 245 |
<td class="mdRow">
|
| 246 |
<table cellpadding="0" cellspacing="0" border="0">
|
| 247 |
<tr>
|
| 248 |
<td class="md" nowrap valign="top"><a class="el" href="classNumber.html">Number</a> DecimalPrefix::value </td>
|
| 249 |
<td class="md" valign="top">( </td>
|
| 250 |
<td class="mdname1" valign="top" nowrap> </td>
|
| 251 |
<td class="md" valign="top"> ) </td>
|
| 252 |
<td class="md" nowrap> const<code> [virtual]</code></td>
|
| 253 |
</tr>
|
| 254 |
</table>
|
| 255 |
</td>
|
| 256 |
</tr>
|
| 257 |
</table>
|
| 258 |
<table cellspacing="5" cellpadding="0" border="0">
|
| 259 |
<tr>
|
| 260 |
<td>
|
| 261 |
|
| 262 |
</td>
|
| 263 |
<td>
|
| 264 |
|
| 265 |
<p>
|
| 266 |
Returns the value of the prefix.<p>
|
| 267 |
<dl compact><dt><b>Returns:</b></dt><dd>The value of the prefix.</dd></dl>
|
| 268 |
|
| 269 |
<p>
|
| 270 |
Implements <a class="el" href="classPrefix.html#a11">Prefix</a>. </td>
|
| 271 |
</tr>
|
| 272 |
</table>
|
| 273 |
<a class="anchor" name="a6"></a><!-- doxytag: member=<DecimalPrefix::value> ref=<a6> args=<(int iexp) const > --><p>
|
| 274 |
<table class="mdTable" cellpadding="2" cellspacing="0">
|
| 275 |
<tr>
|
| 276 |
<td class="mdRow">
|
| 277 |
<table cellpadding="0" cellspacing="0" border="0">
|
| 278 |
<tr>
|
| 279 |
<td class="md" nowrap valign="top"><a class="el" href="classNumber.html">Number</a> DecimalPrefix::value </td>
|
| 280 |
<td class="md" valign="top">( </td>
|
| 281 |
<td class="md" nowrap valign="top">int </td>
|
| 282 |
<td class="mdname1" valign="top" nowrap> <em>iexp</em> </td>
|
| 283 |
<td class="md" valign="top"> ) </td>
|
| 284 |
<td class="md" nowrap> const<code> [virtual]</code></td>
|
| 285 |
</tr>
|
| 286 |
</table>
|
| 287 |
</td>
|
| 288 |
</tr>
|
| 289 |
</table>
|
| 290 |
<table cellspacing="5" cellpadding="0" border="0">
|
| 291 |
<tr>
|
| 292 |
<td>
|
| 293 |
|
| 294 |
</td>
|
| 295 |
<td>
|
| 296 |
|
| 297 |
<p>
|
| 298 |
Returns the value of the prefix.<p>
|
| 299 |
<dl compact><dt><b>Parameters:</b></dt><dd>
|
| 300 |
<table border="0" cellspacing="2" cellpadding="0">
|
| 301 |
<tr><td valign="top"></td><td valign="top"><em>iexp</em> </td><td>The power of the prefixed unit. </td></tr>
|
| 302 |
</table>
|
| 303 |
</dl>
|
| 304 |
<dl compact><dt><b>Returns:</b></dt><dd>The value of the prefix.</dd></dl>
|
| 305 |
|
| 306 |
<p>
|
| 307 |
Implements <a class="el" href="classPrefix.html#a10">Prefix</a>. </td>
|
| 308 |
</tr>
|
| 309 |
</table>
|
| 310 |
<a class="anchor" name="a5"></a><!-- doxytag: member=<DecimalPrefix::value> ref=<a5> args=<(const Number &nexp) const > --><p>
|
| 311 |
<table class="mdTable" cellpadding="2" cellspacing="0">
|
| 312 |
<tr>
|
| 313 |
<td class="mdRow">
|
| 314 |
<table cellpadding="0" cellspacing="0" border="0">
|
| 315 |
<tr>
|
| 316 |
<td class="md" nowrap valign="top"><a class="el" href="classNumber.html">Number</a> DecimalPrefix::value </td>
|
| 317 |
<td class="md" valign="top">( </td>
|
| 318 |
<td class="md" nowrap valign="top">const <a class="el" href="classNumber.html">Number</a> & </td>
|
| 319 |
<td class="mdname1" valign="top" nowrap> <em>nexp</em> </td>
|
| 320 |
<td class="md" valign="top"> ) </td>
|
| 321 |
<td class="md" nowrap> const<code> [virtual]</code></td>
|
| 322 |
</tr>
|
| 323 |
</table>
|
| 324 |
</td>
|
| 325 |
</tr>
|
| 326 |
</table>
|
| 327 |
<table cellspacing="5" cellpadding="0" border="0">
|
| 328 |
<tr>
|
| 329 |
<td>
|
| 330 |
|
| 331 |
</td>
|
| 332 |
<td>
|
| 333 |
|
| 334 |
<p>
|
| 335 |
Returns the value of the prefix.<p>
|
| 336 |
<dl compact><dt><b>Parameters:</b></dt><dd>
|
| 337 |
<table border="0" cellspacing="2" cellpadding="0">
|
| 338 |
<tr><td valign="top"></td><td valign="top"><em>nexp</em> </td><td>The power of the prefixed unit. </td></tr>
|
| 339 |
</table>
|
| 340 |
</dl>
|
| 341 |
<dl compact><dt><b>Returns:</b></dt><dd>The value of the prefix.</dd></dl>
|
| 342 |
|
| 343 |
<p>
|
| 344 |
Implements <a class="el" href="classPrefix.html#a9">Prefix</a>. </td>
|
| 345 |
</tr>
|
| 346 |
</table>
|
| 347 |
<hr>The documentation for this class was generated from the following file:<ul>
|
| 348 |
<li>libqalculate/<a class="el" href="Prefix_8h.html">Prefix.h</a></ul>
|
| 349 |
<hr size="1"><address style="align: right;"><small>
|
| 350 |
Generated on 1 Jun 2006 for libqalculate-0.9.4 by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.3</small></address>
|
| 351 |
</body>
|
| 352 |
</html>
|