Sophie

Sophie

distrib > CentOS > 5 > i386 > by-pkgid > b9045fbd68b9dde72f144d2135c0d1f9 > files > 91

libicu-doc-3.6-5.16.1.i386.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>ICU 3.6: MessageFormat Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li id="current"><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
  </ul></div>
<h1>MessageFormat Class Reference</h1><!-- doxytag: class="MessageFormat" --><!-- doxytag: inherits="Format" -->A <a class="el" href="classMessageFormat.html">MessageFormat</a> produces concatenated messages in a language-neutral way.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="msgfmt_8h-source.html">msgfmt.h</a>&gt;</code>
<p>
<p>Inheritance diagram for MessageFormat:
<p><center><img src="classMessageFormat.png" usemap="#MessageFormat_map" border="0" alt=""></center>
<map name="MessageFormat_map">
<area href="classFormat.html" alt="Format" shape="rect" coords="0,112,102,136">
<area href="classUObject.html" alt="UObject" shape="rect" coords="0,56,102,80">
<area href="classUMemory.html" alt="UMemory" shape="rect" coords="0,0,102,24">
</map>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#3b02759e9345bba433598ca169fe26262c4649766d55fba1106595c70fab6a79">kMaxFormat</a> = 10</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The maximum number of arguments.  <a href="#3b02759e9345bba433598ca169fe26262c4649766d55fba1106595c70fab6a79"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#3b02759e9345bba433598ca169fe2626">EFormatNumber</a> { <a class="el" href="classMessageFormat.html#3b02759e9345bba433598ca169fe26262c4649766d55fba1106595c70fab6a79">kMaxFormat</a> =  10
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enum type for kMaxFormat.  <a href="classMessageFormat.html#3b02759e9345bba433598ca169fe2626">More...</a><br></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#9bd166332a223bf4f626bd4a23826da2">MessageFormat</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;pattern, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a new <a class="el" href="classMessageFormat.html">MessageFormat</a> using the given pattern and the default locale.  <a href="#9bd166332a223bf4f626bd4a23826da2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#09d0a688a0017c803eb903b5956de3a0">MessageFormat</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;pattern, const <a class="el" href="classLocale.html">Locale</a> &amp;newLocale, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a new <a class="el" href="classMessageFormat.html">MessageFormat</a> using the given pattern and locale.  <a href="#09d0a688a0017c803eb903b5956de3a0"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#df000f6a8019f6e9999d3df283688843">MessageFormat</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;pattern, const <a class="el" href="classLocale.html">Locale</a> &amp;newLocale, <a class="el" href="structUParseError.html">UParseError</a> &amp;parseError, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a new <a class="el" href="classMessageFormat.html">MessageFormat</a> using the given pattern and locale.  <a href="#df000f6a8019f6e9999d3df283688843"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#945eac8450aca382e2db73b7c3187249">MessageFormat</a> (const <a class="el" href="classMessageFormat.html">MessageFormat</a> &amp;)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs a new <a class="el" href="classMessageFormat.html">MessageFormat</a> from an existing one.  <a href="#945eac8450aca382e2db73b7c3187249"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classMessageFormat.html">MessageFormat</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#48e4814289b48723b11e7cd00df0be69">operator=</a> (const <a class="el" href="classMessageFormat.html">MessageFormat</a> &amp;)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assignment operator.  <a href="#48e4814289b48723b11e7cd00df0be69"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#37bc94ae7e3622880f9f79d58320796b">~MessageFormat</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#37bc94ae7e3622880f9f79d58320796b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classFormat.html">Format</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#be6a3b6d9e7e74b7586b4644e4ba001c">clone</a> (void) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clones this <a class="el" href="classFormat.html">Format</a> object polymorphically.  <a href="#be6a3b6d9e7e74b7586b4644e4ba001c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#26e0c92e8035193f110b578381611c02">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">Returns true if the given <a class="el" href="classFormat.html">Format</a> objects are semantically equal.  <a href="#26e0c92e8035193f110b578381611c02"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#5d403deba6c059ebd752d964ad49a7c1">setLocale</a> (const <a class="el" href="classLocale.html">Locale</a> &amp;theLocale)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the locale.  <a href="#5d403deba6c059ebd752d964ad49a7c1"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#422910b60d0e79cf37afa8a49418333b">getLocale</a> (void) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the locale.  <a href="#422910b60d0e79cf37afa8a49418333b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#ce3d4f8c18ba0b07aada0066efb9ab9d">applyPattern</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;pattern, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Applies the given pattern string to this message format.  <a href="#ce3d4f8c18ba0b07aada0066efb9ab9d"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#d5e44f1a945520eefade9b60350a3327">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#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Applies the given pattern string to this message format.  <a href="#d5e44f1a945520eefade9b60350a3327"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap 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="classMessageFormat.html#96ffcd9c8df9b1a4b9bf604faa51eef2">toPattern</a> (<a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;appendTo) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a pattern that can be used to recreate this object.  <a href="#96ffcd9c8df9b1a4b9bf604faa51eef2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#4322393c6960d0abbecb97e2d5db7032">adoptFormats</a> (<a class="el" href="classFormat.html">Format</a> **formatsToAdopt, <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> count)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets subformats.  <a href="#4322393c6960d0abbecb97e2d5db7032"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#7d51d28b509a3d1365b250be805556a8">setFormats</a> (const <a class="el" href="classFormat.html">Format</a> **newFormats, <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> cnt)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets subformats.  <a href="#7d51d28b509a3d1365b250be805556a8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#96f9fb97e9bc525197b39222aba74bcc">adoptFormat</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> formatNumber, <a class="el" href="classFormat.html">Format</a> *formatToAdopt)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets one subformat.  <a href="#96f9fb97e9bc525197b39222aba74bcc"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#16530e29c89c9a569d973b0e5f0fc598">setFormat</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> formatNumber, const <a class="el" href="classFormat.html">Format</a> &amp;format)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets one subformat.  <a href="#16530e29c89c9a569d973b0e5f0fc598"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classFormat.html">Format</a> **&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#e6fab4bde713f7c17f12c8a6dc9ce89b">getFormats</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> &amp;count) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets an array of subformats of this object.  <a href="#e6fab4bde713f7c17f12c8a6dc9ce89b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#c984e47d8f99db7f623bd60f856f8666">format</a> (const <a class="el" href="classFormattable.html">Formattable</a> *source, <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> count, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;ignore, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Formats the given array of arguments into a user-readable string.  <a href="#c984e47d8f99db7f623bd60f856f8666"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap 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="classMessageFormat.html#427aef9177f57f8c1fd37c3a3d157437">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#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Formats the given array of arguments into a user-readable string.  <a href="#427aef9177f57f8c1fd37c3a3d157437"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#7e78ae8192e0889a196b0b4ae86a3a6a">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#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Formats the given array of arguments into a user-readable string.  <a href="#7e78ae8192e0889a196b0b4ae86a3a6a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classFormattable.html">Formattable</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#d9f1ebf28e194700db6fef7c16009ea5">parse</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;source, <a class="el" href="classParsePosition.html">ParsePosition</a> &amp;pos, <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> &amp;count) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parses the given string into an array of output arguments.  <a href="#d9f1ebf28e194700db6fef7c16009ea5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classFormattable.html">Formattable</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#c4eeb461355c2d0f7c5a76c1d640eefd">parse</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;source, <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> &amp;count, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parses the given string into an array of output arguments.  <a href="#c4eeb461355c2d0f7c5a76c1d640eefd"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#53732066584f68579adf8bf91409217c">parseObject</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;source, <a class="el" href="classFormattable.html">Formattable</a> &amp;result, <a class="el" href="classParsePosition.html">ParsePosition</a> &amp;pos) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parses the given string into an array of output arguments stored within a single <a class="el" href="classFormattable.html">Formattable</a> of type kArray.  <a href="#53732066584f68579adf8bf91409217c"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="utypes_8h.html#22af10545208a455a6e884008df48e9f">UClassID</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#10a58c0715cac006dd4d05f1f1ad6eb2">getDynamicClassID</a> (void) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a unique class ID POLYMORPHICALLY.  <a href="#10a58c0715cac006dd4d05f1f1ad6eb2"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#44ac6c9d28fcc101ba8cfce3e9230871">format</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;pattern, const <a class="el" href="classFormattable.html">Formattable</a> *arguments, <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> count, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Formats the given array of arguments into a user-readable string using the given pattern.  <a href="#44ac6c9d28fcc101ba8cfce3e9230871"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#1649c7540f4789dbc2fd43bb251e3dd8">autoQuoteApostrophe</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;pattern, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convert an 'apostrophe-friendly' pattern into a standard pattern.  <a href="#1649c7540f4789dbc2fd43bb251e3dd8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="utypes_8h.html#22af10545208a455a6e884008df48e9f">UClassID</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#abdeb33d4de48799fe111a337d0684c6">getStaticClassID</a> (void)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the class ID for this class.  <a href="#abdeb33d4de48799fe111a337d0684c6"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="633236b616d8e67ea32f83ed52132aae"></a><!-- doxytag: member="MessageFormat::MessageFormatAdapter" ref="633236b616d8e67ea32f83ed52132aae" args="" -->
class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#633236b616d8e67ea32f83ed52132aae">MessageFormatAdapter</a></td></tr>

<tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><b>Subformat</b></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A <a class="el" href="classMessageFormat.html">MessageFormat</a> produces concatenated messages in a language-neutral way. 
<p>
It should be used for all string concatenations that are visible to end users. <p>
A <a class="el" href="classMessageFormat.html">MessageFormat</a> contains an array of <em>subformats</em> arranged within a <em>template string</em>. Together, the subformats and template string determine how the <a class="el" href="classMessageFormat.html">MessageFormat</a> will operate during formatting and parsing. <p>
Typically, both the subformats and the template string are specified at once in a <em>pattern</em>. By using different patterns for different locales, messages may be localized. <p>
During formatting, the <a class="el" href="classMessageFormat.html">MessageFormat</a> takes an array of arguments and produces a user-readable string. Each argument is a <a class="el" href="classFormattable.html">Formattable</a> object; they may be passed in in an array, or as a single <a class="el" href="classFormattable.html">Formattable</a> object which itself contains an array. Each argument is matched up with its corresponding subformat, which then formats it into a string. The resultant strings are then assembled within the string template of the <a class="el" href="classMessageFormat.html">MessageFormat</a> to produce the final output string. <p>
During parsing, an input string is matched against the string template of the <a class="el" href="classMessageFormat.html">MessageFormat</a> to produce an array of <a class="el" href="classFormattable.html">Formattable</a> objects. Plain text of the template string is matched directly against intput text. At each position in the template string where a subformat is located, the subformat is called to parse the corresponding segment of input text to produce an output argument. In this way, an array of arguments is created which together constitute the parse result. <p>
Parsing may fail or produce unexpected results in a number of circumstances. <ul>
<li>
If one of the arguments does not occur in the pattern, it will be returned as a default <a class="el" href="classFormattable.html">Formattable</a>. </li>
<li>
If the format of an argument is loses information, such as with a choice format where a large number formats to "many", then the parse may not correspond to the originally formatted argument. </li>
<li>
<a class="el" href="classMessageFormat.html">MessageFormat</a> does not handle <a class="el" href="classChoiceFormat.html">ChoiceFormat</a> recursion during parsing; such parses will fail. </li>
<li>
Parsing will not always find a match (or the correct match) if some part of the parse is ambiguous. For example, if the pattern "{1},{2}" is used with the string arguments {"a,b", "c"}, it will format as "a,b,c". When the result is parsed, it will return {"a", "b,c"}. </li>
<li>
If a single argument is formatted more than once in the string, then the rightmost subformat in the pattern string will produce the parse result; prior subformats with the same argument index will have no effect. </li>
</ul>
Here are some examples of usage: <p>
Example 1: <pre>
<div class="fragment"><pre class="fragment">     <a class="code" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> success = <a class="code" href="utypes_8h.html#3343c1c8a8377277046774691c98d78ca43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;
     <a class="code" href="classGregorianCalendar.html">GregorianCalendar</a> cal(success);
     <a class="code" href="classFormattable.html">Formattable</a> arguments[] = {
         7L,
         <a class="code" href="classFormattable.html">Formattable</a>( (Date) cal.getTime(success), Formattable::kIsDate),
         <span class="stringliteral">"a disturbance in the Force"</span>
     };

     <a class="code" href="classUnicodeString.html">UnicodeString</a> result;
     <a class="code" href="classMessageFormat.html#c984e47d8f99db7f623bd60f856f8666">MessageFormat::format</a>(
          <span class="stringliteral">"At {1,time} on {1,date}, there was {2} on planet {0,number}."</span>,
          arguments, 3, result, success );

     cout &lt;&lt; <span class="stringliteral">"result: "</span> &lt;&lt; result &lt;&lt; endl;
     <span class="comment">//&lt;output&gt;: At 4:34:20 PM on 23-Mar-98, there was a disturbance</span>
     <span class="comment">//             in the Force on planet 7.</span>
</pre></div>
 </pre> Typically, the message format will come from resources, and the arguments will be dynamically set at runtime. <p>
Example 2: <pre>
<div class="fragment"><pre class="fragment">     success = <a class="code" href="utypes_8h.html#3343c1c8a8377277046774691c98d78ca43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;
     <a class="code" href="classFormattable.html">Formattable</a> testArgs[] = {3L, <span class="stringliteral">"MyDisk"</span>};

     <a class="code" href="classMessageFormat.html">MessageFormat</a> form(
         <span class="stringliteral">"The disk \"{1}\" contains {0} file(s)."</span>, success );

     <a class="code" href="classUnicodeString.html">UnicodeString</a> string;
     <a class="code" href="classFieldPosition.html">FieldPosition</a> fpos = 0;
     cout &lt;&lt; <span class="stringliteral">"format: "</span> &lt;&lt; form.<a class="code" href="classNumberFormat.html#53e27d424735198566d90eb30401ec36">format</a>(testArgs, 2, string, fpos, success ) &lt;&lt; endl;

     <span class="comment">// output, with different testArgs:</span>
     <span class="comment">// output: The disk "MyDisk" contains 0 file(s).</span>
     <span class="comment">// output: The disk "MyDisk" contains 1 file(s).</span>
     <span class="comment">// output: The disk "MyDisk" contains 1,273 file(s).</span>
</pre></div>
  </pre><p>
The pattern is of the following form. Legend: <pre>
<div class="fragment"><pre class="fragment">       {optional item}
       (group that may be repeated)*
</pre></div>
  </pre> Do not confuse optional items with items inside quotes braces, such as this: "{". Quoted braces are literals. <pre>
<div class="fragment"><pre class="fragment">       messageFormatPattern := string ( <span class="stringliteral">"{"</span> messageFormatElement <span class="stringliteral">"}"</span> string )*

       messageFormatElement := argumentIndex { <span class="stringliteral">","</span> elementFormat }

       elementFormat := <span class="stringliteral">"time"</span> { <span class="stringliteral">","</span> datetimeStyle }
                      | <span class="stringliteral">"date"</span> { <span class="stringliteral">","</span> datetimeStyle }
                      | <span class="stringliteral">"number"</span> { <span class="stringliteral">","</span> numberStyle }
                      | <span class="stringliteral">"choice"</span> <span class="stringliteral">","</span> choiceStyle

       datetimeStyle := <span class="stringliteral">"short"</span>
                      | <span class="stringliteral">"medium"</span>
                      | <span class="stringliteral">"long"</span>
                      | <span class="stringliteral">"full"</span>
                      | dateFormatPattern

       numberStyle :=   <span class="stringliteral">"currency"</span>
                      | <span class="stringliteral">"percent"</span>
                      | <span class="stringliteral">"integer"</span>
                      | numberFormatPattern

       choiceStyle :=   choiceFormatPattern
</pre></div>
 </pre> If there is no elementFormat, then the argument must be a string, which is substituted. If there is no dateTimeStyle or numberStyle, then the default format is used (e.g. <a class="el" href="classNumberFormat.html#2483fa1e87f3600395ff0c8f364f7b6f">NumberFormat::createInstance()</a>, <a class="el" href="classDateFormat.html#bfd5a63e39e890a2ff07a5b15ec88a42">DateFormat::createTimeInstance</a>(DateFormat::kDefault, ...) or <a class="el" href="classDateFormat.html#4421ca0c8b71b078f3ab9433f5413380">DateFormat::createDateInstance</a>(DateFormat::kDefault, ...). For a <a class="el" href="classChoiceFormat.html">ChoiceFormat</a>, the pattern must always be specified, since there is no default. <p>
In strings, single quotes can be used to quote syntax characters. A literal single quote is represented by '', both within and outside of single-quoted segments. Inside a messageFormatElement, quotes are <em>not</em> removed. For example, {1,number,$'#',##} will produce a number format with the pound-sign quoted, with a result such as: "$#31,45". <p>
If a pattern is used, then unquoted braces in the pattern, if any, must match: that is, "ab {0} de" and "ab '}' de" are ok, but "ab {0'}' de" and "ab } de" are not. <p>
<dl>
<dt><b>Warning:</b></dt>
<dd>The rules for using quotes within message format patterns unfortunately have shown to be somewhat confusing. In particular, it isn't always obvious to localizers whether single quotes need to be doubled or not. Make sure to inform localizers about the rules, and tell them (for example, by using comments in resource bundle source files) which strings will be processed by <a class="el" href="classMessageFormat.html">MessageFormat</a>. Note that localizers may need to use single quotes in translated strings where the original version doesn't have them. <br>
Note also that the simplest way to avoid the problem is to use the real apostrophe (single quote) character U+2019 (') for human-readable text, and to use the ASCII apostrophe (U+0027 ' ) only in program syntax, like quoting in <a class="el" href="classMessageFormat.html">MessageFormat</a>. See the annotations for U+0027 Apostrophe in The Unicode Standard. </dd>
</dl>
<p>
The argumentIndex is a non-negative integer, which corresponds to the index of the arguments presented in an array to be formatted. The first argument has argumentIndex 0. <p>
It is acceptable to have unused arguments in the array. With missing arguments or arguments that are not of the right class for the specified format, a failing UErrorCode result is set. <p>
For more sophisticated patterns, you can use a <a class="el" href="classChoiceFormat.html">ChoiceFormat</a> to get output: <pre>
<div class="fragment"><pre class="fragment">     <a class="code" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> success = <a class="code" href="utypes_8h.html#3343c1c8a8377277046774691c98d78ca43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;
     <a class="code" href="classMessageFormat.html">MessageFormat</a>* form(<span class="stringliteral">"The disk \"{1}\" contains {0}."</span>, success);
     <span class="keywordtype">double</span> filelimits[] = {0,1,2};
     <a class="code" href="classUnicodeString.html">UnicodeString</a> filepart[] = {<span class="stringliteral">"no files"</span>,<span class="stringliteral">"one file"</span>,<span class="stringliteral">"{0,number} files"</span>};
     <a class="code" href="classChoiceFormat.html">ChoiceFormat</a>* fileform = <span class="keyword">new</span> <a class="code" href="classChoiceFormat.html">ChoiceFormat</a>(filelimits, filepart, 3);
     form.setFormat(1, *fileform); <span class="comment">// NOT zero, see below</span>

     <a class="code" href="classFormattable.html">Formattable</a> testArgs[] = {1273L, <span class="stringliteral">"MyDisk"</span>};

     <a class="code" href="classUnicodeString.html">UnicodeString</a> string;
     <a class="code" href="classFieldPosition.html">FieldPosition</a> fpos = 0;
     cout &lt;&lt; form.<a class="code" href="classNumberFormat.html#53e27d424735198566d90eb30401ec36">format</a>(testArgs, 2, string, fpos, success) &lt;&lt; endl;

     <span class="comment">// output, with different testArgs</span>
     <span class="comment">// output: The disk "MyDisk" contains no files.</span>
     <span class="comment">// output: The disk "MyDisk" contains one file.</span>
     <span class="comment">// output: The disk "MyDisk" contains 1,273 files.</span>
</pre></div>
 </pre> You can either do this programmatically, as in the above example, or by using a pattern (see <a class="el" href="classChoiceFormat.html">ChoiceFormat</a> for more information) as in: <pre>
<div class="fragment"><pre class="fragment">    form.applyPattern(
      <span class="stringliteral">"There {0,choice,0#are no files|1#is one file|1&lt;are {0,number,integer} files}."</span>);
</pre></div>
 </pre> <p>
<em>Note:</em> As we see above, the string produced by a <a class="el" href="classChoiceFormat.html">ChoiceFormat</a> in <a class="el" href="classMessageFormat.html">MessageFormat</a> is treated specially; occurences of '{' are used to indicated subformats, and cause recursion. If you create both a <a class="el" href="classMessageFormat.html">MessageFormat</a> and <a class="el" href="classChoiceFormat.html">ChoiceFormat</a> programmatically (instead of using the string patterns), then be careful not to produce a format that recurses on itself, which will cause an infinite loop. <p>
<em>Note:</em> Subformats are numbered by their order in the pattern. This is <em>not</em> the same as the argumentIndex. <pre>
<div class="fragment"><pre class="fragment">    For example: with <span class="stringliteral">"abc{2}def{3}ghi{0}..."</span>,

    format0 affects the first variable {2}
    format1 affects the second variable {3}
    format2 affects the second variable {0}
</pre></div>
 </pre><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="msgfmt_8h-source.html#l00267">267</a> of file <a class="el" href="msgfmt_8h-source.html">msgfmt.h</a>.<hr><h2>Member Enumeration Documentation</h2>
<a class="anchor" name="3b02759e9345bba433598ca169fe2626"></a><!-- doxytag: member="MessageFormat::EFormatNumber" ref="3b02759e9345bba433598ca169fe2626" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classMessageFormat.html#3b02759e9345bba433598ca169fe2626">MessageFormat::EFormatNumber</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Enum type for kMaxFormat. 
<p>
<dl compact><dt><b><a class="el" href="obsolete.html#_obsolete000002">Obsolete:</a></b></dt><dd>ICU 3.0. The 10-argument limit was removed as of ICU 2.6, rendering this enum type obsolete. </dd></dl>
<dl compact><dt><b>Enumerator: </b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" name="3b02759e9345bba433598ca169fe26262c4649766d55fba1106595c70fab6a79"></a><!-- doxytag: member="kMaxFormat" ref="3b02759e9345bba433598ca169fe26262c4649766d55fba1106595c70fab6a79" args="" -->kMaxFormat</em>&nbsp;</td><td>
The maximum number of arguments. 
<p>
<dl compact><dt><b><a class="el" href="obsolete.html#_obsolete000003">Obsolete:</a></b></dt><dd>ICU 3.0. The 10-argument limit was removed as of ICU 2.6, rendering this constant obsolete. </dd></dl>
</td></tr>
</table>
</dl>

<p>
Definition at line <a class="el" href="msgfmt_8h-source.html#l00274">274</a> of file <a class="el" href="msgfmt_8h-source.html">msgfmt.h</a>.
</div>
</div><p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="9bd166332a223bf4f626bd4a23826da2"></a><!-- doxytag: member="MessageFormat::MessageFormat" ref="9bd166332a223bf4f626bd4a23826da2" args="(const UnicodeString &amp;pattern, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">MessageFormat::MessageFormat           </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#3343c1c8a8377277046774691c98d78c">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 width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructs a new <a class="el" href="classMessageFormat.html">MessageFormat</a> using the given pattern and the default locale. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>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>Input/output error code. If the pattern cannot be parsed, set to failure code. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002284">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="09d0a688a0017c803eb903b5956de3a0"></a><!-- doxytag: member="MessageFormat::MessageFormat" ref="09d0a688a0017c803eb903b5956de3a0" args="(const UnicodeString &amp;pattern, const Locale &amp;newLocale, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">MessageFormat::MessageFormat           </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">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>newLocale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">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 width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructs a new <a class="el" href="classMessageFormat.html">MessageFormat</a> using the given pattern and locale. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>Pattern used to construct object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>newLocale</em>&nbsp;</td><td>The locale to use for formatting dates and numbers. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Input/output error code. If the pattern cannot be parsed, set to failure code. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002285">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="df000f6a8019f6e9999d3df283688843"></a><!-- doxytag: member="MessageFormat::MessageFormat" ref="df000f6a8019f6e9999d3df283688843" args="(const UnicodeString &amp;pattern, const Locale &amp;newLocale, UParseError &amp;parseError, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">MessageFormat::MessageFormat           </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">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>newLocale</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#3343c1c8a8377277046774691c98d78c">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 width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructs a new <a class="el" href="classMessageFormat.html">MessageFormat</a> using the given pattern and locale. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>Pattern used to construct object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>newLocale</em>&nbsp;</td><td>The locale to use for formatting dates and numbers. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parseError</em>&nbsp;</td><td>Struct to recieve information on position of error within the pattern. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Input/output error code. If the pattern cannot be parsed, set to failure code. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002286">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

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

<p>
Constructs a new <a class="el" href="classMessageFormat.html">MessageFormat</a> from an existing one. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable002287">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

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

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

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="96f9fb97e9bc525197b39222aba74bcc"></a><!-- doxytag: member="MessageFormat::adoptFormat" ref="96f9fb97e9bc525197b39222aba74bcc" args="(int32_t formatNumber, Format *formatToAdopt)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void MessageFormat::adoptFormat           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>formatNumber</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFormat.html">Format</a> *&nbsp;</td>
          <td class="paramname"> <em>formatToAdopt</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets one subformat. 
<p>
See the class description about format numbering. The caller should not delete the <a class="el" href="classFormat.html">Format</a> object after this call. If the number is over the number of formats already set, the item will be deleted and ignored. <dl compact><dt><b><a class="el" href="stable.html#_stable002299">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>formatNumber</em>&nbsp;</td><td>index of the subformat. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>formatToAdopt</em>&nbsp;</td><td>the format to be adopted. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="4322393c6960d0abbecb97e2d5db7032"></a><!-- doxytag: member="MessageFormat::adoptFormats" ref="4322393c6960d0abbecb97e2d5db7032" args="(Format **formatsToAdopt, int32_t count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void MessageFormat::adoptFormats           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classFormat.html">Format</a> **&nbsp;</td>
          <td class="paramname"> <em>formatsToAdopt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets subformats. 
<p>
See the class description about format numbering. The caller should not delete the <a class="el" href="classFormat.html">Format</a> objects after this call. <em>The array formatsToAdopt is not itself adopted.</em> Its ownership is retained by the caller. If the call fails because memory cannot be allocated, then the formats will be deleted by this method, and this object will remain unchanged.<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable002297">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>formatsToAdopt</em>&nbsp;</td><td>the format to be adopted. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>the size of the array. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="d5e44f1a945520eefade9b60350a3327"></a><!-- doxytag: member="MessageFormat::applyPattern" ref="d5e44f1a945520eefade9b60350a3327" 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 MessageFormat::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#3343c1c8a8377277046774691c98d78c">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 width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Applies the given pattern string to this message format. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>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 within pattern. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Input/output error code. If the pattern cannot be parsed, set to failure code. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002295">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="ce3d4f8c18ba0b07aada0066efb9ab9d"></a><!-- doxytag: member="MessageFormat::applyPattern" ref="ce3d4f8c18ba0b07aada0066efb9ab9d" args="(const UnicodeString &amp;pattern, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void MessageFormat::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#3343c1c8a8377277046774691c98d78c">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 width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Applies the given pattern string to this message format. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>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>Input/output error code. If the pattern cannot be parsed, set to failure code. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002294">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="1649c7540f4789dbc2fd43bb251e3dd8"></a><!-- doxytag: member="MessageFormat::autoQuoteApostrophe" ref="1649c7540f4789dbc2fd43bb251e3dd8" args="(const UnicodeString &amp;pattern, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classUnicodeString.html">UnicodeString</a> MessageFormat::autoQuoteApostrophe           </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#3343c1c8a8377277046774691c98d78c">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 width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Convert an 'apostrophe-friendly' pattern into a standard pattern. 
<p>
Standard patterns treat all apostrophes as quotes, which is problematic in some languages, e.g. French, where apostrophe is commonly used. This utility assumes that only an unpaired apostrophe immediately before a brace is a true quote. Other unpaired apostrophes are paired, and the resulting standard pattern string is returned.<p>
<b>Note</b> it is not guaranteed that the returned pattern is indeed a valid pattern. The only effect is to convert between patterns having different quoting semantics.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>the 'apostrophe-friendly' patttern to convert </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Input/output error code. If the pattern cannot be parsed, the failure code is set. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the standard equivalent of the original pattern </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002309">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="be6a3b6d9e7e74b7586b4644e4ba001c"></a><!-- doxytag: member="MessageFormat::clone" ref="be6a3b6d9e7e74b7586b4644e4ba001c" 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>* MessageFormat::clone           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Clones this <a class="el" href="classFormat.html">Format</a> object polymorphically. 
<p>
The caller owns the result and should delete it when done. <dl compact><dt><b><a class="el" href="stable.html#_stable002290">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Implements <a class="el" href="classFormat.html#4e7ebd5cfd390c35e2bda88257f8b51a">Format</a>.
</div>
</div><p>
<a class="anchor" name="7e78ae8192e0889a196b0b4ae86a3a6a"></a><!-- doxytag: member="MessageFormat::format" ref="7e78ae8192e0889a196b0b4ae86a3a6a" 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; MessageFormat::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#3343c1c8a8377277046774691c98d78c">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 width="100%"> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Formats the given array of arguments into a user-readable string. 
<p>
The array must be stored within a single <a class="el" href="classFormattable.html">Formattable</a> object of type kArray. If the <a class="el" href="classFormattable.html">Formattable</a> object type is not of type kArray, then returns a failing UErrorCode.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj</em>&nbsp;</td><td>The object to format </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>Input/output error code. If the pattern cannot be parsed, set to failure code. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002305">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Reimplemented from <a class="el" href="classFormat.html#f3f0b157f07d6e9f908da69c99239600">Format</a>.
<p>
Definition at line <a class="el" href="msgfmt_8h-source.html#l00818">818</a> of file <a class="el" href="msgfmt_8h-source.html">msgfmt.h</a>.
<p>
References <a class="el" href="classFormat.html#f3f0b157f07d6e9f908da69c99239600">Format::format()</a>.
</div>
</div><p>
<a class="anchor" name="427aef9177f57f8c1fd37c3a3d157437"></a><!-- doxytag: member="MessageFormat::format" ref="427aef9177f57f8c1fd37c3a3d157437" 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; MessageFormat::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#3343c1c8a8377277046774691c98d78c">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 width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Formats the given array of arguments into a user-readable string. 
<p>
The array must be stored within a single <a class="el" href="classFormattable.html">Formattable</a> object of type kArray. If the <a class="el" href="classFormattable.html">Formattable</a> object type is not of type kArray, then returns a failing UErrorCode.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj</em>&nbsp;</td><td>A <a class="el" href="classFormattable.html">Formattable</a> of type kArray containing arguments 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>Input/output error code. If the pattern cannot be parsed, set to failure code. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002304">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Implements <a class="el" href="classFormat.html#12ffb857c5c9a553270dfe9a71fbd8e9">Format</a>.
</div>
</div><p>
<a class="anchor" name="44ac6c9d28fcc101ba8cfce3e9230871"></a><!-- doxytag: member="MessageFormat::format" ref="44ac6c9d28fcc101ba8cfce3e9230871" args="(const UnicodeString &amp;pattern, const Formattable *arguments, int32_t count, UnicodeString &amp;appendTo, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; MessageFormat::format           </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">const <a class="el" href="classFormattable.html">Formattable</a> *&nbsp;</td>
          <td class="paramname"> <em>arguments</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>count</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#3343c1c8a8377277046774691c98d78c">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 width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Formats the given array of arguments into a user-readable string using the given pattern. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>The pattern. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>arguments</em>&nbsp;</td><td>An array of objects to be formatted. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>The number of elements of 'source'. </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>Input/output error code. If the pattern cannot be parsed, set to failure code. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002303">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="c984e47d8f99db7f623bd60f856f8666"></a><!-- doxytag: member="MessageFormat::format" ref="c984e47d8f99db7f623bd60f856f8666" args="(const Formattable *source, int32_t count, UnicodeString &amp;appendTo, FieldPosition &amp;ignore, 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; MessageFormat::format           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classFormattable.html">Formattable</a> *&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>count</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>ignore</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">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 width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Formats the given array of arguments into a user-readable string. 
<p>
Does not take ownership of the Formattable* array or its contents.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>An array of objects to be formatted. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>The number of elements of 'source'. </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>ignore</em>&nbsp;</td><td>Not used; inherited from base class API. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Input/output error code. If the pattern cannot be parsed, set to failure code. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002302">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="10a58c0715cac006dd4d05f1f1ad6eb2"></a><!-- doxytag: member="MessageFormat::getDynamicClassID" ref="10a58c0715cac006dd4d05f1f1ad6eb2" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="utypes_8h.html#22af10545208a455a6e884008df48e9f">UClassID</a> MessageFormat::getDynamicClassID           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns a unique class ID POLYMORPHICALLY. 
<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="classMessageFormat.html#26e0c92e8035193f110b578381611c02">operator==()</a> and <a class="el" href="classMessageFormat.html#be6a3b6d9e7e74b7586b4644e4ba001c">clone()</a> methods call this method.<p>
<dl compact><dt><b>Returns:</b></dt><dd>The class ID for this object. All objects of a given class have the same class ID. Objects of other classes have different class IDs. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002310">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Implements <a class="el" href="classFormat.html#c961d410d174518e5a3ebb8bbef45cd7">Format</a>.
</div>
</div><p>
<a class="anchor" name="e6fab4bde713f7c17f12c8a6dc9ce89b"></a><!-- doxytag: member="MessageFormat::getFormats" ref="e6fab4bde713f7c17f12c8a6dc9ce89b" 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="classFormat.html">Format</a>** MessageFormat::getFormats           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>count</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Gets an array of subformats of this object. 
<p>
The returned array should not be deleted by the caller, nor should the pointers within the array. The array and its contents remain valid only until the next call to any method of this class is made with this object. See the class description about format numbering. <dl compact><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>output parameter to receive the size of the array </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>an array of count Format* objects, or NULL if out of memory. Any or all of the array elements may be NULL. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002301">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="422910b60d0e79cf37afa8a49418333b"></a><!-- doxytag: member="MessageFormat::getLocale" ref="422910b60d0e79cf37afa8a49418333b" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="classLocale.html">Locale</a>&amp; MessageFormat::getLocale           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Gets the locale. 
<p>
This locale is used for fetching default number or date format information. <dl compact><dt><b>Returns:</b></dt><dd>the locale of the object. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002293">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="abdeb33d4de48799fe111a337d0684c6"></a><!-- doxytag: member="MessageFormat::getStaticClassID" ref="abdeb33d4de48799fe111a337d0684c6" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="utypes_8h.html#22af10545208a455a6e884008df48e9f">UClassID</a> MessageFormat::getStaticClassID           </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Return the class ID for this class. 
<p>
This is useful only for comparing to a return value from <a class="el" href="classMessageFormat.html#10a58c0715cac006dd4d05f1f1ad6eb2">getDynamicClassID()</a>. For example: <pre>
 .   Base* polymorphic_pointer = createPolymorphicObject();
 .   if (polymorphic_pointer-&gt;<a class="el" href="classMessageFormat.html#10a58c0715cac006dd4d05f1f1ad6eb2">getDynamicClassID()</a> ==
 .      Derived::getStaticClassID()) ...
 </pre> <dl compact><dt><b>Returns:</b></dt><dd>The class ID for all objects of this class. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002311">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

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

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

</div>
</div><p>
<a class="anchor" name="26e0c92e8035193f110b578381611c02"></a><!-- doxytag: member="MessageFormat::operator==" ref="26e0c92e8035193f110b578381611c02" 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#349ef00011f20ccd1d3b424445681aa5">UBool</a> MessageFormat::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 width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns true if the given <a class="el" href="classFormat.html">Format</a> objects are semantically equal. 
<p>
Objects of different subclasses are considered unequal. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>the object to be compared with. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>true if the given <a class="el" href="classFormat.html">Format</a> objects are semantically equal. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002291">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Implements <a class="el" href="classFormat.html#d9be7e8b7bef97013ff74ef1be3903a5">Format</a>.
</div>
</div><p>
<a class="anchor" name="c4eeb461355c2d0f7c5a76c1d640eefd"></a><!-- doxytag: member="MessageFormat::parse" ref="c4eeb461355c2d0f7c5a76c1d640eefd" args="(const UnicodeString &amp;source, int32_t &amp;count, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classFormattable.html">Formattable</a>* MessageFormat::parse           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>count</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">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 width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Parses the given string into an array of output arguments. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>String to be parsed. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>Output param to receive size of returned array. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Input/output error code. If the pattern cannot be parsed, set to failure code. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>an array of parsed arguments. The caller owns both the array and its contents. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002307">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="d9f1ebf28e194700db6fef7c16009ea5"></a><!-- doxytag: member="MessageFormat::parse" ref="d9f1ebf28e194700db6fef7c16009ea5" args="(const UnicodeString &amp;source, ParsePosition &amp;pos, int32_t &amp;count) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classFormattable.html">Formattable</a>* MessageFormat::parse           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>source</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>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Parses the given string into an array of output arguments. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>String to be parsed. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>On input, starting position for parse. On output, final position after parse. Unchanged if parse fails. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>Output parameter to receive the number of arguments parsed. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>an array of parsed arguments. The caller owns both the array and its contents. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002306">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="53732066584f68579adf8bf91409217c"></a><!-- doxytag: member="MessageFormat::parseObject" ref="53732066584f68579adf8bf91409217c" args="(const UnicodeString &amp;source, Formattable &amp;result, ParsePosition &amp;pos) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void MessageFormat::parseObject           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>source</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>pos</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Parses the given string into an array of output arguments stored within a single <a class="el" href="classFormattable.html">Formattable</a> of type kArray. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>The string to be parsed into an object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td><a class="el" href="classFormattable.html">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>pos</em>&nbsp;</td><td>On input, starting position for parse. On output, final position after parse. Unchanged if parse fails. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002308">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>
Implements <a class="el" href="classFormat.html#a53bea97b986c2f21e5638aa30aa08b7">Format</a>.
</div>
</div><p>
<a class="anchor" name="16530e29c89c9a569d973b0e5f0fc598"></a><!-- doxytag: member="MessageFormat::setFormat" ref="16530e29c89c9a569d973b0e5f0fc598" args="(int32_t formatNumber, const Format &amp;format)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void MessageFormat::setFormat           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>formatNumber</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classFormat.html">Format</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>format</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets one subformat. 
<p>
See the class description about format numbering. If the number is over the number of formats already set, the item will be ignored. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>formatNumber</em>&nbsp;</td><td>index of the subformat. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>format</em>&nbsp;</td><td>the format to be set. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002300">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="7d51d28b509a3d1365b250be805556a8"></a><!-- doxytag: member="MessageFormat::setFormats" ref="7d51d28b509a3d1365b250be805556a8" args="(const Format **newFormats, int32_t cnt)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void MessageFormat::setFormats           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classFormat.html">Format</a> **&nbsp;</td>
          <td class="paramname"> <em>newFormats</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td>
          <td class="paramname"> <em>cnt</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets subformats. 
<p>
See the class description about format numbering. Each item in the array is cloned into the internal array. If the call fails because memory cannot be allocated, then this object will remain unchanged.<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable002298">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>newFormats</em>&nbsp;</td><td>the new format to be set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>cnt</em>&nbsp;</td><td>the size of the array. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="5d403deba6c059ebd752d964ad49a7c1"></a><!-- doxytag: member="MessageFormat::setLocale" ref="5d403deba6c059ebd752d964ad49a7c1" args="(const Locale &amp;theLocale)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void MessageFormat::setLocale           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>theLocale</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the locale. 
<p>
This locale is used for fetching default number or date format information. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>theLocale</em>&nbsp;</td><td>the new locale value to be set. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002292">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div><p>
<a class="anchor" name="96ffcd9c8df9b1a4b9bf604faa51eef2"></a><!-- doxytag: member="MessageFormat::toPattern" ref="96ffcd9c8df9b1a4b9bf604faa51eef2" args="(UnicodeString &amp;appendTo) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; MessageFormat::toPattern           </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;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns a pattern that can be used to recreate this object. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>appendTo</em>&nbsp;</td><td>Output parameter to receive the pattern. Result is appended to existing contents. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable002296">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

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