| Linux in-mum-web1499.main-hosting.eu 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64 Path : /opt/alt/alt-nodejs18/root/usr/share/doc/alt-nodejs18-libicu-doc/ |
| Current File : //opt/alt/alt-nodejs18/root/usr/share/doc/alt-nodejs18-libicu-doc/classSelectFormat.html |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ICU 74.2: icu::SelectFormat 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 74.2
 <span id="projectnumber">74.2</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></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_1SelectFormat.html">SelectFormat</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="#friends">Friends</a> </div>
<div class="headertitle">
<div class="title">icu::SelectFormat Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><code>#include <<a class="el" href="selfmt_8h_source.html">selfmt.h</a>></code></p>
<div class="dynheader">
Inheritance diagram for icu::SelectFormat:</div>
<div class="dyncontent">
<div class="center">
<img src="classicu_1_1SelectFormat.png" usemap="#icu::SelectFormat_map" alt=""/>
<map id="icu::SelectFormat_map" name="icu::SelectFormat_map">
<area href="classicu_1_1Format.html" title="Base class for all formats." alt="icu::Format" shape="rect" coords="0,112,109,136"/>
<area href="classicu_1_1UObject.html" title="UObject is the common ICU "boilerplate" class." alt="icu::UObject" shape="rect" coords="0,56,109,80"/>
<area href="classicu_1_1UMemory.html" title="UMemory is the common ICU base class." alt="icu::UMemory" shape="rect" coords="0,0,109,24"/>
</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:ae0664e05f0e69888e0a67c76cd456085"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1SelectFormat.html#ae0664e05f0e69888e0a67c76cd456085">SelectFormat</a> (const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &pattern, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status)</td></tr>
<tr class="memdesc:ae0664e05f0e69888e0a67c76cd456085"><td class="mdescLeft"> </td><td class="mdescRight">Creates a new <code><a class="el" href="classicu_1_1SelectFormat.html">SelectFormat</a></code> for a given pattern string. <a href="classicu_1_1SelectFormat.html#ae0664e05f0e69888e0a67c76cd456085">More...</a><br /></td></tr>
<tr class="separator:ae0664e05f0e69888e0a67c76cd456085"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1efeff9d054d0fcf9a3e37e75e908048"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1SelectFormat.html#a1efeff9d054d0fcf9a3e37e75e908048">SelectFormat</a> (const <a class="el" href="classicu_1_1SelectFormat.html">SelectFormat</a> &other)</td></tr>
<tr class="memdesc:a1efeff9d054d0fcf9a3e37e75e908048"><td class="mdescLeft"> </td><td class="mdescRight">copy constructor. <a href="classicu_1_1SelectFormat.html#a1efeff9d054d0fcf9a3e37e75e908048">More...</a><br /></td></tr>
<tr class="separator:a1efeff9d054d0fcf9a3e37e75e908048"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa902260bef395b42c115f09aa5a04adb"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1SelectFormat.html#aa902260bef395b42c115f09aa5a04adb">~SelectFormat</a> ()</td></tr>
<tr class="memdesc:aa902260bef395b42c115f09aa5a04adb"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="classicu_1_1SelectFormat.html#aa902260bef395b42c115f09aa5a04adb">More...</a><br /></td></tr>
<tr class="separator:aa902260bef395b42c115f09aa5a04adb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac22629c047f8cf2b16812b9244046703"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1SelectFormat.html#ac22629c047f8cf2b16812b9244046703">applyPattern</a> (const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &pattern, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status)</td></tr>
<tr class="memdesc:ac22629c047f8cf2b16812b9244046703"><td class="mdescLeft"> </td><td class="mdescRight">Sets the pattern used by this select format. <a href="classicu_1_1SelectFormat.html#ac22629c047f8cf2b16812b9244046703">More...</a><br /></td></tr>
<tr class="separator:ac22629c047f8cf2b16812b9244046703"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a70a0499bded50754f1e25ee07a8a2489"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1SelectFormat.html#a70a0499bded50754f1e25ee07a8a2489">format</a> (const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &keyword, <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &appendTo, <a class="el" href="classicu_1_1FieldPosition.html">FieldPosition</a> &pos, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const</td></tr>
<tr class="memdesc:a70a0499bded50754f1e25ee07a8a2489"><td class="mdescLeft"> </td><td class="mdescRight">Selects the phrase for the given keyword. <a href="classicu_1_1SelectFormat.html#a70a0499bded50754f1e25ee07a8a2489">More...</a><br /></td></tr>
<tr class="separator:a70a0499bded50754f1e25ee07a8a2489"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a78a332de3bc07754b644da0774fc4397"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1SelectFormat.html">SelectFormat</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1SelectFormat.html#a78a332de3bc07754b644da0774fc4397">operator=</a> (const <a class="el" href="classicu_1_1SelectFormat.html">SelectFormat</a> &other)</td></tr>
<tr class="memdesc:a78a332de3bc07754b644da0774fc4397"><td class="mdescLeft"> </td><td class="mdescRight">Assignment operator. <a href="classicu_1_1SelectFormat.html#a78a332de3bc07754b644da0774fc4397">More...</a><br /></td></tr>
<tr class="separator:a78a332de3bc07754b644da0774fc4397"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9253035ee9bd8444ee463bd5b2ee7bbe"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1SelectFormat.html#a9253035ee9bd8444ee463bd5b2ee7bbe">operator==</a> (const <a class="el" href="classicu_1_1Format.html">Format</a> &other) const override</td></tr>
<tr class="memdesc:a9253035ee9bd8444ee463bd5b2ee7bbe"><td class="mdescLeft"> </td><td class="mdescRight">Return true if another object is semantically equal to this one. <a href="classicu_1_1SelectFormat.html#a9253035ee9bd8444ee463bd5b2ee7bbe">More...</a><br /></td></tr>
<tr class="separator:a9253035ee9bd8444ee463bd5b2ee7bbe"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1e53aaf2ce1fc247ad448b85f9ae6218"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1SelectFormat.html#a1e53aaf2ce1fc247ad448b85f9ae6218">operator!=</a> (const <a class="el" href="classicu_1_1Format.html">Format</a> &other) const</td></tr>
<tr class="memdesc:a1e53aaf2ce1fc247ad448b85f9ae6218"><td class="mdescLeft"> </td><td class="mdescRight">Return true if another object is semantically unequal to this one. <a href="classicu_1_1SelectFormat.html#a1e53aaf2ce1fc247ad448b85f9ae6218">More...</a><br /></td></tr>
<tr class="separator:a1e53aaf2ce1fc247ad448b85f9ae6218"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3d4453c539d9b6c421f7c328c0485f11"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classicu_1_1SelectFormat.html">SelectFormat</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1SelectFormat.html#a3d4453c539d9b6c421f7c328c0485f11">clone</a> () const override</td></tr>
<tr class="memdesc:a3d4453c539d9b6c421f7c328c0485f11"><td class="mdescLeft"> </td><td class="mdescRight">Clones this <a class="el" href="classicu_1_1Format.html" title="Base class for all formats.">Format</a> object polymorphically. <a href="classicu_1_1SelectFormat.html#a3d4453c539d9b6c421f7c328c0485f11">More...</a><br /></td></tr>
<tr class="separator:a3d4453c539d9b6c421f7c328c0485f11"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a21f9ec54fdde72dd1a6dff8552f0ad00"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1SelectFormat.html#a21f9ec54fdde72dd1a6dff8552f0ad00">format</a> (const <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &obj, <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &appendTo, <a class="el" href="classicu_1_1FieldPosition.html">FieldPosition</a> &pos, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const override</td></tr>
<tr class="memdesc:a21f9ec54fdde72dd1a6dff8552f0ad00"><td class="mdescLeft"> </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="classicu_1_1SelectFormat.html#a21f9ec54fdde72dd1a6dff8552f0ad00">More...</a><br /></td></tr>
<tr class="separator:a21f9ec54fdde72dd1a6dff8552f0ad00"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a63a5c2f40400e17ac125be04b5217882"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1SelectFormat.html#a63a5c2f40400e17ac125be04b5217882">toPattern</a> (<a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &appendTo)</td></tr>
<tr class="memdesc:a63a5c2f40400e17ac125be04b5217882"><td class="mdescLeft"> </td><td class="mdescRight">Returns the pattern from <a class="el" href="classicu_1_1SelectFormat.html#ac22629c047f8cf2b16812b9244046703" title="Sets the pattern used by this select format.">applyPattern()</a> or constructor. <a href="classicu_1_1SelectFormat.html#a63a5c2f40400e17ac125be04b5217882">More...</a><br /></td></tr>
<tr class="separator:a63a5c2f40400e17ac125be04b5217882"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a54fa1c704786fe073959c8c51d8ef332"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1SelectFormat.html#a54fa1c704786fe073959c8c51d8ef332">parseObject</a> (const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &source, <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &result, <a class="el" href="classicu_1_1ParsePosition.html">ParsePosition</a> &parse_pos) const override</td></tr>
<tr class="memdesc:a54fa1c704786fe073959c8c51d8ef332"><td class="mdescLeft"> </td><td class="mdescRight">This method is not yet supported by <code><a class="el" href="classicu_1_1SelectFormat.html">SelectFormat</a></code>. <a href="classicu_1_1SelectFormat.html#a54fa1c704786fe073959c8c51d8ef332">More...</a><br /></td></tr>
<tr class="separator:a54fa1c704786fe073959c8c51d8ef332"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6dfe8988b73a069184885f54bcf64153"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="uobject_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1SelectFormat.html#a6dfe8988b73a069184885f54bcf64153">getDynamicClassID</a> () const override</td></tr>
<tr class="memdesc:a6dfe8988b73a069184885f54bcf64153"><td class="mdescLeft"> </td><td class="mdescRight">ICU "poor man's RTTI", returns a UClassID for the actual class. <a href="classicu_1_1SelectFormat.html#a6dfe8988b73a069184885f54bcf64153">More...</a><br /></td></tr>
<tr class="separator:a6dfe8988b73a069184885f54bcf64153"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:affaf0088c4eb9976223a327bdc4f1dd0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1SelectFormat.html#affaf0088c4eb9976223a327bdc4f1dd0">format</a> (const <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &obj, <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &appendTo, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const</td></tr>
<tr class="memdesc:affaf0088c4eb9976223a327bdc4f1dd0"><td class="mdescLeft"> </td><td class="mdescRight">Formats an object to produce a string. <a href="classicu_1_1SelectFormat.html#affaf0088c4eb9976223a327bdc4f1dd0">More...</a><br /></td></tr>
<tr class="separator:affaf0088c4eb9976223a327bdc4f1dd0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a218d385a5aaf02005c0f7af9d4e00b74"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1SelectFormat.html#a218d385a5aaf02005c0f7af9d4e00b74">format</a> (const <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &obj, <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &appendTo, <a class="el" href="classicu_1_1FieldPosition.html">FieldPosition</a> &pos, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const=0</td></tr>
<tr class="memdesc:a218d385a5aaf02005c0f7af9d4e00b74"><td class="mdescLeft"> </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="classicu_1_1SelectFormat.html#a218d385a5aaf02005c0f7af9d4e00b74">More...</a><br /></td></tr>
<tr class="separator:a218d385a5aaf02005c0f7af9d4e00b74"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6b5fe6a90f69376fe95caf2123239ccb"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1SelectFormat.html#a6b5fe6a90f69376fe95caf2123239ccb">format</a> (const <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &obj, <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &appendTo, <a class="el" href="classicu_1_1FieldPositionIterator.html">FieldPositionIterator</a> *posIter, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const</td></tr>
<tr class="memdesc:a6b5fe6a90f69376fe95caf2123239ccb"><td class="mdescLeft"> </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="classicu_1_1SelectFormat.html#a6b5fe6a90f69376fe95caf2123239ccb">More...</a><br /></td></tr>
<tr class="separator:a6b5fe6a90f69376fe95caf2123239ccb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pub_methods_classicu_1_1Format"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classicu_1_1Format')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classicu_1_1Format.html">icu::Format</a></td></tr>
<tr class="memitem:ab5b0d091d165c5576af62b3ee246058a inherit pub_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#ab5b0d091d165c5576af62b3ee246058a">~Format</a> ()</td></tr>
<tr class="memdesc:ab5b0d091d165c5576af62b3ee246058a inherit pub_methods_classicu_1_1Format"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="classicu_1_1Format.html#ab5b0d091d165c5576af62b3ee246058a">More...</a><br /></td></tr>
<tr class="separator:ab5b0d091d165c5576af62b3ee246058a inherit pub_methods_classicu_1_1Format"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aedcfb084bd044486e9112d6bae06556d inherit pub_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#aedcfb084bd044486e9112d6bae06556d">operator!=</a> (const <a class="el" href="classicu_1_1Format.html">Format</a> &other) const</td></tr>
<tr class="memdesc:aedcfb084bd044486e9112d6bae06556d inherit pub_methods_classicu_1_1Format"><td class="mdescLeft"> </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="classicu_1_1Format.html#aedcfb084bd044486e9112d6bae06556d">More...</a><br /></td></tr>
<tr class="separator:aedcfb084bd044486e9112d6bae06556d inherit pub_methods_classicu_1_1Format"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:affaf0088c4eb9976223a327bdc4f1dd0 inherit pub_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#affaf0088c4eb9976223a327bdc4f1dd0">format</a> (const <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &obj, <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &appendTo, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const</td></tr>
<tr class="memdesc:affaf0088c4eb9976223a327bdc4f1dd0 inherit pub_methods_classicu_1_1Format"><td class="mdescLeft"> </td><td class="mdescRight">Formats an object to produce a string. <a href="classicu_1_1Format.html#affaf0088c4eb9976223a327bdc4f1dd0">More...</a><br /></td></tr>
<tr class="separator:affaf0088c4eb9976223a327bdc4f1dd0 inherit pub_methods_classicu_1_1Format"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6b5fe6a90f69376fe95caf2123239ccb inherit pub_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a6b5fe6a90f69376fe95caf2123239ccb">format</a> (const <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &obj, <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &appendTo, <a class="el" href="classicu_1_1FieldPositionIterator.html">FieldPositionIterator</a> *posIter, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const</td></tr>
<tr class="memdesc:a6b5fe6a90f69376fe95caf2123239ccb inherit pub_methods_classicu_1_1Format"><td class="mdescLeft"> </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="classicu_1_1Format.html#a6b5fe6a90f69376fe95caf2123239ccb">More...</a><br /></td></tr>
<tr class="separator:a6b5fe6a90f69376fe95caf2123239ccb inherit pub_methods_classicu_1_1Format"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac8854eba45f8c57f22ff994b8e8099ae inherit pub_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#ac8854eba45f8c57f22ff994b8e8099ae">parseObject</a> (const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> &source, <a class="el" href="classicu_1_1Formattable.html">Formattable</a> &result, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const</td></tr>
<tr class="memdesc:ac8854eba45f8c57f22ff994b8e8099ae inherit pub_methods_classicu_1_1Format"><td class="mdescLeft"> </td><td class="mdescRight">Parses a string to produce an object. <a href="classicu_1_1Format.html#ac8854eba45f8c57f22ff994b8e8099ae">More...</a><br /></td></tr>
<tr class="separator:ac8854eba45f8c57f22ff994b8e8099ae inherit pub_methods_classicu_1_1Format"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afb8661d3a5d713adc9845c6c76de2a09 inherit pub_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1Locale.html">Locale</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#afb8661d3a5d713adc9845c6c76de2a09">getLocale</a> (<a class="el" href="uloc_8h.html#adf053345d343f8d82ae080f7a5871f34">ULocDataLocaleType</a> type, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const</td></tr>
<tr class="memdesc:afb8661d3a5d713adc9845c6c76de2a09 inherit pub_methods_classicu_1_1Format"><td class="mdescLeft"> </td><td class="mdescRight">Get the locale for this format object. <a href="classicu_1_1Format.html#afb8661d3a5d713adc9845c6c76de2a09">More...</a><br /></td></tr>
<tr class="separator:afb8661d3a5d713adc9845c6c76de2a09 inherit pub_methods_classicu_1_1Format"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7b0aa1422df718c60a6bc342f2de79cf inherit pub_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a7b0aa1422df718c60a6bc342f2de79cf">getLocaleID</a> (<a class="el" href="uloc_8h.html#adf053345d343f8d82ae080f7a5871f34">ULocDataLocaleType</a> type, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const</td></tr>
<tr class="memdesc:a7b0aa1422df718c60a6bc342f2de79cf inherit pub_methods_classicu_1_1Format"><td class="mdescLeft"> </td><td class="mdescRight">Get the locale for this format object. <a href="classicu_1_1Format.html#a7b0aa1422df718c60a6bc342f2de79cf">More...</a><br /></td></tr>
<tr class="separator:a7b0aa1422df718c60a6bc342f2de79cf inherit pub_methods_classicu_1_1Format"><td class="memSeparator" colspan="2"> </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="-"/> 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 </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"> </td><td class="mdescRight">Destructor. <a href="classicu_1_1UObject.html#af10026497704f510d3d1f2eff50acb18">More...</a><br /></td></tr>
<tr class="separator:af10026497704f510d3d1f2eff50acb18 inherit pub_methods_classicu_1_1UObject"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a3993cd56c4cb9db8b2e4ecdb5193e0ee"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="uobject_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1SelectFormat.html#a3993cd56c4cb9db8b2e4ecdb5193e0ee">getStaticClassID</a> (void)</td></tr>
<tr class="memdesc:a3993cd56c4cb9db8b2e4ecdb5193e0ee"><td class="mdescLeft"> </td><td class="mdescRight">ICU "poor man's RTTI", returns a UClassID for this class. <a href="classicu_1_1SelectFormat.html#a3993cd56c4cb9db8b2e4ecdb5193e0ee">More...</a><br /></td></tr>
<tr class="separator:a3993cd56c4cb9db8b2e4ecdb5193e0ee"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a878637013842f94d9e8f7eb5ec0411b2"><td class="memItemLeft" align="right" valign="top"><a id="a878637013842f94d9e8f7eb5ec0411b2"></a>
class </td><td class="memItemRight" valign="bottom"><b>MessageFormat</b></td></tr>
<tr class="separator:a878637013842f94d9e8f7eb5ec0411b2"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pro_methods_classicu_1_1Format"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classicu_1_1Format')"><img src="closed.png" alt="-"/> Protected Member Functions inherited from <a class="el" href="classicu_1_1Format.html">icu::Format</a></td></tr>
<tr class="memitem:a9c316525df8bdb422d3e73f0eb9a2a32 inherit pro_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top">void </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 inherit pro_methods_classicu_1_1Format"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0e673e9e040598bace20c25a2261b845 inherit pro_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1Format.html#a0e673e9e040598bace20c25a2261b845">Format</a> ()</td></tr>
<tr class="memdesc:a0e673e9e040598bace20c25a2261b845 inherit pro_methods_classicu_1_1Format"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor for subclass use only. <a href="classicu_1_1Format.html#a0e673e9e040598bace20c25a2261b845">More...</a><br /></td></tr>
<tr class="separator:a0e673e9e040598bace20c25a2261b845 inherit pro_methods_classicu_1_1Format"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2747bab62f7164f3c1556c044502df6e inherit pro_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top"> </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> &)</td></tr>
<tr class="separator:a2747bab62f7164f3c1556c044502df6e inherit pro_methods_classicu_1_1Format"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6e4a4f6e5eedfe8d949e9307191a3afc inherit pro_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1Format.html">Format</a> & </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> &)</td></tr>
<tr class="separator:a6e4a4f6e5eedfe8d949e9307191a3afc inherit pro_methods_classicu_1_1Format"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="inherit_header pro_static_methods_classicu_1_1Format"><td colspan="2" onclick="javascript:toggleInherit('pro_static_methods_classicu_1_1Format')"><img src="closed.png" alt="-"/> Static Protected Member Functions inherited from <a class="el" href="classicu_1_1Format.html">icu::Format</a></td></tr>
<tr class="memitem:a4667230f833245c55ba081c163d8bb71 inherit pro_static_methods_classicu_1_1Format"><td class="memItemLeft" align="right" valign="top">static void </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> &pattern, int32_t pos, <a class="el" href="structUParseError.html">UParseError</a> &parseError)</td></tr>
<tr class="memdesc:a4667230f833245c55ba081c163d8bb71 inherit pro_static_methods_classicu_1_1Format"><td class="mdescLeft"> </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="classicu_1_1Format.html#a4667230f833245c55ba081c163d8bb71">More...</a><br /></td></tr>
<tr class="separator:a4667230f833245c55ba081c163d8bb71 inherit pro_static_methods_classicu_1_1Format"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><code><a class="el" href="classicu_1_1SelectFormat.html">SelectFormat</a></code> supports the creation of internationalized messages by selecting phrases based on keywords. The pattern specifies how to map keywords to phrases and provides a default phrase. The object provided to the format method is a string that's matched against the keywords. If there is a match, the corresponding phrase is selected; otherwise, the default phrase is used.</p>
<h4>Using <code><a class="el" href="classicu_1_1SelectFormat.html">SelectFormat</a></code> for Gender Agreement</h4>
<p>Note: Typically, select formatting is done via <code><a class="el" href="classicu_1_1MessageFormat.html">MessageFormat</a></code> with a <code>select</code> argument type, rather than using a stand-alone <code><a class="el" href="classicu_1_1SelectFormat.html">SelectFormat</a></code>.</p>
<p>The main use case for the select format is gender based inflection. When names or nouns are inserted into sentences, their gender can affect pronouns, verb forms, articles, and adjectives. Special care needs to be taken for the case where the gender cannot be determined. The impact varies between languages:</p>
<p>
<ul>
<li>English has three genders, and unknown gender is handled as a special
case. Names use the gender of the named person (if known), nouns referring
to people use natural gender, and inanimate objects are usually neutral.
The gender only affects pronouns: "he", "she", "it", "they".
<li>German differs from English in that the gender of nouns is rather
arbitrary, even for nouns referring to people ("Mädchen", girl, is neutral).
The gender affects pronouns ("er", "sie", "es"), articles ("der", "die",
"das"), and adjective forms ("guter Mann", "gute Frau", "gutes Mädchen").
<li>French has only two genders; as in German the gender of nouns
is rather arbitrary - for sun and moon, the genders
are the opposite of those in German. The gender affects
pronouns ("il", "elle"), articles ("le", "la"),
adjective forms ("bon", "bonne"), and sometimes
verb forms ("allé", "allée").
<li>Polish distinguishes five genders (or noun classes),
human masculine, animate non-human masculine, inanimate masculine,
feminine, and neuter.
</ul>
</p>
<p>Some other languages have noun classes that are not related to gender, but similar in grammatical use. Some African languages have around 20 noun classes.</p>
<p><b>Note:</b>For the gender of a <em>person</em> in a given sentence, we usually need to distinguish only between female, male and other/unknown.</p>
<p>To enable localizers to create sentence patterns that take their language's gender dependencies into consideration, software has to provide information about the gender associated with a noun or name to <code><a class="el" href="classicu_1_1MessageFormat.html">MessageFormat</a></code>. Two main cases can be distinguished:</p>
<ul>
<li>
<p class="startli">For people, natural gender information should be maintained for each person. Keywords like "male", "female", "mixed" (for groups of people) and "unknown" could be used.</p>
<p class="endli"></p>
</li>
<li>
For nouns, grammatical gender information should be maintained for each noun and per language, e.g., in resource bundles. The keywords "masculine", "feminine", and "neuter" are commonly used, but some languages may require other keywords. </li>
</ul>
<p>The resulting keyword is provided to <code><a class="el" href="classicu_1_1MessageFormat.html">MessageFormat</a></code> as a parameter separate from the name or noun it's associated with. For example, to generate a message such as "Jean went to Paris", three separate arguments would be provided: The name of the person as argument 0, the gender of the person as argument 1, and the name of the city as argument 2. The sentence pattern for English, where the gender of the person has no impact on this simple sentence, would not refer to argument 1 at all:</p>
<pre>{0} went to {2}.</pre><p><b>Note:</b> The entire sentence should be included (and partially repeated) inside each phrase. Otherwise translators would have to be trained on how to move bits of the sentence in and out of the select argument of a message. (The examples below do not follow this recommendation!)</p>
<p>The sentence pattern for French, where the gender of the person affects the form of the participle, uses a select format based on argument 1:</p>
<p> <pre>{0} est {1, select, female {allée} other {allé}} à {2}.</pre></p>
<p>Patterns can be nested, so that it's possible to handle interactions of number and gender where necessary. For example, if the above sentence should allow for the names of several people to be inserted, the following sentence pattern can be used (with argument 0 the list of people's names, argument 1 the number of people, argument 2 their combined gender, and argument 3 the city name):</p>
<p>
<pre>{0} {1, plural,
one {est {2, select, female {allée} other {allé}}}
other {sont {2, select, female {allées} other {allés}}}
}à {3}.</pre>
</p>
<h4>Patterns and Their Interpretation</h4>
<p>The <code><a class="el" href="classicu_1_1SelectFormat.html">SelectFormat</a></code> pattern string defines the phrase output for each user-defined keyword. The pattern is a sequence of (keyword, message) pairs. A keyword is a "pattern identifier": [^[[:Pattern_Syntax:][:Pattern_White_Space:]]]+</p>
<p>Each message is a <a class="el" href="classicu_1_1MessageFormat.html">MessageFormat</a> pattern string enclosed in {curly braces}.</p>
<p>You always have to define a phrase for the default keyword <code>other</code>; this phrase is returned when the keyword provided to the <code>format</code> method matches no other keyword. If a pattern does not provide a phrase for <code>other</code>, the method it's provided to returns the error <code>U_DEFAULT_KEYWORD_MISSING</code>. <br />
Pattern_White_Space between keywords and messages is ignored. Pattern_White_Space within a message is preserved and output.</p>
<pre>Example:
UErrorCode status = U_ZERO_ERROR;
MessageFormat *msgFmt = new MessageFormat(UnicodeString("{0} est {1, select, female {allée} other {allé}} à Paris."), Locale("fr"), status);
if (U_FAILURE(status)) {
return;
}
FieldPosition ignore(FieldPosition::DONT_CARE);
UnicodeString result;
char* str1= "Kirti,female";
Formattable args1[] = {"Kirti","female"};
msgFmt->format(args1, 2, result, ignore, status);
cout << "Input is " << str1 << " and result is: " << result << endl;
delete msgFmt;
</pre> <p>Produces the output:<br />
<code>Kirti est allée à Paris.</code>
</p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005372">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>
<p class="definition">Definition at line <a class="el" href="selfmt_8h_source.html#l00188">188</a> of file <a class="el" href="selfmt_8h_source.html">selfmt.h</a>.</p>
</div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a id="ae0664e05f0e69888e0a67c76cd456085"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae0664e05f0e69888e0a67c76cd456085">◆ </a></span>SelectFormat() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">icu::SelectFormat::SelectFormat </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> & </td>
<td class="paramname"><em>pattern</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td>
<td class="paramname"><em>status</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a new <code><a class="el" href="classicu_1_1SelectFormat.html">SelectFormat</a></code> for a given pattern string. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pattern</td><td>the pattern for this <code><a class="el" href="classicu_1_1SelectFormat.html">SelectFormat</a></code>. errors are returned to status if the pattern is invalid. </td></tr>
<tr><td class="paramname">status</td><td>output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
</table>
</dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005373">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>
</div>
</div>
<a id="a1efeff9d054d0fcf9a3e37e75e908048"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1efeff9d054d0fcf9a3e37e75e908048">◆ </a></span>SelectFormat() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">icu::SelectFormat::SelectFormat </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classicu_1_1SelectFormat.html">SelectFormat</a> & </td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>copy constructor. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005374">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>
</div>
</div>
<a id="aa902260bef395b42c115f09aa5a04adb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa902260bef395b42c115f09aa5a04adb">◆ </a></span>~SelectFormat()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual icu::SelectFormat::~SelectFormat </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#_stable005375">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ac22629c047f8cf2b16812b9244046703"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac22629c047f8cf2b16812b9244046703">◆ </a></span>applyPattern()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void icu::SelectFormat::applyPattern </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> & </td>
<td class="paramname"><em>pattern</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td>
<td class="paramname"><em>status</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the pattern used by this select format. </p>
<p>for the keyword rules. Patterns and their interpretation are specified in the class description.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pattern</td><td>the pattern for this select format errors are returned to status if the pattern is invalid. </td></tr>
<tr><td class="paramname">status</td><td>output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
</table>
</dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005376">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>
</div>
</div>
<a id="a3d4453c539d9b6c421f7c328c0485f11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3d4453c539d9b6c421f7c328c0485f11">◆ </a></span>clone()</h2>
<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_1SelectFormat.html">SelectFormat</a>* icu::SelectFormat::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">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Clones this <a class="el" href="classicu_1_1Format.html" title="Base class for all formats.">Format</a> object polymorphically. </p>
<p>The caller owns the result and should delete it when done. </p><dl class="stable"><dt><b><a class="el" href="stable.html#_stable005381">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>
<p>Implements <a class="el" href="classicu_1_1Format.html#ad606fa4ed45908fe4220085c6276c65a">icu::Format</a>.</p>
</div>
</div>
<a id="a21f9ec54fdde72dd1a6dff8552f0ad00"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a21f9ec54fdde72dd1a6dff8552f0ad00">◆ </a></span>format() <span class="overload">[1/5]</span></h2>
<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_1UnicodeString.html">UnicodeString</a>& icu::SelectFormat::format </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classicu_1_1Formattable.html">Formattable</a> & </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> & </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> & </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> & </td>
<td class="paramname"><em>status</em> </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">override</span><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>This method handles keyword strings. If the <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 is not a <code><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></code>, then it returns a failing UErrorCode.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">obj</td><td>A keyword string that is used to select an alternative. </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#_stable005382">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>
<p>Implements <a class="el" href="classicu_1_1Format.html#a68fb0a8875645f7ab11bb5230c03c212">icu::Format</a>.</p>
</div>
</div>
<a id="a218d385a5aaf02005c0f7af9d4e00b74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a218d385a5aaf02005c0f7af9d4e00b74">◆ </a></span>format() <span class="overload">[2/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a>& icu::Format::format</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#_stable004178">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>
</div>
</div>
<a id="a6b5fe6a90f69376fe95caf2123239ccb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6b5fe6a90f69376fe95caf2123239ccb">◆ </a></span>format() <span class="overload">[3/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a>& icu::Format::format</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#_stable004179">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>
</div>
</div>
<a id="affaf0088c4eb9976223a327bdc4f1dd0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#affaf0088c4eb9976223a327bdc4f1dd0">◆ </a></span>format() <span class="overload">[4/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a>& icu::Format::format</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#_stable004177">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl>
</div>
</div>
<a id="a70a0499bded50754f1e25ee07a8a2489"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a70a0499bded50754f1e25ee07a8a2489">◆ </a></span>format() <span class="overload">[5/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a>& icu::SelectFormat::format </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> & </td>
<td class="paramname"><em>keyword</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> & </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> & </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> & </td>
<td class="paramname"><em>status</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Selects the phrase for the given keyword. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">keyword</td><td>The keyword that is used to select an alternative. </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 set to success/failure code on exit, which must not indicate a failure before the function call. </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#_stable005377">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>
</div>
</div>
<a id="a6dfe8988b73a069184885f54bcf64153"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6dfe8988b73a069184885f54bcf64153">◆ </a></span>getDynamicClassID()</h2>
<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="uobject_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> icu::SelectFormat::getDynamicClassID </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">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>ICU "poor man's RTTI", returns a UClassID for the actual class. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005386">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>
<p>Reimplemented from <a class="el" href="classicu_1_1UObject.html#aca1169c4978c52ce2b76eda104e9a214">icu::UObject</a>.</p>
</div>
</div>
<a id="a3993cd56c4cb9db8b2e4ecdb5193e0ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3993cd56c4cb9db8b2e4ecdb5193e0ee">◆ </a></span>getStaticClassID()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="uobject_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> icu::SelectFormat::getStaticClassID </td>
<td>(</td>
<td class="paramtype">void </td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>ICU "poor man's RTTI", returns a UClassID for this class. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005385">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>
</div>
</div>
<a id="a1e53aaf2ce1fc247ad448b85f9ae6218"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e53aaf2ce1fc247ad448b85f9ae6218">◆ </a></span>operator!=()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual bool icu::SelectFormat::operator!= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classicu_1_1Format.html">Format</a> & </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">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return true if another object is semantically unequal to this one. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">other</td><td>the <a class="el" href="classicu_1_1SelectFormat.html">SelectFormat</a> object to be compared with. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if other is semantically unequal to this. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005380">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>
</div>
</div>
<a id="a78a332de3bc07754b644da0774fc4397"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a78a332de3bc07754b644da0774fc4397">◆ </a></span>operator=()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classicu_1_1SelectFormat.html">SelectFormat</a>& icu::SelectFormat::operator= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classicu_1_1SelectFormat.html">SelectFormat</a> & </td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Assignment operator. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">other</td><td>the <a class="el" href="classicu_1_1SelectFormat.html">SelectFormat</a> object to copy from. </td></tr>
</table>
</dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005378">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>
</div>
</div>
<a id="a9253035ee9bd8444ee463bd5b2ee7bbe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9253035ee9bd8444ee463bd5b2ee7bbe">◆ </a></span>operator==()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual bool icu::SelectFormat::operator== </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classicu_1_1Format.html">Format</a> & </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">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return true if another object is semantically equal to this one. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">other</td><td>the <a class="el" href="classicu_1_1SelectFormat.html">SelectFormat</a> object to be compared with. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if other is semantically equal to this. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005379">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>
<p>Implements <a class="el" href="classicu_1_1Format.html#ae1e8e16cd0803127ac506d8de257ec4f">icu::Format</a>.</p>
</div>
</div>
<a id="a54fa1c704786fe073959c8c51d8ef332"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a54fa1c704786fe073959c8c51d8ef332">◆ </a></span>parseObject()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void icu::SelectFormat::parseObject </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> & </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> & </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> & </td>
<td class="paramname"><em>parse_pos</em> </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">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>This method is not yet supported by <code><a class="el" href="classicu_1_1SelectFormat.html">SelectFormat</a></code>. </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 a successful parse), while trailing whitespace is left as is. </p>
<p>See <a class="el" href="classicu_1_1Format.html#a292d797eb9d3bc8a42d8d8efba119a83" title="Parse a string to produce an object.">Format::parseObject()</a> for more.</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#_stable005384">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>
<p>Implements <a class="el" href="classicu_1_1Format.html#a292d797eb9d3bc8a42d8d8efba119a83">icu::Format</a>.</p>
</div>
</div>
<a id="a63a5c2f40400e17ac125be04b5217882"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a63a5c2f40400e17ac125be04b5217882">◆ </a></span>toPattern()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a>& icu::SelectFormat::toPattern </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> & </td>
<td class="paramname"><em>appendTo</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the pattern from <a class="el" href="classicu_1_1SelectFormat.html#ac22629c047f8cf2b16812b9244046703" title="Sets the pattern used by this select format.">applyPattern()</a> or constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">appendTo</td><td>output parameter to receive result. Result is appended to existing contents. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the <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> with inserted pattern. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable005383">Stable:</a></b></dt><dd>ICU 4.4 </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>i18n/unicode/<a class="el" href="selfmt_8h_source.html">selfmt.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>