Server IP : 103.119.228.120 / Your IP : 3.135.205.26 Web Server : Apache System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : nobody ( 99) PHP Version : 5.6.40 Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/ssl/local/ssl/local/easy/share/doc/easy-libicu-doc-4.0.1/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.5"/> <title>ICU 4.0.1: MessageFormat 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="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </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 style="padding-left: 0.5em;"> <div id="projectname">ICU 4.0.1 </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.5 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.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)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="classes.html"><span>Data Structure Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Data Fields</span></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"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark"> </span>Pages</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-types">Public Types</a> | <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">MessageFormat Class Reference</div> </div> </div><!--header--> <div class="contents"> <p>A <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> produces concatenated messages in a language-neutral way. <a href="classMessageFormat.html#details">More...</a></p> <p><code>#include <<a class="el" href="msgfmt_8h_source.html">msgfmt.h</a>></code></p> <div class="dynheader"> Inheritance diagram for MessageFormat:</div> <div class="dyncontent"> <div class="center"> <img src="classMessageFormat.png" usemap="#MessageFormat_map" alt=""/> <map id="MessageFormat_map" name="MessageFormat_map"> <area href="classFormat.html" title="Base class for all formats. " alt="Format" shape="rect" coords="0,112,102,136"/> <area href="classUObject.html" title="UObject is the common ICU "boilerplate" class. " alt="UObject" shape="rect" coords="0,56,102,80"/> <area href="classUMemory.html" title="UMemory is the common ICU base class. " alt="UMemory" shape="rect" coords="0,0,102,24"/> </map> </div></div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a> Public Types</h2></td></tr> <tr class="memitem:a3b02759e9345bba433598ca169fe2626"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a3b02759e9345bba433598ca169fe2626">EFormatNumber</a> { <a class="el" href="classMessageFormat.html#a3b02759e9345bba433598ca169fe2626a2c4649766d55fba1106595c70fab6a79">kMaxFormat</a> = 10 }</td></tr> <tr class="memdesc:a3b02759e9345bba433598ca169fe2626"><td class="mdescLeft"> </td><td class="mdescRight">Enum type for kMaxFormat. <a href="classMessageFormat.html#a3b02759e9345bba433598ca169fe2626">More...</a><br/></td></tr> <tr class="separator:a3b02759e9345bba433598ca169fe2626"><td class="memSeparator" colspan="2"> </td></tr> </table><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:a9bd166332a223bf4f626bd4a23826da2"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a9bd166332a223bf4f626bd4a23826da2">MessageFormat</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &pattern, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status)</td></tr> <tr class="memdesc:a9bd166332a223bf4f626bd4a23826da2"><td class="mdescLeft"> </td><td class="mdescRight">Constructs a new <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> using the given pattern and the default locale. <a href="#a9bd166332a223bf4f626bd4a23826da2">More...</a><br/></td></tr> <tr class="separator:a9bd166332a223bf4f626bd4a23826da2"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a09d0a688a0017c803eb903b5956de3a0"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a09d0a688a0017c803eb903b5956de3a0">MessageFormat</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &pattern, const <a class="el" href="classLocale.html">Locale</a> &newLocale, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status)</td></tr> <tr class="memdesc:a09d0a688a0017c803eb903b5956de3a0"><td class="mdescLeft"> </td><td class="mdescRight">Constructs a new <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> using the given pattern and locale. <a href="#a09d0a688a0017c803eb903b5956de3a0">More...</a><br/></td></tr> <tr class="separator:a09d0a688a0017c803eb903b5956de3a0"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:adf000f6a8019f6e9999d3df283688843"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#adf000f6a8019f6e9999d3df283688843">MessageFormat</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &pattern, const <a class="el" href="classLocale.html">Locale</a> &newLocale, <a class="el" href="structUParseError.html">UParseError</a> &parseError, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status)</td></tr> <tr class="memdesc:adf000f6a8019f6e9999d3df283688843"><td class="mdescLeft"> </td><td class="mdescRight">Constructs a new <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> using the given pattern and locale. <a href="#adf000f6a8019f6e9999d3df283688843">More...</a><br/></td></tr> <tr class="separator:adf000f6a8019f6e9999d3df283688843"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a945eac8450aca382e2db73b7c3187249"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a945eac8450aca382e2db73b7c3187249">MessageFormat</a> (const <a class="el" href="classMessageFormat.html">MessageFormat</a> &)</td></tr> <tr class="memdesc:a945eac8450aca382e2db73b7c3187249"><td class="mdescLeft"> </td><td class="mdescRight">Constructs a new <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> from an existing one. <a href="#a945eac8450aca382e2db73b7c3187249">More...</a><br/></td></tr> <tr class="separator:a945eac8450aca382e2db73b7c3187249"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a48e4814289b48723b11e7cd00df0be69"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classMessageFormat.html">MessageFormat</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a48e4814289b48723b11e7cd00df0be69">operator=</a> (const <a class="el" href="classMessageFormat.html">MessageFormat</a> &)</td></tr> <tr class="memdesc:a48e4814289b48723b11e7cd00df0be69"><td class="mdescLeft"> </td><td class="mdescRight">Assignment operator. <a href="#a48e4814289b48723b11e7cd00df0be69">More...</a><br/></td></tr> <tr class="separator:a48e4814289b48723b11e7cd00df0be69"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a37bc94ae7e3622880f9f79d58320796b"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a37bc94ae7e3622880f9f79d58320796b">~MessageFormat</a> ()</td></tr> <tr class="memdesc:a37bc94ae7e3622880f9f79d58320796b"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#a37bc94ae7e3622880f9f79d58320796b">More...</a><br/></td></tr> <tr class="separator:a37bc94ae7e3622880f9f79d58320796b"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:abe6a3b6d9e7e74b7586b4644e4ba001c"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classFormat.html">Format</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#abe6a3b6d9e7e74b7586b4644e4ba001c">clone</a> (<a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a>) const </td></tr> <tr class="memdesc:abe6a3b6d9e7e74b7586b4644e4ba001c"><td class="mdescLeft"> </td><td class="mdescRight">Clones this <a class="el" href="classFormat.html" title="Base class for all formats. ">Format</a> object polymorphically. <a href="#abe6a3b6d9e7e74b7586b4644e4ba001c">More...</a><br/></td></tr> <tr class="separator:abe6a3b6d9e7e74b7586b4644e4ba001c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a26e0c92e8035193f110b578381611c02"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a26e0c92e8035193f110b578381611c02">operator==</a> (const <a class="el" href="classFormat.html">Format</a> &other) const </td></tr> <tr class="memdesc:a26e0c92e8035193f110b578381611c02"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the given <a class="el" href="classFormat.html" title="Base class for all formats. ">Format</a> objects are semantically equal. <a href="#a26e0c92e8035193f110b578381611c02">More...</a><br/></td></tr> <tr class="separator:a26e0c92e8035193f110b578381611c02"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a5d403deba6c059ebd752d964ad49a7c1"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a5d403deba6c059ebd752d964ad49a7c1">setLocale</a> (const <a class="el" href="classLocale.html">Locale</a> &theLocale)</td></tr> <tr class="memdesc:a5d403deba6c059ebd752d964ad49a7c1"><td class="mdescLeft"> </td><td class="mdescRight">Sets the locale. <a href="#a5d403deba6c059ebd752d964ad49a7c1">More...</a><br/></td></tr> <tr class="separator:a5d403deba6c059ebd752d964ad49a7c1"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a422910b60d0e79cf37afa8a49418333b"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="classLocale.html">Locale</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a422910b60d0e79cf37afa8a49418333b">getLocale</a> (<a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a>) const </td></tr> <tr class="memdesc:a422910b60d0e79cf37afa8a49418333b"><td class="mdescLeft"> </td><td class="mdescRight">Gets the locale. <a href="#a422910b60d0e79cf37afa8a49418333b">More...</a><br/></td></tr> <tr class="separator:a422910b60d0e79cf37afa8a49418333b"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ace3d4f8c18ba0b07aada0066efb9ab9d"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#ace3d4f8c18ba0b07aada0066efb9ab9d">applyPattern</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &pattern, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status)</td></tr> <tr class="memdesc:ace3d4f8c18ba0b07aada0066efb9ab9d"><td class="mdescLeft"> </td><td class="mdescRight">Applies the given pattern string to this message format. <a href="#ace3d4f8c18ba0b07aada0066efb9ab9d">More...</a><br/></td></tr> <tr class="separator:ace3d4f8c18ba0b07aada0066efb9ab9d"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ad5e44f1a945520eefade9b60350a3327"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#ad5e44f1a945520eefade9b60350a3327">applyPattern</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &pattern, <a class="el" href="structUParseError.html">UParseError</a> &parseError, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status)</td></tr> <tr class="memdesc:ad5e44f1a945520eefade9b60350a3327"><td class="mdescLeft"> </td><td class="mdescRight">Applies the given pattern string to this message format. <a href="#ad5e44f1a945520eefade9b60350a3327">More...</a><br/></td></tr> <tr class="separator:ad5e44f1a945520eefade9b60350a3327"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a96ffcd9c8df9b1a4b9bf604faa51eef2"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a96ffcd9c8df9b1a4b9bf604faa51eef2">toPattern</a> (<a class="el" href="classUnicodeString.html">UnicodeString</a> &appendTo) const </td></tr> <tr class="memdesc:a96ffcd9c8df9b1a4b9bf604faa51eef2"><td class="mdescLeft"> </td><td class="mdescRight">Returns a pattern that can be used to recreate this object. <a href="#a96ffcd9c8df9b1a4b9bf604faa51eef2">More...</a><br/></td></tr> <tr class="separator:a96ffcd9c8df9b1a4b9bf604faa51eef2"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a4322393c6960d0abbecb97e2d5db7032"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a4322393c6960d0abbecb97e2d5db7032">adoptFormats</a> (<a class="el" href="classFormat.html">Format</a> **formatsToAdopt, int32_t count)</td></tr> <tr class="memdesc:a4322393c6960d0abbecb97e2d5db7032"><td class="mdescLeft"> </td><td class="mdescRight">Sets subformats. <a href="#a4322393c6960d0abbecb97e2d5db7032">More...</a><br/></td></tr> <tr class="separator:a4322393c6960d0abbecb97e2d5db7032"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7d51d28b509a3d1365b250be805556a8"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a7d51d28b509a3d1365b250be805556a8">setFormats</a> (const <a class="el" href="classFormat.html">Format</a> **newFormats, int32_t cnt)</td></tr> <tr class="memdesc:a7d51d28b509a3d1365b250be805556a8"><td class="mdescLeft"> </td><td class="mdescRight">Sets subformats. <a href="#a7d51d28b509a3d1365b250be805556a8">More...</a><br/></td></tr> <tr class="separator:a7d51d28b509a3d1365b250be805556a8"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a96f9fb97e9bc525197b39222aba74bcc"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a96f9fb97e9bc525197b39222aba74bcc">adoptFormat</a> (int32_t formatNumber, <a class="el" href="classFormat.html">Format</a> *formatToAdopt)</td></tr> <tr class="memdesc:a96f9fb97e9bc525197b39222aba74bcc"><td class="mdescLeft"> </td><td class="mdescRight">Sets one subformat. <a href="#a96f9fb97e9bc525197b39222aba74bcc">More...</a><br/></td></tr> <tr class="separator:a96f9fb97e9bc525197b39222aba74bcc"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a16530e29c89c9a569d973b0e5f0fc598"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a16530e29c89c9a569d973b0e5f0fc598">setFormat</a> (int32_t formatNumber, const <a class="el" href="classFormat.html">Format</a> &<a class="el" href="classMessageFormat.html#ac984e47d8f99db7f623bd60f856f8666">format</a>)</td></tr> <tr class="memdesc:a16530e29c89c9a569d973b0e5f0fc598"><td class="mdescLeft"> </td><td class="mdescRight">Sets one subformat. <a href="#a16530e29c89c9a569d973b0e5f0fc598">More...</a><br/></td></tr> <tr class="separator:a16530e29c89c9a569d973b0e5f0fc598"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a4767de0a57c55c404db332be67edb73e"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classStringEnumeration.html">StringEnumeration</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a4767de0a57c55c404db332be67edb73e">getFormatNames</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status)</td></tr> <tr class="memdesc:a4767de0a57c55c404db332be67edb73e"><td class="mdescLeft"> </td><td class="mdescRight">Gets format names. <a href="#a4767de0a57c55c404db332be67edb73e">More...</a><br/></td></tr> <tr class="separator:a4767de0a57c55c404db332be67edb73e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aaa4cef286b4f4f5845ed783e079ad96b"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classFormat.html">Format</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#aaa4cef286b4f4f5845ed783e079ad96b">getFormat</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &formatName, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status)</td></tr> <tr class="memdesc:aaa4cef286b4f4f5845ed783e079ad96b"><td class="mdescLeft"> </td><td class="mdescRight">Gets subformat pointer for given format name. <a href="#aaa4cef286b4f4f5845ed783e079ad96b">More...</a><br/></td></tr> <tr class="separator:aaa4cef286b4f4f5845ed783e079ad96b"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a781ee11f6a1512717b670b6e0db229d9"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a781ee11f6a1512717b670b6e0db229d9">setFormat</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &formatName, const <a class="el" href="classFormat.html">Format</a> &<a class="el" href="classMessageFormat.html#ac984e47d8f99db7f623bd60f856f8666">format</a>, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status)</td></tr> <tr class="memdesc:a781ee11f6a1512717b670b6e0db229d9"><td class="mdescLeft"> </td><td class="mdescRight">Sets one subformat for given format name. <a href="#a781ee11f6a1512717b670b6e0db229d9">More...</a><br/></td></tr> <tr class="separator:a781ee11f6a1512717b670b6e0db229d9"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab1f5fd9a8e07a97020fe8618fed368b4"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#ab1f5fd9a8e07a97020fe8618fed368b4">adoptFormat</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &formatName, <a class="el" href="classFormat.html">Format</a> *formatToAdopt, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status)</td></tr> <tr class="memdesc:ab1f5fd9a8e07a97020fe8618fed368b4"><td class="mdescLeft"> </td><td class="mdescRight">Sets one subformat for given format name. <a href="#ab1f5fd9a8e07a97020fe8618fed368b4">More...</a><br/></td></tr> <tr class="separator:ab1f5fd9a8e07a97020fe8618fed368b4"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ae6fab4bde713f7c17f12c8a6dc9ce89b"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="classFormat.html">Format</a> ** </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#ae6fab4bde713f7c17f12c8a6dc9ce89b">getFormats</a> (int32_t &count) const </td></tr> <tr class="memdesc:ae6fab4bde713f7c17f12c8a6dc9ce89b"><td class="mdescLeft"> </td><td class="mdescRight">Gets an array of subformats of this object. <a href="#ae6fab4bde713f7c17f12c8a6dc9ce89b">More...</a><br/></td></tr> <tr class="separator:ae6fab4bde713f7c17f12c8a6dc9ce89b"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ac984e47d8f99db7f623bd60f856f8666"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#ac984e47d8f99db7f623bd60f856f8666">format</a> (const <a class="el" href="classFormattable.html">Formattable</a> *source, int32_t count, <a class="el" href="classUnicodeString.html">UnicodeString</a> &appendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &ignore, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const </td></tr> <tr class="memdesc:ac984e47d8f99db7f623bd60f856f8666"><td class="mdescLeft"> </td><td class="mdescRight">Formats the given array of arguments into a user-readable string. <a href="#ac984e47d8f99db7f623bd60f856f8666">More...</a><br/></td></tr> <tr class="separator:ac984e47d8f99db7f623bd60f856f8666"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a427aef9177f57f8c1fd37c3a3d157437"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a427aef9177f57f8c1fd37c3a3d157437">format</a> (const <a class="el" href="classFormattable.html">Formattable</a> &obj, <a class="el" href="classUnicodeString.html">UnicodeString</a> &appendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &pos, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const </td></tr> <tr class="memdesc:a427aef9177f57f8c1fd37c3a3d157437"><td class="mdescLeft"> </td><td class="mdescRight">Formats the given array of arguments into a user-readable string. <a href="#a427aef9177f57f8c1fd37c3a3d157437">More...</a><br/></td></tr> <tr class="separator:a427aef9177f57f8c1fd37c3a3d157437"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7e78ae8192e0889a196b0b4ae86a3a6a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a7e78ae8192e0889a196b0b4ae86a3a6a">format</a> (const <a class="el" href="classFormattable.html">Formattable</a> &obj, <a class="el" href="classUnicodeString.html">UnicodeString</a> &appendTo, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const </td></tr> <tr class="memdesc:a7e78ae8192e0889a196b0b4ae86a3a6a"><td class="mdescLeft"> </td><td class="mdescRight">Formats the given array of arguments into a user-readable string. <a href="#a7e78ae8192e0889a196b0b4ae86a3a6a">More...</a><br/></td></tr> <tr class="separator:a7e78ae8192e0889a196b0b4ae86a3a6a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a8fd632cd6603981f64301fca9bb15eec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a8fd632cd6603981f64301fca9bb15eec">format</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> *argumentNames, const <a class="el" href="classFormattable.html">Formattable</a> *arguments, int32_t count, <a class="el" href="classUnicodeString.html">UnicodeString</a> &appendTo, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const </td></tr> <tr class="memdesc:a8fd632cd6603981f64301fca9bb15eec"><td class="mdescLeft"> </td><td class="mdescRight">Formats the given array of arguments into a user-defined argument name array. <a href="#a8fd632cd6603981f64301fca9bb15eec">More...</a><br/></td></tr> <tr class="separator:a8fd632cd6603981f64301fca9bb15eec"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ad9f1ebf28e194700db6fef7c16009ea5"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classFormattable.html">Formattable</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#ad9f1ebf28e194700db6fef7c16009ea5">parse</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &source, <a class="el" href="classParsePosition.html">ParsePosition</a> &pos, int32_t &count) const </td></tr> <tr class="memdesc:ad9f1ebf28e194700db6fef7c16009ea5"><td class="mdescLeft"> </td><td class="mdescRight">Parses the given string into an array of output arguments. <a href="#ad9f1ebf28e194700db6fef7c16009ea5">More...</a><br/></td></tr> <tr class="separator:ad9f1ebf28e194700db6fef7c16009ea5"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ac4eeb461355c2d0f7c5a76c1d640eefd"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classFormattable.html">Formattable</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#ac4eeb461355c2d0f7c5a76c1d640eefd">parse</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &source, int32_t &count, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const </td></tr> <tr class="memdesc:ac4eeb461355c2d0f7c5a76c1d640eefd"><td class="mdescLeft"> </td><td class="mdescRight">Parses the given string into an array of output arguments. <a href="#ac4eeb461355c2d0f7c5a76c1d640eefd">More...</a><br/></td></tr> <tr class="separator:ac4eeb461355c2d0f7c5a76c1d640eefd"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a53732066584f68579adf8bf91409217c"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a53732066584f68579adf8bf91409217c">parseObject</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &source, <a class="el" href="classFormattable.html">Formattable</a> &result, <a class="el" href="classParsePosition.html">ParsePosition</a> &pos) const </td></tr> <tr class="memdesc:a53732066584f68579adf8bf91409217c"><td class="mdescLeft"> </td><td class="mdescRight">Parses the given string into an array of output arguments stored within a single <a class="el" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> of type kArray. <a href="#a53732066584f68579adf8bf91409217c">More...</a><br/></td></tr> <tr class="separator:a53732066584f68579adf8bf91409217c"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a40b7cb584ce76b7bc3be2289a48c9f96"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a40b7cb584ce76b7bc3be2289a48c9f96">usesNamedArguments</a> () const </td></tr> <tr class="memdesc:a40b7cb584ce76b7bc3be2289a48c9f96"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if this <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> uses named arguments, and false otherwise. <a href="#a40b7cb584ce76b7bc3be2289a48c9f96">More...</a><br/></td></tr> <tr class="separator:a40b7cb584ce76b7bc3be2289a48c9f96"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a10a58c0715cac006dd4d05f1f1ad6eb2"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a10a58c0715cac006dd4d05f1f1ad6eb2">getDynamicClassID</a> (<a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a>) const </td></tr> <tr class="memdesc:a10a58c0715cac006dd4d05f1f1ad6eb2"><td class="mdescLeft"> </td><td class="mdescRight">Returns a unique class ID POLYMORPHICALLY. <a href="#a10a58c0715cac006dd4d05f1f1ad6eb2">More...</a><br/></td></tr> <tr class="separator:a10a58c0715cac006dd4d05f1f1ad6eb2"><td class="memSeparator" colspan="2"> </td></tr> <tr class="inherit_header pub_methods_classFormat"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classFormat')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classFormat.html">Format</a></td></tr> <tr class="memitem:aafee703f14d0f5ddb264b708a75174a8 inherit pub_methods_classFormat"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#aafee703f14d0f5ddb264b708a75174a8">~Format</a> ()</td></tr> <tr class="memdesc:aafee703f14d0f5ddb264b708a75174a8 inherit pub_methods_classFormat"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#aafee703f14d0f5ddb264b708a75174a8">More...</a><br/></td></tr> <tr class="separator:aafee703f14d0f5ddb264b708a75174a8 inherit pub_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a4f65d87226814931dde8b035f47b69f3 inherit pub_methods_classFormat"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a4f65d87226814931dde8b035f47b69f3">operator!=</a> (const <a class="el" href="classFormat.html">Format</a> &other) const </td></tr> <tr class="memdesc:a4f65d87226814931dde8b035f47b69f3 inherit pub_methods_classFormat"><td class="mdescLeft"> </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">More...</a><br/></td></tr> <tr class="separator:a4f65d87226814931dde8b035f47b69f3 inherit pub_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:af3f0b157f07d6e9f908da69c99239600 inherit pub_methods_classFormat"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#af3f0b157f07d6e9f908da69c99239600">format</a> (const <a class="el" href="classFormattable.html">Formattable</a> &obj, <a class="el" href="classUnicodeString.html">UnicodeString</a> &appendTo, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const </td></tr> <tr class="memdesc:af3f0b157f07d6e9f908da69c99239600 inherit pub_methods_classFormat"><td class="mdescLeft"> </td><td class="mdescRight">Formats an object to produce a string. <a href="#af3f0b157f07d6e9f908da69c99239600">More...</a><br/></td></tr> <tr class="separator:af3f0b157f07d6e9f908da69c99239600 inherit pub_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a90da11177ef906f464d63ca14300e1c9 inherit pub_methods_classFormat"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a90da11177ef906f464d63ca14300e1c9">parseObject</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &source, <a class="el" href="classFormattable.html">Formattable</a> &result, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status) const </td></tr> <tr class="memdesc:a90da11177ef906f464d63ca14300e1c9 inherit pub_methods_classFormat"><td class="mdescLeft"> </td><td class="mdescRight">Parses a string to produce an object. <a href="#a90da11177ef906f464d63ca14300e1c9">More...</a><br/></td></tr> <tr class="separator:a90da11177ef906f464d63ca14300e1c9 inherit pub_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a4502b04fe77be54f9f0343a87156fbd5 inherit pub_methods_classFormat"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classLocale.html">Locale</a> </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> &status) const </td></tr> <tr class="memdesc:a4502b04fe77be54f9f0343a87156fbd5 inherit pub_methods_classFormat"><td class="mdescLeft"> </td><td class="mdescRight">Get the locale for this format object. <a href="#a4502b04fe77be54f9f0343a87156fbd5">More...</a><br/></td></tr> <tr class="separator:a4502b04fe77be54f9f0343a87156fbd5 inherit pub_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ad8ca4e4cbd2a11b4de3c748c48c7c536 inherit pub_methods_classFormat"><td class="memItemLeft" align="right" valign="top">const char * </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> &status) const </td></tr> <tr class="memdesc:ad8ca4e4cbd2a11b4de3c748c48c7c536 inherit pub_methods_classFormat"><td class="mdescLeft"> </td><td class="mdescRight">Get the locale for this format object. <a href="#ad8ca4e4cbd2a11b4de3c748c48c7c536">More...</a><br/></td></tr> <tr class="separator:ad8ca4e4cbd2a11b4de3c748c48c7c536 inherit pub_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="inherit_header pub_methods_classUObject"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classUObject')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classUObject.html">UObject</a></td></tr> <tr class="memitem:ace22cf29a90641ef43350deae5bedb85 inherit pub_methods_classUObject"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classUObject.html#ace22cf29a90641ef43350deae5bedb85">~UObject</a> ()</td></tr> <tr class="memdesc:ace22cf29a90641ef43350deae5bedb85 inherit pub_methods_classUObject"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#ace22cf29a90641ef43350deae5bedb85">More...</a><br/></td></tr> <tr class="separator:ace22cf29a90641ef43350deae5bedb85 inherit pub_methods_classUObject"><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:a44ac6c9d28fcc101ba8cfce3e9230871"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classUnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a44ac6c9d28fcc101ba8cfce3e9230871">format</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &pattern, const <a class="el" href="classFormattable.html">Formattable</a> *arguments, int32_t count, <a class="el" href="classUnicodeString.html">UnicodeString</a> &appendTo, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status)</td></tr> <tr class="memdesc:a44ac6c9d28fcc101ba8cfce3e9230871"><td class="mdescLeft"> </td><td class="mdescRight">Formats the given array of arguments into a user-readable string using the given pattern. <a href="#a44ac6c9d28fcc101ba8cfce3e9230871">More...</a><br/></td></tr> <tr class="separator:a44ac6c9d28fcc101ba8cfce3e9230871"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a1649c7540f4789dbc2fd43bb251e3dd8"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classUnicodeString.html">UnicodeString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#a1649c7540f4789dbc2fd43bb251e3dd8">autoQuoteApostrophe</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &pattern, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &status)</td></tr> <tr class="memdesc:a1649c7540f4789dbc2fd43bb251e3dd8"><td class="mdescLeft"> </td><td class="mdescRight">Convert an 'apostrophe-friendly' pattern into a standard pattern. <a href="#a1649c7540f4789dbc2fd43bb251e3dd8">More...</a><br/></td></tr> <tr class="separator:a1649c7540f4789dbc2fd43bb251e3dd8"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:aabdeb33d4de48799fe111a337d0684c6"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMessageFormat.html#aabdeb33d4de48799fe111a337d0684c6">getStaticClassID</a> (<a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a>)</td></tr> <tr class="memdesc:aabdeb33d4de48799fe111a337d0684c6"><td class="mdescLeft"> </td><td class="mdescRight">Return the class ID for this class. <a href="#aabdeb33d4de48799fe111a337d0684c6">More...</a><br/></td></tr> <tr class="separator:aabdeb33d4de48799fe111a337d0684c6"><td class="memSeparator" colspan="2"> </td></tr> <tr class="inherit_header pub_static_methods_classUMemory"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classUMemory')"><img src="closed.png" alt="-"/> Static Public Member Functions inherited from <a class="el" href="classUMemory.html">UMemory</a></td></tr> <tr class="memitem:a309b19b5777e2840b85b202aef5a54fb inherit pub_static_methods_classUMemory"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classUMemory.html#a309b19b5777e2840b85b202aef5a54fb">operator new</a> (size_t size)</td></tr> <tr class="memdesc:a309b19b5777e2840b85b202aef5a54fb inherit pub_static_methods_classUMemory"><td class="mdescLeft"> </td><td class="mdescRight">Override for ICU4C C++ memory management. <a href="#a309b19b5777e2840b85b202aef5a54fb">More...</a><br/></td></tr> <tr class="separator:a309b19b5777e2840b85b202aef5a54fb inherit pub_static_methods_classUMemory"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a4d0df3571728e7b8a823dbbea6e9b5c5 inherit pub_static_methods_classUMemory"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classUMemory.html#a4d0df3571728e7b8a823dbbea6e9b5c5">operator new[]</a> (size_t size)</td></tr> <tr class="memdesc:a4d0df3571728e7b8a823dbbea6e9b5c5 inherit pub_static_methods_classUMemory"><td class="mdescLeft"> </td><td class="mdescRight">Override for ICU4C C++ memory management. <a href="#a4d0df3571728e7b8a823dbbea6e9b5c5">More...</a><br/></td></tr> <tr class="separator:a4d0df3571728e7b8a823dbbea6e9b5c5 inherit pub_static_methods_classUMemory"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:adcda65a58813749f8f45c5e6c1ed37e1 inherit pub_static_methods_classUMemory"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classUMemory.html#adcda65a58813749f8f45c5e6c1ed37e1">operator delete</a> (<a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> *p)</td></tr> <tr class="memdesc:adcda65a58813749f8f45c5e6c1ed37e1 inherit pub_static_methods_classUMemory"><td class="mdescLeft"> </td><td class="mdescRight">Override for ICU4C C++ memory management. <a href="#adcda65a58813749f8f45c5e6c1ed37e1">More...</a><br/></td></tr> <tr class="separator:adcda65a58813749f8f45c5e6c1ed37e1 inherit pub_static_methods_classUMemory"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7602a7a8c6fdff21d9fbecea4d899333 inherit pub_static_methods_classUMemory"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classUMemory.html#a7602a7a8c6fdff21d9fbecea4d899333">operator delete[]</a> (<a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> *p)</td></tr> <tr class="memdesc:a7602a7a8c6fdff21d9fbecea4d899333 inherit pub_static_methods_classUMemory"><td class="mdescLeft"> </td><td class="mdescRight">Override for ICU4C C++ memory management. <a href="#a7602a7a8c6fdff21d9fbecea4d899333">More...</a><br/></td></tr> <tr class="separator:a7602a7a8c6fdff21d9fbecea4d899333 inherit pub_static_methods_classUMemory"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a43b5221fe429f77230b2040f8724c154 inherit pub_static_methods_classUMemory"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classUMemory.html#a43b5221fe429f77230b2040f8724c154">operator new</a> (size_t, <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> *ptr)</td></tr> <tr class="memdesc:a43b5221fe429f77230b2040f8724c154 inherit pub_static_methods_classUMemory"><td class="mdescLeft"> </td><td class="mdescRight">Override for ICU4C C++ memory management for STL. <a href="#a43b5221fe429f77230b2040f8724c154">More...</a><br/></td></tr> <tr class="separator:a43b5221fe429f77230b2040f8724c154 inherit pub_static_methods_classUMemory"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9b746b0cdb49c8f8907773002ea5c4ea inherit pub_static_methods_classUMemory"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classUMemory.html#a9b746b0cdb49c8f8907773002ea5c4ea">operator delete</a> (<a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> *, <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> *)</td></tr> <tr class="memdesc:a9b746b0cdb49c8f8907773002ea5c4ea inherit pub_static_methods_classUMemory"><td class="mdescLeft"> </td><td class="mdescRight">Override for ICU4C C++ memory management for STL. <a href="#a9b746b0cdb49c8f8907773002ea5c4ea">More...</a><br/></td></tr> <tr class="separator:a9b746b0cdb49c8f8907773002ea5c4ea inherit pub_static_methods_classUMemory"><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:a633236b616d8e67ea32f83ed52132aae"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a633236b616d8e67ea32f83ed52132aae"></a> class </td><td class="memItemRight" valign="bottom"><b>MessageFormatAdapter</b></td></tr> <tr class="separator:a633236b616d8e67ea32f83ed52132aae"><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_classFormat"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classFormat')"><img src="closed.png" alt="-"/> Protected Member Functions inherited from <a class="el" href="classFormat.html">Format</a></td></tr> <tr class="memitem:ae15f405ad3805e8d6691354047b500ca inherit pro_methods_classFormat"><td class="memItemLeft" align="right" valign="top"><a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#ae15f405ad3805e8d6691354047b500ca">setLocaleIDs</a> (const char *valid, const char *actual)</td></tr> <tr class="separator:ae15f405ad3805e8d6691354047b500ca inherit pro_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9326a787208f39b9544fc6fcbcbfcad3 inherit pro_methods_classFormat"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a9326a787208f39b9544fc6fcbcbfcad3">Format</a> ()</td></tr> <tr class="memdesc:a9326a787208f39b9544fc6fcbcbfcad3 inherit pro_methods_classFormat"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor for subclass use only. <a href="#a9326a787208f39b9544fc6fcbcbfcad3">More...</a><br/></td></tr> <tr class="separator:a9326a787208f39b9544fc6fcbcbfcad3 inherit pro_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ab69111c370cfe44f9508e78e5431cc65 inherit pro_methods_classFormat"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#ab69111c370cfe44f9508e78e5431cc65">Format</a> (const <a class="el" href="classFormat.html">Format</a> &)</td></tr> <tr class="separator:ab69111c370cfe44f9508e78e5431cc65 inherit pro_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7a5276a88c488462eea3a508b71f4d9c inherit pro_methods_classFormat"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classFormat.html">Format</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a7a5276a88c488462eea3a508b71f4d9c">operator=</a> (const <a class="el" href="classFormat.html">Format</a> &)</td></tr> <tr class="separator:a7a5276a88c488462eea3a508b71f4d9c inherit pro_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> <tr class="inherit_header pro_static_methods_classFormat"><td colspan="2" onclick="javascript:toggleInherit('pro_static_methods_classFormat')"><img src="closed.png" alt="-"/> Static Protected Member Functions inherited from <a class="el" href="classFormat.html">Format</a></td></tr> <tr class="memitem:a98213ada53770537d242f4bf0ba43b73 inherit pro_static_methods_classFormat"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classFormat.html#a98213ada53770537d242f4bf0ba43b73">syntaxError</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &pattern, int32_t pos, <a class="el" href="structUParseError.html">UParseError</a> &parseError)</td></tr> <tr class="memdesc:a98213ada53770537d242f4bf0ba43b73 inherit pro_static_methods_classFormat"><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="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a>. <a href="#a98213ada53770537d242f4bf0ba43b73">More...</a><br/></td></tr> <tr class="separator:a98213ada53770537d242f4bf0ba43b73 inherit pro_static_methods_classFormat"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>A <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> produces concatenated messages in a language-neutral way. </p> <p>It should be used for all string concatenations that are visible to end users. </p> <p>A <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> contains an array of <em>subformats</em> arranged within a <em>template string</em>. Together, the subformats and template string determine how the <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> will operate during formatting and parsing. </p> <p>Typically, both the subformats and the template string are specified at once in a <em>pattern</em>. By using different patterns for different locales, messages may be localized. </p> <p>During formatting, the <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> takes an array of arguments and produces a user-readable string. Each argument is 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; they may be passed in in an array, or as a single <a class="el" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> object which itself contains an array. Each argument is matched up with its corresponding subformat, which then formats it into a string. The resultant strings are then assembled within the string template of the <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> to produce the final output string. </p> <p><b>Note:</b> In ICU 4.0 <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> supports named arguments. If a named argument is used, all arguments must be named. Names start with a character in <code>UCHAR_ID_START</code> and continue with characters in <code>UCHARID_CONTINUE</code>, in particular they do not start with a digit. If named arguments are used, <a class="el" href="classMessageFormat.html#a40b7cb584ce76b7bc3be2289a48c9f96">usesNamedArguments()</a> will return true. </p> <p>The other new methods supporting named arguments are <a class="el" href="classMessageFormat.html#a4767de0a57c55c404db332be67edb73e">getFormatNames(UErrorCode& status)</a>, <a class="el" href="classMessageFormat.html#aaa4cef286b4f4f5845ed783e079ad96b">getFormat(const UnicodeString& formatName, UErrorCode& status)</a> <a class="el" href="classMessageFormat.html#a781ee11f6a1512717b670b6e0db229d9">setFormat(const UnicodeString& formatName, const Format& format, UErrorCode& status)</a>, <a class="el" href="classMessageFormat.html#ab1f5fd9a8e07a97020fe8618fed368b4">adoptFormat(const UnicodeString& formatName, Format* formatToAdopt, UErrorCode& status)</a>, <a class="el" href="">format(const Formattable* arguments, const UnicodeString <em>argumentNames, int32_t cnt, UnicodeString& appendTo, FieldPosition& status, int32_t recursionProtection, UErrorCode& success)</a>, <a class="el" href="">format(const UnicodeString</em> argumentNames, const Formattable* arguments, int32_t count, UnicodeString& appendTo,UErrorCode& status)</a>. These methods are all compatible with patterns that do not used named arguments– in these cases the keys in the input or output use <code><a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a></code>s that name the argument indices, e.g. "0", "1", "2"... etc. </p> <p>When named arguments are used, certain methods on <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> that take or return arrays do not perform any action, since it is not possible to identify positions in an array using a name. UErrorCode is set to U_ARGUMENT_TYPE_MISMATCH if there is a status/success field in the method. These methods are <a class="el" href="classMessageFormat.html#a4322393c6960d0abbecb97e2d5db7032">adoptFormats(Format** newFormats, int32_t count)</a>, <a class="el" href="classMessageFormat.html#a7d51d28b509a3d1365b250be805556a8">setFormats(const Format** newFormats,int32_t count)</a>, <a class="el" href="">adoptFormat(int32_t n, Format <em>newFormat)</a>, <a class="el" href="">getFormats(int32_t& cnt)</a>, <a class="el" href="">format(const Formattable</em> source,int32_t cnt,UnicodeString& appendTo, FieldPosition& ignore, UErrorCode& success)</a>, <a class="el" href="classMessageFormat.html#a44ac6c9d28fcc101ba8cfce3e9230871">format(const UnicodeString& pattern,const Formattable* arguments,int32_t cnt,UnicodeString& appendTo,UErrorCode& success)</a>, <a class="el" href="">format(const Formattable& source, UnicodeString& appendTo,FieldPosition& ignore, UErrorCode& success)</a>, <a class="el" href="">format(const Formattable* arguments, int32_t cnt, UnicodeString& appendTo, FieldPosition& status, int32_t recursionProtection,UErrorCode& success)</a>, <a class="el" href="">parse(const UnicodeString& source, ParsePosition& pos,int32_t& count)</a>, <a class="el" href="">parse(const UnicodeString& source, int32_t& cnt, UErrorCode& status)</a> </p> <p>During parsing, an input string is matched against the string template of the <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> to produce an array 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. Plain text of the template string is matched directly against intput text. At each position in the template string where a subformat is located, the subformat is called to parse the corresponding segment of input text to produce an output argument. In this way, an array of arguments is created which together constitute the parse result. </p> <p>Parsing may fail or produce unexpected results in a number of circumstances. </p> <ul> <li> If one of the arguments does not occur in the pattern, it will be returned as a default <a class="el" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a>. </li> <li> If the format of an argument is loses information, such as with a choice format where a large number formats to "many", then the parse may not correspond to the originally formatted argument. </li> <li> <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> does not handle <a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those ranges...">ChoiceFormat</a> recursion during parsing; such parses will fail. </li> <li> Parsing will not always find a match (or the correct match) if some part of the parse is ambiguous. For example, if the pattern "{1},{2}" is used with the string arguments {"a,b", "c"}, it will format as "a,b,c". When the result is parsed, it will return {"a", "b,c"}. </li> <li> If a single argument is formatted more than once in the string, then the rightmost subformat in the pattern string will produce the parse result; prior subformats with the same argument index will have no effect. </li> </ul> <p>Here are some examples of usage: </p> <p>Example 1: </p> <pre> <div class="fragment"><div class="line">* <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> success = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;</div> <div class="line">* <a class="code" href="classGregorianCalendar.html">GregorianCalendar</a> cal(success);</div> <div class="line">* <a class="code" href="classFormattable.html">Formattable</a> arguments[] = {</div> <div class="line">* 7L,</div> <div class="line">* <a class="code" href="classFormattable.html">Formattable</a>( (Date) cal.getTime(success), Formattable::kIsDate),</div> <div class="line">* <span class="stringliteral">"a disturbance in the Force"</span></div> <div class="line">* };</div> <div class="line">*</div> <div class="line">* <a class="code" href="classUnicodeString.html">UnicodeString</a> result;</div> <div class="line">* <a class="code" href="classMessageFormat.html#ac984e47d8f99db7f623bd60f856f8666">MessageFormat::format</a>(</div> <div class="line">* <span class="stringliteral">"At {1,time} on {1,date}, there was {2} on planet {0,number}."</span>,</div> <div class="line">* arguments, 3, result, success );</div> <div class="line">*</div> <div class="line">* cout << <span class="stringliteral">"result: "</span> << result << endl;</div> <div class="line">* <span class="comment">//<output>: At 4:34:20 PM on 23-Mar-98, there was a disturbance</span></div> <div class="line">* <span class="comment">// in the Force on planet 7.</span></div> <div class="line">* </div> </div><!-- fragment --> </pre><p> Typically, the message format will come from resources, and the arguments will be dynamically set at runtime. </p> <p>Example 2: </p> <pre> <div class="fragment"><div class="line">* success = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;</div> <div class="line">* <a class="code" href="classFormattable.html">Formattable</a> testArgs[] = {3L, <span class="stringliteral">"MyDisk"</span>};</div> <div class="line">*</div> <div class="line">* <a class="code" href="classMessageFormat.html">MessageFormat</a> form(</div> <div class="line">* <span class="stringliteral">"The disk \"{1}\" contains {0} file(s)."</span>, success );</div> <div class="line">*</div> <div class="line">* <a class="code" href="classUnicodeString.html">UnicodeString</a> string;</div> <div class="line">* <a class="code" href="classFieldPosition.html">FieldPosition</a> fpos = 0;</div> <div class="line">* cout << <span class="stringliteral">"format: "</span> << form.<a class="code" href="classNumberFormat.html#a53e27d424735198566d90eb30401ec36">format</a>(testArgs, 2, <span class="keywordtype">string</span>, fpos, success ) << endl;</div> <div class="line">*</div> <div class="line">* <span class="comment">// output, with different testArgs:</span></div> <div class="line">* <span class="comment">// output: The disk "MyDisk" contains 0 file(s).</span></div> <div class="line">* <span class="comment">// output: The disk "MyDisk" contains 1 file(s).</span></div> <div class="line">* <span class="comment">// output: The disk "MyDisk" contains 1,273 file(s).</span></div> <div class="line">* </div> </div><!-- fragment --> </pre><p>The pattern is of the following form. Legend: </p> <pre> <div class="fragment"><div class="line">* {optional item}</div> <div class="line">* (group that may be repeated)*</div> <div class="line">* </div> </div><!-- fragment --> </pre><p> Do not confuse optional items with items inside quotes braces, such as this: "{". Quoted braces are literals. </p> <pre> <div class="fragment"><div class="line">* messageFormatPattern := string ( <span class="stringliteral">"{"</span> messageFormatElement <span class="stringliteral">"}"</span> <span class="keywordtype">string</span> )*</div> <div class="line">*</div> <div class="line">* messageFormatElement := argumentIndex | argumentName { <span class="stringliteral">","</span> elementFormat }</div> <div class="line">*</div> <div class="line">* elementFormat := <span class="stringliteral">"time"</span> { <span class="stringliteral">","</span> datetimeStyle }</div> <div class="line">* | <span class="stringliteral">"date"</span> { <span class="stringliteral">","</span> datetimeStyle }</div> <div class="line">* | <span class="stringliteral">"number"</span> { <span class="stringliteral">","</span> numberStyle }</div> <div class="line">* | <span class="stringliteral">"choice"</span> <span class="stringliteral">","</span> choiceStyle</div> <div class="line">*</div> <div class="line">* datetimeStyle := <span class="stringliteral">"short"</span></div> <div class="line">* | <span class="stringliteral">"medium"</span></div> <div class="line">* | <span class="stringliteral">"long"</span></div> <div class="line">* | <span class="stringliteral">"full"</span></div> <div class="line">* | dateFormatPattern</div> <div class="line">*</div> <div class="line">* numberStyle := <span class="stringliteral">"currency"</span></div> <div class="line">* | <span class="stringliteral">"percent"</span></div> <div class="line">* | <span class="stringliteral">"integer"</span></div> <div class="line">* | numberFormatPattern</div> <div class="line">*</div> <div class="line">* choiceStyle := choiceFormatPattern</div> <div class="line">* </div> <div class="line">* pluralStyle := pluralFormatPattern</div> <div class="line">* </div> </div><!-- fragment --> </pre><p> If there is no elementFormat, then the argument must be a string, which is substituted. If there is no dateTimeStyle or numberStyle, then the default format is used (e.g. <a class="el" href="classNumberFormat.html#a2483fa1e87f3600395ff0c8f364f7b6f" title="Returns the default number format for the current default locale. ">NumberFormat::createInstance()</a>, <a class="el" href="classDateFormat.html#abfd5a63e39e890a2ff07a5b15ec88a42" title="Creates a time formatter with the given formatting style for the given locale. ">DateFormat::createTimeInstance</a>(DateFormat::kDefault, ...) or <a class="el" href="classDateFormat.html#a4421ca0c8b71b078f3ab9433f5413380" title="Creates a date formatter with the given formatting style for the given const locale. ">DateFormat::createDateInstance</a>(DateFormat::kDefault, ...). For a <a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those ranges...">ChoiceFormat</a>, the pattern must always be specified, since there is no default. </p> <p>In strings, single quotes can be used to quote syntax characters. A literal single quote is represented by '', both within and outside of single-quoted segments. Inside a messageFormatElement, quotes are <em>not</em> removed. For example, {1,number,$'#',##} will produce a number format with the pound-sign quoted, with a result such as: "$#31,45". </p> <p>If a pattern is used, then unquoted braces in the pattern, if any, must match: that is, "ab {0} de" and "ab '}' de" are ok, but "ab {0'}' de" and "ab } de" are not. </p> <dl> <dt><b>Warning:</b></dt> <dd><p class="startdd">The rules for using quotes within message format patterns unfortunately have shown to be somewhat confusing. In particular, it isn't always obvious to localizers whether single quotes need to be doubled or not. Make sure to inform localizers about the rules, and tell them (for example, by using comments in resource bundle source files) which strings will be processed by <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a>. Note that localizers may need to use single quotes in translated strings where the original version doesn't have them. <br/> Note also that the simplest way to avoid the problem is to use the real apostrophe (single quote) character U+2019 (') for human-readable text, and to use the ASCII apostrophe (U+0027 ' ) only in program syntax, like quoting in <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a>. See the annotations for U+0027 Apostrophe in The Unicode Standard.</p> <p class="enddd"></p> </dd> </dl> <p>The argumentIndex is a non-negative integer, which corresponds to the index of the arguments presented in an array to be formatted. The first argument has argumentIndex 0. </p> <p>It is acceptable to have unused arguments in the array. With missing arguments or arguments that are not of the right class for the specified format, a failing UErrorCode result is set. </p> <p>For more sophisticated patterns, you can use a <a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those ranges...">ChoiceFormat</a> to get output: </p> <pre> <div class="fragment"><div class="line">* <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> success = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78caa43dbfc9499c5f911d04e1a0ca3bf6f9">U_ZERO_ERROR</a>;</div> <div class="line">* <a class="code" href="classMessageFormat.html">MessageFormat</a>* form(<span class="stringliteral">"The disk \"{1}\" contains {0}."</span>, success);</div> <div class="line">* <span class="keywordtype">double</span> filelimits[] = {0,1,2};</div> <div class="line">* <a class="code" href="classUnicodeString.html">UnicodeString</a> filepart[] = {<span class="stringliteral">"no files"</span>,<span class="stringliteral">"one file"</span>,<span class="stringliteral">"{0,number} files"</span>};</div> <div class="line">* <a class="code" href="classChoiceFormat.html">ChoiceFormat</a>* fileform = <span class="keyword">new</span> <a class="code" href="classChoiceFormat.html">ChoiceFormat</a>(filelimits, filepart, 3);</div> <div class="line">* form.setFormat(1, *fileform); <span class="comment">// NOT zero, see below</span></div> <div class="line">*</div> <div class="line">* <a class="code" href="classFormattable.html">Formattable</a> testArgs[] = {1273L, <span class="stringliteral">"MyDisk"</span>};</div> <div class="line">*</div> <div class="line">* <a class="code" href="classUnicodeString.html">UnicodeString</a> string;</div> <div class="line">* <a class="code" href="classFieldPosition.html">FieldPosition</a> fpos = 0;</div> <div class="line">* cout << form.<a class="code" href="classNumberFormat.html#a53e27d424735198566d90eb30401ec36">format</a>(testArgs, 2, <span class="keywordtype">string</span>, fpos, success) << endl;</div> <div class="line">*</div> <div class="line">* <span class="comment">// output, with different testArgs</span></div> <div class="line">* <span class="comment">// output: The disk "MyDisk" contains no files.</span></div> <div class="line">* <span class="comment">// output: The disk "MyDisk" contains one file.</span></div> <div class="line">* <span class="comment">// output: The disk "MyDisk" contains 1,273 files.</span></div> <div class="line">* </div> </div><!-- fragment --> </pre><p> You can either do this programmatically, as in the above example, or by using a pattern (see <a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those ranges...">ChoiceFormat</a> for more information) as in: </p> <pre> <div class="fragment"><div class="line">* form.applyPattern(</div> <div class="line">* <span class="stringliteral">"There {0,choice,0#are no files|1#is one file|1<are {0,number,integer} files}."</span>);</div> <div class="line">* </div> </div><!-- fragment --> </pre> <p><em>Note:</em> As we see above, the string produced by a <a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those ranges...">ChoiceFormat</a> in <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> is treated specially; occurences of '{' are used to indicated subformats, and cause recursion. If you create both a <a class="el" href="classMessageFormat.html" title="A 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 ranges...">ChoiceFormat</a> programmatically (instead of using the string patterns), then be careful not to produce a format that recurses on itself, which will cause an infinite loop. </p> <p><em>Note:</em> Subformats are numbered by their order in the pattern. This is <em>not</em> the same as the argumentIndex. </p> <pre> <div class="fragment"><div class="line">* For example: with <span class="stringliteral">"abc{2}def{3}ghi{0}..."</span>,</div> <div class="line">*</div> <div class="line">* format0 affects the first variable {2}</div> <div class="line">* format1 affects the second variable {3}</div> <div class="line">* format2 affects the second variable {0}</div> <div class="line">* </div> </div><!-- fragment --> </pre><p><em>User subclasses are not supported.</em> While clients may write subclasses, such code will not necessarily work and will not be guaranteed to work stably from release to release. </p> <p>Definition at line <a class="el" href="msgfmt_8h_source.html#l00306">306</a> of file <a class="el" href="msgfmt_8h_source.html">msgfmt.h</a>.</p> </div><h2 class="groupheader">Member Enumeration Documentation</h2> <a class="anchor" id="a3b02759e9345bba433598ca169fe2626"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">enum <a class="el" href="classMessageFormat.html#a3b02759e9345bba433598ca169fe2626">MessageFormat::EFormatNumber</a></td> </tr> </table> </div><div class="memdoc"> <p>Enum type for kMaxFormat. </p> <dl class="obsolete"><dt><b><a class="el" href="obsolete.html#_obsolete000002">Obsolete:</a></b></dt><dd>ICU 3.0. The 10-argument limit was removed as of ICU 2.6, rendering this enum type obsolete. </dd></dl> <table class="fieldtable"> <tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="a3b02759e9345bba433598ca169fe2626a2c4649766d55fba1106595c70fab6a79"></a>kMaxFormat</em> </td><td class="fielddoc"> <p>The maximum number of arguments. </p> <dl class="obsolete"><dt><b><a class="el" href="obsolete.html#_obsolete000003">Obsolete:</a></b></dt><dd>ICU 3.0. The 10-argument limit was removed as of ICU 2.6, rendering this constant obsolete. </dd></dl> </td></tr> </table> <p>Definition at line <a class="el" href="msgfmt_8h_source.html#l00313">313</a> of file <a class="el" href="msgfmt_8h_source.html">msgfmt.h</a>.</p> </div> </div> <h2 class="groupheader">Constructor & Destructor Documentation</h2> <a class="anchor" id="a9bd166332a223bf4f626bd4a23826da2"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">MessageFormat::MessageFormat </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> & </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>Constructs a new <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> using the given pattern and the default locale. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pattern</td><td>Pattern used to construct object. </td></tr> <tr><td class="paramname">status</td><td>Input/output error code. If the pattern cannot be parsed, set to failure code. </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002582">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a09d0a688a0017c803eb903b5956de3a0"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">MessageFormat::MessageFormat </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>pattern</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> & </td> <td class="paramname"><em>newLocale</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="utypes_8h.html#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>Constructs a new <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> using the given pattern and locale. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pattern</td><td>Pattern used to construct object. </td></tr> <tr><td class="paramname">newLocale</td><td>The locale to use for formatting dates and numbers. </td></tr> <tr><td class="paramname">status</td><td>Input/output error code. If the pattern cannot be parsed, set to failure code. </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002583">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="adf000f6a8019f6e9999d3df283688843"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">MessageFormat::MessageFormat </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>pattern</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> & </td> <td class="paramname"><em>newLocale</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="structUParseError.html">UParseError</a> & </td> <td class="paramname"><em>parseError</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </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>Constructs a new <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> using the given pattern and locale. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pattern</td><td>Pattern used to construct object. </td></tr> <tr><td class="paramname">newLocale</td><td>The locale to use for formatting dates and numbers. </td></tr> <tr><td class="paramname">parseError</td><td>Struct to recieve information on position of error within the pattern. </td></tr> <tr><td class="paramname">status</td><td>Input/output error code. If the pattern cannot be parsed, set to failure code. </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002584">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a945eac8450aca382e2db73b7c3187249"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">MessageFormat::MessageFormat </td> <td>(</td> <td class="paramtype">const <a class="el" href="classMessageFormat.html">MessageFormat</a> & </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Constructs a new <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> from an existing one. </p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002585">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a37bc94ae7e3622880f9f79d58320796b"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual MessageFormat::~MessageFormat </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#_stable002587">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <h2 class="groupheader">Member Function Documentation</h2> <a class="anchor" id="a96f9fb97e9bc525197b39222aba74bcc"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> MessageFormat::adoptFormat </td> <td>(</td> <td class="paramtype">int32_t </td> <td class="paramname"><em>formatNumber</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classFormat.html">Format</a> * </td> <td class="paramname"><em>formatToAdopt</em> </td> </tr> <tr> <td></td> <td>)</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>Sets one subformat. </p> <p>See the class description about format numbering. The caller should not delete the <a class="el" href="classFormat.html" title="Base class for all formats. ">Format</a> object after this call. If the number is over the number of formats already set, the item will be deleted and ignored. </p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002597">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">formatNumber</td><td>index of the subformat. </td></tr> <tr><td class="paramname">formatToAdopt</td><td>the format to be adopted. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="ab1f5fd9a8e07a97020fe8618fed368b4"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> MessageFormat::adoptFormat </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>formatName</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classFormat.html">Format</a> * </td> <td class="paramname"><em>formatToAdopt</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> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Sets one subformat for given format name. </p> <p>See the class description about format name. This function supports both named and numbered arguments– if numbered, the formatName is the corresponding UnicodeStrings (e.g. "0", "1", "2"...). If there is no matched formatName or wrong type, the item will be ignored. The caller should not delete the <a class="el" href="classFormat.html" title="Base class for all formats. ">Format</a> object after this call. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">formatName</td><td>Name of the subformat. </td></tr> <tr><td class="paramname">formatToAdopt</td><td><a class="el" href="classFormat.html" title="Base class for all formats. ">Format</a> to be adopted. </td></tr> <tr><td class="paramname">status</td><td>output param set to success/failure code. </td></tr> </table> </dd> </dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000074">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 4.0 </dd></dl> </div> </div> <a class="anchor" id="a4322393c6960d0abbecb97e2d5db7032"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> MessageFormat::adoptFormats </td> <td>(</td> <td class="paramtype"><a class="el" href="classFormat.html">Format</a> ** </td> <td class="paramname"><em>formatsToAdopt</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"><em>count</em> </td> </tr> <tr> <td></td> <td>)</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>Sets subformats. </p> <p>See the class description about format numbering. The caller should not delete the <a class="el" href="classFormat.html" title="Base class for all formats. ">Format</a> objects after this call. <em>The array formatsToAdopt is not itself adopted.</em> Its ownership is retained by the caller. If the call fails because memory cannot be allocated, then the formats will be deleted by this method, and this object will remain unchanged.</p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002595">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">formatsToAdopt</td><td>the format to be adopted. </td></tr> <tr><td class="paramname">count</td><td>the size of the array. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="ace3d4f8c18ba0b07aada0066efb9ab9d"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> MessageFormat::applyPattern </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.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> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Applies the given pattern string to this message format. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pattern</td><td>The pattern to be applied. </td></tr> <tr><td class="paramname">status</td><td>Input/output error code. If the pattern cannot be parsed, set to failure code. </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002592">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="ad5e44f1a945520eefade9b60350a3327"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> MessageFormat::applyPattern </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.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="structUParseError.html">UParseError</a> & </td> <td class="paramname"><em>parseError</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td> <td class="paramname"><em>status</em> </td> </tr> <tr> <td></td> <td>)</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>Applies the given pattern string to this message format. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pattern</td><td>The pattern to be applied. </td></tr> <tr><td class="paramname">parseError</td><td>Struct to recieve information on position of error within pattern. </td></tr> <tr><td class="paramname">status</td><td>Input/output error code. If the pattern cannot be parsed, set to failure code. </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002593">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a1649c7540f4789dbc2fd43bb251e3dd8"></a> <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="classUnicodeString.html">UnicodeString</a> MessageFormat::autoQuoteApostrophe </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.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> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Convert an 'apostrophe-friendly' pattern into a standard pattern. </p> <p>Standard patterns treat all apostrophes as quotes, which is problematic in some languages, e.g. French, where apostrophe is commonly used. This utility assumes that only an unpaired apostrophe immediately before a brace is a true quote. Other unpaired apostrophes are paired, and the resulting standard pattern string is returned.</p> <p><b>Note</b> it is not guaranteed that the returned pattern is indeed a valid pattern. The only effect is to convert between patterns having different quoting semantics.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pattern</td><td>the 'apostrophe-friendly' patttern to convert </td></tr> <tr><td class="paramname">status</td><td>Input/output error code. If the pattern cannot be parsed, the failure code is set. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>the standard equivalent of the original pattern </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002608">Stable:</a></b></dt><dd>ICU 3.4 </dd></dl> </div> </div> <a class="anchor" id="abe6a3b6d9e7e74b7586b4644e4ba001c"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="classFormat.html">Format</a>* MessageFormat::clone </td> <td>(</td> <td class="paramtype"><a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td> <td class="paramname"></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>Clones this <a class="el" href="classFormat.html" title="Base class for all formats. ">Format</a> object polymorphically. </p> <p>The caller owns the result and should delete it when done. </p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002588">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Implements <a class="el" href="classFormat.html#a4e7ebd5cfd390c35e2bda88257f8b51a">Format</a>.</p> </div> </div> <a class="anchor" id="ac984e47d8f99db7f623bd60f856f8666"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a>& MessageFormat::format </td> <td>(</td> <td class="paramtype">const <a class="el" href="classFormattable.html">Formattable</a> * </td> <td class="paramname"><em>source</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"><em>count</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> & </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> & </td> <td class="paramname"><em>ignore</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="utypes_8h.html#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>Formats the given array of arguments into a user-readable string. </p> <p>Does not take ownership of the Formattable* array or its contents.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">source</td><td>An array of objects to be formatted. </td></tr> <tr><td class="paramname">count</td><td>The number of elements of 'source'. </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">ignore</td><td>Not used; inherited from base class API. </td></tr> <tr><td class="paramname">status</td><td>Input/output error code. If the pattern cannot be parsed, set to failure code. </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#_stable002600">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a44ac6c9d28fcc101ba8cfce3e9230871"></a> <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="classUnicodeString.html">UnicodeString</a>& MessageFormat::format </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>pattern</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classFormattable.html">Formattable</a> * </td> <td class="paramname"><em>arguments</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"><em>count</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> & </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> & </td> <td class="paramname"><em>status</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Formats the given array of arguments into a user-readable string using the given pattern. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">pattern</td><td>The pattern. </td></tr> <tr><td class="paramname">arguments</td><td>An array of objects to be formatted. </td></tr> <tr><td class="paramname">count</td><td>The number of elements of 'source'. </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>Input/output error code. If the pattern cannot be parsed, set to failure code. </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#_stable002601">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a427aef9177f57f8c1fd37c3a3d157437"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>& MessageFormat::format </td> <td>(</td> <td class="paramtype">const <a class="el" href="classFormattable.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="classUnicodeString.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="classFieldPosition.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">virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Formats the given array of arguments into a user-readable string. </p> <p>The array must be stored within a single <a class="el" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> object of type kArray. If the <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 is not of type kArray, then returns a failing UErrorCode.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">obj</td><td>A <a class="el" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> of type kArray containing arguments to be formatted. </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>Input/output error code. If the pattern cannot be parsed, set to failure code. </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#_stable002602">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Implements <a class="el" href="classFormat.html#a12ffb857c5c9a553270dfe9a71fbd8e9">Format</a>.</p> </div> </div> <a class="anchor" id="a7e78ae8192e0889a196b0b4ae86a3a6a"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a> & MessageFormat::format </td> <td>(</td> <td class="paramtype">const <a class="el" href="classFormattable.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="classUnicodeString.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="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">inline</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Formats the given array of arguments into a user-readable string. </p> <p>The array must be stored within a single <a class="el" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> object of type kArray. If the <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 is not of type kArray, then 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">status</td><td>Input/output error code. If the pattern cannot be parsed, set to failure code. </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#_stable002603">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Definition at line <a class="el" href="msgfmt_8h_source.html#l00929">929</a> of file <a class="el" href="msgfmt_8h_source.html">msgfmt.h</a>.</p> <p>References <a class="el" href="classFormat.html#af3f0b157f07d6e9f908da69c99239600">Format::format()</a>.</p> </div> </div> <a class="anchor" id="a8fd632cd6603981f64301fca9bb15eec"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a>& MessageFormat::format </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> * </td> <td class="paramname"><em>argumentNames</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classFormattable.html">Formattable</a> * </td> <td class="paramname"><em>arguments</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"><em>count</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> & </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> & </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>Formats the given array of arguments into a user-defined argument name array. </p> <p>This function supports both named and numbered arguments– if numbered, the formatName is the corresponding UnicodeStrings (e.g. "0", "1", "2"...).</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">argumentNames</td><td>argument name array </td></tr> <tr><td class="paramname">arguments</td><td>An array of objects to be formatted. </td></tr> <tr><td class="paramname">count</td><td>The number of elements of 'argumentNames' and arguments. The number of argumentNames and arguments must be the same. </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>Input/output error code. If the pattern cannot be parsed, set to failure code. </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#_stable002604">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl> </div> </div> <a class="anchor" id="a10a58c0715cac006dd4d05f1f1ad6eb2"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> MessageFormat::getDynamicClassID </td> <td>(</td> <td class="paramtype"><a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td> <td class="paramname"></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>Returns a unique class ID POLYMORPHICALLY. </p> <p>Pure virtual override. This method is to implement a simple version of RTTI, since not all C++ compilers support genuine RTTI. Polymorphic <a class="el" href="classMessageFormat.html#a26e0c92e8035193f110b578381611c02" title="Returns true if the given Format objects are semantically equal. ">operator==()</a> and <a class="el" href="classMessageFormat.html#abe6a3b6d9e7e74b7586b4644e4ba001c" title="Clones this Format object polymorphically. ">clone()</a> methods call this method.</p> <dl class="section return"><dt>Returns</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#_stable002609">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Implements <a class="el" href="classFormat.html#ac961d410d174518e5a3ebb8bbef45cd7">Format</a>.</p> </div> </div> <a class="anchor" id="aaa4cef286b4f4f5845ed783e079ad96b"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="classFormat.html">Format</a>* MessageFormat::getFormat </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>formatName</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> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Gets subformat pointer for given format name. </p> <p>This function supports both named and numbered arguments– if numbered, the formatName is the corresponding UnicodeStrings (e.g. "0", "1", "2"...). The returned <a class="el" href="classFormat.html" title="Base class for all formats. ">Format</a> object should not be deleted by the caller, nor should the ponter of other object . The pointer and its contents remain valid only until the next call to any method of this class is made with this object. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">formatName</td><td>the name or number specifying a format </td></tr> <tr><td class="paramname">status</td><td>output param set to success/failure code. </td></tr> </table> </dd> </dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000072">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 4.0 </dd></dl> </div> </div> <a class="anchor" id="a4767de0a57c55c404db332be67edb73e"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="classStringEnumeration.html">StringEnumeration</a>* MessageFormat::getFormatNames </td> <td>(</td> <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td> <td class="paramname"><em>status</em></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>Gets format names. </p> <p>This function returns formatNames in StringEnumerations which can be used with <a class="el" href="classMessageFormat.html#aaa4cef286b4f4f5845ed783e079ad96b" title="Gets subformat pointer for given format name. ">getFormat()</a> and <a class="el" href="classMessageFormat.html#a16530e29c89c9a569d973b0e5f0fc598" title="Sets one subformat. ">setFormat()</a> to export formattable array from current <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> to another. It is caller's resposibility to delete the returned formatNames. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">status</td><td>output param set to success/failure code. </td></tr> </table> </dd> </dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000071">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 4.0 </dd></dl> </div> </div> <a class="anchor" id="ae6fab4bde713f7c17f12c8a6dc9ce89b"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual const <a class="el" href="classFormat.html">Format</a>** MessageFormat::getFormats </td> <td>(</td> <td class="paramtype">int32_t & </td> <td class="paramname"><em>count</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>Gets an array of subformats of this object. </p> <p>The returned array should not be deleted by the caller, nor should the pointers within the array. The array and its contents remain valid only until the next call to any method of this class is made with this object. See the class description about format numbering. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">count</td><td>output parameter to receive the size of the array </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>an array of count Format* objects, or NULL if out of memory. Any or all of the array elements may be NULL. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002599">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a422910b60d0e79cf37afa8a49418333b"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual const <a class="el" href="classLocale.html">Locale</a>& MessageFormat::getLocale </td> <td>(</td> <td class="paramtype"><a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </td> <td class="paramname"></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>Gets the locale. </p> <p>This locale is used for fetching default number or date format information. </p> <dl class="section return"><dt>Returns</dt><dd>the locale of the object. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002591">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="aabdeb33d4de48799fe111a337d0684c6"></a> <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="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> MessageFormat::getStaticClassID </td> <td>(</td> <td class="paramtype"><a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> </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>Return the class ID for this class. </p> <p>This is useful only for comparing to a return value from <a class="el" href="classMessageFormat.html#a10a58c0715cac006dd4d05f1f1ad6eb2" title="Returns a unique class ID POLYMORPHICALLY. ">getDynamicClassID()</a>. For example: </p> <pre> . Base* polymorphic_pointer = createPolymorphicObject(); . if (polymorphic_pointer-><a class="el" href="classMessageFormat.html#a10a58c0715cac006dd4d05f1f1ad6eb2" title="Returns a unique class ID POLYMORPHICALLY. ">getDynamicClassID()</a> == . Derived::getStaticClassID()) ... </pre> <dl class="section return"><dt>Returns</dt><dd>The class ID for all objects of this class. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002610">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a48e4814289b48723b11e7cd00df0be69"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="classMessageFormat.html">MessageFormat</a>& MessageFormat::operator= </td> <td>(</td> <td class="paramtype">const <a class="el" href="classMessageFormat.html">MessageFormat</a> & </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Assignment operator. </p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002586">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a26e0c92e8035193f110b578381611c02"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> MessageFormat::operator== </td> <td>(</td> <td class="paramtype">const <a class="el" href="classFormat.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>Returns 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 class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">other</td><td>the object to be compared with. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>true if the given <a class="el" href="classFormat.html" title="Base class for all formats. ">Format</a> objects are semantically equal. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002589">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Implements <a class="el" href="classFormat.html#ad9be7e8b7bef97013ff74ef1be3903a5">Format</a>.</p> </div> </div> <a class="anchor" id="ad9f1ebf28e194700db6fef7c16009ea5"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="classFormattable.html">Formattable</a>* MessageFormat::parse </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.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="classParsePosition.html">ParsePosition</a> & </td> <td class="paramname"><em>pos</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t & </td> <td class="paramname"><em>count</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">virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Parses the given string into an array of output arguments. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">source</td><td>String to be parsed. </td></tr> <tr><td class="paramname">pos</td><td>On input, starting position for parse. On output, final position after parse. Unchanged if parse fails. </td></tr> <tr><td class="paramname">count</td><td>Output parameter to receive the number of arguments parsed. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>an array of parsed arguments. The caller owns both the array and its contents. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002605">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="ac4eeb461355c2d0f7c5a76c1d640eefd"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="classFormattable.html">Formattable</a>* MessageFormat::parse </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>source</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t & </td> <td class="paramname"><em>count</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="utypes_8h.html#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">virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Parses the given string into an array of output arguments. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">source</td><td>String to be parsed. </td></tr> <tr><td class="paramname">count</td><td>Output param to receive size of returned array. </td></tr> <tr><td class="paramname">status</td><td>Input/output error code. If the pattern cannot be parsed, set to failure code. If the <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> is named argument, the status is set to U_ARGUMENT_TYPE_MISMATCH. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>an array of parsed arguments. The caller owns both the array and its contents. Return NULL if status is not U_ZERO_ERROR.</dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002606">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a53732066584f68579adf8bf91409217c"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> MessageFormat::parseObject </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.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="classFormattable.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="classParsePosition.html">ParsePosition</a> & </td> <td class="paramname"><em>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">virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Parses the given string into an array of output arguments stored within a single <a class="el" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting. ">Formattable</a> of type kArray. </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="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 class="paramname">pos</td><td>On input, starting position for parse. On output, final position after parse. Unchanged if parse fails. </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002607">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <p>Implements <a class="el" href="classFormat.html#aa53bea97b986c2f21e5638aa30aa08b7">Format</a>.</p> </div> </div> <a class="anchor" id="a16530e29c89c9a569d973b0e5f0fc598"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> MessageFormat::setFormat </td> <td>(</td> <td class="paramtype">int32_t </td> <td class="paramname"><em>formatNumber</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classFormat.html">Format</a> & </td> <td class="paramname"><em>format</em> </td> </tr> <tr> <td></td> <td>)</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>Sets one subformat. </p> <p>See the class description about format numbering. If the number is over the number of formats already set, the item will be ignored. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">formatNumber</td><td>index of the subformat. </td></tr> <tr><td class="paramname">format</td><td>the format to be set. </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002598">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a781ee11f6a1512717b670b6e0db229d9"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> MessageFormat::setFormat </td> <td>(</td> <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>formatName</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classFormat.html">Format</a> & </td> <td class="paramname"><em>format</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> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">virtual</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Sets one subformat for given format name. </p> <p>See the class description about format name. This function supports both named and numbered arguments– if numbered, the formatName is the corresponding UnicodeStrings (e.g. "0", "1", "2"...). If there is no matched formatName or wrong type, the item will be ignored. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">formatName</td><td>Name of the subformat. </td></tr> <tr><td class="paramname">format</td><td>the format to be set. </td></tr> <tr><td class="paramname">status</td><td>output param set to success/failure code. </td></tr> </table> </dd> </dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000073">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 4.0 </dd></dl> </div> </div> <a class="anchor" id="a7d51d28b509a3d1365b250be805556a8"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> MessageFormat::setFormats </td> <td>(</td> <td class="paramtype">const <a class="el" href="classFormat.html">Format</a> ** </td> <td class="paramname"><em>newFormats</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"><em>cnt</em> </td> </tr> <tr> <td></td> <td>)</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>Sets subformats. </p> <p>See the class description about format numbering. Each item in the array is cloned into the internal array. If the call fails because memory cannot be allocated, then this object will remain unchanged.</p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002596">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">newFormats</td><td>the new format to be set. </td></tr> <tr><td class="paramname">cnt</td><td>the size of the array. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="a5d403deba6c059ebd752d964ad49a7c1"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="ucnv_8h.html#aa953bd3cedaedf78b700c837361fe00b">void</a> MessageFormat::setLocale </td> <td>(</td> <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> & </td> <td class="paramname"><em>theLocale</em></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>Sets the locale. </p> <p>This locale is used for fetching default number or date format information. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">theLocale</td><td>the new locale value to be set. </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable002590">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a96ffcd9c8df9b1a4b9bf604faa51eef2"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="classUnicodeString.html">UnicodeString</a>& MessageFormat::toPattern </td> <td>(</td> <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> & </td> <td class="paramname"><em>appendTo</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>Returns a pattern that can be used to recreate this object. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">appendTo</td><td>Output parameter to receive the pattern. Result is appended to existing contents. </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#_stable002594">Stable:</a></b></dt><dd>ICU 2.0 </dd></dl> </div> </div> <a class="anchor" id="a40b7cb584ce76b7bc3be2289a48c9f96"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> MessageFormat::usesNamedArguments </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <p>Returns true if this <a class="el" href="classMessageFormat.html" title="A MessageFormat produces concatenated messages in a language-neutral way. ">MessageFormat</a> uses named arguments, and false otherwise. </p> <p>See class description.</p> <dl class="section return"><dt>Returns</dt><dd>true if named arguments are used. </dd></dl> <dl class="draft"><dt><b><a class="el" href="draft.html#_draft000075">Draft:</a></b></dt><dd>This API may be changed in the future versions and was introduced in ICU 4.0 </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="msgfmt_8h_source.html">msgfmt.h</a></li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.5 </small></address> </body> </html>