Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > 34ae14235711d1471f043ac894a061f9 > files > 49

libicu-doc-3.6-5.16.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>ICU 3.6: CurrencyAmount 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.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li id="current"><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</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="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
  </ul></div>
<h1>CurrencyAmount Class Reference</h1><!-- doxytag: class="CurrencyAmount" --><!-- doxytag: inherits="Measure" -->A currency together with a numeric amount, such as 200 USD.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="curramt_8h-source.html">curramt.h</a>&gt;</code>
<p>
<p>Inheritance diagram for CurrencyAmount:
<p><center><img src="classCurrencyAmount.png" usemap="#CurrencyAmount_map" border="0" alt=""></center>
<map name="CurrencyAmount_map">
<area href="classMeasure.html" alt="Measure" shape="rect" coords="0,112,108,136">
<area href="classUObject.html" alt="UObject" shape="rect" coords="0,56,108,80">
<area href="classUMemory.html" alt="UMemory" shape="rect" coords="0,0,108,24">
</map>
<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">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrencyAmount.html#17de2bc7cb99ee5585f66009ada79aa2">CurrencyAmount</a> (const <a class="el" href="classFormattable.html">Formattable</a> &amp;amount, const UChar *isoCode, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> &amp;ec)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct an object with the given numeric amount and the given ISO currency code.  <a href="#17de2bc7cb99ee5585f66009ada79aa2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrencyAmount.html#77d61b2988b2b1cb54b747d549f53a4a">CurrencyAmount</a> (double amount, const UChar *isoCode, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> &amp;ec)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct an object with the given numeric amount and the given ISO currency code.  <a href="#77d61b2988b2b1cb54b747d549f53a4a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrencyAmount.html#d2514985f7661811871b3553b5fc2d84">CurrencyAmount</a> (const <a class="el" href="classCurrencyAmount.html">CurrencyAmount</a> &amp;other)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor.  <a href="#d2514985f7661811871b3553b5fc2d84"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classCurrencyAmount.html">CurrencyAmount</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrencyAmount.html#fcd1bd252ed7adeb9ccd1c79bff6d6f5">operator=</a> (const <a class="el" href="classCurrencyAmount.html">CurrencyAmount</a> &amp;other)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assignment operator.  <a href="#fcd1bd252ed7adeb9ccd1c79bff6d6f5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classUObject.html">UObject</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrencyAmount.html#fc9b4fa9cdb62d43c7d0906d955ab48d">clone</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a polymorphic clone of this object.  <a href="#fc9b4fa9cdb62d43c7d0906d955ab48d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrencyAmount.html#75f5e7eb06fc5a8837d46fba73242b7f">~CurrencyAmount</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#75f5e7eb06fc5a8837d46fba73242b7f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="utypes_8h.html#452dc3c7d14eb1a1837ae1aa0b2d6724">UClassID</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrencyAmount.html#812f417f8b5799b74e637afad0eaff01">getDynamicClassID</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a unique class ID for this object POLYMORPHICALLY.  <a href="#812f417f8b5799b74e637afad0eaff01"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classCurrencyUnit.html">CurrencyUnit</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrencyAmount.html#c23837451841f51f71fe53952ab7dbe8">getCurrency</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the currency unit object of this object.  <a href="#c23837451841f51f71fe53952ab7dbe8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const UChar *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrencyAmount.html#73811426cf3bb3bb894b8f8657fa0d25">getISOCurrency</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the ISO currency code of this object.  <a href="#73811426cf3bb3bb894b8f8657fa0d25"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="utypes_8h.html#452dc3c7d14eb1a1837ae1aa0b2d6724">UClassID</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrencyAmount.html#78124be8401816dc357772b27140ca80">getStaticClassID</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the class ID for this class.  <a href="#78124be8401816dc357772b27140ca80"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A currency together with a numeric amount, such as 200 USD. 
<p>
<dl compact><dt><b>Author:</b></dt><dd>Alan Liu </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001977">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl>

<p>

<p>
Definition at line <a class="el" href="curramt_8h-source.html#l00035">35</a> of file <a class="el" href="curramt_8h-source.html">curramt.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="17de2bc7cb99ee5585f66009ada79aa2"></a><!-- doxytag: member="CurrencyAmount::CurrencyAmount" ref="17de2bc7cb99ee5585f66009ada79aa2" args="(const Formattable &amp;amount, const UChar *isoCode, UErrorCode &amp;ec)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CurrencyAmount::CurrencyAmount           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classFormattable.html">Formattable</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>amount</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const UChar *&nbsp;</td>
          <td class="paramname"> <em>isoCode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>ec</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Construct an object with the given numeric amount and the given ISO currency code. 
<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>amount</em>&nbsp;</td><td>a numeric object; amount.isNumeric() must be TRUE </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>isoCode</em>&nbsp;</td><td>the 3-letter ISO 4217 currency code; must not be NULL and must have length 3 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ec</em>&nbsp;</td><td>input-output error code. If the amount or the isoCode is invalid, then this will be set to a failing value. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001978">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="77d61b2988b2b1cb54b747d549f53a4a"></a><!-- doxytag: member="CurrencyAmount::CurrencyAmount" ref="77d61b2988b2b1cb54b747d549f53a4a" args="(double amount, const UChar *isoCode, UErrorCode &amp;ec)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CurrencyAmount::CurrencyAmount           </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>amount</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const UChar *&nbsp;</td>
          <td class="paramname"> <em>isoCode</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>ec</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Construct an object with the given numeric amount and the given ISO currency code. 
<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>amount</em>&nbsp;</td><td>the amount of the given currency </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>isoCode</em>&nbsp;</td><td>the 3-letter ISO 4217 currency code; must not be NULL and must have length 3 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ec</em>&nbsp;</td><td>input-output error code. If the isoCode is invalid, then this will be set to a failing value. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001979">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="d2514985f7661811871b3553b5fc2d84"></a><!-- doxytag: member="CurrencyAmount::CurrencyAmount" ref="d2514985f7661811871b3553b5fc2d84" args="(const CurrencyAmount &amp;other)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CurrencyAmount::CurrencyAmount           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classCurrencyAmount.html">CurrencyAmount</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Copy constructor. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable001980">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="75f5e7eb06fc5a8837d46fba73242b7f"></a><!-- doxytag: member="CurrencyAmount::~CurrencyAmount" ref="75f5e7eb06fc5a8837d46fba73242b7f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual CurrencyAmount::~CurrencyAmount           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destructor. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable001983">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="fc9b4fa9cdb62d43c7d0906d955ab48d"></a><!-- doxytag: member="CurrencyAmount::clone" ref="fc9b4fa9cdb62d43c7d0906d955ab48d" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUObject.html">UObject</a>* CurrencyAmount::clone           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return a polymorphic clone of this object. 
<p>
The result will have the same class as returned by <a class="el" href="classCurrencyAmount.html#812f417f8b5799b74e637afad0eaff01">getDynamicClassID()</a>. <dl compact><dt><b><a class="el" href="stable.html#_stable001982">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl>

<p>
Implements <a class="el" href="classMeasure.html#659f865e2f6c72cc2db0f5795dc66efa">Measure</a>.
</div>
</div><p>
<a class="anchor" name="c23837451841f51f71fe53952ab7dbe8"></a><!-- doxytag: member="CurrencyAmount::getCurrency" ref="c23837451841f51f71fe53952ab7dbe8" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classCurrencyUnit.html">CurrencyUnit</a> &amp; CurrencyAmount::getCurrency           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the currency unit object of this object. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable001986">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl>

<p>
Definition at line <a class="el" href="curramt_8h-source.html#l00119">119</a> of file <a class="el" href="curramt_8h-source.html">curramt.h</a>.
<p>
References <a class="el" href="measure_8h-source.html#l00130">Measure::getUnit()</a>.
<p>
Referenced by <a class="el" href="curramt_8h-source.html#l00123">getISOCurrency()</a>.
</div>
</div><p>
<a class="anchor" name="812f417f8b5799b74e637afad0eaff01"></a><!-- doxytag: member="CurrencyAmount::getDynamicClassID" ref="812f417f8b5799b74e637afad0eaff01" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="utypes_8h.html#452dc3c7d14eb1a1837ae1aa0b2d6724">UClassID</a> CurrencyAmount::getDynamicClassID           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns a unique class ID for this object POLYMORPHICALLY. 
<p>
This method implements a simple form of RTTI used by ICU. <dl compact><dt><b>Returns:</b></dt><dd>The class ID for this object. All objects of a given class have the same class ID. Objects of other classes have different class IDs. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001984">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl>

<p>
Implements <a class="el" href="classUObject.html#60f3fba82b9d7edfe3d3f9d423ab826d">UObject</a>.
</div>
</div><p>
<a class="anchor" name="73811426cf3bb3bb894b8f8657fa0d25"></a><!-- doxytag: member="CurrencyAmount::getISOCurrency" ref="73811426cf3bb3bb894b8f8657fa0d25" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const UChar * CurrencyAmount::getISOCurrency           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the ISO currency code of this object. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable001987">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl>

<p>
Definition at line <a class="el" href="curramt_8h-source.html#l00123">123</a> of file <a class="el" href="curramt_8h-source.html">curramt.h</a>.
<p>
References <a class="el" href="curramt_8h-source.html#l00119">getCurrency()</a>, and <a class="el" href="currunit_8h-source.html#l00110">CurrencyUnit::getISOCurrency()</a>.
</div>
</div><p>
<a class="anchor" name="78124be8401816dc357772b27140ca80"></a><!-- doxytag: member="CurrencyAmount::getStaticClassID" ref="78124be8401816dc357772b27140ca80" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="utypes_8h.html#452dc3c7d14eb1a1837ae1aa0b2d6724">UClassID</a> CurrencyAmount::getStaticClassID           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the class ID for this class. 
<p>
This is used to compare to the return value of <a class="el" href="classCurrencyAmount.html#812f417f8b5799b74e637afad0eaff01">getDynamicClassID()</a>. <dl compact><dt><b>Returns:</b></dt><dd>The class ID for all objects of this class. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable001985">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="fcd1bd252ed7adeb9ccd1c79bff6d6f5"></a><!-- doxytag: member="CurrencyAmount::operator=" ref="fcd1bd252ed7adeb9ccd1c79bff6d6f5" args="(const CurrencyAmount &amp;other)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classCurrencyAmount.html">CurrencyAmount</a>&amp; CurrencyAmount::operator=           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classCurrencyAmount.html">CurrencyAmount</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Assignment operator. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable001981">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="curramt_8h-source.html">curramt.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Dec 13 17:29:54 2011 for ICU 3.6 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>