Sophie

Sophie

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

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: ChoiceFormat 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>ChoiceFormat Class Reference</h1><!-- doxytag: class="ChoiceFormat" --><!-- doxytag: inherits="NumberFormat" -->
<p><a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a> converts between ranges of numeric values and string names for those ranges.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="choicfmt_8h_source.html">choicfmt.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for ChoiceFormat:</div>
<div class="dynsection">
 <div class="center">
  <img src="classChoiceFormat.gif" usemap="#ChoiceFormat_map" alt=""/>
  <map id="ChoiceFormat_map" name="ChoiceFormat_map">
<area href="classNumberFormat.html" alt="NumberFormat" shape="rect" coords="0,168,95,192"/>
<area href="classFormat.html" alt="Format" shape="rect" coords="0,112,95,136"/>
<area href="classUObject.html" alt="UObject" shape="rect" coords="0,56,95,80"/>
<area href="classUMemory.html" alt="UMemory" shape="rect" coords="0,0,95,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="classChoiceFormat.html#a9551b876e173743f214d1530368ee92d">ChoiceFormat</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;pattern, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct a new <a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a> with the limits and the corresponding formats based on the pattern.  <a href="#a9551b876e173743f214d1530368ee92d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#a5f097ff199910610ab5a5eb113e034e8">ChoiceFormat</a> (const double *limits, const <a class="el" href="classUnicodeString.html">UnicodeString</a> *formats, int32_t count)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct a new <a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a> with the given limits and formats.  <a href="#a5f097ff199910610ab5a5eb113e034e8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#a491cc4d24cbd4c42acebb158b1e04204">ChoiceFormat</a> (const double *limits, const <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> *closures, const <a class="el" href="classUnicodeString.html">UnicodeString</a> *formats, int32_t count)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct a new <a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a> with the given limits and formats.  <a href="#a491cc4d24cbd4c42acebb158b1e04204"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#aaac82d203aea4854d148eabe422a8b17">ChoiceFormat</a> (const <a class="el" href="classChoiceFormat.html">ChoiceFormat</a> &amp;that)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor.  <a href="#aaac82d203aea4854d148eabe422a8b17"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classChoiceFormat.html">ChoiceFormat</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#a2873dacc65a6fd80c8111711a6f0c3b4">operator=</a> (const <a class="el" href="classChoiceFormat.html">ChoiceFormat</a> &amp;that)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assignment operator.  <a href="#a2873dacc65a6fd80c8111711a6f0c3b4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#a13b14e531d655819e8f3ab2c10bf9cb5">~ChoiceFormat</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#a13b14e531d655819e8f3ab2c10bf9cb5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classFormat.html">Format</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#a3ebd2e04337baee2dbb8c7629592714d">clone</a> (void) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clone this <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> object polymorphically.  <a href="#a3ebd2e04337baee2dbb8c7629592714d"></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="classChoiceFormat.html#a68b2c94926681294a2fe0d1c7cf52975">operator==</a> (const <a class="el" href="classFormat.html">Format</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return true if the given <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> objects are semantically equal.  <a href="#a68b2c94926681294a2fe0d1c7cf52975"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#a9e558988f447da3af36ef7fc8245fb55">applyPattern</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;pattern, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the pattern.  <a href="#a9e558988f447da3af36ef7fc8245fb55"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#a01a7bc685dacb242a2cc12f502a88546">applyPattern</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;pattern, <a class="el" href="structUParseError.html">UParseError</a> &amp;parseError, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the pattern.  <a href="#a01a7bc685dacb242a2cc12f502a88546"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#a8a78bcd2a5d928a6e9fd29d5f95d86b1">toPattern</a> (<a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;pattern) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the pattern.  <a href="#a8a78bcd2a5d928a6e9fd29d5f95d86b1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#a5b737cf15cc825a52b7ef14b77a5b2b2">setChoices</a> (const double *limitsToCopy, const <a class="el" href="classUnicodeString.html">UnicodeString</a> *formatsToCopy, int32_t count)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the choices to be used in formatting.  <a href="#a5b737cf15cc825a52b7ef14b77a5b2b2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#a7a9bfd3b21d29c46ffce3329b2d96668">setChoices</a> (const double *limits, const <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> *closures, const <a class="el" href="classUnicodeString.html">UnicodeString</a> *formats, int32_t count)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the choices to be used in formatting.  <a href="#a7a9bfd3b21d29c46ffce3329b2d96668"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const double *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#afa32b852545c0ba36952df0b3a88b252">getLimits</a> (int32_t &amp;count) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the limits passed in the constructor.  <a href="#afa32b852545c0ba36952df0b3a88b252"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#a9966403f7f19dbb378921a417e033bb1">getClosures</a> (int32_t &amp;count) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the limit booleans passed in the constructor.  <a href="#a9966403f7f19dbb378921a417e033bb1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="classUnicodeString.html">UnicodeString</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#ac48619b6d0315ade9984e9b33ee86398">getFormats</a> (int32_t &amp;count) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the formats passed in the constructor.  <a href="#ac48619b6d0315ade9984e9b33ee86398"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#a3488103b67c452ace7cac7f6da452e72">format</a> (double number, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;pos) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> a double or long number using this object's choices.  <a href="#a3488103b67c452ace7cac7f6da452e72"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#a4c31ee3278dc0afb02e83127d4677161">format</a> (int32_t number, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;pos) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> a int_32t number using this object's choices.  <a href="#a4c31ee3278dc0afb02e83127d4677161"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#a066409675f3c1ec30237668f7e3a80f0">format</a> (int64_t number, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;pos) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> an int64_t number using this object's choices.  <a href="#a066409675f3c1ec30237668f7e3a80f0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#afd1964f35f534b3dc9aff6e13e37e6e1">format</a> (const <a class="el" href="classFormattable.html">Formattable</a> *objs, int32_t cnt, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;pos, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;success) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> an array of objects using this object's choices.  <a href="#afd1964f35f534b3dc9aff6e13e37e6e1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#a4282d9e61550d4abb84d5c6f1ce29f6f">format</a> (const <a class="el" href="classFormattable.html">Formattable</a> &amp;obj, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;pos, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> an object using this object's choices.  <a href="#a4282d9e61550d4abb84d5c6f1ce29f6f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#a1df3b8b4b32453583e6cef2aa74c5d97">format</a> (const <a class="el" href="classFormattable.html">Formattable</a> &amp;obj, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Redeclared <a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a> method.  <a href="#a1df3b8b4b32453583e6cef2aa74c5d97"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#af4a83c08f52e73d89efa3ae68b938e0d">format</a> (double number, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;appendTo) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Redeclared <a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a> method.  <a href="#af4a83c08f52e73d89efa3ae68b938e0d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#a5c48a05a17d3f3e33bd18d1674c90c66">format</a> (int32_t number, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;appendTo) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Redeclared <a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a> method.  <a href="#a5c48a05a17d3f3e33bd18d1674c90c66"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#af39ef720dd6a46678563da4f4f185bdd">parse</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;text, <a class="el" href="classFormattable.html">Formattable</a> &amp;result, <a class="el" href="classParsePosition.html">ParsePosition</a> &amp;parsePosition) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a long if possible (e.g.  <a href="#af39ef720dd6a46678563da4f4f185bdd"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#aa1d8199f4ac3743ffb19f9deec3648f9">parse</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;text, <a class="el" href="classFormattable.html">Formattable</a> &amp;result, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a long if possible (e.g.  <a href="#aa1d8199f4ac3743ffb19f9deec3648f9"></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="classChoiceFormat.html#a3bb9d296446885cca90a38e477ef5527">getDynamicClassID</a> (void) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a unique class ID POLYMORPHICALLY.  <a href="#a3bb9d296446885cca90a38e477ef5527"></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="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#adaeccf67d5eac282b6b3c4ccf020e9b5">getStaticClassID</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the class ID for this class.  <a href="#adaeccf67d5eac282b6b3c4ccf020e9b5"></a><br/></td></tr>
<tr><td colspan="2"><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a878637013842f94d9e8f7eb5ec0411b2"></a><!-- doxytag: member="ChoiceFormat::MessageFormat" ref="a878637013842f94d9e8f7eb5ec0411b2" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classChoiceFormat.html#a878637013842f94d9e8f7eb5ec0411b2">MessageFormat</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p><a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a> converts between ranges of numeric values and string names for those ranges. </p>
<p>A <code><a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a></code> splits the real number line <code>-Inf</code> to <code>+Inf</code> into two or more contiguous ranges. Each range is mapped to a string. <code><a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a></code> is generally used in a <code><a class="el" href="classMessageFormat.html" title="MessageFormat produces concatenated messages in a language-neutral way.">MessageFormat</a></code> for displaying grammatically correct plurals such as "There are 2 files."</p>
<p>There are two methods of defining a <code><a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a></code>; both are equivalent. The first is by using a string pattern. This is the preferred method in most cases. The second method is through direct specification of the arrays that make up the <code><a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a></code>.</p>
<p><b>Patterns</b></p>
<p>In most cases, the preferred way to define a <code><a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a></code> is with a pattern. Here is an example of a <code><a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a></code> pattern:</p>
 <pre>    0&#x2264;are no files|1&#x2264;is one file|1&lt;are many files</pre><p>or equivalently,</p>
 <pre>    0#are no files|1#is one file|1&lt;are many files</pre><p>The pattern consists of a number or <em>range specifiers</em> separated by vertical bars '|' (U+007C). There is no vertical bar after the last range. Each range specifier is of the form:</p>
 <blockquote><em>Number Separator String</em></blockquote><p><em>Number</em> is a floating point number that can be parsed by a default <code><a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a></code> for the US locale. It gives the lower limit of this range. The lower limit is either inclusive or exclusive, depending on the <em>separator</em>. The upper limit is given by the lower limit of the next range. The Unicode infinity sign  &#x221E  (U+221E) is recognized for positive infinity. It may be preceded by '-' (U+002D) to indicate negative infinity.</p>
<p><em>String</em> is the format string for this range, with special characters enclosed in single quotes (<code>'The # sign'</code>). Single quotes themselves are indicated by two single quotes in a row (<code>'o''clock'</code>).</p>
<p><em>Separator</em> is one of the following single characters:</p>
<ul>
<li>
 '&#x2264;'  (U+2264) or '#' (U+0023) indicates that the lower limit given by <em>Number</em> is inclusive. (The two characters are equivalent to <a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a>.) This means that the limit value <em>Number</em> belongs to this range. Another way of saying this is that the corresponding closure is <code>FALSE</code>.</p>
<p class="endli"></p>
</li>
<li>
'&lt;' (U+003C) indicates that the lower limit given by <em>Number</em> is exclusive. This means that the value <em>Number</em> belongs to the prior range. Another way of saying this is that the corresponding closure is <code>TRUE</code>. </li>
</ul>
<p>See below for more information about closures.</p>
<p><b>Arrays</b></p>
<p>A <code><a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a></code> defining <code>n</code> intervals (<code>n</code> &gt;= 2) is specified by three arrays of <code>n</code> items:</p>
<ul>
<li>
<code>double limits[]</code> gives the start of each interval. This must be a non-decreasing list of values, none of which may be <code>NaN</code>. </li>
<li>
<code>UBool closures[]</code> determines whether each limit value is contained in the interval below it or in the interval above it. If <code>closures[i]</code> is <code>FALSE</code>, then <code>limits[i]</code> is a member of interval <code>i</code>. Otherwise it is a member of interval <code>i+1</code>. If no closures array is specified, this is equivalent to having all closures be <code>FALSE</code>. Closures allow one to specify half-open, open, or closed intervals. </li>
<li>
<code><a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> formats[]</code> gives the string label associated with each interval. </li>
</ul>
<p><b>Formatting and Parsing</b></p>
<p>During formatting, a number is converted to a string. <code><a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a></code> accomplishes this by mapping the number to an interval using the following rule. Given a number <code>X</code> and and index value <code>j</code> in the range <code>0..n-1</code>, where <code>n</code> is the number of ranges:</p>
 <blockquote><code>X</code> matches <code>j</code> if and only if <code>limit[j] &lt;= X &lt; limit[j+1]</code>  </blockquote><p>(This assumes that all closures are <code>FALSE</code>. If some closures are <code>TRUE</code> then the relations must be changed to <code>&lt;=</code> or <code>&lt;</code> as appropriate.) If there is no match, then either the first or last index is used, depending on whether the number is too low or too high. Once a number is mapped to an interval <code>j</code>, the string <code>formats[j]</code> is output.</p>
<p>During parsing, a string is converted to a number. <code><a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a></code> finds the element <code>formats[j]</code> equal to the string, and returns <code>limits[j]</code> as the parsed value.</p>
<p><b>Notes</b></p>
<p>The first limit value does not define a range boundary. For example, in the pattern  &quot;<code>1.0#a|2.0#b</code>&quot;, the intervals are [-Inf, 2.0) and [2.0, +Inf]. It appears that the first interval should be [1.0, 2.0). However, since all values that are too small are mapped to range zero, the first interval is effectively [-Inf, 2.0). However, the first limit value <em>is</em> used during formatting. In this example, <code>parse("a")</code> returns 1.0.</p>
<p>There are no gaps between intervals and the entire number line is covered. A <code><a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a></code> maps <em>all</em> possible double values to a finite set of intervals.</p>
<p>The non-number <code>NaN</code> is mapped to interval zero during formatting.</p>
<p><b>Examples</b></p>
<p>Here is an example of two arrays that map the number <code>1..7</code> to the English day of the week abbreviations <code>Sun..Sat</code>. No closures array is given; this is the same as specifying all closures to be <code>FALSE</code>.</p>
<pre>    {1,2,3,4,5,6,7},
     {"Sun","Mon","Tue","Wed","Thur","Fri","Sat"}</pre><p>Here is an example that maps the ranges [-Inf, 1), [1, 1], and (1, +Inf] to three strings. That is, the number line is split into three ranges: x &lt; 1.0, x = 1.0, and x &gt; 1.0.</p>
<pre>    {0, 1, 1},
     {FALSE, FALSE, TRUE},
     {"no files", "one file", "many files"}</pre><p>Here is a simple example that shows formatting and parsing: </p>
<div class="fragment"><pre class="fragment"><span class="preprocessor">   #include &lt;<a class="code" href="choicfmt_8h.html" title="C++ API: Choice Format.">unicode/choicfmt.h</a>&gt;</span>
<span class="preprocessor">   #include &lt;<a class="code" href="unistr_8h.html" title="C++ API: Unicode String.">unicode/unistr.h</a>&gt;</span>
<span class="preprocessor">   #include &lt;iostream.h&gt;</span>

   <span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *argv[]) {
       <span class="keywordtype">double</span> limits[] = {1,2,3,4,5,6,7};
       <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> monthNames[] = {
           <span class="stringliteral">&quot;Sun&quot;</span>,<span class="stringliteral">&quot;Mon&quot;</span>,<span class="stringliteral">&quot;Tue&quot;</span>,<span class="stringliteral">&quot;Wed&quot;</span>,<span class="stringliteral">&quot;Thu&quot;</span>,<span class="stringliteral">&quot;Fri&quot;</span>,<span class="stringliteral">&quot;Sat&quot;</span>};
       <a class="code" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a> fmt(limits, monthNames, 7);
       <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> str;
       <span class="keywordtype">char</span> buf[256];
       <span class="keywordflow">for</span> (<span class="keywordtype">double</span> x = 1.0; x &lt;= 8.0; x += 1.0) {
           fmt.format(x, str);
           str.<a class="code" href="classUnicodeString.html#a9b2d4e417740becdb24a59fab263b8e3" title="Copy the characters in the range [start, start + length) into the array dst, beginning...">extract</a>(0, str.<a class="code" href="classUnicodeString.html#ac4cf80391a0e523c27aacaba796aede6" title="Return the length of the UnicodeString object.">length</a>(), buf, 256, <span class="stringliteral">&quot;&quot;</span>);
           str.<a class="code" href="classUnicodeString.html#ad8fe3cabef409468a11b77111de45ebc" title="Truncate this UnicodeString to the targetLength.">truncate</a>(0);
           cout &lt;&lt; x &lt;&lt; <span class="stringliteral">&quot; -&gt; &quot;</span>
                &lt;&lt; buf &lt;&lt; endl;
       }
       cout &lt;&lt; endl;
       <span class="keywordflow">return</span> 0;
   }
</pre></div><p>Here is a more complex example using a <code><a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a></code> constructed from a pattern together with a <code><a class="el" href="classMessageFormat.html" title="MessageFormat produces concatenated messages in a language-neutral way.">MessageFormat</a></code>.</p>
<div class="fragment"><pre class="fragment"><span class="preprocessor">   #include &lt;<a class="code" href="choicfmt_8h.html" title="C++ API: Choice Format.">unicode/choicfmt.h</a>&gt;</span>
<span class="preprocessor">   #include &lt;<a class="code" href="msgfmt_8h.html" title="C++ API: Formats messages in a language-neutral way.">unicode/msgfmt.h</a>&gt;</span>
<span class="preprocessor">   #include &lt;<a class="code" href="unistr_8h.html" title="C++ API: Unicode String.">unicode/unistr.h</a>&gt;</span>
<span class="preprocessor">   #include &lt;iostream.h&gt;</span>

   <span class="keywordtype">int</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> *argv[]) {
       <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a> status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9" title="No error, no warning.">U_ZERO_ERROR</a>;
       <span class="keywordtype">double</span> filelimits[] = {0,1,2};
       <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> filepart[] =
           {<span class="stringliteral">&quot;are no files&quot;</span>,<span class="stringliteral">&quot;is one file&quot;</span>,<span class="stringliteral">&quot;are {0} files&quot;</span>};
       <a class="code" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a>* fileform = <span class="keyword">new</span> <a class="code" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a>(filelimits, filepart, 3 );
       <a class="code" href="classFormat.html" title="Base class for all formats.">Format</a>* testFormats[] =
           {fileform, <a class="code" href="utypes_8h.html#a070d2ce7b6bb7e5c05602aa8c308d0c4" title="Define NULL if necessary, to 0 for C++ and to ((void *)0) for C.">NULL</a>, <a class="code" href="classNumberFormat.html#a2483fa1e87f3600395ff0c8f364f7b6f" title="Returns the default number format for the current default locale.">NumberFormat::createInstance</a>(status)};
       <a class="code" href="classMessageFormat.html" title="MessageFormat produces concatenated messages in a language-neutral way.">MessageFormat</a> pattform(<span class="stringliteral">&quot;There {0} on {1}&quot;</span>, status );
       pattform.adoptFormats(testFormats, 3);
       <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a> testArgs[] = {0L, <span class="stringliteral">&quot;Disk A&quot;</span>};
       <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a> fp(0);
       <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> str;
       <span class="keywordtype">char</span> buf[256];
       <span class="keywordflow">for</span> (int32_t i = 0; i &lt; 4; ++i) {
           <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a> fInt(i);
           testArgs[0] = fInt;
           pattform.format(testArgs, 2, str, fp, status );
           str.<a class="code" href="classUnicodeString.html#a9b2d4e417740becdb24a59fab263b8e3" title="Copy the characters in the range [start, start + length) into the array dst, beginning...">extract</a>(0, str.<a class="code" href="classUnicodeString.html#ac4cf80391a0e523c27aacaba796aede6" title="Return the length of the UnicodeString object.">length</a>(), buf, <span class="stringliteral">&quot;&quot;</span>);
           str.<a class="code" href="classUnicodeString.html#ad8fe3cabef409468a11b77111de45ebc" title="Truncate this UnicodeString to the targetLength.">truncate</a>(0);
           cout &lt;&lt; <span class="stringliteral">&quot;Output for i=&quot;</span> &lt;&lt; i &lt;&lt; <span class="stringliteral">&quot; : &quot;</span> &lt;&lt; buf &lt;&lt; endl;
       }
       cout &lt;&lt; endl;
       <span class="keywordflow">return</span> 0;
   }
</pre></div><p><em>User subclasses are not supported.</em> While clients may write subclasses, such code will not necessarily work and will not be guaranteed to work stably from release to release. </p>

<p>Definition at line <a class="el" href="choicfmt_8h_source.html#l00259">259</a> of file <a class="el" href="choicfmt_8h_source.html">choicfmt.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a9551b876e173743f214d1530368ee92d"></a><!-- doxytag: member="ChoiceFormat::ChoiceFormat" ref="a9551b876e173743f214d1530368ee92d" args="(const UnicodeString &amp;pattern, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ChoiceFormat::ChoiceFormat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pattern</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></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Construct a new <a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a> with the limits and the corresponding formats based on the pattern. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>Pattern used to construct object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Output param to receive success code. If the pattern cannot be parsed, set to failure code. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002233">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a5f097ff199910610ab5a5eb113e034e8"></a><!-- doxytag: member="ChoiceFormat::ChoiceFormat" ref="a5f097ff199910610ab5a5eb113e034e8" args="(const double *limits, const UnicodeString *formats, int32_t count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ChoiceFormat::ChoiceFormat </td>
          <td>(</td>
          <td class="paramtype">const double *&nbsp;</td>
          <td class="paramname"> <em>limits</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> *&nbsp;</td>
          <td class="paramname"> <em>formats</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Construct a new <a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a> with the given limits and formats. </p>
<p>Copy the limits and formats instead of adopting them.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>limits</em>&nbsp;</td><td>Array of limit values. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>formats</em>&nbsp;</td><td>Array of formats. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>Size of 'limits' and 'formats' arrays. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002234">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a491cc4d24cbd4c42acebb158b1e04204"></a><!-- doxytag: member="ChoiceFormat::ChoiceFormat" ref="a491cc4d24cbd4c42acebb158b1e04204" args="(const double *limits, const UBool *closures, const UnicodeString *formats, int32_t count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ChoiceFormat::ChoiceFormat </td>
          <td>(</td>
          <td class="paramtype">const double *&nbsp;</td>
          <td class="paramname"> <em>limits</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> *&nbsp;</td>
          <td class="paramname"> <em>closures</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> *&nbsp;</td>
          <td class="paramname"> <em>formats</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Construct a new <a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a> with the given limits and formats. </p>
<p>Copy the limits and formats (instead of adopting them). By default, each limit in the array specifies the inclusive lower bound of its range, and the exclusive upper bound of the previous range. However, if the isLimitOpen element corresponding to a limit is TRUE, then the limit is the exclusive lower bound of its range, and the inclusive upper bound of the previous range. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>limits</em>&nbsp;</td><td>Array of limit values </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>closures</em>&nbsp;</td><td>Array of booleans specifying whether each element of 'limits' is open or closed. If FALSE, then the corresponding limit is a member of the range above it. If TRUE, then the limit belongs to the range below it. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>formats</em>&nbsp;</td><td>Array of formats </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>Size of 'limits', 'closures', and 'formats' arrays </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002235">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

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

<p>Copy 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>that</em>&nbsp;</td><td><a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a> object to be copied from </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002236">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a13b14e531d655819e8f3ab2c10bf9cb5"></a><!-- doxytag: member="ChoiceFormat::~ChoiceFormat" ref="a13b14e531d655819e8f3ab2c10bf9cb5" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ChoiceFormat::~ChoiceFormat </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#_stable002238">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a01a7bc685dacb242a2cc12f502a88546"></a><!-- doxytag: member="ChoiceFormat::applyPattern" ref="a01a7bc685dacb242a2cc12f502a88546" args="(const UnicodeString &amp;pattern, UParseError &amp;parseError, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void ChoiceFormat::applyPattern </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUParseError.html">UParseError</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>parseError</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> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the pattern. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>The pattern to be applied. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parseError</em>&nbsp;</td><td>Struct to recieve information on position of error if an error is encountered </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. If the pattern is invalid, this will be set to a failure result. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002242">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a9e558988f447da3af36ef7fc8245fb55"></a><!-- doxytag: member="ChoiceFormat::applyPattern" ref="a9e558988f447da3af36ef7fc8245fb55" args="(const UnicodeString &amp;pattern, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void ChoiceFormat::applyPattern </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pattern</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> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the pattern. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>The pattern to be applied. </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. If the pattern is invalid, this will be set to a failure result. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002241">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a3ebd2e04337baee2dbb8c7629592714d"></a><!-- doxytag: member="ChoiceFormat::clone" ref="a3ebd2e04337baee2dbb8c7629592714d" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classFormat.html">Format</a>* ChoiceFormat::clone </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Clone this <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> object polymorphically. </p>
<p>The caller owns the result and should delete it when done.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>a copy of this object </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002239">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implements <a class="el" href="classFormat.html#a4e7ebd5cfd390c35e2bda88257f8b51a">Format</a>.</p>

</div>
</div>
<a class="anchor" id="a5c48a05a17d3f3e33bd18d1674c90c66"></a><!-- doxytag: member="ChoiceFormat::format" ref="a5c48a05a17d3f3e33bd18d1674c90c66" args="(int32_t number, UnicodeString &amp;appendTo) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp; ChoiceFormat::format </td>
          <td>(</td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>appendTo</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Redeclared <a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a> method. </p>
<p><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> a long number. These methods call the <a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a> pure virtual <a class="el" href="classChoiceFormat.html#a3488103b67c452ace7cac7f6da452e72" title="Format a double or long number using this object&#39;s choices.">format()</a> methods with the default <a class="el" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>.</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 value to be formatted. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>appendTo</em>&nbsp;</td><td>Output parameter to receive result. Result is appended to existing contents. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002256">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Reimplemented from <a class="el" href="classNumberFormat.html#aaa05c67fc637d9127756d854581a17fc">NumberFormat</a>.</p>

<p>Definition at line <a class="el" href="choicfmt_8h_source.html#l00740">740</a> of file <a class="el" href="choicfmt_8h_source.html">choicfmt.h</a>.</p>

<p>References <a class="el" href="classChoiceFormat.html#a3488103b67c452ace7cac7f6da452e72">format()</a>.</p>

</div>
</div>
<a class="anchor" id="af4a83c08f52e73d89efa3ae68b938e0d"></a><!-- doxytag: member="ChoiceFormat::format" ref="af4a83c08f52e73d89efa3ae68b938e0d" args="(double number, UnicodeString &amp;appendTo) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp; ChoiceFormat::format </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>appendTo</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Redeclared <a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a> method. </p>
<p><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> a double number. These methods call the <a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a> pure virtual <a class="el" href="classChoiceFormat.html#a3488103b67c452ace7cac7f6da452e72" title="Format a double or long number using this object&#39;s choices.">format()</a> methods with the default <a class="el" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>.</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 value to be formatted. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>appendTo</em>&nbsp;</td><td>Output parameter to receive result. Result is appended to existing contents. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002255">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Reimplemented from <a class="el" href="classNumberFormat.html#ad0d0bf658489e6a530a6c7716ef44320">NumberFormat</a>.</p>

<p>Definition at line <a class="el" href="choicfmt_8h_source.html#l00734">734</a> of file <a class="el" href="choicfmt_8h_source.html">choicfmt.h</a>.</p>

<p>References <a class="el" href="classChoiceFormat.html#a3488103b67c452ace7cac7f6da452e72">format()</a>.</p>

</div>
</div>
<a class="anchor" id="a1df3b8b4b32453583e6cef2aa74c5d97"></a><!-- doxytag: member="ChoiceFormat::format" ref="a1df3b8b4b32453583e6cef2aa74c5d97" args="(const Formattable &amp;obj, UnicodeString &amp;appendTo, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp; ChoiceFormat::format </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classFormattable.html">Formattable</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>appendTo</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> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Redeclared <a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a> method. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj</em>&nbsp;</td><td>The object to be formatted. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>appendTo</em>&nbsp;</td><td>Output parameter to receive result. Result is appended to existing contents. </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. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002254">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Reimplemented from <a class="el" href="classNumberFormat.html#a67d754f52d336d911454e97ba32654de">NumberFormat</a>.</p>

<p>Definition at line <a class="el" href="choicfmt_8h_source.html#l00725">725</a> of file <a class="el" href="choicfmt_8h_source.html">choicfmt.h</a>.</p>

<p>References <a class="el" href="classChoiceFormat.html#a3488103b67c452ace7cac7f6da452e72">format()</a>.</p>

</div>
</div>
<a class="anchor" id="a4282d9e61550d4abb84d5c6f1ce29f6f"></a><!-- doxytag: member="ChoiceFormat::format" ref="a4282d9e61550d4abb84d5c6f1ce29f6f" args="(const Formattable &amp;obj, UnicodeString &amp;appendTo, FieldPosition &amp;pos, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; ChoiceFormat::format </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classFormattable.html">Formattable</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>appendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pos</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> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> an object using this object's choices. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj</em>&nbsp;</td><td>The object to be formatted. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>appendTo</em>&nbsp;</td><td>Output parameter to receive result. Result is appended to existing contents. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>On input: an alignment field, if desired. On output: the offsets of the alignment field. </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. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002253">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Reimplemented from <a class="el" href="classNumberFormat.html#a53e27d424735198566d90eb30401ec36">NumberFormat</a>.</p>

</div>
</div>
<a class="anchor" id="afd1964f35f534b3dc9aff6e13e37e6e1"></a><!-- doxytag: member="ChoiceFormat::format" ref="afd1964f35f534b3dc9aff6e13e37e6e1" args="(const Formattable *objs, int32_t cnt, UnicodeString &amp;appendTo, FieldPosition &amp;pos, UErrorCode &amp;success) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; ChoiceFormat::format </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classFormattable.html">Formattable</a> *&nbsp;</td>
          <td class="paramname"> <em>objs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>cnt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>appendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pos</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>success</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> an array of objects using this object's choices. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>objs</em>&nbsp;</td><td>The array of objects to be formatted. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>cnt</em>&nbsp;</td><td>The size of objs. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>appendTo</em>&nbsp;</td><td>Output parameter to receive result. Result is appended to existing contents. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>On input: an alignment field, if desired. On output: the offsets of the alignment field. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>success</em>&nbsp;</td><td>Output param set to success/failure code on exit. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002252">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a066409675f3c1ec30237668f7e3a80f0"></a><!-- doxytag: member="ChoiceFormat::format" ref="a066409675f3c1ec30237668f7e3a80f0" args="(int64_t number, UnicodeString &amp;appendTo, FieldPosition &amp;pos) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; ChoiceFormat::format </td>
          <td>(</td>
          <td class="paramtype">int64_t&nbsp;</td>
          <td class="paramname"> <em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>appendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pos</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> an int64_t number using this object's choices. </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 value to be formatted. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>appendTo</em>&nbsp;</td><td>Output parameter to receive result. Result is appended to existing contents. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>On input: an alignment field, if desired. On output: the offsets of the alignment field. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002251">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

<p>Reimplemented from <a class="el" href="classNumberFormat.html#ac64ccd4841f822f601f2533e63e0592b">NumberFormat</a>.</p>

</div>
</div>
<a class="anchor" id="a4c31ee3278dc0afb02e83127d4677161"></a><!-- doxytag: member="ChoiceFormat::format" ref="a4c31ee3278dc0afb02e83127d4677161" args="(int32_t number, UnicodeString &amp;appendTo, FieldPosition &amp;pos) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; ChoiceFormat::format </td>
          <td>(</td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>appendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pos</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> a int_32t number using this object's choices. </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 value to be formatted. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>appendTo</em>&nbsp;</td><td>Output parameter to receive result. Result is appended to existing contents. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>On input: an alignment field, if desired. On output: the offsets of the alignment field. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002250">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implements <a class="el" href="classNumberFormat.html#acaaca11795df052b165e82261b7825f1">NumberFormat</a>.</p>

</div>
</div>
<a class="anchor" id="a3488103b67c452ace7cac7f6da452e72"></a><!-- doxytag: member="ChoiceFormat::format" ref="a3488103b67c452ace7cac7f6da452e72" args="(double number, UnicodeString &amp;appendTo, FieldPosition &amp;pos) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; ChoiceFormat::format </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>appendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pos</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> a double or long number using this object's choices. </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 value to be formatted. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>appendTo</em>&nbsp;</td><td>Output parameter to receive result. Result is appended to existing contents. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>On input: an alignment field, if desired. On output: the offsets of the alignment field. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002249">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implements <a class="el" href="classNumberFormat.html#a7078d52baaa94ddf6e0680a4bc2f542a">NumberFormat</a>.</p>

<p>Referenced by <a class="el" href="choicfmt_8h_source.html#l00725">format()</a>.</p>

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

<p>Get the limit booleans passed in the constructor. </p>
<p>The caller must not delete the result.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>The size of the arrays </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the closures </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002247">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a3bb9d296446885cca90a38e477ef5527"></a><!-- doxytag: member="ChoiceFormat::getDynamicClassID" ref="a3bb9d296446885cca90a38e477ef5527" args="(void) 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> ChoiceFormat::getDynamicClassID </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns a unique class ID POLYMORPHICALLY. </p>
<p>Pure virtual override. This method is to implement a simple version of RTTI, since not all C++ compilers support genuine RTTI. Polymorphic <a class="el" href="classChoiceFormat.html#a68b2c94926681294a2fe0d1c7cf52975" title="Return true if the given Format objects are semantically equal.">operator==()</a> and <a class="el" href="classChoiceFormat.html#a3ebd2e04337baee2dbb8c7629592714d" title="Clone this Format object polymorphically.">clone()</a> methods call this method.</p>
<dl class="return"><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 class="stable"><dt><b><a class="el" href="stable.html#_stable002259">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implements <a class="el" href="classNumberFormat.html#a63c193a4db6a1552073bf069d5d31749">NumberFormat</a>.</p>

</div>
</div>
<a class="anchor" id="ac48619b6d0315ade9984e9b33ee86398"></a><!-- doxytag: member="ChoiceFormat::getFormats" ref="ac48619b6d0315ade9984e9b33ee86398" args="(int32_t &amp;count) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="classUnicodeString.html">UnicodeString</a>* ChoiceFormat::getFormats </td>
          <td>(</td>
          <td class="paramtype">int32_t &amp;&nbsp;</td>
          <td class="paramname"> <em>count</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the formats passed in the 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>count</em>&nbsp;</td><td>The size of the arrays </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the formats. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002248">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="afa32b852545c0ba36952df0b3a88b252"></a><!-- doxytag: member="ChoiceFormat::getLimits" ref="afa32b852545c0ba36952df0b3a88b252" args="(int32_t &amp;count) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const double* ChoiceFormat::getLimits </td>
          <td>(</td>
          <td class="paramtype">int32_t &amp;&nbsp;</td>
          <td class="paramname"> <em>count</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the limits passed in the 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>count</em>&nbsp;</td><td>The size of the limits arrays </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the limits. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002246">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="adaeccf67d5eac282b6b3c4ccf020e9b5"></a><!-- doxytag: member="ChoiceFormat::getStaticClassID" ref="adaeccf67d5eac282b6b3c4ccf020e9b5" 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> ChoiceFormat::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>Return the class ID for this class. </p>
<p>This is useful only for comparing to a return value from <a class="el" href="classChoiceFormat.html#a3bb9d296446885cca90a38e477ef5527" title="Returns a unique class ID POLYMORPHICALLY.">getDynamicClassID()</a>. For example: </p>
<pre>
 .       Base* polymorphic_pointer = createPolymorphicObject();
 .       if (polymorphic_pointer-&gt;<a class="el" href="classChoiceFormat.html#a3bb9d296446885cca90a38e477ef5527" title="Returns a unique class ID POLYMORPHICALLY.">getDynamicClassID()</a> ==
 .           Derived::getStaticClassID()) ...
 </pre> <dl class="return"><dt><b>Returns:</b></dt><dd>The class ID for all objects of this class. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002260">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Reimplemented from <a class="el" href="classNumberFormat.html#acfeb8972959e9383b026761d0e9e1e5e">NumberFormat</a>.</p>

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

<p>Assignment operator. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>that</em>&nbsp;</td><td><a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a> object to be copied </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002237">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Reimplemented from <a class="el" href="classNumberFormat.html#a8b9d5c0937f4da69d9a229fd10f8ec38">NumberFormat</a>.</p>

</div>
</div>
<a class="anchor" id="a68b2c94926681294a2fe0d1c7cf52975"></a><!-- doxytag: member="ChoiceFormat::operator==" ref="a68b2c94926681294a2fe0d1c7cf52975" args="(const Format &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> ChoiceFormat::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classFormat.html">Format</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>Return true if the given <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> objects are semantically equal. </p>
<p>Objects of different subclasses are considered unequal.</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><a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a> object to be compared </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if other is the same as this. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002240">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Reimplemented from <a class="el" href="classNumberFormat.html#a97f4f81efd4747024deaf88ceb4d80a3">NumberFormat</a>.</p>

</div>
</div>
<a class="anchor" id="aa1d8199f4ac3743ffb19f9deec3648f9"></a><!-- doxytag: member="ChoiceFormat::parse" ref="aa1d8199f4ac3743ffb19f9deec3648f9" args="(const UnicodeString &amp;text, Formattable &amp;result, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void ChoiceFormat::parse </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFormattable.html">Formattable</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>result</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> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return a long if possible (e.g. </p>
<p>within range LONG_MAX, LONG_MAX], and with no decimals), otherwise a double. If IntegerOnly is set, will stop at a decimal point (or equivalent; e.g. for rational numbers "1 2/3", will stop after the 1). </p>
<p>If no object can be parsed, parsePosition is unchanged, and NULL is returned.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>The text to be parsed. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td><a class="el" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a> to be set to the parse result. If parse fails, return contents are undefined. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Output param with the formatted string. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classNumberFormat.html#a680f60d204c0d00bb06f65d7c3ea716a" title="Return true if this format will parse numbers as integers only.">NumberFormat::isParseIntegerOnly</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002258">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Reimplemented from <a class="el" href="classNumberFormat.html#a01ac6e0a7a47b2d8e387752d1a024b29">NumberFormat</a>.</p>

</div>
</div>
<a class="anchor" id="af39ef720dd6a46678563da4f4f185bdd"></a><!-- doxytag: member="ChoiceFormat::parse" ref="af39ef720dd6a46678563da4f4f185bdd" args="(const UnicodeString &amp;text, Formattable &amp;result, ParsePosition &amp;parsePosition) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void ChoiceFormat::parse </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFormattable.html">Formattable</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classParsePosition.html">ParsePosition</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>parsePosition</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return a long if possible (e.g. </p>
<p>within range LONG_MAX, LONG_MAX], and with no decimals), otherwise a double. If IntegerOnly is set, will stop at a decimal point (or equivalent; e.g. for rational numbers "1 2/3", will stop after the 1). </p>
<p>If no object can be parsed, parsePosition is unchanged, and NULL is returned.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>The text to be parsed. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td><a class="el" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a> to be set to the parse result. If parse fails, return contents are undefined. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parsePosition</em>&nbsp;</td><td>The position to start parsing at on input. On output, moved to after the last successfully parse character. On parse failure, does not change. </td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classNumberFormat.html#a680f60d204c0d00bb06f65d7c3ea716a" title="Return true if this format will parse numbers as integers only.">NumberFormat::isParseIntegerOnly</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002257">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implements <a class="el" href="classNumberFormat.html#ab2c59c0b036a413b6735c6d50b88ae25">NumberFormat</a>.</p>

</div>
</div>
<a class="anchor" id="a7a9bfd3b21d29c46ffce3329b2d96668"></a><!-- doxytag: member="ChoiceFormat::setChoices" ref="a7a9bfd3b21d29c46ffce3329b2d96668" args="(const double *limits, const UBool *closures, const UnicodeString *formats, int32_t count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void ChoiceFormat::setChoices </td>
          <td>(</td>
          <td class="paramtype">const double *&nbsp;</td>
          <td class="paramname"> <em>limits</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> *&nbsp;</td>
          <td class="paramname"> <em>closures</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> *&nbsp;</td>
          <td class="paramname"> <em>formats</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the choices to be used in formatting. </p>
<p>See class description for documenatation of the limits, closures, and formats arrays. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>limits</em>&nbsp;</td><td>Array of limits </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>closures</em>&nbsp;</td><td>Array of limit booleans </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>formats</em>&nbsp;</td><td>Array of format string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>The size of the above arrays </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002245">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a5b737cf15cc825a52b7ef14b77a5b2b2"></a><!-- doxytag: member="ChoiceFormat::setChoices" ref="a5b737cf15cc825a52b7ef14b77a5b2b2" args="(const double *limitsToCopy, const UnicodeString *formatsToCopy, int32_t count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void ChoiceFormat::setChoices </td>
          <td>(</td>
          <td class="paramtype">const double *&nbsp;</td>
          <td class="paramname"> <em>limitsToCopy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> *&nbsp;</td>
          <td class="paramname"> <em>formatsToCopy</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the choices to be used in formatting. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>limitsToCopy</em>&nbsp;</td><td>Contains the top value that you want parsed with that format,and should be in ascending sorted order. When formatting X, the choice will be the i, where limit[i] &lt;= X &lt; limit[i+1]. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>formatsToCopy</em>&nbsp;</td><td>The format strings you want to use for each limit. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>The size of the above arrays. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002244">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a8a78bcd2a5d928a6e9fd29d5f95d86b1"></a><!-- doxytag: member="ChoiceFormat::toPattern" ref="a8a78bcd2a5d928a6e9fd29d5f95d86b1" args="(UnicodeString &amp;pattern) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; ChoiceFormat::toPattern </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pattern</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the pattern. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>Output param which will recieve the pattern Previous contents are deleted. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>A reference to 'pattern' </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002243">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="choicfmt_8h_source.html">choicfmt.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>