<!-- 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: fieldpos.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.1 --> <script type="text/javascript"><!-- var searchBox = new SearchBox("searchBox", "search",false,'Search'); --></script> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main 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>fieldpos.h</h1><a href="fieldpos_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-2006, 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 FIELDPOS.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/25/97 aliu Converted from java.</span> <a name="l00013"></a>00013 <span class="comment"> * 03/17/97 clhuang Updated per Format implementation.</span> <a name="l00014"></a>00014 <span class="comment"> * 07/17/98 stephen Added default/copy ctors, and operators =, ==, !=</span> <a name="l00015"></a>00015 <span class="comment"> ********************************************************************************</span> <a name="l00016"></a>00016 <span class="comment"> */</span> <a name="l00017"></a>00017 <a name="l00018"></a>00018 <span class="comment">// *****************************************************************************</span> <a name="l00019"></a>00019 <span class="comment">// This file was generated from the java source file FieldPosition.java</span> <a name="l00020"></a>00020 <span class="comment">// *****************************************************************************</span> <a name="l00021"></a>00021 <a name="l00022"></a>00022 <span class="preprocessor">#ifndef FIELDPOS_H</span> <a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define FIELDPOS_H</span> <a name="l00024"></a>00024 <span class="preprocessor"></span> <a name="l00025"></a>00025 <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="l00026"></a>00026 <a name="l00032"></a>00032 <span class="preprocessor">#if !UCONFIG_NO_FORMATTING</span> <a name="l00033"></a>00033 <span class="preprocessor"></span> <a name="l00034"></a>00034 <span class="preprocessor">#include "<a class="code" href="uobject_8h.html" title="C++ API: Common ICU base class UObject.">unicode/uobject.h</a>"</span> <a name="l00035"></a>00035 <a name="l00036"></a>00036 <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="l00037"></a>00037 <a name="l00106"></a><a class="code" href="classFieldPosition.html">00106</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="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</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="l00107"></a>00107 <span class="keyword">public</span>: <a name="l00112"></a>00112 <span class="keyword">enum</span> { DONT_CARE = -1 }; <a name="l00113"></a>00113 <a name="l00118"></a><a class="code" href="classFieldPosition.html#a75a87d2e7d6d97217daff8e029a0f9b9">00118</a> <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>() <a name="l00119"></a>00119 : <a class="code" href="classUObject.html" title="UObject is the common ICU &quot;boilerplate&quot; class.">UObject</a>(), fField(DONT_CARE), fBeginIndex(0), fEndIndex(0) {} <a name="l00120"></a>00120 <a name="l00132"></a><a class="code" href="classFieldPosition.html#aa03f4d3490bf5f56b797c36363bfae4f">00132</a> <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>(int32_t field) <a name="l00133"></a>00133 : <a class="code" href="classUObject.html" title="UObject is the common ICU &quot;boilerplate&quot; class.">UObject</a>(), fField(field), fBeginIndex(0), fEndIndex(0) {} <a name="l00134"></a>00134 <a name="l00140"></a><a class="code" href="classFieldPosition.html#aee8d7c91df960f9f020b480e7b2fa628">00140</a> <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>(<span class="keyword">const</span> <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>& copy) <a name="l00141"></a>00141 : <a class="code" href="classUObject.html" title="UObject is the common ICU &quot;boilerplate&quot; class.">UObject</a>(copy), fField(copy.fField), fBeginIndex(copy.fBeginIndex), fEndIndex(copy.fEndIndex) {} <a name="l00142"></a>00142 <a name="l00147"></a>00147 <span class="keyword">virtual</span> ~<a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>(); <a name="l00148"></a>00148 <a name="l00154"></a>00154 <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>& operator=(<span class="keyword">const</span> <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>& copy); <a name="l00155"></a>00155 <a name="l00162"></a>00162 <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="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>& that) <span class="keyword">const</span>; <a name="l00163"></a>00163 <a name="l00170"></a>00170 <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="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>& that) <span class="keyword">const</span>; <a name="l00171"></a>00171 <a name="l00183"></a>00183 <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a> *clone() <span class="keyword">const</span>; <a name="l00184"></a>00184 <a name="l00190"></a><a class="code" href="classFieldPosition.html#ad62441dc0bcc91af346d78a3faca2812">00190</a> int32_t <a class="code" href="classFieldPosition.html#ad62441dc0bcc91af346d78a3faca2812" title="Retrieve the field identifier.">getField</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> fField; } <a name="l00191"></a>00191 <a name="l00197"></a><a class="code" href="classFieldPosition.html#ac1b3be1343963a616b7eaf335437a2ff">00197</a> int32_t <a class="code" href="classFieldPosition.html#ac1b3be1343963a616b7eaf335437a2ff" title="Retrieve the index of the first character in the requested field.">getBeginIndex</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> fBeginIndex; } <a name="l00198"></a>00198 <a name="l00206"></a><a class="code" href="classFieldPosition.html#ad94244fb17162aa8a6629bd5e978f5d2">00206</a> int32_t <a class="code" href="classFieldPosition.html#ad94244fb17162aa8a6629bd5e978f5d2" title="Retrieve the index of the character following the last character in the requested...">getEndIndex</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> fEndIndex; } <a name="l00207"></a>00207 <a name="l00213"></a><a class="code" href="classFieldPosition.html#aa5fab63fb11108011e818b7904648a98">00213</a> <span class="keywordtype">void</span> <a class="code" href="classFieldPosition.html#aa5fab63fb11108011e818b7904648a98" title="Set the field.">setField</a>(int32_t f) { fField = f; } <a name="l00214"></a>00214 <a name="l00220"></a><a class="code" href="classFieldPosition.html#ae08c2e084a51bc0602b374d5ac69d76f">00220</a> <span class="keywordtype">void</span> <a class="code" href="classFieldPosition.html#ae08c2e084a51bc0602b374d5ac69d76f" title="Set the begin index.">setBeginIndex</a>(int32_t bi) { fBeginIndex = bi; } <a name="l00221"></a>00221 <a name="l00227"></a><a class="code" href="classFieldPosition.html#a272f8398a2757804560771cc67d1f0f8">00227</a> <span class="keywordtype">void</span> <a class="code" href="classFieldPosition.html#a272f8398a2757804560771cc67d1f0f8" title="Set the end index.">setEndIndex</a>(int32_t ei) { fEndIndex = ei; } <a name="l00228"></a>00228 <a name="l00234"></a>00234 <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="l00235"></a>00235 <a name="l00241"></a>00241 <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="l00242"></a>00242 <a name="l00243"></a>00243 <span class="keyword">private</span>: <a name="l00248"></a>00248 int32_t fField; <a name="l00249"></a>00249 <a name="l00254"></a>00254 int32_t fBeginIndex; <a name="l00255"></a>00255 <a name="l00260"></a>00260 int32_t fEndIndex; <a name="l00261"></a>00261 }; <a name="l00262"></a>00262 <a name="l00263"></a>00263 <span class="keyword">inline</span> <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>& <a name="l00264"></a><a class="code" href="classFieldPosition.html#a71afa3cf2ccf393943034c2c7d7eb7ce">00264</a> <a class="code" href="classFieldPosition.html#a71afa3cf2ccf393943034c2c7d7eb7ce" title="Assignment operator.">FieldPosition::operator=</a>(<span class="keyword">const</span> <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>& copy) <a name="l00265"></a>00265 { <a name="l00266"></a>00266 fField = copy.fField; <a name="l00267"></a>00267 fEndIndex = copy.fEndIndex; <a name="l00268"></a>00268 fBeginIndex = copy.fBeginIndex; <a name="l00269"></a>00269 <span class="keywordflow">return</span> *<span class="keyword">this</span>; <a name="l00270"></a>00270 } <a name="l00271"></a>00271 <a name="l00272"></a>00272 <span class="keyword">inline</span> <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> <a name="l00273"></a><a class="code" href="classFieldPosition.html#ae9dbfaa44ccd20e4eb792546df80e714">00273</a> <a class="code" href="classFieldPosition.html#ae9dbfaa44ccd20e4eb792546df80e714" title="Equality operator.">FieldPosition::operator==</a>(<span class="keyword">const</span> <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>& copy)<span class="keyword"> const</span> <a name="l00274"></a>00274 <span class="keyword"></span>{ <a name="l00275"></a>00275 <span class="keywordflow">return</span> (fField == copy.fField && <a name="l00276"></a>00276 fEndIndex == copy.fEndIndex && <a name="l00277"></a>00277 fBeginIndex == copy.fBeginIndex); <a name="l00278"></a>00278 } <a name="l00279"></a>00279 <a name="l00280"></a>00280 <span class="keyword">inline</span> <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> <a name="l00281"></a><a class="code" href="classFieldPosition.html#ad142ffe1884a49a2bf4d4073aa303038">00281</a> <a class="code" href="classFieldPosition.html#ad142ffe1884a49a2bf4d4073aa303038" title="Equality operator.">FieldPosition::operator!=</a>(<span class="keyword">const</span> <a class="code" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a>& copy)<span class="keyword"> const</span> <a name="l00282"></a>00282 <span class="keyword"></span>{ <a name="l00283"></a>00283 <span class="keywordflow">return</span> !<a class="code" href="classFieldPosition.html#ae9dbfaa44ccd20e4eb792546df80e714" title="Equality operator.">operator==</a>(copy); <a name="l00284"></a>00284 } <a name="l00285"></a>00285 <a name="l00286"></a>00286 <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="l00287"></a>00287 <a name="l00288"></a>00288 <span class="preprocessor">#endif </span><span class="comment">/* #if !UCONFIG_NO_FORMATTING */</span> <a name="l00289"></a>00289 <a name="l00290"></a>00290 <span class="preprocessor">#endif // _FIELDPOS</span> <a name="l00291"></a>00291 <span class="preprocessor"></span><span class="comment">//eof</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 size="1"/><address style="text-align: right;"><small>Generated on 16 Mar 2010 for ICU 4.4 by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> </body> </html>