<!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.8: CurrencyUnit 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.1 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li id="current"><a href="classes.html"><span>Data Structures</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</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="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Data Fields</span></a></li> </ul></div> <h1>CurrencyUnit Class Reference</h1><!-- doxytag: class="CurrencyUnit" --><!-- doxytag: inherits="MeasureUnit" -->A unit of currency, such as USD (U.S. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="currunit_8h-source.html">currunit.h</a>></code> <p> <p>Inheritance diagram for CurrencyUnit: <p><center><img src="classCurrencyUnit.png" usemap="#CurrencyUnit_map" border="0" alt=""></center> <map name="CurrencyUnit_map"> <area href="classMeasureUnit.html" alt="MeasureUnit" shape="rect" coords="0,112,87,136"> <area href="classUObject.html" alt="UObject" shape="rect" coords="0,56,87,80"> <area href="classUMemory.html" alt="UMemory" shape="rect" coords="0,0,87,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"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrencyUnit.html#730fd929c8fba95407996401a37fa9c2">CurrencyUnit</a> (const UChar *isoCode, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &ec)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Construct an object with the given ISO currency code. <a href="#730fd929c8fba95407996401a37fa9c2"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrencyUnit.html#206e26b3939378044aa9e9bc33f02e4f">CurrencyUnit</a> (const <a class="el" href="classCurrencyUnit.html">CurrencyUnit</a> &other)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <a href="#206e26b3939378044aa9e9bc33f02e4f"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classCurrencyUnit.html">CurrencyUnit</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrencyUnit.html#652ca28074ddeb812337a30237a86723">operator=</a> (const <a class="el" href="classCurrencyUnit.html">CurrencyUnit</a> &other)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Assignment operator. <a href="#652ca28074ddeb812337a30237a86723"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classUObject.html">UObject</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrencyUnit.html#9aafb257546a12ca287be31cdff9559b">clone</a> () const</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return a polymorphic clone of this object. <a href="#9aafb257546a12ca287be31cdff9559b"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrencyUnit.html#ce5ca87b4dcd3ba93f58f0b8edff189a">~CurrencyUnit</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#ce5ca87b4dcd3ba93f58f0b8edff189a"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrencyUnit.html#dd93ac56ca8b30c6dc7780a46a65a21d">operator==</a> (const <a class="el" href="classUObject.html">UObject</a> &other) const</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Equality operator. <a href="#dd93ac56ca8b30c6dc7780a46a65a21d"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="utypes_8h.html#22af10545208a455a6e884008df48e9f">UClassID</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrencyUnit.html#5ba719b6ed8f78900105fbc274092da9">getDynamicClassID</a> () const</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns a unique class ID for this object POLYMORPHICALLY. <a href="#5ba719b6ed8f78900105fbc274092da9"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const UChar * </td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrencyUnit.html#244761656c1884348abff9e115017168">getISOCurrency</a> () const</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the ISO currency code of this object. <a href="#244761656c1884348abff9e115017168"></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#22af10545208a455a6e884008df48e9f">UClassID</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classCurrencyUnit.html#45f3040e2094a74ad8caeed529d040cb">getStaticClassID</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the class ID for this class. <a href="#45f3040e2094a74ad8caeed529d040cb"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> A unit of currency, such as USD (U.S. <p> dollars) or JPY (Japanese yen). This class is a thin wrapper over a UChar string that subclasses <a class="el" href="classMeasureUnit.html">MeasureUnit</a>, for use with <a class="el" href="classMeasure.html">Measure</a> and <a class="el" href="classMeasureFormat.html">MeasureFormat</a>.<p> <dl class="author" compact><dt><b>Author:</b></dt><dd>Alan Liu </dd></dl> <dl compact><dt><b><a class="el" href="stable.html#_stable002179">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> <p> <p> Definition at line <a class="el" href="currunit_8h-source.html#l00035">35</a> of file <a class="el" href="currunit_8h-source.html">currunit.h</a>.<hr><h2>Constructor & Destructor Documentation</h2> <a class="anchor" name="730fd929c8fba95407996401a37fa9c2"></a><!-- doxytag: member="CurrencyUnit::CurrencyUnit" ref="730fd929c8fba95407996401a37fa9c2" args="(const UChar *isoCode, UErrorCode &ec)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">CurrencyUnit::CurrencyUnit </td> <td>(</td> <td class="paramtype">const UChar * </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#3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td> <td class="paramname"> <em>ec</em></td><td> </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 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>isoCode</em> </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> </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#_stable002180">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div><p> <a class="anchor" name="206e26b3939378044aa9e9bc33f02e4f"></a><!-- doxytag: member="CurrencyUnit::CurrencyUnit" ref="206e26b3939378044aa9e9bc33f02e4f" args="(const CurrencyUnit &other)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">CurrencyUnit::CurrencyUnit </td> <td>(</td> <td class="paramtype">const <a class="el" href="classCurrencyUnit.html">CurrencyUnit</a> & </td> <td class="paramname"> <em>other</em> </td> <td> ) </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#_stable002181">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div><p> <a class="anchor" name="ce5ca87b4dcd3ba93f58f0b8edff189a"></a><!-- doxytag: member="CurrencyUnit::~CurrencyUnit" ref="ce5ca87b4dcd3ba93f58f0b8edff189a" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual CurrencyUnit::~CurrencyUnit </td> <td>(</td> <td class="paramname"> </td> <td> ) </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#_stable002184">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div><p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="652ca28074ddeb812337a30237a86723"></a><!-- doxytag: member="CurrencyUnit::operator=" ref="652ca28074ddeb812337a30237a86723" args="(const CurrencyUnit &other)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classCurrencyUnit.html">CurrencyUnit</a>& CurrencyUnit::operator= </td> <td>(</td> <td class="paramtype">const <a class="el" href="classCurrencyUnit.html">CurrencyUnit</a> & </td> <td class="paramname"> <em>other</em> </td> <td> ) </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#_stable002182">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div><p> <a class="anchor" name="9aafb257546a12ca287be31cdff9559b"></a><!-- doxytag: member="CurrencyUnit::clone" ref="9aafb257546a12ca287be31cdff9559b" args="() const" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="classUObject.html">UObject</a>* CurrencyUnit::clone </td> <td>(</td> <td class="paramname"> </td> <td> ) </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="classCurrencyUnit.html#5ba719b6ed8f78900105fbc274092da9">getDynamicClassID()</a>. <dl compact><dt><b><a class="el" href="stable.html#_stable002183">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> <p> Implements <a class="el" href="classMeasureUnit.html#48b16451dce8b9f591855dcaadca1023">MeasureUnit</a>. </div> </div><p> <a class="anchor" name="dd93ac56ca8b30c6dc7780a46a65a21d"></a><!-- doxytag: member="CurrencyUnit::operator==" ref="dd93ac56ca8b30c6dc7780a46a65a21d" args="(const UObject &other) const" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> CurrencyUnit::operator== </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUObject.html">UObject</a> & </td> <td class="paramname"> <em>other</em> </td> <td> ) </td> <td width="100%"> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Equality operator. <p> Return true if this object is equal to the given object. <dl compact><dt><b><a class="el" href="stable.html#_stable002185">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> <p> Implements <a class="el" href="classMeasureUnit.html#a0c1bc87e7098dabf49a3a14d9b68a50">MeasureUnit</a>. </div> </div><p> <a class="anchor" name="5ba719b6ed8f78900105fbc274092da9"></a><!-- doxytag: member="CurrencyUnit::getDynamicClassID" ref="5ba719b6ed8f78900105fbc274092da9" args="() const" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="utypes_8h.html#22af10545208a455a6e884008df48e9f">UClassID</a> CurrencyUnit::getDynamicClassID </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 a unique class ID for this object POLYMORPHICALLY. <p> This method implements a simple form of RTTI used by ICU. <dl class="return" 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#_stable002186">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> <p> Implements <a class="el" href="classUObject.html#ce1dd31fb2c6f2c07dfebe8fd240ec37">UObject</a>. </div> </div><p> <a class="anchor" name="45f3040e2094a74ad8caeed529d040cb"></a><!-- doxytag: member="CurrencyUnit::getStaticClassID" ref="45f3040e2094a74ad8caeed529d040cb" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="utypes_8h.html#22af10545208a455a6e884008df48e9f">UClassID</a> CurrencyUnit::getStaticClassID </td> <td>(</td> <td class="paramname"> </td> <td> ) </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="classCurrencyUnit.html#5ba719b6ed8f78900105fbc274092da9">getDynamicClassID()</a>. <dl class="return" 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#_stable002187">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> </div> </div><p> <a class="anchor" name="244761656c1884348abff9e115017168"></a><!-- doxytag: member="CurrencyUnit::getISOCurrency" ref="244761656c1884348abff9e115017168" args="() const" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const UChar * CurrencyUnit::getISOCurrency </td> <td>(</td> <td class="paramname"> </td> <td> ) </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#_stable002188">Stable:</a></b></dt><dd>ICU 3.0 </dd></dl> <p> Definition at line <a class="el" href="currunit_8h-source.html#l00110">110</a> of file <a class="el" href="currunit_8h-source.html">currunit.h</a>. <p> Referenced by <a class="el" href="curramt_8h-source.html#l00123">CurrencyAmount::getISOCurrency()</a>. </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="currunit_8h-source.html">currunit.h</a></ul> <hr size="1"><address style="align: right;"><small>Generated on Fri Sep 14 12:59:39 2007 for ICU 3.8 by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address> </body> </html>