Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-release > by-pkgid > 3a4e91bde08970529a0aa07935652fe8 > files > 114

icu-doc-58.2-3.mga6.noarch.rpm

<!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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ICU 58.2: icu::Format Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ICU 58.2
   &#160;<span id="projectnumber">58.2</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceicu.html">icu</a></li><li class="navelem"><a class="el" href="classicu_1_1Format.html">Format</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-static-methods">Static Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">icu::Format Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Base class for all formats.  
 <a href="classicu_1_1Format.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="format_8h_source.html">format.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for icu::Format:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classicu_1_1Format.png" usemap="#icu::Format_map" alt=""/>
  <map id="icu::Format_map" name="icu::Format_map">
<area href="classicu_1_1UObject.html" title="UObject is the common ICU &quot;boilerplate&quot; class. " alt="icu::UObject" shape="rect" coords="0,56,142,80"/>
<area href="classicu_1_1UMemory.html" title="UMemory is the common ICU base class. " alt="icu::UMemory" shape="rect" coords="0,0,142,24"/>
<area href="classicu_1_1DateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter..." alt="icu::DateFormat" shape="rect" coords="152,168,294,192"/>
<area href="classicu_1_1DateIntervalFormat.html" title="DateIntervalFormat is a class for formatting and parsing date intervals in a language-independent man..." alt="icu::DateIntervalFormat" shape="rect" coords="152,224,294,248"/>
<area href="classicu_1_1MeasureFormat.html" title="A formatter for measure objects. " alt="icu::MeasureFormat" shape="rect" coords="152,280,294,304"/>
<area href="classicu_1_1MessageFormat.html" alt="icu::MessageFormat" shape="rect" coords="152,336,294,360"/>
<area href="classicu_1_1NumberFormat.html" title="Abstract base class for all number formats. " alt="icu::NumberFormat" shape="rect" coords="152,392,294,416"/>
<area href="classicu_1_1PluralFormat.html" alt="icu::PluralFormat" shape="rect" coords="152,448,294,472"/>
<area href="classicu_1_1SelectFormat.html" alt="icu::SelectFormat" shape="rect" coords="152,504,294,528"/>
<area href="classicu_1_1TimeZoneFormat.html" title="TimeZoneFormat supports time zone display name formatting and parsing. " alt="icu::TimeZoneFormat" shape="rect" coords="152,560,294,584"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab5b0d091d165c5576af62b3ee246058a"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#ab5b0d091d165c5576af62b3ee246058a">~Format</a> ()</td></tr>
<tr class="memdesc:ab5b0d091d165c5576af62b3ee246058a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#ab5b0d091d165c5576af62b3ee246058a">More...</a><br /></td></tr>
<tr class="separator:ab5b0d091d165c5576af62b3ee246058a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2db8f1097b03f3660d329752370bdf7"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#ab2db8f1097b03f3660d329752370bdf7">operator==</a> (const <a class="el" href="classicu_1_1Format.html">Format</a> &amp;other) const =0</td></tr>
<tr class="memdesc:ab2db8f1097b03f3660d329752370bdf7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if the given <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> objects are semantically equal.  <a href="#ab2db8f1097b03f3660d329752370bdf7">More...</a><br /></td></tr>
<tr class="separator:ab2db8f1097b03f3660d329752370bdf7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6805569ed12cf68e0e8359dadcbe9b1c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a6805569ed12cf68e0e8359dadcbe9b1c">operator!=</a> (const <a class="el" href="classicu_1_1Format.html">Format</a> &amp;other) const </td></tr>
<tr class="memdesc:a6805569ed12cf68e0e8359dadcbe9b1c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return true if the given <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> objects are not semantically equal.  <a href="#a6805569ed12cf68e0e8359dadcbe9b1c">More...</a><br /></td></tr>
<tr class="separator:a6805569ed12cf68e0e8359dadcbe9b1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad606fa4ed45908fe4220085c6276c65a"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classicu_1_1Format.html">Format</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#ad606fa4ed45908fe4220085c6276c65a">clone</a> () const =0</td></tr>
<tr class="memdesc:ad606fa4ed45908fe4220085c6276c65a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clone this object polymorphically.  <a href="#ad606fa4ed45908fe4220085c6276c65a">More...</a><br /></td></tr>
<tr class="separator:ad606fa4ed45908fe4220085c6276c65a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab510bded8f13465d98b950db03f15297"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#ab510bded8f13465d98b950db03f15297">format</a> (const <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &amp;obj, <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr class="memdesc:ab510bded8f13465d98b950db03f15297"><td class="mdescLeft">&#160;</td><td class="mdescRight">Formats an object to produce a string.  <a href="#ab510bded8f13465d98b950db03f15297">More...</a><br /></td></tr>
<tr class="separator:ab510bded8f13465d98b950db03f15297"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68fb0a8875645f7ab11bb5230c03c212"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a68fb0a8875645f7ab11bb5230c03c212">format</a> (const <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &amp;obj, <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="classicu_1_1FieldPosition.html">FieldPosition</a> &amp;pos, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const =0</td></tr>
<tr class="memdesc:a68fb0a8875645f7ab11bb5230c03c212"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> an object to produce a string.  <a href="#a68fb0a8875645f7ab11bb5230c03c212">More...</a><br /></td></tr>
<tr class="separator:a68fb0a8875645f7ab11bb5230c03c212"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a24241eabda236878b4f93395ca5218"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a3a24241eabda236878b4f93395ca5218">format</a> (const <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &amp;obj, <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="classicu_1_1FieldPositionIterator.html">FieldPositionIterator</a> *posIter, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr class="memdesc:a3a24241eabda236878b4f93395ca5218"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> an object to produce a string.  <a href="#a3a24241eabda236878b4f93395ca5218">More...</a><br /></td></tr>
<tr class="separator:a3a24241eabda236878b4f93395ca5218"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a292d797eb9d3bc8a42d8d8efba119a83"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a292d797eb9d3bc8a42d8d8efba119a83">parseObject</a> (const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;source, <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &amp;result, <a class="el" href="classicu_1_1ParsePosition.html">ParsePosition</a> &amp;parse_pos) const =0</td></tr>
<tr class="memdesc:a292d797eb9d3bc8a42d8d8efba119a83"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parse a string to produce an object.  <a href="#a292d797eb9d3bc8a42d8d8efba119a83">More...</a><br /></td></tr>
<tr class="separator:a292d797eb9d3bc8a42d8d8efba119a83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14835811eb14a1826b8529704de07bbf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a14835811eb14a1826b8529704de07bbf">parseObject</a> (const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;source, <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &amp;result, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr class="memdesc:a14835811eb14a1826b8529704de07bbf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses a string to produce an object.  <a href="#a14835811eb14a1826b8529704de07bbf">More...</a><br /></td></tr>
<tr class="separator:a14835811eb14a1826b8529704de07bbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5064d4b46b3f5882fb339960089bf87e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1Locale.html">Locale</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a5064d4b46b3f5882fb339960089bf87e">getLocale</a> (<a class="el" href="uloc_8h.html#adf053345d343f8d82ae080f7a5871f34">ULocDataLocaleType</a> type, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr class="memdesc:a5064d4b46b3f5882fb339960089bf87e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the locale for this format object.  <a href="#a5064d4b46b3f5882fb339960089bf87e">More...</a><br /></td></tr>
<tr class="separator:a5064d4b46b3f5882fb339960089bf87e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b0f21f3e3f6cc3ed196af5e6559b421"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a1b0f21f3e3f6cc3ed196af5e6559b421">getLocaleID</a> (<a class="el" href="uloc_8h.html#adf053345d343f8d82ae080f7a5871f34">ULocDataLocaleType</a> type, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr class="memdesc:a1b0f21f3e3f6cc3ed196af5e6559b421"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the locale for this format object.  <a href="#a1b0f21f3e3f6cc3ed196af5e6559b421">More...</a><br /></td></tr>
<tr class="separator:a1b0f21f3e3f6cc3ed196af5e6559b421"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classicu_1_1UObject"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classicu_1_1UObject')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classicu_1_1UObject.html">icu::UObject</a></td></tr>
<tr class="memitem:af10026497704f510d3d1f2eff50acb18 inherit pub_methods_classicu_1_1UObject"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1UObject.html#af10026497704f510d3d1f2eff50acb18">~UObject</a> ()</td></tr>
<tr class="memdesc:af10026497704f510d3d1f2eff50acb18 inherit pub_methods_classicu_1_1UObject"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#af10026497704f510d3d1f2eff50acb18">More...</a><br /></td></tr>
<tr class="separator:af10026497704f510d3d1f2eff50acb18 inherit pub_methods_classicu_1_1UObject"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1aa93096e880907080b503ff1fb0f8bc inherit pub_methods_classicu_1_1UObject"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="uobject_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1UObject.html#a1aa93096e880907080b503ff1fb0f8bc">getDynamicClassID</a> () const </td></tr>
<tr class="memdesc:a1aa93096e880907080b503ff1fb0f8bc inherit pub_methods_classicu_1_1UObject"><td class="mdescLeft">&#160;</td><td class="mdescRight">ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.  <a href="#a1aa93096e880907080b503ff1fb0f8bc">More...</a><br /></td></tr>
<tr class="separator:a1aa93096e880907080b503ff1fb0f8bc inherit pub_methods_classicu_1_1UObject"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a9c316525df8bdb422d3e73f0eb9a2a32"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a9c316525df8bdb422d3e73f0eb9a2a32">setLocaleIDs</a> (const char *valid, const char *actual)</td></tr>
<tr class="separator:a9c316525df8bdb422d3e73f0eb9a2a32"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e673e9e040598bace20c25a2261b845"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a0e673e9e040598bace20c25a2261b845">Format</a> ()</td></tr>
<tr class="memdesc:a0e673e9e040598bace20c25a2261b845"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor for subclass use only.  <a href="#a0e673e9e040598bace20c25a2261b845">More...</a><br /></td></tr>
<tr class="separator:a0e673e9e040598bace20c25a2261b845"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2747bab62f7164f3c1556c044502df6e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a2747bab62f7164f3c1556c044502df6e">Format</a> (const <a class="el" href="classicu_1_1Format.html">Format</a> &amp;)</td></tr>
<tr class="separator:a2747bab62f7164f3c1556c044502df6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e4a4f6e5eedfe8d949e9307191a3afc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1Format.html">Format</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a6e4a4f6e5eedfe8d949e9307191a3afc">operator=</a> (const <a class="el" href="classicu_1_1Format.html">Format</a> &amp;)</td></tr>
<tr class="separator:a6e4a4f6e5eedfe8d949e9307191a3afc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-static-methods"></a>
Static Protected Member Functions</h2></td></tr>
<tr class="memitem:a4667230f833245c55ba081c163d8bb71"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a4667230f833245c55ba081c163d8bb71">syntaxError</a> (const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;pattern, int32_t pos, <a class="el" href="structUParseError.html">UParseError</a> &amp;parseError)</td></tr>
<tr class="memdesc:a4667230f833245c55ba081c163d8bb71"><td class="mdescLeft">&#160;</td><td class="mdescRight">Simple function for initializing a <a class="el" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors. ">UParseError</a> from a <a class="el" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a>.  <a href="#a4667230f833245c55ba081c163d8bb71">More...</a><br /></td></tr>
<tr class="separator:a4667230f833245c55ba081c163d8bb71"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Base class for all formats. </p>
<p>This is an abstract base class which specifies the protocol for classes which convert other objects or values, such as numeric values and dates, and their string representations. In some cases these representations may be localized or contain localized characters or strings. For example, a numeric formatter such as <a class="el" href="classicu_1_1DecimalFormat.html" title="DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers. ">DecimalFormat</a> may convert a numeric value such as 12345 to the string "$12,345". It may also parse the string back into a numeric value. A date and time formatter like <a class="el" href="classicu_1_1SimpleDateFormat.html" title="SimpleDateFormat is a concrete class for formatting and parsing dates in a language-independent manne...">SimpleDateFormat</a> may represent a specific date, encoded numerically, as a string such as "Wednesday, February 26, 1997 AD". </p>
<p>Many of the concrete subclasses of <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> employ the notion of a pattern. A pattern is a string representation of the rules which govern the interconversion between values and strings. For example, a <a class="el" href="classicu_1_1DecimalFormat.html" title="DecimalFormat is a concrete subclass of NumberFormat that formats decimal numbers. ">DecimalFormat</a> object may be associated with the pattern "$#,##0.00;($#,##0.00)", which is a common US English format for currency values, yielding strings such as "$1,234.45" for 1234.45, and "($987.65)" for 987.6543. The specific syntax of a pattern is defined by each subclass. </p>
<p>Even though many subclasses use patterns, the notion of a pattern is not inherent to <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> classes in general, and is not part of the explicit base class protocol. </p>
<p>Two complex formatting classes bear mentioning. These are <a class="el" href="classicu_1_1MessageFormat.html">MessageFormat</a> and <a class="el" href="classicu_1_1ChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and strings for those ranges. ">ChoiceFormat</a>. <a class="el" href="classicu_1_1ChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and strings for those ranges. ">ChoiceFormat</a> is a subclass of <a class="el" href="classicu_1_1NumberFormat.html" title="Abstract base class for all number formats. ">NumberFormat</a> which allows the user to format different number ranges as strings. For instance, 0 may be represented as "no files", 1 as "one file", and any number greater than 1 as "many files". <a class="el" href="classicu_1_1MessageFormat.html">MessageFormat</a> is a formatter which utilizes other <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> objects to format a string containing with multiple values. For instance, A <a class="el" href="classicu_1_1MessageFormat.html">MessageFormat</a> object might produce the string "There are no files
on the disk MyDisk on February 27, 1997." given the arguments 0, "MyDisk", and the date value of 2/27/97. See the <a class="el" href="classicu_1_1ChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and strings for those ranges. ">ChoiceFormat</a> and <a class="el" href="classicu_1_1MessageFormat.html">MessageFormat</a> headers for further information. </p>
<p>If formatting is unsuccessful, a failing UErrorCode is returned when the <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> cannot format the type of object, otherwise if there is something illformed about the the Unicode replacement character 0xFFFD is returned. </p>
<p>If there is no match when parsing, a parse failure UErrorCode is retured for methods which take no <a class="el" href="classicu_1_1ParsePosition.html" title="ParsePosition is a simple class used by Format and its subclasses to keep track of the current positi...">ParsePosition</a>. For the method that takes a <a class="el" href="classicu_1_1ParsePosition.html" title="ParsePosition is a simple class used by Format and its subclasses to keep track of the current positi...">ParsePosition</a>, the index parameter is left unchanged. </p>
<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="format_8h_source.html#l00096">96</a> of file <a class="el" href="format_8h_source.html">format.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ab5b0d091d165c5576af62b3ee246058a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual icu::Format::~Format </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

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

</div>
</div>
<a class="anchor" id="a0e673e9e040598bace20c25a2261b845"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">icu::Format::Format </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default constructor for subclass use only. </p>
<p>Does nothing. </p><dl class="stable"><dt><b><a class="el" href="stable.html#_stable003670">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a2747bab62f7164f3c1556c044502df6e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">icu::Format::Format </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1Format.html">Format</a> &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003671">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ad606fa4ed45908fe4220085c6276c65a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classicu_1_1Format.html">Format</a>* icu::Format::clone </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Clone this object polymorphically. </p>
<p>The caller is responsible for deleting the result when done. </p><dl class="section return"><dt>Returns</dt><dd>A copy of the object </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003662">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implemented in <a class="el" href="classicu_1_1DecimalFormat.html#a149b9ec1447f08f2364953b84c1972e6">icu::DecimalFormat</a>, <a class="el" href="classicu_1_1SimpleDateFormat.html#ae04034c22b93cb56fd31a7e9b291b2be">icu::SimpleDateFormat</a>, <a class="el" href="classicu_1_1RuleBasedNumberFormat.html#a4d9b235eb3f90d3754f1237ef4a558f1">icu::RuleBasedNumberFormat</a>, <a class="el" href="classicu_1_1PluralFormat.html#af254f7c8e92992877bb8717641478d68">icu::PluralFormat</a>, <a class="el" href="classicu_1_1MessageFormat.html#ad17094511b3f742cfa7ed8513c38e4a3">icu::MessageFormat</a>, <a class="el" href="classicu_1_1DateIntervalFormat.html#ad7bae778642a3f39981953089e25a4d2">icu::DateIntervalFormat</a>, <a class="el" href="classicu_1_1TimeZoneFormat.html#a2a393f5350ae01f97c858e82570c12da">icu::TimeZoneFormat</a>, <a class="el" href="classicu_1_1SelectFormat.html#ac0d5ac30c66f1afaddbc819a197c8ed5">icu::SelectFormat</a>, <a class="el" href="classicu_1_1ChoiceFormat.html#a6efe9e99784490504d9aa1b07c53ba4c">icu::ChoiceFormat</a>, <a class="el" href="classicu_1_1MeasureFormat.html#a958450ed0ae2e017961a95f5b42b960e">icu::MeasureFormat</a>, <a class="el" href="classicu_1_1TimeUnitFormat.html#ae8cb2d782de67cceaa9b44fb70a870c1">icu::TimeUnitFormat</a>, and <a class="el" href="classicu_1_1CompactDecimalFormat.html#a2fd95f43a6d5e9effd8c50c295040940">icu::CompactDecimalFormat</a>.</p>

<p>Referenced by <a class="el" href="msgfmt_8h_source.html#l00480">icu::MessageFormat::getApostropheMode()</a>.</p>

</div>
</div>
<a class="anchor" id="ab510bded8f13465d98b950db03f15297"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a>&amp; icu::Format::format </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &amp;&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</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;&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Formats an object to produce a string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">obj</td><td>The object to format. </td></tr>
    <tr><td class="paramname">appendTo</td><td>Output parameter to receive result. Result is appended to existing contents. </td></tr>
    <tr><td class="paramname">status</td><td>Output parameter filled in with success or failure status. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003663">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Referenced by <a class="el" href="msgfmt_8h_source.html#l00480">icu::MessageFormat::getApostropheMode()</a>.</p>

</div>
</div>
<a class="anchor" id="a68fb0a8875645f7ab11bb5230c03c212"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a>&amp; icu::Format::format </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &amp;&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td>
          <td class="paramname"><em>appendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classicu_1_1FieldPosition.html">FieldPosition</a> &amp;&#160;</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;&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> an object to produce a string. </p>
<p>This is a pure virtual method which subclasses must implement. This method allows polymorphic formatting of <a class="el" href="classicu_1_1Formattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> objects. If a subclass of <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> receives a <a class="el" href="classicu_1_1Formattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> object type it doesn't handle (e.g., if a numeric <a class="el" href="classicu_1_1Formattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> is passed to a <a class="el" href="classicu_1_1DateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a> object) then it returns a failing UErrorCode.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">obj</td><td>The object to format. </td></tr>
    <tr><td class="paramname">appendTo</td><td>Output parameter to receive result. Result is appended to existing contents. </td></tr>
    <tr><td class="paramname">pos</td><td>On input: an alignment field, if desired. On output: the offsets of the alignment field. </td></tr>
    <tr><td class="paramname">status</td><td>Output param filled with success/failure status. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003664">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implemented in <a class="el" href="classicu_1_1MessageFormat.html#a455648202a7266100b4588e90da2e244">icu::MessageFormat</a>, <a class="el" href="classicu_1_1TimeZoneFormat.html#af2ef1089f5f5692ab923adaa7c48b040">icu::TimeZoneFormat</a>, <a class="el" href="classicu_1_1PluralFormat.html#afd9d35881d35dc8db644779476aa0e26">icu::PluralFormat</a>, <a class="el" href="classicu_1_1DateIntervalFormat.html#a1c03d0aa3227b576da283a3ca03e3477">icu::DateIntervalFormat</a>, <a class="el" href="classicu_1_1SelectFormat.html#a7b404fc3bc40f72fa1c44f094bcd7833">icu::SelectFormat</a>, <a class="el" href="classicu_1_1NumberFormat.html#ae6be6e14d00006754826d00095777e8e">icu::NumberFormat</a>, <a class="el" href="classicu_1_1DateFormat.html#a620a647dcf9ea97d7383ee1efaf182d1">icu::DateFormat</a>, and <a class="el" href="classicu_1_1MeasureFormat.html#ad50456cd4cde0245cc9adc1588c732d1">icu::MeasureFormat</a>.</p>

</div>
</div>
<a class="anchor" id="a3a24241eabda236878b4f93395ca5218"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a>&amp; icu::Format::format </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &amp;&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td>
          <td class="paramname"><em>appendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classicu_1_1FieldPositionIterator.html">FieldPositionIterator</a> *&#160;</td>
          <td class="paramname"><em>posIter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> an object to produce a string. </p>
<p>Subclasses should override this method. This method allows polymorphic formatting of <a class="el" href="classicu_1_1Formattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> objects. If a subclass of <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> receives a <a class="el" href="classicu_1_1Formattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> object type it doesn't handle (e.g., if a numeric <a class="el" href="classicu_1_1Formattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> is passed to a <a class="el" href="classicu_1_1DateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times from their inter...">DateFormat</a> object) then it returns a failing UErrorCode.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">obj</td><td>The object to format. </td></tr>
    <tr><td class="paramname">appendTo</td><td>Output parameter to receive result. Result is appended to existing contents. </td></tr>
    <tr><td class="paramname">posIter</td><td>On return, can be used to iterate over positions of fields generated by this format call. </td></tr>
    <tr><td class="paramname">status</td><td>Output param filled with success/failure status. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003665">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>

<p>Reimplemented in <a class="el" href="classicu_1_1NumberFormat.html#a7c916314a96365eb4098b5524b290917">icu::NumberFormat</a>, and <a class="el" href="classicu_1_1DateFormat.html#ae731e34df69969aef4a2aa6a0550935b">icu::DateFormat</a>.</p>

</div>
</div>
<a class="anchor" id="a5064d4b46b3f5882fb339960089bf87e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classicu_1_1Locale.html">Locale</a> icu::Format::getLocale </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uloc_8h.html#adf053345d343f8d82ae080f7a5871f34">ULocDataLocaleType</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the locale for this format object. </p>
<p>You can choose between valid and actual locale. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>type of the locale we're looking for (valid or actual) </td></tr>
    <tr><td class="paramname">status</td><td>error code for the operation </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the locale </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003668">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

</div>
</div>
<a class="anchor" id="a1b0f21f3e3f6cc3ed196af5e6559b421"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* icu::Format::getLocaleID </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uloc_8h.html#adf053345d343f8d82ae080f7a5871f34">ULocDataLocaleType</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the locale for this format object. </p>
<p>You can choose between valid and actual locale. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>type of the locale we're looking for (valid or actual) </td></tr>
    <tr><td class="paramname">status</td><td>error code for the operation </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the locale </dd></dl>
<dl class="internal"><dt><b><a class="el" href="internal.html#_internal000355">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. </dd></dl>

</div>
</div>
<a class="anchor" id="a6805569ed12cf68e0e8359dadcbe9b1c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> icu::Format::operator!= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1Format.html">Format</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return true if the given <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> objects are not semantically equal. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">other</td><td>the object to be compared with. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Return true if the given <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> objects are not semantically. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003661">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Definition at line <a class="el" href="format_8h_source.html#l00121">121</a> of file <a class="el" href="format_8h_source.html">format.h</a>.</p>

<p>References <a class="el" href="namespaceicu.html#a1c2f6ca43e636f38d1a3291eb851e9f0">icu::operator==()</a>, <a class="el" href="uversion_8h_source.html#l00132">U_NAMESPACE_END</a>, and <a class="el" href="uloc_8h_source.html#l00264">ULOC_FULLNAME_CAPACITY</a>.</p>

</div>
</div>
<a class="anchor" id="a6e4a4f6e5eedfe8d949e9307191a3afc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classicu_1_1Format.html">Format</a>&amp; icu::Format::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1Format.html">Format</a> &amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003672">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ab2db8f1097b03f3660d329752370bdf7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> icu::Format::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1Format.html">Format</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return true if the given <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> objects are semantically equal. </p>
<p>Objects of different subclasses are considered unequal. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">other</td><td>the object to be compared with. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Return true if the given <a class="el" href="classicu_1_1Format.html" title="Base class for all formats. ">Format</a> objects are semantically equal. Objects of different subclasses are considered unequal. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003660">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implemented in <a class="el" href="classicu_1_1DecimalFormat.html#a0ebd97b14ab1ee0f70bdcfe9f34f934b">icu::DecimalFormat</a>, <a class="el" href="classicu_1_1SimpleDateFormat.html#a43717234d8d874f3d125dfb8c4abe95a">icu::SimpleDateFormat</a>, <a class="el" href="classicu_1_1RuleBasedNumberFormat.html#a9573d8c4d9bae042f8c52876a284c19a">icu::RuleBasedNumberFormat</a>, <a class="el" href="classicu_1_1PluralFormat.html#a1aec2634099cc21c235ea5243b4bc2cf">icu::PluralFormat</a>, <a class="el" href="classicu_1_1MessageFormat.html#a4b2aa5a7cb29b975fc5b178cd72e6619">icu::MessageFormat</a>, <a class="el" href="classicu_1_1DateIntervalFormat.html#aa035d3ea07ce9bcb6c4802147826f7bb">icu::DateIntervalFormat</a>, <a class="el" href="classicu_1_1TimeZoneFormat.html#a011c6c10f278241ef85b87d04a4d8ba8">icu::TimeZoneFormat</a>, <a class="el" href="classicu_1_1ChoiceFormat.html#a83f0f73a2b9a50ebc160eced5710eba6">icu::ChoiceFormat</a>, <a class="el" href="classicu_1_1SelectFormat.html#a172ae1af1a4d018e26f9de58e91c3575">icu::SelectFormat</a>, <a class="el" href="classicu_1_1NumberFormat.html#a2768f0c60212a8187f5e9fcf7972ada9">icu::NumberFormat</a>, <a class="el" href="classicu_1_1DateFormat.html#a134c773a4c043ad20575fa7059e4e178">icu::DateFormat</a>, <a class="el" href="classicu_1_1MeasureFormat.html#a8e6bc4619c1a597ebeb06c9c5d36d331">icu::MeasureFormat</a>, and <a class="el" href="classicu_1_1CompactDecimalFormat.html#a04d421d5b6179b770ac93223403174a7">icu::CompactDecimalFormat</a>.</p>

<p>Referenced by <a class="el" href="msgfmt_8h_source.html#l00480">icu::MessageFormat::getApostropheMode()</a>.</p>

</div>
</div>
<a class="anchor" id="a292d797eb9d3bc8a42d8d8efba119a83"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void icu::Format::parseObject </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classicu_1_1Formattable.html">Formattable</a> &amp;&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classicu_1_1ParsePosition.html">ParsePosition</a> &amp;&#160;</td>
          <td class="paramname"><em>parse_pos</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Parse a string to produce an object. </p>
<p>This is a pure virtual method which subclasses must implement. This method allows polymorphic parsing of strings into <a class="el" href="classicu_1_1Formattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> objects. </p>
<p>Before calling, set parse_pos.index to the offset you want to start parsing at in the source. After calling, parse_pos.index is the end of the text you parsed. If error occurs, index is unchanged. </p>
<p>When parsing, leading whitespace is discarded (with successful parse), while trailing whitespace is left as is. </p>
<p>Example: </p>
<p>Parsing "_12_xy" (where _ represents a space) for a number, with index == 0 will result in the number 12, with parse_pos.index updated to 3 (just before the second space). Parsing a second time will result in a failing UErrorCode since "xy" is not a number, and leave index at 3. </p>
<p>Subclasses will typically supply specific parse methods that return different types of values. Since methods can't overload on return types, these will typically be named "parse", while this polymorphic method will always be called parseObject. Any parse method that does not take a parse_pos should set status to an error value when no text in the required format is at the start position.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>The string to be parsed into an object. </td></tr>
    <tr><td class="paramname">result</td><td><a class="el" href="classicu_1_1Formattable.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 class="paramname">parse_pos</td><td>The position to start parsing at. Upon return this param is set to the position after the last character successfully parsed. If the source is not parsed successfully, this param will remain unchanged. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003666">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implemented in <a class="el" href="classicu_1_1MessageFormat.html#acf78231d56a02ccd02bb255d10dc119f">icu::MessageFormat</a>, <a class="el" href="classicu_1_1TimeZoneFormat.html#a32cedbc5fe74bfcfcbac696bf8d42777">icu::TimeZoneFormat</a>, <a class="el" href="classicu_1_1DateFormat.html#a456b42194cc69e21d47d51219187f2eb">icu::DateFormat</a>, <a class="el" href="classicu_1_1PluralFormat.html#a57dab6a7b69e3eb73062501db7fa1276">icu::PluralFormat</a>, <a class="el" href="classicu_1_1DateIntervalFormat.html#a2ee630aa393b4e1edfa97763579d051f">icu::DateIntervalFormat</a>, <a class="el" href="classicu_1_1SelectFormat.html#a31eea827ed5c401387c5dc653b0d76c4">icu::SelectFormat</a>, <a class="el" href="classicu_1_1NumberFormat.html#ac218596a77ab417983aa1ff31431d69e">icu::NumberFormat</a>, <a class="el" href="classicu_1_1TimeUnitFormat.html#a42f817d0a828a836d60720a5bb4bd1a0">icu::TimeUnitFormat</a>, and <a class="el" href="classicu_1_1MeasureFormat.html#a5fbb083d194870cfcd8d69ef152f038b">icu::MeasureFormat</a>.</p>

<p>Referenced by <a class="el" href="msgfmt_8h_source.html#l00480">icu::MessageFormat::getApostropheMode()</a>.</p>

</div>
</div>
<a class="anchor" id="a14835811eb14a1826b8529704de07bbf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void icu::Format::parseObject </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td>
          <td class="paramname"><em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classicu_1_1Formattable.html">Formattable</a> &amp;&#160;</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;&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Parses a string to produce an object. </p>
<p>This is a convenience method which calls the pure virtual <a class="el" href="classicu_1_1Format.html#a292d797eb9d3bc8a42d8d8efba119a83" title="Parse a string to produce an object. ">parseObject()</a> method, and returns a failure UErrorCode if the <a class="el" href="classicu_1_1ParsePosition.html" title="ParsePosition is a simple class used by Format and its subclasses to keep track of the current positi...">ParsePosition</a> indicates failure.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">source</td><td>The string to be parsed into an object. </td></tr>
    <tr><td class="paramname">result</td><td><a class="el" href="classicu_1_1Formattable.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 class="paramname">status</td><td>Output param to be filled with success/failure result code. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003667">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a9c316525df8bdb422d3e73f0eb9a2a32"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void icu::Format::setLocaleIDs </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>valid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>actual</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003669">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

</div>
</div>
<a class="anchor" id="a4667230f833245c55ba081c163d8bb71"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void icu::Format::syntaxError </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &amp;&#160;</td>
          <td class="paramname"><em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structUParseError.html">UParseError</a> &amp;&#160;</td>
          <td class="paramname"><em>parseError</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Simple function for initializing a <a class="el" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors. ">UParseError</a> from a <a class="el" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pattern</td><td>The pattern to copy into the parseError </td></tr>
    <tr><td class="paramname">pos</td><td>The position in pattern where the error occured </td></tr>
    <tr><td class="paramname">parseError</td><td>The <a class="el" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors. ">UParseError</a> object to fill in </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable003673">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="format_8h_source.html">format.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>