<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>libqalculate-0.9.7: DecimalPrefix Class Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.5 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li class="current"><a href="classes.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</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> <div class="contents"> <h1>DecimalPrefix Class Reference</h1><!-- doxytag: class="DecimalPrefix" --><!-- doxytag: inherits="Prefix" -->A decimal (metric) prefix. <a href="#_details">More...</a> <p> <code>#include <Prefix.h></code> <p> <div class="dynheader"> Inheritance diagram for DecimalPrefix:</div> <div class="dynsection"> <p><center><img src="classDecimalPrefix.png" usemap="#DecimalPrefix_map" border="0" alt=""></center> <map name="DecimalPrefix_map"> <area href="classPrefix.html" alt="Prefix" shape="rect" coords="0,0,90,24"> </map> </div> <p> <a href="classDecimalPrefix-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classDecimalPrefix.html#6c50a3242d71f97bb9cf4ea7d11f4b16">DecimalPrefix</a> (int exp10, string long_name, string short_name="", string unicode_name="")</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classDecimalPrefix.html#dbfc3e630ef4a69b2a5e109ffef17e53">exponent</a> (int iexp=1) const </td></tr> <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#a50d228f5d2bc2f78637712971bd582c">exponent</a> (const <a class="el" href="classNumber.html">Number</a> &nexp) const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classDecimalPrefix.html#3cca3ffe456cbca4800fb1574ff42227">setExponent</a> (int iexp)</td></tr> <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#e1117227f6a7b3e479a9c2f2a21e3096">value</a> (const <a class="el" href="classNumber.html">Number</a> &nexp) const </td></tr> <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#cb8f98fb9b7acc0b3943431bf125ff7b">value</a> (int iexp) const </td></tr> <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#f810a95e1f94ff2e3119c54aa43be05c">value</a> () const </td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="classDecimalPrefix.html#59759de2b0394b0bc906ec923ea80e40">type</a> () const </td></tr> <tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fb58bdb9194f0ad7c6a593a7ab6c9c85"></a><!-- doxytag: member="DecimalPrefix::exp" ref="fb58bdb9194f0ad7c6a593a7ab6c9c85" args="" --> int </td><td class="memItemRight" valign="bottom"><b>exp</b></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> A decimal (metric) prefix. <p> A metric or decimal prefix has an integer exponent which with a base of ten constitutes the value of the prefix (value=10^exponent). <hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="6c50a3242d71f97bb9cf4ea7d11f4b16"></a><!-- doxytag: member="DecimalPrefix::DecimalPrefix" ref="6c50a3242d71f97bb9cf4ea7d11f4b16" args="(int exp10, string long_name, string short_name="", string unicode_name="")" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">DecimalPrefix::DecimalPrefix </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>exp10</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">string </td> <td class="paramname"> <em>long_name</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">string </td> <td class="paramname"> <em>short_name</em> = <code>""</code>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">string </td> <td class="paramname"> <em>unicode_name</em> = <code>""</code></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Create a decimal prefix.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>exp10</em> </td><td>Exponent for the value. </td></tr> <tr><td valign="top"></td><td valign="top"><em>long_name</em> </td><td>Long name. </td></tr> <tr><td valign="top"></td><td valign="top"><em>short_name</em> </td><td>Short name. </td></tr> <tr><td valign="top"></td><td valign="top"><em>unicode_name</em> </td><td>Unicode name. </td></tr> </table> </dl> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="dbfc3e630ef4a69b2a5e109ffef17e53"></a><!-- doxytag: member="DecimalPrefix::exponent" ref="dbfc3e630ef4a69b2a5e109ffef17e53" args="(int iexp=1) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int DecimalPrefix::exponent </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>iexp</em> = <code>1</code> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table> </div> <div class="memdoc"> <p> Returns the exponent.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>iexp</em> </td><td>Exponent of the unit. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The exponent of the prefix. </dd></dl> </div> </div><p> <a class="anchor" name="a50d228f5d2bc2f78637712971bd582c"></a><!-- doxytag: member="DecimalPrefix::exponent" ref="a50d228f5d2bc2f78637712971bd582c" args="(const Number &nexp) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classNumber.html">Number</a> DecimalPrefix::exponent </td> <td>(</td> <td class="paramtype">const <a class="el" href="classNumber.html">Number</a> & </td> <td class="paramname"> <em>nexp</em> </td> <td> ) </td> <td width="100%"> const</td> </tr> </table> </div> <div class="memdoc"> <p> Returns the exponent.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>nexp</em> </td><td>Exponent of the unit. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The exponent of the prefix. </dd></dl> </div> </div><p> <a class="anchor" name="3cca3ffe456cbca4800fb1574ff42227"></a><!-- doxytag: member="DecimalPrefix::setExponent" ref="3cca3ffe456cbca4800fb1574ff42227" args="(int iexp)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void DecimalPrefix::setExponent </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>iexp</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Sets the exponent of the prefix.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>iexp</em> </td><td>New exponent for the prefix. </td></tr> </table> </dl> </div> </div><p> <a class="anchor" name="e1117227f6a7b3e479a9c2f2a21e3096"></a><!-- doxytag: member="DecimalPrefix::value" ref="e1117227f6a7b3e479a9c2f2a21e3096" args="(const Number &nexp) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classNumber.html">Number</a> DecimalPrefix::value </td> <td>(</td> <td class="paramtype">const <a class="el" href="classNumber.html">Number</a> & </td> <td class="paramname"> <em>nexp</em> </td> <td> ) </td> <td width="100%"> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Returns the value of the prefix.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>nexp</em> </td><td>The power of the prefixed unit. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The value of the prefix. </dd></dl> <p>Implements <a class="el" href="classPrefix.html#e828e66c2fc5b58cc6cc6df5db15d2b2">Prefix</a>.</p> </div> </div><p> <a class="anchor" name="cb8f98fb9b7acc0b3943431bf125ff7b"></a><!-- doxytag: member="DecimalPrefix::value" ref="cb8f98fb9b7acc0b3943431bf125ff7b" args="(int iexp) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classNumber.html">Number</a> DecimalPrefix::value </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>iexp</em> </td> <td> ) </td> <td width="100%"> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Returns the value of the prefix.<p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>iexp</em> </td><td>The power of the prefixed unit. </td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The value of the prefix. </dd></dl> <p>Implements <a class="el" href="classPrefix.html#a1eec8b3ac6266f3865d169c07d9e26d">Prefix</a>.</p> </div> </div><p> <a class="anchor" name="f810a95e1f94ff2e3119c54aa43be05c"></a><!-- doxytag: member="DecimalPrefix::value" ref="f810a95e1f94ff2e3119c54aa43be05c" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classNumber.html">Number</a> DecimalPrefix::value </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Returns the value of the prefix.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The value of the prefix. </dd></dl> <p>Implements <a class="el" href="classPrefix.html#e304214d9254a1e9e06d8ee2c6df09ab">Prefix</a>.</p> </div> </div><p> <a class="anchor" name="59759de2b0394b0bc906ec923ea80e40"></a><!-- doxytag: member="DecimalPrefix::type" ref="59759de2b0394b0bc906ec923ea80e40" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int DecimalPrefix::type </td> <td>(</td> <td class="paramname"> </td> <td> ) </td> <td width="100%"> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Returns type, subclass, of the prefix. This can be PREFIX_DECIMAL for prefixes of the class <a class="el" href="classDecimalPrefix.html" title="A decimal (metric) prefix.">DecimalPrefix</a>, PREFIX_BINARY for <a class="el" href="classBinaryPrefix.html" title="A binary prefix.">BinaryPrefix</a>, or PREFIX_NUMBER for <a class="el" href="classNumberPrefix.html" title="A prefix with a free numerical value.">NumberPrefix</a>.<p> <dl class="return" compact><dt><b>Returns:</b></dt><dd>The type of the prefix. </dd></dl> <p>Implements <a class="el" href="classPrefix.html#2e3d9095de33a874a898b7218636be3a">Prefix</a>.</p> </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li>libqalculate/<a class="el" href="Prefix_8h.html">Prefix.h</a></ul> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Tue Jan 5 08:26:29 2010 for libqalculate-0.9.7 by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address> </body> </html>