<!-- This comment will put IE 6, 7 and 8 in quirks mode --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>ICU 4.4.1: rbnf.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javaScript" src="search/search.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body onload='searchBox.OnSelectItem(0);'> <!-- Generated by Doxygen 1.6.2-20100208 --> <script type="text/javascript"><!-- var searchBox = new SearchBox("searchBox", "search",false,'Search'); --></script> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main 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><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <img id="MSearchSelect" src="search/search.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </div> </li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> <h1>rbnf.h</h1><a href="rbnf_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment">*******************************************************************************</span> <a name="l00003"></a>00003 <span class="comment">* Copyright (C) 1997-2010, International Business Machines Corporation and others.</span> <a name="l00004"></a>00004 <span class="comment">* All Rights Reserved.</span> <a name="l00005"></a>00005 <span class="comment">*******************************************************************************</span> <a name="l00006"></a>00006 <span class="comment">*/</span> <a name="l00007"></a>00007 <a name="l00008"></a>00008 <span class="preprocessor">#ifndef RBNF_H</span> <a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define RBNF_H</span> <a name="l00010"></a>00010 <span class="preprocessor"></span> <a name="l00011"></a>00011 <span class="preprocessor">#include "<a class="code" href="utypes_8h.html" title="Basic definitions for ICU, for both C and C++ APIs.">unicode/utypes.h</a>"</span> <a name="l00012"></a>00012 <a name="l00025"></a>00025 <span class="preprocessor">#if UCONFIG_NO_FORMATTING</span> <a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define U_HAVE_RBNF 0</span> <a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#else</span> <a name="l00028"></a><a class="code" href="rbnf_8h.html#a58bcc4332aee7488f85c5adbbb9bbcde">00028</a> <span class="preprocessor"></span><span class="preprocessor">#define U_HAVE_RBNF 1</span> <a name="l00029"></a>00029 <span class="preprocessor"></span> <a name="l00030"></a>00030 <span class="preprocessor">#include "<a class="code" href="coll_8h.html" title="C++ API: Collation Service.">unicode/coll.h</a>"</span> <a name="l00031"></a>00031 <span class="preprocessor">#include "<a class="code" href="dcfmtsym_8h.html" title="C++ API: Symbols for formatting numbers.">unicode/dcfmtsym.h</a>"</span> <a name="l00032"></a>00032 <span class="preprocessor">#include "<a class="code" href="fmtable_8h.html" title="C++ API: Formattable is a thin wrapper for primitive numeric types.">unicode/fmtable.h</a>"</span> <a name="l00033"></a>00033 <span class="preprocessor">#include "<a class="code" href="locid_8h.html" title="C++ API: Locale ID object.">unicode/locid.h</a>"</span> <a name="l00034"></a>00034 <span class="preprocessor">#include "<a class="code" href="numfmt_8h.html" title="C++ API: Abstract base class for all number formats.">unicode/numfmt.h</a>"</span> <a name="l00035"></a>00035 <span class="preprocessor">#include "<a class="code" href="unistr_8h.html" title="C++ API: Unicode String.">unicode/unistr.h</a>"</span> <a name="l00036"></a>00036 <span class="preprocessor">#include "<a class="code" href="strenum_8h.html" title="C++ API: String Enumeration.">unicode/strenum.h</a>"</span> <a name="l00037"></a>00037 <a name="l00038"></a>00038 <a class="code" href="uversion_8h.html#a7d9374e037299886d4192b763b4c5e8b" title="This is used to begin a declaration of a public ICU C++ API.">U_NAMESPACE_BEGIN</a> <a name="l00039"></a>00039 <a name="l00040"></a>00040 <span class="keyword">class </span>NFRuleSet; <a name="l00041"></a>00041 <span class="keyword">class </span>LocalizationInfo; <a name="l00042"></a>00042 <a name="l00048"></a><a class="code" href="rbnf_8h.html#a2ef7bd419418b4628b33a7270c11f68d">00048</a> <span class="keyword">enum</span> <a class="code" href="rbnf_8h.html#a2ef7bd419418b4628b33a7270c11f68d" title="Tags for the predefined rulesets.">URBNFRuleSetTag</a> { <a name="l00049"></a>00049 URBNF_SPELLOUT, <a name="l00050"></a>00050 URBNF_ORDINAL, <a name="l00051"></a>00051 URBNF_DURATION, <a name="l00052"></a>00052 URBNF_NUMBERING_SYSTEM, <a name="l00053"></a>00053 URBNF_COUNT <a name="l00054"></a>00054 }; <a name="l00055"></a>00055 <a name="l00056"></a>00056 <span class="preprocessor">#if UCONFIG_NO_COLLATION</span> <a name="l00057"></a>00057 <span class="preprocessor"></span><span class="keyword">class </span><a class="code" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a>; <a name="l00058"></a>00058 <span class="preprocessor">#endif</span> <a name="l00059"></a>00059 <span class="preprocessor"></span> <a name="l00503"></a><a class="code" href="classRuleBasedNumberFormat.html">00503</a> <span class="keyword">class </span><a class="code" href="utypes_8h.html#ab9d90a30137b6ec046fe59e79b09745a" title="Set to export library symbols from inside the i18n library, and to import them from...">U_I18N_API</a> <a class="code" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a> : <span class="keyword">public</span> <a class="code" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a> { <a name="l00504"></a>00504 <span class="keyword">public</span>: <a name="l00505"></a>00505 <a name="l00506"></a>00506 <span class="comment">//-----------------------------------------------------------------------</span> <a name="l00507"></a>00507 <span class="comment">// constructors</span> <a name="l00508"></a>00508 <span class="comment">//-----------------------------------------------------------------------</span> <a name="l00509"></a>00509 <a name="l00520"></a>00520 <a class="code" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a>(<span class="keyword">const</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& rules, <a class="code" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors...">UParseError</a>& perror, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>& status); <a name="l00521"></a>00521 <a name="l00545"></a>00545 <a class="code" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a>(<span class="keyword">const</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& rules, <span class="keyword">const</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& localizations, <a name="l00546"></a>00546 <a class="code" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors...">UParseError</a>& perror, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>& status); <a name="l00547"></a>00547 <a name="l00563"></a>00563 <a class="code" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a>(<span class="keyword">const</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& rules, <span class="keyword">const</span> <a class="code" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region...">Locale</a>& locale, <a name="l00564"></a>00564 <a class="code" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors...">UParseError</a>& perror, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>& status); <a name="l00565"></a>00565 <a name="l00592"></a>00592 <a class="code" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a>(<span class="keyword">const</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& rules, <span class="keyword">const</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& localizations, <a name="l00593"></a>00593 <span class="keyword">const</span> <a class="code" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region...">Locale</a>& locale, <a class="code" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors...">UParseError</a>& perror, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>& status); <a name="l00594"></a>00594 <a name="l00610"></a>00610 <a class="code" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a>(<a class="code" href="rbnf_8h.html#a2ef7bd419418b4628b33a7270c11f68d" title="Tags for the predefined rulesets.">URBNFRuleSetTag</a> tag, <span class="keyword">const</span> <a class="code" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region...">Locale</a>& locale, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>& status); <a name="l00611"></a>00611 <a name="l00612"></a>00612 <span class="comment">//-----------------------------------------------------------------------</span> <a name="l00613"></a>00613 <span class="comment">// boilerplate</span> <a name="l00614"></a>00614 <span class="comment">//-----------------------------------------------------------------------</span> <a name="l00615"></a>00615 <a name="l00621"></a>00621 <a class="code" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a>(<span class="keyword">const</span> <a class="code" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a>& rhs); <a name="l00622"></a>00622 <a name="l00628"></a>00628 <a class="code" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a>& <a class="code" href="classNumberFormat.html#a8b9d5c0937f4da69d9a229fd10f8ec38" title="Assignment operator.">operator=</a>(<span class="keyword">const</span> <a class="code" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a>& rhs); <a name="l00629"></a>00629 <a name="l00634"></a>00634 <span class="keyword">virtual</span> ~<a class="code" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a>(); <a name="l00635"></a>00635 <a name="l00642"></a>00642 <span class="keyword">virtual</span> <a class="code" href="classFormat.html" title="Base class for all formats.">Format</a>* <a class="code" href="classFormat.html#a4e7ebd5cfd390c35e2bda88257f8b51a" title="Clone this object polymorphically.">clone</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; <a name="l00643"></a>00643 <a name="l00651"></a>00651 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> <a class="code" href="classNumberFormat.html#a97f4f81efd4747024deaf88ceb4d80a3" title="Return true if the given Format objects are semantically equal.">operator==</a>(<span class="keyword">const</span> <a class="code" href="classFormat.html" title="Base class for all formats.">Format</a>& other) <span class="keyword">const</span>; <a name="l00652"></a>00652 <a name="l00653"></a>00653 <span class="comment">//-----------------------------------------------------------------------</span> <a name="l00654"></a>00654 <span class="comment">// public API functions</span> <a name="l00655"></a>00655 <span class="comment">//-----------------------------------------------------------------------</span> <a name="l00656"></a>00656 <a name="l00662"></a>00662 <span class="keyword">virtual</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> getRules() <span class="keyword">const</span>; <a name="l00663"></a>00663 <a name="l00669"></a>00669 <span class="keyword">virtual</span> int32_t getNumberOfRuleSetNames() <span class="keyword">const</span>; <a name="l00670"></a>00670 <a name="l00678"></a>00678 <span class="keyword">virtual</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> getRuleSetName(int32_t index) <span class="keyword">const</span>; <a name="l00679"></a>00679 <a name="l00685"></a>00685 <span class="keyword">virtual</span> int32_t getNumberOfRuleSetDisplayNameLocales(<span class="keywordtype">void</span>) <span class="keyword">const</span>; <a name="l00686"></a>00686 <a name="l00695"></a>00695 <span class="keyword">virtual</span> <a class="code" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region...">Locale</a> getRuleSetDisplayNameLocale(int32_t index, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>& status) <span class="keyword">const</span>; <a name="l00696"></a>00696 <a name="l00710"></a>00710 <span class="keyword">virtual</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> getRuleSetDisplayName(int32_t index, <a name="l00711"></a>00711 <span class="keyword">const</span> <a class="code" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region...">Locale</a>& locale = <a class="code" href="classLocale.html#ac12d6326f2d283f5643f6b6caacfe88c" title="Common methods of getting the current default Locale.">Locale::getDefault</a>()); <a name="l00712"></a>00712 <a name="l00721"></a>00721 <span class="keyword">virtual</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> getRuleSetDisplayName(<span class="keyword">const</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& ruleSetName, <a name="l00722"></a>00722 <span class="keyword">const</span> <a class="code" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region...">Locale</a>& locale = <a class="code" href="classLocale.html#ac12d6326f2d283f5643f6b6caacfe88c" title="Common methods of getting the current default Locale.">Locale::getDefault</a>()); <a name="l00723"></a>00723 <a name="l00724"></a>00724 <a name="l00725"></a>00725 <span class="keyword">using</span> <a class="code" href="classNumberFormat.html#a53e27d424735198566d90eb30401ec36" title="Format an object to produce a string.">NumberFormat::format</a>; <a name="l00726"></a>00726 <a name="l00735"></a>00735 <span class="keyword">virtual</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& <a class="code" href="classNumberFormat.html#a53e27d424735198566d90eb30401ec36" title="Format an object to produce a string.">format</a>(int32_t number, <a name="l00736"></a>00736 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& toAppendTo, <a name="l00737"></a>00737 <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>& pos) <span class="keyword">const</span>; <a name="l00738"></a>00738 <a name="l00747"></a>00747 <span class="keyword">virtual</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& <a class="code" href="classNumberFormat.html#a53e27d424735198566d90eb30401ec36" title="Format an object to produce a string.">format</a>(int64_t number, <a name="l00748"></a>00748 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& toAppendTo, <a name="l00749"></a>00749 <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>& pos) <span class="keyword">const</span>; <a name="l00758"></a>00758 <span class="keyword">virtual</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& <a class="code" href="classNumberFormat.html#a53e27d424735198566d90eb30401ec36" title="Format an object to produce a string.">format</a>(<span class="keywordtype">double</span> number, <a name="l00759"></a>00759 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& toAppendTo, <a name="l00760"></a>00760 <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>& pos) <span class="keyword">const</span>; <a name="l00761"></a>00761 <a name="l00773"></a>00773 <span class="keyword">virtual</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& <a class="code" href="classNumberFormat.html#a53e27d424735198566d90eb30401ec36" title="Format an object to produce a string.">format</a>(int32_t number, <a name="l00774"></a>00774 <span class="keyword">const</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& ruleSetName, <a name="l00775"></a>00775 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& toAppendTo, <a name="l00776"></a>00776 <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>& pos, <a name="l00777"></a>00777 <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>& status) <span class="keyword">const</span>; <a name="l00789"></a>00789 <span class="keyword">virtual</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& <a class="code" href="classNumberFormat.html#a53e27d424735198566d90eb30401ec36" title="Format an object to produce a string.">format</a>(int64_t number, <a name="l00790"></a>00790 <span class="keyword">const</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& ruleSetName, <a name="l00791"></a>00791 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& toAppendTo, <a name="l00792"></a>00792 <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>& pos, <a name="l00793"></a>00793 <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>& status) <span class="keyword">const</span>; <a name="l00805"></a>00805 <span class="keyword">virtual</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& <a class="code" href="classNumberFormat.html#a53e27d424735198566d90eb30401ec36" title="Format an object to produce a string.">format</a>(<span class="keywordtype">double</span> number, <a name="l00806"></a>00806 <span class="keyword">const</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& ruleSetName, <a name="l00807"></a>00807 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& toAppendTo, <a name="l00808"></a>00808 <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>& pos, <a name="l00809"></a>00809 <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>& status) <span class="keyword">const</span>; <a name="l00810"></a>00810 <a name="l00820"></a>00820 <span class="keyword">virtual</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& <a class="code" href="classNumberFormat.html#a53e27d424735198566d90eb30401ec36" title="Format an object to produce a string.">format</a>(<span class="keyword">const</span> <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>& obj, <a name="l00821"></a>00821 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& toAppendTo, <a name="l00822"></a>00822 <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>& pos, <a name="l00823"></a>00823 <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>& status) <span class="keyword">const</span>; <a name="l00832"></a>00832 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& <a class="code" href="classNumberFormat.html#a53e27d424735198566d90eb30401ec36" title="Format an object to produce a string.">format</a>(<span class="keyword">const</span> <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>& obj, <a name="l00833"></a>00833 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& result, <a name="l00834"></a>00834 <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>& status) <span class="keyword">const</span>; <a name="l00835"></a>00835 <a name="l00843"></a>00843 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& <a class="code" href="classNumberFormat.html#a53e27d424735198566d90eb30401ec36" title="Format an object to produce a string.">format</a>(<span class="keywordtype">double</span> number, <a name="l00844"></a>00844 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& output) <span class="keyword">const</span>; <a name="l00845"></a>00845 <a name="l00853"></a>00853 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& <a class="code" href="classNumberFormat.html#a53e27d424735198566d90eb30401ec36" title="Format an object to produce a string.">format</a>(int32_t number, <a name="l00854"></a>00854 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& output) <span class="keyword">const</span>; <a name="l00855"></a>00855 <a name="l00870"></a>00870 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classNumberFormat.html#ab2c59c0b036a413b6735c6d50b88ae25" title="Return a long if possible (e.g.">parse</a>(<span class="keyword">const</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& text, <a name="l00871"></a>00871 <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>& result, <a name="l00872"></a>00872 <a class="code" href="classParsePosition.html" title="ParsePosition is a simple class used by Format and its subclasses to keep track of...">ParsePosition</a>& parsePosition) <span class="keyword">const</span>; <a name="l00873"></a>00873 <a name="l00874"></a>00874 <a name="l00882"></a>00882 <span class="keyword">virtual</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classNumberFormat.html#ab2c59c0b036a413b6735c6d50b88ae25" title="Return a long if possible (e.g.">parse</a>(<span class="keyword">const</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& text, <a name="l00883"></a>00883 <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>& result, <a name="l00884"></a>00884 <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>& status) <span class="keyword">const</span>; <a name="l00885"></a>00885 <a name="l00886"></a>00886 <span class="preprocessor">#if !UCONFIG_NO_COLLATION</span> <a name="l00887"></a>00887 <span class="preprocessor"></span> <a name="l00921"></a>00921 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setLenient(<a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> enabled); <a name="l00922"></a>00922 <a name="l00930"></a>00930 <span class="keyword">virtual</span> <span class="keyword">inline</span> <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> isLenient(<span class="keywordtype">void</span>) <span class="keyword">const</span>; <a name="l00931"></a>00931 <a name="l00932"></a>00932 <span class="preprocessor">#endif</span> <a name="l00933"></a>00933 <span class="preprocessor"></span> <a name="l00942"></a>00942 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setDefaultRuleSet(<span class="keyword">const</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& ruleSetName, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>& status); <a name="l00943"></a>00943 <a name="l00950"></a>00950 <span class="keyword">virtual</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> getDefaultRuleSetName() <span class="keyword">const</span>; <a name="l00951"></a>00951 <a name="l00952"></a>00952 <span class="keyword">public</span>: <a name="l00958"></a>00958 <span class="keyword">static</span> <a class="code" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f" title="UClassID is used to identify classes without using RTTI, since RTTI is not yet supported...">UClassID</a> <a class="code" href="platform_8h.html#a72bf6d8ec0640a37b1915e5d853b2016">U_EXPORT2</a> <a class="code" href="classNumberFormat.html#acfeb8972959e9383b026761d0e9e1e5e" title="Return the class ID for this class.">getStaticClassID</a>(<span class="keywordtype">void</span>); <a name="l00959"></a>00959 <a name="l00965"></a>00965 <span class="keyword">virtual</span> <a class="code" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f" title="UClassID is used to identify classes without using RTTI, since RTTI is not yet supported...">UClassID</a> <a class="code" href="classNumberFormat.html#a63c193a4db6a1552073bf069d5d31749" title="Returns a unique class ID POLYMORPHICALLY.">getDynamicClassID</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; <a name="l00966"></a>00966 <a name="l00967"></a>00967 <span class="keyword">private</span>: <a name="l00968"></a>00968 <a class="code" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a>(); <span class="comment">// default constructor not implemented</span> <a name="l00969"></a>00969 <a name="l00970"></a>00970 <span class="comment">// this will ref the localizations if they are not NULL</span> <a name="l00971"></a>00971 <span class="comment">// caller must deref to get adoption</span> <a name="l00972"></a>00972 <a class="code" href="classRuleBasedNumberFormat.html" title="The RuleBasedNumberFormat class formats numbers according to a set of rules.">RuleBasedNumberFormat</a>(<span class="keyword">const</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& description, LocalizationInfo* localizations, <a name="l00973"></a>00973 <span class="keyword">const</span> <a class="code" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region...">Locale</a>& locale, <a class="code" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors...">UParseError</a>& perror, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>& status); <a name="l00974"></a>00974 <a name="l00975"></a>00975 <span class="keywordtype">void</span> init(<span class="keyword">const</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& rules, LocalizationInfo* localizations, <a class="code" href="structUParseError.html" title="A UParseError struct is used to returned detailed information about parsing errors...">UParseError</a>& perror, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>& status); <a name="l00976"></a>00976 <span class="keywordtype">void</span> dispose(); <a name="l00977"></a>00977 <span class="keywordtype">void</span> stripWhitespace(<a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& src); <a name="l00978"></a>00978 <span class="keywordtype">void</span> initDefaultRuleSet(); <a name="l00979"></a>00979 <span class="keywordtype">void</span> <a class="code" href="classNumberFormat.html#a53e27d424735198566d90eb30401ec36" title="Format an object to produce a string.">format</a>(<span class="keywordtype">double</span> number, NFRuleSet& ruleSet); <a name="l00980"></a>00980 NFRuleSet* findRuleSet(<span class="keyword">const</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& name, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>& status) <span class="keyword">const</span>; <a name="l00981"></a>00981 <a name="l00982"></a>00982 <span class="comment">/* friend access */</span> <a name="l00983"></a>00983 <span class="keyword">friend</span> <span class="keyword">class </span>NFSubstitution; <a name="l00984"></a>00984 <span class="keyword">friend</span> <span class="keyword">class </span>NFRule; <a name="l00985"></a>00985 <span class="keyword">friend</span> <span class="keyword">class </span>FractionalPartSubstitution; <a name="l00986"></a>00986 <a name="l00987"></a>00987 <span class="keyword">inline</span> NFRuleSet * getDefaultRuleSet() <span class="keyword">const</span>; <a name="l00988"></a>00988 <a class="code" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a> * getCollator() <span class="keyword">const</span>; <a name="l00989"></a>00989 <a class="code" href="classDecimalFormatSymbols.html" title="This class represents the set of symbols needed by DecimalFormat to format numbers...">DecimalFormatSymbols</a> * getDecimalFormatSymbols() <span class="keyword">const</span>; <a name="l00990"></a>00990 <a name="l00991"></a>00991 <span class="keyword">private</span>: <a name="l00992"></a>00992 NFRuleSet **ruleSets; <a name="l00993"></a>00993 NFRuleSet *defaultRuleSet; <a name="l00994"></a>00994 <a class="code" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region...">Locale</a> locale; <a name="l00995"></a>00995 <a class="code" href="classCollator.html" title="The Collator class performs locale-sensitive string comparison.">Collator</a>* collator; <a name="l00996"></a>00996 <a class="code" href="classDecimalFormatSymbols.html" title="This class represents the set of symbols needed by DecimalFormat to format numbers...">DecimalFormatSymbols</a>* decimalFormatSymbols; <a name="l00997"></a>00997 <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> lenient; <a name="l00998"></a>00998 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>* lenientParseRules; <a name="l00999"></a>00999 LocalizationInfo* localizations; <a name="l01000"></a>01000 <a name="l01001"></a>01001 <span class="comment">// Temporary workaround - when noParse is true, do noting in parse.</span> <a name="l01002"></a>01002 <span class="comment">// TODO: We need a real fix - see #6895/#6896</span> <a name="l01003"></a>01003 <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> noParse; <a name="l01004"></a>01004 }; <a name="l01005"></a>01005 <a name="l01006"></a>01006 <span class="comment">// ---------------</span> <a name="l01007"></a>01007 <a name="l01008"></a>01008 <span class="keyword">inline</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& <a name="l01009"></a><a class="code" href="classRuleBasedNumberFormat.html#ae97cffb5bc4fca4e5f7d89b41a333983">01009</a> <a class="code" href="classRuleBasedNumberFormat.html#ad18c54375913d2426aae02a4328c3187" title="Formats the specified 32-bit number using the default ruleset.">RuleBasedNumberFormat::format</a>(<span class="keyword">const</span> <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>& obj, <a name="l01010"></a>01010 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& result, <a name="l01011"></a>01011 <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>& status)<span class="keyword"> const</span> <a name="l01012"></a>01012 <span class="keyword"></span>{ <a name="l01013"></a>01013 <span class="comment">// Don't use Format:: - use immediate base class only,</span> <a name="l01014"></a>01014 <span class="comment">// in case immediate base modifies behavior later.</span> <a name="l01015"></a>01015 <span class="comment">// dlf - the above comment is bogus, if there were a reason to modify</span> <a name="l01016"></a>01016 <span class="comment">// it, it would be virtual, and there's no reason because it is</span> <a name="l01017"></a>01017 <span class="comment">// a one-line macro in NumberFormat anyway, just like this one.</span> <a name="l01018"></a>01018 <span class="keywordflow">return</span> <a class="code" href="classRuleBasedNumberFormat.html#ad18c54375913d2426aae02a4328c3187" title="Formats the specified 32-bit number using the default ruleset.">NumberFormat::format</a>(obj, result, status); <a name="l01019"></a>01019 } <a name="l01020"></a>01020 <a name="l01021"></a>01021 <span class="keyword">inline</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& <a name="l01022"></a><a class="code" href="classRuleBasedNumberFormat.html#afe15fa9d2566bb4339e105f59f64f974">01022</a> <a class="code" href="classRuleBasedNumberFormat.html#ad18c54375913d2426aae02a4328c3187" title="Formats the specified 32-bit number using the default ruleset.">RuleBasedNumberFormat::format</a>(<span class="keywordtype">double</span> number, <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& output)<span class="keyword"> const </span>{ <a name="l01023"></a>01023 <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a> pos(0); <a name="l01024"></a>01024 <span class="keywordflow">return</span> <a class="code" href="classRuleBasedNumberFormat.html#ad18c54375913d2426aae02a4328c3187" title="Formats the specified 32-bit number using the default ruleset.">format</a>(number, output, pos); <a name="l01025"></a>01025 } <a name="l01026"></a>01026 <a name="l01027"></a>01027 <span class="keyword">inline</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& <a name="l01028"></a><a class="code" href="classRuleBasedNumberFormat.html#a920e08de6b0aca3f83b1e6c35dff9ad9">01028</a> <a class="code" href="classRuleBasedNumberFormat.html#ad18c54375913d2426aae02a4328c3187" title="Formats the specified 32-bit number using the default ruleset.">RuleBasedNumberFormat::format</a>(int32_t number, <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& output)<span class="keyword"> const </span>{ <a name="l01029"></a>01029 <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a> pos(0); <a name="l01030"></a>01030 <span class="keywordflow">return</span> <a class="code" href="classRuleBasedNumberFormat.html#ad18c54375913d2426aae02a4328c3187" title="Formats the specified 32-bit number using the default ruleset.">format</a>(number, output, pos); <a name="l01031"></a>01031 } <a name="l01032"></a>01032 <a name="l01033"></a>01033 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a name="l01034"></a><a class="code" href="classRuleBasedNumberFormat.html#a90cc5cec4399cea7c3f1e600ca800ebb">01034</a> <a class="code" href="classRuleBasedNumberFormat.html#a16c9b8e02cf8bb2f5c5d122143dbeb60" title="Parses the specfied string, beginning at the specified position, according to this...">RuleBasedNumberFormat::parse</a>(<span class="keyword">const</span> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& text, <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>& result, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all...">UErrorCode</a>& status)<span class="keyword"> const</span> <a name="l01035"></a>01035 <span class="keyword"></span>{ <a name="l01036"></a>01036 <a class="code" href="classRuleBasedNumberFormat.html#a16c9b8e02cf8bb2f5c5d122143dbeb60" title="Parses the specfied string, beginning at the specified position, according to this...">NumberFormat::parse</a>(text, result, status); <a name="l01037"></a>01037 } <a name="l01038"></a>01038 <a name="l01039"></a>01039 <span class="preprocessor">#if !UCONFIG_NO_COLLATION</span> <a name="l01040"></a>01040 <span class="preprocessor"></span> <a name="l01041"></a>01041 <span class="keyword">inline</span> <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> <a name="l01042"></a><a class="code" href="classRuleBasedNumberFormat.html#a15b474bf4a11e7d1df7164f9b9a7df90">01042</a> <a class="code" href="classRuleBasedNumberFormat.html#a15b474bf4a11e7d1df7164f9b9a7df90" title="Returns true if lenient-parse mode is turned on.">RuleBasedNumberFormat::isLenient</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <a name="l01043"></a>01043 <span class="keywordflow">return</span> lenient; <a name="l01044"></a>01044 } <a name="l01045"></a>01045 <a name="l01046"></a>01046 <span class="preprocessor">#endif</span> <a name="l01047"></a>01047 <span class="preprocessor"></span> <a name="l01048"></a>01048 <span class="keyword">inline</span> NFRuleSet* <a name="l01049"></a>01049 RuleBasedNumberFormat::getDefaultRuleSet()<span class="keyword"> const </span>{ <a name="l01050"></a>01050 <span class="keywordflow">return</span> defaultRuleSet; <a name="l01051"></a>01051 } <a name="l01052"></a>01052 <a name="l01053"></a>01053 <a class="code" href="uversion_8h.html#a3da1f00f3b02976ac53c014a3e4c0933" title="This is used to end a declaration of a public ICU C++ API.">U_NAMESPACE_END</a> <a name="l01054"></a>01054 <a name="l01055"></a>01055 <span class="comment">/* U_HAVE_RBNF */</span> <a name="l01056"></a>01056 <span class="preprocessor">#endif</span> <a name="l01057"></a>01057 <span class="preprocessor"></span> <a name="l01058"></a>01058 <span class="comment">/* RBNF_H */</span> <a name="l01059"></a>01059 <span class="preprocessor">#endif</span> </pre></div></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>Defines</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2-20100208 </small></address> </body> </html>