Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > f51238514e2abe817779ad2fe01b0759 > files > 158

icu-doc-4.4-2.1mdv2010.2.i586.rpm

<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ICU 4.4: PluralRules Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Search" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&nbsp;Structure&nbsp;Index</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>
</div>
<div class="contents">
<h1>PluralRules Class Reference</h1><!-- doxytag: class="PluralRules" --><!-- doxytag: inherits="UObject" -->
<p>Defines rules for mapping positive long values onto a small set of keywords.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="plurrule_8h_source.html">plurrule.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for PluralRules:</div>
<div class="dynsection">
 <div class="center">
  <img src="classPluralRules.gif" usemap="#PluralRules_map" alt=""/>
  <map id="PluralRules_map" name="PluralRules_map">
<area href="classUObject.html" alt="UObject" shape="rect" coords="0,56,76,80"/>
<area href="classUMemory.html" alt="UMemory" shape="rect" coords="0,0,76,24"/>
</map>
 </div>
</div>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralRules.html#a6b32ab53f65942e15823e132f321a4b8">PluralRules</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor.  <a href="#a6b32ab53f65942e15823e132f321a4b8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralRules.html#ae490f4501e45cfd73d4d7fd4ccee1d08">PluralRules</a> (const <a class="el" href="classPluralRules.html">PluralRules</a> &amp;other)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor.  <a href="#ae490f4501e45cfd73d4d7fd4ccee1d08"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralRules.html#a95d1445d1f33367a0c5083bcb817940e">~PluralRules</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#a95d1445d1f33367a0c5083bcb817940e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classPluralRules.html">PluralRules</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralRules.html#a55946d0936860e17e5e5dd7bcdf2d169">clone</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clone.  <a href="#a55946d0936860e17e5e5dd7bcdf2d169"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classPluralRules.html">PluralRules</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralRules.html#aca0a4ab81aac9368b7c3c01d6f43ce43">operator=</a> (const <a class="el" href="classPluralRules.html">PluralRules</a> &amp;)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assignment operator.  <a href="#aca0a4ab81aac9368b7c3c01d6f43ce43"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralRules.html#a795c3aa81dae02077e5d9b8bc0c1f067">select</a> (int32_t number) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Given a number, returns the keyword of the first rule that applies to the number.  <a href="#a795c3aa81dae02077e5d9b8bc0c1f067"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralRules.html#a54348839619cdf54e1e94b8180cc72dd">select</a> (double number) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Given a number, returns the keyword of the first rule that applies to the number.  <a href="#a54348839619cdf54e1e94b8180cc72dd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classStringEnumeration.html">StringEnumeration</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralRules.html#acbdb208b3df25706fa8e2cc50e437192">getKeywords</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a list of all rule keywords used in this <code><a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a></code> object.  <a href="#acbdb208b3df25706fa8e2cc50e437192"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralRules.html#a5f9591d534c2075bd3a31c28041df437">isKeyword</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;keyword) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns TRUE if the given keyword is defined in this <code><a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a></code> object.  <a href="#a5f9591d534c2075bd3a31c28041df437"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralRules.html#abcea68fc5bee177e902049c0fb34df0d">getKeywordOther</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns keyword for default plural form.  <a href="#abcea68fc5bee177e902049c0fb34df0d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralRules.html#a0409c1c6f97a2086bb6b0b18deb47f1d">operator==</a> (const <a class="el" href="classPluralRules.html">PluralRules</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compares the equality of two <a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a> objects.  <a href="#a0409c1c6f97a2086bb6b0b18deb47f1d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralRules.html#a0584e7a2285e577782440de32e33e12c">operator!=</a> (const <a class="el" href="classPluralRules.html">PluralRules</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compares the inequality of two <a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a> objects.  <a href="#a0584e7a2285e577782440de32e33e12c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralRules.html#adcb38526674c5db9462ebbfa3650da03">getDynamicClassID</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">ICU "poor man's RTTI", returns a UClassID for the actual class.  <a href="#adcb38526674c5db9462ebbfa3650da03"></a><br/></td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classPluralRules.html">PluralRules</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralRules.html#aea9b12842f4357ad1a018da516aab499">createRules</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;description, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a <a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a> from a description if it is parsable, otherwise returns null.  <a href="#aea9b12842f4357ad1a018da516aab499"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classPluralRules.html">PluralRules</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralRules.html#ae462c8413dcbde39a6ef3495ce299102">createDefaultRules</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The default rules that accept any number.  <a href="#ae462c8413dcbde39a6ef3495ce299102"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classPluralRules.html">PluralRules</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralRules.html#ae24ef3c35b4769680b50b7aa171e11f4">forLocale</a> (const <a class="el" href="classLocale.html">Locale</a> &amp;locale, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Provides access to the predefined <code><a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a></code> for a given locale.  <a href="#ae24ef3c35b4769680b50b7aa171e11f4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralRules.html#ab889decdc97ff8219a9ec2dd5e1bf717">getStaticClassID</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">ICU "poor man's RTTI", returns a UClassID for this class.  <a href="#ab889decdc97ff8219a9ec2dd5e1bf717"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Defines rules for mapping positive long values onto a small set of keywords. </p>
<p>Rules are constructed from a text description, consisting of a series of keywords and conditions. The <a class="el" href="classPluralRules.html#a795c3aa81dae02077e5d9b8bc0c1f067">select</a> method examines each condition in order and returns the keyword for the first condition that matches the number. If none match, default rule(other) is returned.</p>
<p>Examples:</p>
<pre>
   "one: n is 1; few: n in 2..4"</pre><p> This defines two rules, for 'one' and 'few'. The condition for 'one' is "n is 1" which means that the number must be equal to 1 for this condition to pass. The condition for 'few' is "n in 2..4" which means that the number must be between 2 and 4 inclusive for this condition to pass. All other numbers are assigned the keyword "other" by the default rule. </p>
<pre>
    "zero: n is 0; one: n is 1; zero: n mod 100 in 1..19"</pre><p> This illustrates that the same keyword can be defined multiple times. Each rule is examined in order, and the first keyword whose condition passes is the one returned. Also notes that a modulus is applied to n in the last rule. Thus its condition holds for 119, 219, 319... </p>
<pre>
    "one: n is 1; few: n mod 10 in 2..4 and n mod 100 not in 12..14"</pre><p> This illustrates conjunction and negation. The condition for 'few' has two parts, both of which must be met: "n mod 10 in 2..4" and "n mod 100 not in 12..14". The first part applies a modulus to n before the test as in the previous example. The second part applies a different modulus and also uses negation, thus it matches all numbers _not_ in 12, 13, 14, 112, 113, 114, 212, 213, 214...  </p>
<p>Syntax:</p>
<pre>
 <div class="fragment"><pre class="fragment"> rules         = rule (<span class="charliteral">&apos;;&apos;</span> rule)*
 rule          = keyword <span class="charliteral">&apos;:&apos;</span> condition
 keyword       = &lt;identifier&gt;
 condition     = and_condition (<span class="stringliteral">&apos;or&apos;</span> and_condition)*
 and_condition = relation (<span class="stringliteral">&apos;and&apos;</span> relation)*
 relation      = is_relation | in_relation | within_relation | <span class="charliteral">&apos;n&apos;</span> &lt;EOL&gt;
 is_relation   = expr <span class="stringliteral">&apos;is&apos;</span> (<span class="stringliteral">&apos;not&apos;</span>)? value
 in_relation   = expr (<span class="stringliteral">&apos;not&apos;</span>)? <span class="stringliteral">&apos;in&apos;</span> range
 within_relation = expr (<span class="stringliteral">&apos;not&apos;</span>)? <span class="stringliteral">&apos;within&apos;</span> range
 expr          = <span class="charliteral">&apos;n&apos;</span> (<span class="stringliteral">&apos;mod&apos;</span> value)?
 value         = digit+
 digit         = 0|1|2|3|4|5|6|7|8|9
 range         = value<span class="stringliteral">&apos;..&apos;</span>value
</pre></div>
 </pre> <p>The difference between 'in' and 'within' is that 'in' only includes integers in the specified range, while 'within' includes all values. </p>
<p>Keywords could be defined by users or from ICU locale data. There are 6 predefined values in ICU - 'zero', 'one', 'two', 'few', 'many' and 'other'. Callers need to check the value of keyword returned by <a class="el" href="classPluralRules.html#a795c3aa81dae02077e5d9b8bc0c1f067">select</a> method. </p>
<p>Examples:</p>
<pre>
 <a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> keyword = pl-&gt;select(number);
 if (keyword== <a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>("one") {
     ...
 }
 else if ( ... )
 </pre> 
<p>Definition at line <a class="el" href="plurrule_8h_source.html#l00104">104</a> of file <a class="el" href="plurrule_8h_source.html">plurrule.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a6b32ab53f65942e15823e132f321a4b8"></a><!-- doxytag: member="PluralRules::PluralRules" ref="a6b32ab53f65942e15823e132f321a4b8" args="(UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PluralRules::PluralRules </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Output param set to success/failure code on exit, which must not indicate a failure before the function call.</td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002894">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ae490f4501e45cfd73d4d7fd4ccee1d08"></a><!-- doxytag: member="PluralRules::PluralRules" ref="ae490f4501e45cfd73d4d7fd4ccee1d08" args="(const PluralRules &amp;other)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PluralRules::PluralRules </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classPluralRules.html">PluralRules</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

</div>
</div>
<a class="anchor" id="a95d1445d1f33367a0c5083bcb817940e"></a><!-- doxytag: member="PluralRules::~PluralRules" ref="a95d1445d1f33367a0c5083bcb817940e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual PluralRules::~PluralRules </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a55946d0936860e17e5e5dd7bcdf2d169"></a><!-- doxytag: member="PluralRules::clone" ref="a55946d0936860e17e5e5dd7bcdf2d169" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classPluralRules.html">PluralRules</a>* PluralRules::clone </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Clone. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002897">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ae462c8413dcbde39a6ef3495ce299102"></a><!-- doxytag: member="PluralRules::createDefaultRules" ref="ae462c8413dcbde39a6ef3495ce299102" args="(UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classPluralRules.html">PluralRules</a>* PluralRules::createDefaultRules </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The default rules that accept any number. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>new <a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a> pointer. NULL if there is an error. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002900">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="aea9b12842f4357ad1a018da516aab499"></a><!-- doxytag: member="PluralRules::createRules" ref="aea9b12842f4357ad1a018da516aab499" args="(const UnicodeString &amp;description, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classPluralRules.html">PluralRules</a>* PluralRules::createRules </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>description</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a <a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a> from a description if it is parsable, otherwise returns null. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>description</em>&nbsp;</td><td>rule description </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>new <a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a> pointer. NULL if there is an error. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002899">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ae24ef3c35b4769680b50b7aa171e11f4"></a><!-- doxytag: member="PluralRules::forLocale" ref="ae24ef3c35b4769680b50b7aa171e11f4" args="(const Locale &amp;locale, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classPluralRules.html">PluralRules</a>* PluralRules::forLocale </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Provides access to the predefined <code><a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a></code> for a given locale. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>locale</em>&nbsp;</td><td>The locale for which a <code><a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a></code> object is returned. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The predefined <code><a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a></code> object pointer for this locale. If there's no predefined rules for this locale, the rules for the closest parent in the locale hierarchy that has one will be returned. The final fallback always returns the default 'other' rules. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002901">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="adcb38526674c5db9462ebbfa3650da03"></a><!-- doxytag: member="PluralRules::getDynamicClassID" ref="adcb38526674c5db9462ebbfa3650da03" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> PluralRules::getDynamicClassID </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>ICU "poor man's RTTI", returns a UClassID for the actual class. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002910">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

<p>Implements <a class="el" href="classUObject.html#a9b1acc95efd89cb86ec31f2dc947a262">UObject</a>.</p>

</div>
</div>
<a class="anchor" id="abcea68fc5bee177e902049c0fb34df0d"></a><!-- doxytag: member="PluralRules::getKeywordOther" ref="abcea68fc5bee177e902049c0fb34df0d" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a> PluralRules::getKeywordOther </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns keyword for default plural form. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>keyword for default plural form. </dd></dl>
<dl class="internal"><dt><b><a class="el" href="internal.html#_internal000326">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. 4.0 </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002906">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="acbdb208b3df25706fa8e2cc50e437192"></a><!-- doxytag: member="PluralRules::getKeywords" ref="acbdb208b3df25706fa8e2cc50e437192" args="(UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classStringEnumeration.html">StringEnumeration</a>* PluralRules::getKeywords </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns a list of all rule keywords used in this <code><a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a></code> object. </p>
<p>The rule 'other' is always present by default.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="classStringEnumeration.html" title="Base class for &#39;pure&#39; C++ implementations of uenum api.">StringEnumeration</a> with the keywords. The caller must delete the object. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002904">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ab889decdc97ff8219a9ec2dd5e1bf717"></a><!-- doxytag: member="PluralRules::getStaticClassID" ref="ab889decdc97ff8219a9ec2dd5e1bf717" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> PluralRules::getStaticClassID </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>ICU "poor man's RTTI", returns a UClassID for this class. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002909">Stable:</a></b></dt><dd>ICU 4.0</dd></dl>

</div>
</div>
<a class="anchor" id="a5f9591d534c2075bd3a31c28041df437"></a><!-- doxytag: member="PluralRules::isKeyword" ref="a5f9591d534c2075bd3a31c28041df437" args="(const UnicodeString &amp;keyword) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> PluralRules::isKeyword </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>keyword</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns TRUE if the given keyword is defined in this <code><a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a></code> object. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>keyword</em>&nbsp;</td><td>the input keyword. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>TRUE if the input keyword is defined. Otherwise, return FALSE. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002905">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a0584e7a2285e577782440de32e33e12c"></a><!-- doxytag: member="PluralRules::operator!=" ref="a0584e7a2285e577782440de32e33e12c" args="(const PluralRules &amp;other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> PluralRules::operator!= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classPluralRules.html">PluralRules</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Compares the inequality of two <a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a> objects. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>The <a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a> object to be compared with. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if the given <a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a> is not the same as this <a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a>; false otherwise. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002908">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

<p>Definition at line <a class="el" href="plurrule_8h_source.html#l00253">253</a> of file <a class="el" href="plurrule_8h_source.html">plurrule.h</a>.</p>

<p>References <a class="el" href="stringpiece_8h.html#a7652049cbac0bfeae2cd2aa4514a3352">operator==()</a>.</p>

</div>
</div>
<a class="anchor" id="aca0a4ab81aac9368b7c3c01d6f43ce43"></a><!-- doxytag: member="PluralRules::operator=" ref="aca0a4ab81aac9368b7c3c01d6f43ce43" args="(const PluralRules &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classPluralRules.html">PluralRules</a>&amp; PluralRules::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classPluralRules.html">PluralRules</a> &amp;&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

</div>
</div>
<a class="anchor" id="a0409c1c6f97a2086bb6b0b18deb47f1d"></a><!-- doxytag: member="PluralRules::operator==" ref="a0409c1c6f97a2086bb6b0b18deb47f1d" args="(const PluralRules &amp;other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> PluralRules::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classPluralRules.html">PluralRules</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Compares the equality of two <a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a> objects. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>The other <a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a> object to be compared with. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>True if the given <a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a> is the same as this <a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a>; false otherwise. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002907">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a54348839619cdf54e1e94b8180cc72dd"></a><!-- doxytag: member="PluralRules::select" ref="a54348839619cdf54e1e94b8180cc72dd" args="(double number) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a> PluralRules::select </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>number</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Given a number, returns the keyword of the first rule that applies to the number. </p>
<p>This function can be used with isKeyword* functions to determine the keyword for default plural rules.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>number</em>&nbsp;</td><td>The number for which the rule has to be determined. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The keyword of the selected rule. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002903">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a795c3aa81dae02077e5d9b8bc0c1f067"></a><!-- doxytag: member="PluralRules::select" ref="a795c3aa81dae02077e5d9b8bc0c1f067" args="(int32_t number) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a> PluralRules::select </td>
          <td>(</td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>number</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Given a number, returns the keyword of the first rule that applies to the number. </p>
<p>This function can be used with isKeyword* functions to determine the keyword for default plural rules.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>number</em>&nbsp;</td><td>The number for which the rule has to be determined. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The keyword of the selected rule. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002902">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="plurrule_8h_source.html">plurrule.h</a></li>
</ul>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr size="1"/><address style="text-align: right;"><small>Generated on 16 Mar 2010 for ICU 4.4 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>