Sophie

Sophie

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

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

<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ICU 4.4: Format Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Search" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&nbsp;Structure&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Format Class Reference</h1><!-- doxytag: class="Format" --><!-- doxytag: inherits="UObject" -->
<p>Base class for all formats.  
<a href="#_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 Format:</div>
<div class="dynsection">
 <div class="center">
  <img src="classFormat.gif" usemap="#Format_map" alt=""/>
  <map id="Format_map" name="Format_map">
<area href="classUObject.html" alt="UObject" shape="rect" coords="495,56,650,80"/>
<area href="classUMemory.html" alt="UMemory" shape="rect" coords="495,0,650,24"/>
<area href="classDateFormat.html" alt="DateFormat" shape="rect" coords="0,168,155,192"/>
<area href="classDateIntervalFormat.html" alt="DateIntervalFormat" shape="rect" coords="165,168,320,192"/>
<area href="classMeasureFormat.html" alt="MeasureFormat" shape="rect" coords="330,168,485,192"/>
<area href="classMessageFormat.html" alt="MessageFormat" shape="rect" coords="495,168,650,192"/>
<area href="classNumberFormat.html" alt="NumberFormat" shape="rect" coords="660,168,815,192"/>
<area href="classPluralFormat.html" alt="PluralFormat" shape="rect" coords="825,168,980,192"/>
<area href="classSelectFormat.html" alt="SelectFormat" shape="rect" coords="990,168,1145,192"/>
<area href="classSimpleDateFormat.html" alt="SimpleDateFormat" shape="rect" coords="0,224,155,248"/>
<area href="classTimeUnitFormat.html" alt="TimeUnitFormat" shape="rect" coords="330,224,485,248"/>
<area href="classChoiceFormat.html" alt="ChoiceFormat" shape="rect" coords="495,224,650,248"/>
<area href="classDecimalFormat.html" alt="DecimalFormat" shape="rect" coords="660,224,815,248"/>
<area href="classRuleBasedNumberFormat.html" alt="RuleBasedNumberFormat" shape="rect" coords="825,224,980,248"/>
</map>
 </div>
</div>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#aafee703f14d0f5ddb264b708a75174a8">~Format</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#aafee703f14d0f5ddb264b708a75174a8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#ad9be7e8b7bef97013ff74ef1be3903a5">operator==</a> (const <a class="el" href="classFormat.html">Format</a> &amp;other) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return true if the given <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> objects are semantically equal.  <a href="#ad9be7e8b7bef97013ff74ef1be3903a5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a4f65d87226814931dde8b035f47b69f3">operator!=</a> (const <a class="el" href="classFormat.html">Format</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return true if the given <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> objects are not semantically equal.  <a href="#a4f65d87226814931dde8b035f47b69f3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classFormat.html">Format</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a4e7ebd5cfd390c35e2bda88257f8b51a">clone</a> () const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clone this object polymorphically.  <a href="#a4e7ebd5cfd390c35e2bda88257f8b51a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#af3f0b157f07d6e9f908da69c99239600">format</a> (const <a class="el" href="classFormattable.html">Formattable</a> &amp;obj, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Formats an object to produce a string.  <a href="#af3f0b157f07d6e9f908da69c99239600"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a12ffb857c5c9a553270dfe9a71fbd8e9">format</a> (const <a class="el" href="classFormattable.html">Formattable</a> &amp;obj, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;pos, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> an object to produce a string.  <a href="#a12ffb857c5c9a553270dfe9a71fbd8e9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a820c1ea5bf5fd4f65de463a74ddf113e">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="classFieldPositionIterator.html">FieldPositionIterator</a> *posIter, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> an object to produce a string.  <a href="#a820c1ea5bf5fd4f65de463a74ddf113e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#aa53bea97b986c2f21e5638aa30aa08b7">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;parse_pos) const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parse a string to produce an object.  <a href="#aa53bea97b986c2f21e5638aa30aa08b7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a90da11177ef906f464d63ca14300e1c9">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="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parses a string to produce an object.  <a href="#a90da11177ef906f464d63ca14300e1c9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#ac961d410d174518e5a3ebb8bbef45cd7">getDynamicClassID</a> () const =0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a unique class ID POLYMORPHICALLY.  <a href="#ac961d410d174518e5a3ebb8bbef45cd7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classLocale.html">Locale</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a4502b04fe77be54f9f0343a87156fbd5">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><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the locale for this format object.  <a href="#a4502b04fe77be54f9f0343a87156fbd5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#ad8ca4e4cbd2a11b4de3c748c48c7c536">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><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the locale for this format object.  <a href="#ad8ca4e4cbd2a11b4de3c748c48c7c536"></a><br/></td></tr>
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#ae15f405ad3805e8d6691354047b500ca">setLocaleIDs</a> (const char *valid, const char *actual)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a9326a787208f39b9544fc6fcbcbfcad3">Format</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor for subclass use only.  <a href="#a9326a787208f39b9544fc6fcbcbfcad3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#ab69111c370cfe44f9508e78e5431cc65">Format</a> (const <a class="el" href="classFormat.html">Format</a> &amp;)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classFormat.html">Format</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a7a5276a88c488462eea3a508b71f4d9c">operator=</a> (const <a class="el" href="classFormat.html">Format</a> &amp;)</td></tr>
<tr><td colspan="2"><h2>Static Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a98213ada53770537d242f4bf0ba43b73">syntaxError</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;pattern, int32_t pos, <a class="el" href="structUParseError.html">UParseError</a> &amp;parseError)</td></tr>
<tr><td class="mdescLeft">&nbsp;</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="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>.  <a href="#a98213ada53770537d242f4bf0ba43b73"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<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="classDecimalFormat.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="classSimpleDateFormat.html" title="SimpleDateFormat is a concrete class for formatting and parsing dates in a language-independent...">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="classFormat.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="classDecimalFormat.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="classFormat.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="classMessageFormat.html" title="MessageFormat produces concatenated messages in a language-neutral way.">MessageFormat</a> and <a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a>. <a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a> is a subclass of <a class="el" href="classNumberFormat.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="classMessageFormat.html" title="MessageFormat produces concatenated messages in a language-neutral way.">MessageFormat</a> is a formatter which utilizes other <a class="el" href="classFormat.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="classMessageFormat.html" title="MessageFormat produces concatenated messages in a language-neutral way.">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="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a> and <a class="el" href="classMessageFormat.html" title="MessageFormat produces concatenated messages in a language-neutral way.">MessageFormat</a> headers for further information. </p>
<p>If formatting is unsuccessful, a failing UErrorCode is returned when the <a class="el" href="classFormat.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="classParsePosition.html" title="ParsePosition is a simple class used by Format and its subclasses to keep track of...">ParsePosition</a>. For the method that takes a <a class="el" href="classParsePosition.html" title="ParsePosition is a simple class used by Format and its subclasses to keep track of...">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#l00094">94</a> of file <a class="el" href="format_8h_source.html">format.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aafee703f14d0f5ddb264b708a75174a8"></a><!-- doxytag: member="Format::~Format" ref="aafee703f14d0f5ddb264b708a75174a8" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual Format::~Format </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

</div>
</div>
<a class="anchor" id="a9326a787208f39b9544fc6fcbcbfcad3"></a><!-- doxytag: member="Format::Format" ref="a9326a787208f39b9544fc6fcbcbfcad3" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Format::Format </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></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#_stable002711">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ab69111c370cfe44f9508e78e5431cc65"></a><!-- doxytag: member="Format::Format" ref="ab69111c370cfe44f9508e78e5431cc65" args="(const Format &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Format::Format </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classFormat.html">Format</a> &amp;&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002712">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a4e7ebd5cfd390c35e2bda88257f8b51a"></a><!-- doxytag: member="Format::clone" ref="a4e7ebd5cfd390c35e2bda88257f8b51a" args="() const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classFormat.html">Format</a>* Format::clone </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [pure virtual]</code></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="return"><dt><b>Returns:</b></dt><dd>A copy of the object </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002703">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implemented in <a class="el" href="classChoiceFormat.html#a3ebd2e04337baee2dbb8c7629592714d">ChoiceFormat</a>, <a class="el" href="classDecimalFormat.html#ab708755522b88a31695ed54eac6f1bbe">DecimalFormat</a>, <a class="el" href="classDateIntervalFormat.html#af9a584ad22ff3673323b26923f8c39b4">DateIntervalFormat</a>, <a class="el" href="classMessageFormat.html#abe6a3b6d9e7e74b7586b4644e4ba001c">MessageFormat</a>, <a class="el" href="classPluralFormat.html#aeb3f76cdf69fb00fec050171662d3a09">PluralFormat</a>, <a class="el" href="classRuleBasedNumberFormat.html#a52a2721aa01037d7e03f8c0cca6b4a77">RuleBasedNumberFormat</a>, <a class="el" href="classSelectFormat.html#a93921b5dd473d831353fc489ab2f1afc">SelectFormat</a>, <a class="el" href="classSimpleDateFormat.html#a7e779c3f80b4bb518e2e4d4907c3db3f">SimpleDateFormat</a>, and <a class="el" href="classTimeUnitFormat.html#a43917ab066f1582afeb05f6fdf7684da">TimeUnitFormat</a>.</p>

</div>
</div>
<a class="anchor" id="a820c1ea5bf5fd4f65de463a74ddf113e"></a><!-- doxytag: member="Format::format" ref="a820c1ea5bf5fd4f65de463a74ddf113e" args="(const Formattable &amp;obj, UnicodeString &amp;appendTo, FieldPositionIterator *posIter, 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; Format::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="classFieldPositionIterator.html">FieldPositionIterator</a> *&nbsp;</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;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> an object to produce a string. </p>
<p>Subclasses should override this method. This method allows polymorphic formatting of <a class="el" href="classFormattable.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="classFormat.html" title="Base class for all formats.">Format</a> receives a <a class="el" href="classFormattable.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="classFormattable.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="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times...">DateFormat</a> object) then it returns a failing UErrorCode.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj</em>&nbsp;</td><td>The object to 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>posIter</em>&nbsp;</td><td>On return, can be used to iterate over positions of fields generated by this format call. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Output param filled with success/failure status. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl class="draft"><dt><b><a class="el" href="draft.html#_draft000149">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 4.4 </dd></dl>

<p>Reimplemented in <a class="el" href="classDateFormat.html#ada22d0b844417bdcf425d5613fd9979e">DateFormat</a>, <a class="el" href="classNumberFormat.html#a6a5fcafaeefe33a9c8326e3b6eb8aa55">NumberFormat</a>, and <a class="el" href="classSimpleDateFormat.html#a4d850ae27a73071330e44ed64cfc2be9">SimpleDateFormat</a>.</p>

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

<p><a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> an object 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="classFormattable.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="classFormat.html" title="Base class for all formats.">Format</a> receives a <a class="el" href="classFormattable.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="classFormattable.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="classDateFormat.html" title="DateFormat is an abstract class for a family of classes that convert dates and times...">DateFormat</a> object) then it returns a failing UErrorCode.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj</em>&nbsp;</td><td>The object to 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>pos</em>&nbsp;</td><td>On input: an alignment field, if desired. On output: the offsets of the alignment field. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Output param filled with success/failure status. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002705">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implemented in <a class="el" href="classChoiceFormat.html#a4282d9e61550d4abb84d5c6f1ce29f6f">ChoiceFormat</a>, <a class="el" href="classDateFormat.html#a75b3bbdb1b728fa9c8ddaa344915427d">DateFormat</a>, <a class="el" href="classDecimalFormat.html#a9cd8dc27d2e975c453b12e123225da17">DecimalFormat</a>, <a class="el" href="classDateIntervalFormat.html#ad5163151a343dac64ad66c5680332ea3">DateIntervalFormat</a>, <a class="el" href="classMessageFormat.html#a427aef9177f57f8c1fd37c3a3d157437">MessageFormat</a>, <a class="el" href="classNumberFormat.html#a53e27d424735198566d90eb30401ec36">NumberFormat</a>, <a class="el" href="classPluralFormat.html#a405026e9c17195c2421bb30b96e458f4">PluralFormat</a>, <a class="el" href="classRuleBasedNumberFormat.html#a640cf2259d20cc8f03736f6fe0d18d1b">RuleBasedNumberFormat</a>, <a class="el" href="classSelectFormat.html#aedd16cf657cb9146811f5f3e31dfa9f2">SelectFormat</a>, <a class="el" href="classSimpleDateFormat.html#af969f9c7fbfc2cc9dd861dd011ef94e0">SimpleDateFormat</a>, and <a class="el" href="classTimeUnitFormat.html#a55e29d1d260c1c775e8d1d36c03ab0ad">TimeUnitFormat</a>.</p>

</div>
</div>
<a class="anchor" id="af3f0b157f07d6e9f908da69c99239600"></a><!-- doxytag: member="Format::format" ref="af3f0b157f07d6e9f908da69c99239600" 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; Format::format </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classFormattable.html">Formattable</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>appendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Formats an object to produce a string. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj</em>&nbsp;</td><td>The object to 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>Output parameter filled in with success or failure status. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002704">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Reimplemented in <a class="el" href="classChoiceFormat.html#a1df3b8b4b32453583e6cef2aa74c5d97">ChoiceFormat</a>, <a class="el" href="classDateFormat.html#a5f83e587088badccff4ef25b4b8fcd78">DateFormat</a>, <a class="el" href="classDecimalFormat.html#aaf9c44cbcc2b7f0279dcc6f121b8bf13">DecimalFormat</a>, <a class="el" href="classMessageFormat.html#a7e78ae8192e0889a196b0b4ae86a3a6a">MessageFormat</a>, <a class="el" href="classNumberFormat.html#a67d754f52d336d911454e97ba32654de">NumberFormat</a>, <a class="el" href="classRuleBasedNumberFormat.html#ae97cffb5bc4fca4e5f7d89b41a333983">RuleBasedNumberFormat</a>, and <a class="el" href="classSimpleDateFormat.html#aab9dc1c3bc84ac480ee1bc1c05d6126a">SimpleDateFormat</a>.</p>

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

<p>Returns a unique class ID POLYMORPHICALLY. </p>
<p>Pure virtual method. This method is to implement a simple version of RTTI, since not all C++ compilers support genuine RTTI. Polymorphic <a class="el" href="classFormat.html#ad9be7e8b7bef97013ff74ef1be3903a5" title="Return true if the given Format objects are semantically equal.">operator==()</a> and <a class="el" href="classFormat.html#a4e7ebd5cfd390c35e2bda88257f8b51a" title="Clone this object polymorphically.">clone()</a> methods call this method. Concrete subclasses of <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> must implement <a class="el" href="classFormat.html#ac961d410d174518e5a3ebb8bbef45cd7" title="Returns a unique class ID POLYMORPHICALLY.">getDynamicClassID()</a></p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The class ID for this object. All objects of a given class have the same class ID. Objects of other classes have different class IDs. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002708">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

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

<p>Implemented in <a class="el" href="classChoiceFormat.html#a3bb9d296446885cca90a38e477ef5527">ChoiceFormat</a>, <a class="el" href="classDecimalFormat.html#a29d58da07dee220c1661ec37397babb2">DecimalFormat</a>, <a class="el" href="classDateIntervalFormat.html#a476faa13a44ff11411beaeb69158dd68">DateIntervalFormat</a>, <a class="el" href="classMessageFormat.html#a10a58c0715cac006dd4d05f1f1ad6eb2">MessageFormat</a>, <a class="el" href="classNumberFormat.html#a63c193a4db6a1552073bf069d5d31749">NumberFormat</a>, <a class="el" href="classPluralFormat.html#a12e3f92dd37991545c313fd149107e9c">PluralFormat</a>, <a class="el" href="classRuleBasedNumberFormat.html#aa570fa8ffe7f29c9d6d7ab4b3303fa2a">RuleBasedNumberFormat</a>, <a class="el" href="classSelectFormat.html#a5c0716bdea388c31fee8f051307609cf">SelectFormat</a>, <a class="el" href="classSimpleDateFormat.html#a8b106f7a1c7ea5757aaca9cc3a16a348">SimpleDateFormat</a>, and <a class="el" href="classTimeUnitFormat.html#a8f803c89e8485b013329529aa31d15f8">TimeUnitFormat</a>.</p>

</div>
</div>
<a class="anchor" id="a4502b04fe77be54f9f0343a87156fbd5"></a><!-- doxytag: member="Format::getLocale" ref="a4502b04fe77be54f9f0343a87156fbd5" args="(ULocDataLocaleType type, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classLocale.html">Locale</a> Format::getLocale </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uloc_8h.html#adf053345d343f8d82ae080f7a5871f34">ULocDataLocaleType</a>&nbsp;</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;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <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><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>type of the locale we're looking for (valid or actual) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>error code for the operation </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the locale </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002709">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

</div>
</div>
<a class="anchor" id="ad8ca4e4cbd2a11b4de3c748c48c7c536"></a><!-- doxytag: member="Format::getLocaleID" ref="ad8ca4e4cbd2a11b4de3c748c48c7c536" args="(ULocDataLocaleType type, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* Format::getLocaleID </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uloc_8h.html#adf053345d343f8d82ae080f7a5871f34">ULocDataLocaleType</a>&nbsp;</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;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <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><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>type of the locale we're looking for (valid or actual) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>error code for the operation </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the locale </dd></dl>
<dl class="internal"><dt><b><a class="el" href="internal.html#_internal000299">Internal:</a></b></dt><dd>Do not use. This API is for internal use only. </dd></dl>

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

<p>Return true if the given <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> objects are not semantically equal. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>the object to be compared with. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Return true if the given <a class="el" href="classFormat.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#_stable002702">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

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

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

</div>
</div>
<a class="anchor" id="a7a5276a88c488462eea3a508b71f4d9c"></a><!-- doxytag: member="Format::operator=" ref="a7a5276a88c488462eea3a508b71f4d9c" args="(const Format &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classFormat.html">Format</a>&amp; Format::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classFormat.html">Format</a> &amp;&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002713">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Reimplemented in <a class="el" href="classChoiceFormat.html#a2873dacc65a6fd80c8111711a6f0c3b4">ChoiceFormat</a>, <a class="el" href="classDateFormat.html#acc1631f81d9ce43f827a88a92e9e3b6a">DateFormat</a>, <a class="el" href="classDecimalFormat.html#a80ae4009d0a89aaa339e38328c5f5f31">DecimalFormat</a>, <a class="el" href="classDateIntervalFormat.html#a65a1f1d51dd4d5ac269050b220033ea5">DateIntervalFormat</a>, <a class="el" href="classMessageFormat.html#a48e4814289b48723b11e7cd00df0be69">MessageFormat</a>, <a class="el" href="classNumberFormat.html#a8b9d5c0937f4da69d9a229fd10f8ec38">NumberFormat</a>, <a class="el" href="classPluralFormat.html#a4145baa65aaccfbc3ff6a8c34be82213">PluralFormat</a>, <a class="el" href="classRuleBasedNumberFormat.html#ae492ee51caf11c6244a9ca9b6ddaecda">RuleBasedNumberFormat</a>, <a class="el" href="classSelectFormat.html#aa1d4bff5798ca8a37d3da8f6ac6ea13d">SelectFormat</a>, <a class="el" href="classSimpleDateFormat.html#a9150f0dbd293cf22a470e932d77633fe">SimpleDateFormat</a>, and <a class="el" href="classTimeUnitFormat.html#a4e527fbe06dc2641661427348c229811">TimeUnitFormat</a>.</p>

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

<p>Return true if the given <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> objects are semantically equal. </p>
<p>Objects of different subclasses are considered unequal. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>the object to be compared with. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Return true if the given <a class="el" href="classFormat.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#_stable002701">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a90da11177ef906f464d63ca14300e1c9"></a><!-- doxytag: member="Format::parseObject" ref="a90da11177ef906f464d63ca14300e1c9" args="(const UnicodeString &amp;source, Formattable &amp;result, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Format::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="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</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="classFormat.html#aa53bea97b986c2f21e5638aa30aa08b7" title="Parse a string to produce an object.">parseObject()</a> method, and returns a failure UErrorCode if the <a class="el" href="classParsePosition.html" title="ParsePosition is a simple class used by Format and its subclasses to keep track of...">ParsePosition</a> indicates failure.</p>
<dl><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" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a> to be set to the parse result. If parse fails, return contents are undefined. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Output param to be filled with success/failure result code. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002707">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

</div>
</div>
<a class="anchor" id="aa53bea97b986c2f21e5638aa30aa08b7"></a><!-- doxytag: member="Format::parseObject" ref="aa53bea97b986c2f21e5638aa30aa08b7" args="(const UnicodeString &amp;source, Formattable &amp;result, ParsePosition &amp;parse_pos) const =0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Format::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>parse_pos</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [pure virtual]</code></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="classFormattable.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><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" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a> to be set to the parse result. If parse fails, return contents are undefined. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parse_pos</em>&nbsp;</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#_stable002706">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>

<p>Implemented in <a class="el" href="classDateFormat.html#a37ffcef643dda5667e736ea715ee9a4d">DateFormat</a>, <a class="el" href="classDateIntervalFormat.html#a30cd01f77584059579d72912df3e2bea">DateIntervalFormat</a>, <a class="el" href="classMessageFormat.html#a53732066584f68579adf8bf91409217c">MessageFormat</a>, <a class="el" href="classNumberFormat.html#aae2d85a1f97ae55faf249a4a0f429976">NumberFormat</a>, <a class="el" href="classPluralFormat.html#a24e62f6a197c2b8e524dd40ce58a89c5">PluralFormat</a>, <a class="el" href="classSelectFormat.html#a7e36d9ad29f4c443ddd2ed1c40c63fc4">SelectFormat</a>, and <a class="el" href="classTimeUnitFormat.html#af37d73dc96d335c4e03cd29b2316fca4">TimeUnitFormat</a>.</p>

</div>
</div>
<a class="anchor" id="ae15f405ad3805e8d6691354047b500ca"></a><!-- doxytag: member="Format::setLocaleIDs" ref="ae15f405ad3805e8d6691354047b500ca" args="(const char *valid, const char *actual)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Format::setLocaleIDs </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>valid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>actual</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002710">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

</div>
</div>
<a class="anchor" id="a98213ada53770537d242f4bf0ba43b73"></a><!-- doxytag: member="Format::syntaxError" ref="a98213ada53770537d242f4bf0ba43b73" args="(const UnicodeString &amp;pattern, int32_t pos, UParseError &amp;parseError)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void Format::syntaxError </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">int32_t&nbsp;</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;&nbsp;</td>
          <td class="paramname"> <em>parseError</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static, protected]</code></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="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>The pattern to copy into the parseError </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>The position in pattern where the error occured </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parseError</em>&nbsp;</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#_stable002714">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>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>

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

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