<!-- 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: fmtable.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>fmtable.h</h1><a href="fmtable_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</span> <a name="l00004"></a>00004 <span class="comment">* Corporation and others. 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 <span class="comment">* File FMTABLE.H</span> <a name="l00008"></a>00008 <span class="comment">*</span> <a name="l00009"></a>00009 <span class="comment">* Modification History:</span> <a name="l00010"></a>00010 <span class="comment">*</span> <a name="l00011"></a>00011 <span class="comment">* Date Name Description</span> <a name="l00012"></a>00012 <span class="comment">* 02/29/97 aliu Creation.</span> <a name="l00013"></a>00013 <span class="comment">********************************************************************************</span> <a name="l00014"></a>00014 <span class="comment">*/</span> <a name="l00015"></a>00015 <span class="preprocessor">#ifndef FMTABLE_H</span> <a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#define FMTABLE_H</span> <a name="l00017"></a>00017 <span class="preprocessor"></span> <a name="l00018"></a>00018 <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="l00019"></a>00019 <span class="preprocessor">#include "<a class="code" href="unistr_8h.html" title="C++ API: Unicode String.">unicode/unistr.h</a>"</span> <a name="l00020"></a>00020 <span class="preprocessor">#include "<a class="code" href="stringpiece_8h.html" title="C++ API: StringPiece: Read-only byte string wrapper class.">unicode/stringpiece.h</a>"</span> <a name="l00021"></a>00021 <a name="l00027"></a>00027 <span class="preprocessor">#if !UCONFIG_NO_FORMATTING</span> <a name="l00028"></a>00028 <span class="preprocessor"></span> <a name="l00029"></a>00029 <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="l00030"></a>00030 <a name="l00031"></a>00031 <span class="keyword">class </span>DecimalNumberString; <a name="l00032"></a>00032 <span class="keyword">class </span>DigitList; <a name="l00033"></a>00033 <a name="l00052"></a><a class="code" href="classFormattable.html">00052</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="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a> : <span class="keyword">public</span> <a class="code" href="classUObject.html" title="UObject is the common ICU &quot;boilerplate&quot; class.">UObject</a> { <a name="l00053"></a>00053 <span class="keyword">public</span>: <a name="l00063"></a><a class="code" href="classFormattable.html#a0016ff3fd3a8b77b1775db4d8053dc77">00063</a> <span class="keyword">enum</span> <a class="code" href="classFormattable.html#a0016ff3fd3a8b77b1775db4d8053dc77" title="This enum is only used to let callers distinguish between the Formattable(UDate)...">ISDATE</a> { kIsDate }; <a name="l00064"></a>00064 <a name="l00069"></a>00069 <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>(); <span class="comment">// Type kLong, value 0</span> <a name="l00070"></a>00070 <a name="l00077"></a>00077 <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>(<a class="code" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039" title="Date and Time data type.">UDate</a> d, ISDATE flag); <a name="l00078"></a>00078 <a name="l00084"></a>00084 <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>(<span class="keywordtype">double</span> d); <a name="l00085"></a>00085 <a name="l00091"></a>00091 <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>(int32_t l); <a name="l00092"></a>00092 <a name="l00098"></a>00098 <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>(int64_t ll); <a name="l00099"></a>00099 <a name="l00100"></a>00100 <span class="preprocessor">#if !UCONFIG_NO_CONVERSION</span> <a name="l00101"></a>00101 <span class="preprocessor"></span> <a name="l00107"></a>00107 <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* strToCopy); <a name="l00108"></a>00108 <span class="preprocessor">#endif</span> <a name="l00109"></a>00109 <span class="preprocessor"></span> <a name="l00123"></a>00123 <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>(<span class="keyword">const</span> <a class="code" href="classStringPiece.html" title="A string-like object that points to a sized piece of memory.">StringPiece</a> &number, <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="l00124"></a>00124 <a name="l00130"></a>00130 <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</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>& strToCopy); <a name="l00131"></a>00131 <a name="l00137"></a>00137 <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>(<a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>* strToAdopt); <a name="l00138"></a>00138 <a name="l00145"></a>00145 <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</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>* arrayToCopy, int32_t count); <a name="l00146"></a>00146 <a name="l00152"></a>00152 <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>(<a class="code" href="classUObject.html" title="UObject is the common ICU &quot;boilerplate&quot; class.">UObject</a>* objectToAdopt); <a name="l00153"></a>00153 <a name="l00158"></a>00158 <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</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>&); <a name="l00159"></a>00159 <a name="l00165"></a>00165 <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>& operator=(<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> &rhs); <a name="l00166"></a>00166 <a name="l00173"></a>00173 <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> <a class="code" href="stringpiece_8h.html#a7652049cbac0bfeae2cd2aa4514a3352" title="Global operator == for StringPiece.">operator==</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> &other) <span class="keyword">const</span>; <a name="l00174"></a>00174 <a name="l00181"></a><a class="code" href="classFormattable.html#acf1439b3bd065e6a72cbd2b93ac0ff7b">00181</a> <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> <a class="code" href="stringpiece_8h.html#abf0ccab9536bab551afc07de65eb5d95" title="Global operator != for StringPiece.">operator!=</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>& other)<span class="keyword"> const</span> <a name="l00182"></a>00182 <span class="keyword"> </span>{ <span class="keywordflow">return</span> !<a class="code" href="stringpiece_8h.html#a7652049cbac0bfeae2cd2aa4514a3352" title="Global operator == for StringPiece.">operator==</a>(other); } <a name="l00183"></a>00183 <a name="l00188"></a>00188 <span class="keyword">virtual</span> ~<a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>(); <a name="l00189"></a>00189 <a name="l00201"></a>00201 <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a> *clone() <span class="keyword">const</span>; <a name="l00202"></a>00202 <a name="l00209"></a><a class="code" href="classFormattable.html#a6116dce32d34fe529d3a15c4f4d587a9">00209</a> <span class="keyword">enum</span> <a class="code" href="classFormattable.html#a6116dce32d34fe529d3a15c4f4d587a9" title="Selector for flavor of data type contained within a Formattable object.">Type</a> { <a name="l00215"></a><a class="code" href="classFormattable.html#a6116dce32d34fe529d3a15c4f4d587a9a5b0ae01d869868e36ddc2d548bdfebbb">00215</a> kDate, <a name="l00216"></a>00216 <a name="l00222"></a><a class="code" href="classFormattable.html#a6116dce32d34fe529d3a15c4f4d587a9a20df50b64f4c08d5ddc94d5491978bd6">00222</a> kDouble, <a name="l00223"></a>00223 <a name="l00229"></a><a class="code" href="classFormattable.html#a6116dce32d34fe529d3a15c4f4d587a9ab2c013b122f7d28fc6cb971c6be8fb81">00229</a> kLong, <a name="l00230"></a>00230 <a name="l00236"></a><a class="code" href="classFormattable.html#a6116dce32d34fe529d3a15c4f4d587a9a065be6ed91ee0a3d57cbac3df2755415">00236</a> kString, <a name="l00237"></a>00237 <a name="l00243"></a><a class="code" href="classFormattable.html#a6116dce32d34fe529d3a15c4f4d587a9a91a06b3e0bcd39b0d25be34ece2f85e8">00243</a> kArray, <a name="l00244"></a>00244 <a name="l00250"></a><a class="code" href="classFormattable.html#a6116dce32d34fe529d3a15c4f4d587a9aeea564410cc4d45c86d9e6477d4247be">00250</a> kInt64, <a name="l00251"></a>00251 <a name="l00257"></a><a class="code" href="classFormattable.html#a6116dce32d34fe529d3a15c4f4d587a9a950ff294472e1c07e148a21f98f56b9c">00257</a> kObject <a name="l00258"></a>00258 }; <a name="l00259"></a>00259 <a name="l00265"></a>00265 Type getType(<span class="keywordtype">void</span>) <span class="keyword">const</span>; <a name="l00266"></a>00266 <a name="l00273"></a>00273 <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> isNumeric() <span class="keyword">const</span>; <a name="l00274"></a>00274 <a name="l00281"></a><a class="code" href="classFormattable.html#a9a0118fa9015a633493e37aa421c7f63">00281</a> <span class="keywordtype">double</span> <a class="code" href="classFormattable.html#a9a0118fa9015a633493e37aa421c7f63" title="Gets the double value of this object.">getDouble</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> fValue.fDouble; } <a name="l00282"></a>00282 <a name="l00295"></a>00295 <span class="keywordtype">double</span> getDouble(<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="l00296"></a>00296 <a name="l00303"></a><a class="code" href="classFormattable.html#af23eee6502b54acea1f83549e87ba28e">00303</a> int32_t <a class="code" href="classFormattable.html#af23eee6502b54acea1f83549e87ba28e" title="Gets the long value of this object.">getLong</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> (int32_t)fValue.fInt64; } <a name="l00304"></a>00304 <a name="l00321"></a>00321 int32_t getLong(<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="l00322"></a>00322 <a name="l00329"></a><a class="code" href="classFormattable.html#ad09bd66550cb50d0577ce413c9cb627d">00329</a> int64_t <a class="code" href="classFormattable.html#ad09bd66550cb50d0577ce413c9cb627d" title="Gets the int64 value of this object.">getInt64</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> fValue.fInt64; } <a name="l00330"></a>00330 <a name="l00346"></a>00346 int64_t getInt64(<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="l00347"></a>00347 <a name="l00354"></a><a class="code" href="classFormattable.html#a13eb5e3f597081089fa54aedaaa1bbac">00354</a> <a class="code" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039" title="Date and Time data type.">UDate</a> <a class="code" href="classFormattable.html#a13eb5e3f597081089fa54aedaaa1bbac" title="Gets the Date value of this object.">getDate</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> fValue.fDate; } <a name="l00355"></a>00355 <a name="l00364"></a>00364 <a class="code" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039" title="Date and Time data type.">UDate</a> getDate(<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="l00365"></a>00365 <a name="l00373"></a><a class="code" href="classFormattable.html#a5eb518dc3b86ed33b57351f002f8e6f0">00373</a> <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& getString(<a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& result)<span class="keyword"> const</span> <a name="l00374"></a>00374 <span class="keyword"> </span>{ result=*fValue.fString; <span class="keywordflow">return</span> result; } <a name="l00375"></a>00375 <a name="l00385"></a>00385 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& getString(<a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</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="l00386"></a>00386 <a name="l00394"></a>00394 <span class="keyword">inline</span> <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>& getString(<span class="keywordtype">void</span>) <span class="keyword">const</span>; <a name="l00395"></a>00395 <a name="l00404"></a>00404 <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>& getString(<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="l00405"></a>00405 <a name="l00412"></a>00412 <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>& getString(<span class="keywordtype">void</span>); <a name="l00413"></a>00413 <a name="l00422"></a>00422 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& getString(<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="l00423"></a>00423 <a name="l00431"></a><a class="code" href="classFormattable.html#a1209ed6660b4f0148b4f191f3d1e75a9">00431</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>* getArray(int32_t& count)<span class="keyword"> const</span> <a name="l00432"></a>00432 <span class="keyword"> </span>{ count=fValue.fArrayAndCount.fCount; <span class="keywordflow">return</span> fValue.fArrayAndCount.fArray; } <a name="l00433"></a>00433 <a name="l00443"></a>00443 <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>* getArray(int32_t& count, <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="l00444"></a>00444 <a name="l00453"></a><a class="code" href="classFormattable.html#a8f546115a6d407bd7a812165af4bb9c4">00453</a> <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>& <a class="code" href="classFormattable.html#a8f546115a6d407bd7a812165af4bb9c4" title="Accesses the specified element in the array value of this Formattable object.">operator[]</a>(int32_t index) { <span class="keywordflow">return</span> fValue.fArrayAndCount.fArray[index]; } <a name="l00454"></a>00454 <a name="l00461"></a>00461 <span class="keyword">const</span> <a class="code" href="classUObject.html" title="UObject is the common ICU &quot;boilerplate&quot; class.">UObject</a>* getObject() <span class="keyword">const</span>; <a name="l00462"></a>00462 <a name="l00481"></a>00481 <a class="code" href="classStringPiece.html" title="A string-like object that points to a sized piece of memory.">StringPiece</a> getDecimalNumber(<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="l00482"></a>00482 <a name="l00489"></a>00489 <span class="keywordtype">void</span> setDouble(<span class="keywordtype">double</span> d); <a name="l00490"></a>00490 <a name="l00497"></a>00497 <span class="keywordtype">void</span> setLong(int32_t l); <a name="l00498"></a>00498 <a name="l00505"></a>00505 <span class="keywordtype">void</span> setInt64(int64_t ll); <a name="l00506"></a>00506 <a name="l00513"></a>00513 <span class="keywordtype">void</span> setDate(<a class="code" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039" title="Date and Time data type.">UDate</a> d); <a name="l00514"></a>00514 <a name="l00521"></a>00521 <span class="keywordtype">void</span> setString(<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>& stringToCopy); <a name="l00522"></a>00522 <a name="l00530"></a>00530 <span class="keywordtype">void</span> setArray(<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>* array, int32_t count); <a name="l00531"></a>00531 <a name="l00538"></a>00538 <span class="keywordtype">void</span> adoptString(<a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>* stringToAdopt); <a name="l00539"></a>00539 <a name="l00545"></a>00545 <span class="keywordtype">void</span> adoptArray(<a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>* array, int32_t count); <a name="l00546"></a>00546 <a name="l00554"></a>00554 <span class="keywordtype">void</span> adoptObject(<a class="code" href="classUObject.html" title="UObject is the common ICU &quot;boilerplate&quot; class.">UObject</a>* objectToAdopt); <a name="l00555"></a>00555 <a name="l00570"></a>00570 <span class="keywordtype">void</span> setDecimalNumber(<span class="keyword">const</span> <a class="code" href="classStringPiece.html" title="A string-like object that points to a sized piece of memory.">StringPiece</a> &numberString, <a name="l00571"></a>00571 <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="l00572"></a>00572 <a name="l00578"></a>00578 <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="classUObject.html#a9b1acc95efd89cb86ec31f2dc947a262" title="ICU4C &quot;poor man&#39;s RTTI&quot;, returns a UClassID for the actual ICU class...">getDynamicClassID</a>() <span class="keyword">const</span>; <a name="l00579"></a>00579 <a name="l00585"></a>00585 <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> getStaticClassID(); <a name="l00586"></a>00586 <a name="l00593"></a>00593 <span class="keyword">inline</span> int32_t getLong(<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="l00594"></a>00594 <a name="l00603"></a><a class="code" href="classFormattable.html#a050bf65094f969627c9269ebd5470f7b">00603</a> DigitList *<a class="code" href="classFormattable.html#a050bf65094f969627c9269ebd5470f7b" title="Internal function, do not use.">getDigitList</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> fDecimalNum;}; <a name="l00604"></a>00604 <a name="l00612"></a>00612 <span class="keywordtype">void</span> adoptDigitList(DigitList *dl); <a name="l00613"></a>00613 <a name="l00614"></a>00614 <span class="keyword">private</span>: <a name="l00619"></a>00619 <span class="keywordtype">void</span> dispose(<span class="keywordtype">void</span>); <a name="l00620"></a>00620 <a name="l00624"></a>00624 <span class="keywordtype">void</span> init(); <a name="l00625"></a>00625 <a name="l00626"></a>00626 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>* getBogus() <span class="keyword">const</span>; <a name="l00627"></a>00627 <a name="l00628"></a>00628 <span class="keyword">union </span>{ <a name="l00629"></a>00629 <a class="code" href="classUObject.html" title="UObject is the common ICU &quot;boilerplate&quot; class.">UObject</a>* fObject; <a name="l00630"></a>00630 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>* fString; <a name="l00631"></a>00631 <span class="keywordtype">double</span> fDouble; <a name="l00632"></a>00632 int64_t fInt64; <a name="l00633"></a>00633 <a class="code" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039" title="Date and Time data type.">UDate</a> fDate; <a name="l00634"></a>00634 <span class="keyword">struct </span>{ <a name="l00635"></a>00635 <a class="code" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a>* fArray; <a name="l00636"></a>00636 int32_t fCount; <a name="l00637"></a>00637 } fArrayAndCount; <a name="l00638"></a>00638 } fValue; <a name="l00639"></a>00639 <a name="l00640"></a>00640 DecimalNumberString *fDecimalStr; <a name="l00641"></a>00641 DigitList *fDecimalNum; <a name="l00642"></a>00642 <a name="l00643"></a>00643 Type fType; <a name="l00644"></a>00644 <a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> fBogus; <span class="comment">// Bogus string when it's needed.</span> <a name="l00645"></a>00645 }; <a name="l00646"></a>00646 <a name="l00647"></a><a class="code" href="classFormattable.html#af0cb44babfc420a6f1fc42817c2e3675">00647</a> <span class="keyword">inline</span> <a class="code" href="utypes_8h.html#ace1704e9e77d407d1eaaa2e73ec0c039" title="Date and Time data type.">UDate</a> <a class="code" href="classFormattable.html#a13eb5e3f597081089fa54aedaaa1bbac" title="Gets the Date value of this object.">Formattable::getDate</a>(<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="l00648"></a>00648 <span class="keywordflow">if</span> (fType != <a class="code" href="classFormattable.html#a6116dce32d34fe529d3a15c4f4d587a9a5b0ae01d869868e36ddc2d548bdfebbb" title="Selector indicating a UDate value.">kDate</a>) { <a name="l00649"></a>00649 <span class="keywordflow">if</span> (<a class="code" href="utypes_8h.html#a527f2c69e6b2e3b2c53ad8a99fb36711" title="Does the error code indicate success?">U_SUCCESS</a>(status)) { <a name="l00650"></a>00650 status = <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78ca3b2830761371670dcbe807353eba2b6a" title="Data format is not what is expected.">U_INVALID_FORMAT_ERROR</a>; <a name="l00651"></a>00651 } <a name="l00652"></a>00652 <span class="keywordflow">return</span> 0; <a name="l00653"></a>00653 } <a name="l00654"></a>00654 <span class="keywordflow">return</span> fValue.fDate; <a name="l00655"></a>00655 } <a name="l00656"></a>00656 <a name="l00657"></a><a class="code" href="classFormattable.html#ad73e152f9bf909ebfb6d743f0061b136">00657</a> <span class="keyword">inline</span> <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>& <a class="code" href="classFormattable.html#ad73e152f9bf909ebfb6d743f0061b136" title="Gets a const reference to the string value of this object.">Formattable::getString</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <a name="l00658"></a>00658 <span class="keywordflow">return</span> *fValue.fString; <a name="l00659"></a>00659 } <a name="l00660"></a>00660 <a name="l00661"></a><a class="code" href="classFormattable.html#a599fc22b94579d3d60a05219dad54bc4">00661</a> <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 class="code" href="classFormattable.html#ad73e152f9bf909ebfb6d743f0061b136" title="Gets a const reference to the string value of this object.">Formattable::getString</a>(<span class="keywordtype">void</span>) { <a name="l00662"></a>00662 <span class="keywordflow">return</span> *fValue.fString; <a name="l00663"></a>00663 } <a name="l00664"></a>00664 <a name="l00665"></a><a class="code" href="classFormattable.html#a7ea4122be7eec20f523e9eaa3200ca63">00665</a> <span class="keyword">inline</span> int32_t <a class="code" href="classFormattable.html#af23eee6502b54acea1f83549e87ba28e" title="Gets the long value of this object.">Formattable::getLong</a>(<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="l00666"></a>00666 <span class="keywordflow">return</span> <a class="code" href="classFormattable.html#af23eee6502b54acea1f83549e87ba28e" title="Gets the long value of this object.">getLong</a>(*status); <a name="l00667"></a>00667 } <a name="l00668"></a>00668 <a name="l00669"></a>00669 <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="l00670"></a>00670 <a name="l00671"></a>00671 <span class="preprocessor">#endif </span><span class="comment">/* #if !UCONFIG_NO_FORMATTING */</span> <a name="l00672"></a>00672 <a name="l00673"></a>00673 <span class="preprocessor">#endif //_FMTABLE</span> <a name="l00674"></a>00674 <span class="preprocessor"></span><span class="comment">//eof</span> <a name="l00675"></a>00675 </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>