<!-- 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: uchriter.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>uchriter.h</h1><a href="uchriter_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) 1998-2005, 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 <a name="l00008"></a>00008 <span class="preprocessor">#ifndef UCHRITER_H</span> <a name="l00009"></a>00009 <span class="preprocessor"></span><span class="preprocessor">#define UCHRITER_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 <span class="preprocessor">#include "<a class="code" href="chariter_8h.html" title="C++ API: Character Iterator.">unicode/chariter.h</a>"</span> <a name="l00013"></a>00013 <a name="l00019"></a>00019 <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="l00020"></a>00020 <a name="l00033"></a><a class="code" href="classUCharCharacterIterator.html">00033</a> <span class="keyword">class </span><a class="code" href="utypes_8h.html#a559955ec3bc692657c5d8b1c6de8e334" title="Set to export library symbols from inside the common library, and to import them...">U_COMMON_API</a> <a class="code" href="classUCharCharacterIterator.html" title="A concrete subclass of CharacterIterator that iterates over the characters (code...">UCharCharacterIterator</a> : <span class="keyword">public</span> <a class="code" href="classCharacterIterator.html" title="Abstract class that defines an API for iteration on text objects.">CharacterIterator</a> { <a name="l00034"></a>00034 <span class="keyword">public</span>: <a name="l00044"></a>00044 <a class="code" href="classUCharCharacterIterator.html" title="A concrete subclass of CharacterIterator that iterates over the characters (code...">UCharCharacterIterator</a>(<span class="keyword">const</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>* textPtr, int32_t length); <a name="l00045"></a>00045 <a name="l00059"></a>00059 <a class="code" href="classUCharCharacterIterator.html" title="A concrete subclass of CharacterIterator that iterates over the characters (code...">UCharCharacterIterator</a>(<span class="keyword">const</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>* textPtr, int32_t length, <a name="l00060"></a>00060 int32_t position); <a name="l00061"></a>00061 <a name="l00078"></a>00078 <a class="code" href="classUCharCharacterIterator.html" title="A concrete subclass of CharacterIterator that iterates over the characters (code...">UCharCharacterIterator</a>(<span class="keyword">const</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>* textPtr, int32_t length, <a name="l00079"></a>00079 int32_t textBegin, <a name="l00080"></a>00080 int32_t textEnd, <a name="l00081"></a>00081 int32_t position); <a name="l00082"></a>00082 <a name="l00090"></a>00090 <a class="code" href="classUCharCharacterIterator.html" title="A concrete subclass of CharacterIterator that iterates over the characters (code...">UCharCharacterIterator</a>(<span class="keyword">const</span> <a class="code" href="classUCharCharacterIterator.html" title="A concrete subclass of CharacterIterator that iterates over the characters (code...">UCharCharacterIterator</a>& that); <a name="l00091"></a>00091 <a name="l00096"></a>00096 <span class="keyword">virtual</span> ~<a class="code" href="classUCharCharacterIterator.html" title="A concrete subclass of CharacterIterator that iterates over the characters (code...">UCharCharacterIterator</a>(); <a name="l00097"></a>00097 <a name="l00106"></a>00106 <a class="code" href="classUCharCharacterIterator.html" title="A concrete subclass of CharacterIterator that iterates over the characters (code...">UCharCharacterIterator</a>& <a name="l00107"></a>00107 <a class="code" href="classCharacterIterator.html#a24bbd0b8ba0893633c7ddac569f5161a" title="Assignment operator.">operator=</a>(<span class="keyword">const</span> <a class="code" href="classUCharCharacterIterator.html" title="A concrete subclass of CharacterIterator that iterates over the characters (code...">UCharCharacterIterator</a>& that); <a name="l00108"></a>00108 <a name="l00117"></a>00117 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> <a class="code" href="classForwardCharacterIterator.html#a3359b21f630495c271715decce6703f4" title="Returns true when both iterators refer to the same character in the same character-storage...">operator==</a>(<span class="keyword">const</span> <a class="code" href="classForwardCharacterIterator.html" title="Abstract class that defines an API for forward-only iteration on text objects.">ForwardCharacterIterator</a>& that) <span class="keyword">const</span>; <a name="l00118"></a>00118 <a name="l00124"></a>00124 <span class="keyword">virtual</span> int32_t <a class="code" href="classForwardCharacterIterator.html#a0b9696ca3d4d27b22a2744a2c498b4d7" title="Generates a hash code for this iterator.">hashCode</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; <a name="l00125"></a>00125 <a name="l00133"></a>00133 <span class="keyword">virtual</span> <a class="code" href="classCharacterIterator.html" title="Abstract class that defines an API for iteration on text objects.">CharacterIterator</a>* <a class="code" href="classCharacterIterator.html#adc8a708194960bd2ed640ba8a23e565a" title="Returns a pointer to a new CharacterIterator of the same concrete class as this one...">clone</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; <a name="l00134"></a>00134 <a name="l00142"></a>00142 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a> <a class="code" href="classCharacterIterator.html#afe22aec945697b4459fb4195e1b621c7" title="Sets the iterator to refer to the first code unit in its iteration range, and returns...">first</a>(<span class="keywordtype">void</span>); <a name="l00143"></a>00143 <a name="l00152"></a>00152 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a> <a class="code" href="classCharacterIterator.html#afe620dca9c565e933dca7139ab1f4210" title="Sets the iterator to refer to the first code unit in its iteration range, returns...">firstPostInc</a>(<span class="keywordtype">void</span>); <a name="l00153"></a>00153 <a name="l00163"></a>00163 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809" title="Define UChar32 as a type for single Unicode code points.">UChar32</a> <a class="code" href="classCharacterIterator.html#a26486be2a3a24bb1634c3279139d549c" title="Sets the iterator to refer to the first code point in its iteration range, and returns...">first32</a>(<span class="keywordtype">void</span>); <a name="l00164"></a>00164 <a name="l00173"></a>00173 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809" title="Define UChar32 as a type for single Unicode code points.">UChar32</a> <a class="code" href="classCharacterIterator.html#a9e13e7752a9a3091476ef3d42252bf40" title="Sets the iterator to refer to the first code point in its iteration range, returns...">first32PostInc</a>(<span class="keywordtype">void</span>); <a name="l00174"></a>00174 <a name="l00182"></a>00182 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a> <a class="code" href="classCharacterIterator.html#ace1cd4d7bad7cd6b302df4beef3640be" title="Sets the iterator to refer to the last code unit in its iteration range, and returns...">last</a>(<span class="keywordtype">void</span>); <a name="l00183"></a>00183 <a name="l00191"></a>00191 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809" title="Define UChar32 as a type for single Unicode code points.">UChar32</a> <a class="code" href="classCharacterIterator.html#a88c76a273fb1889aa00272fe0965831b" title="Sets the iterator to refer to the last code point in its iteration range, and returns...">last32</a>(<span class="keywordtype">void</span>); <a name="l00192"></a>00192 <a name="l00201"></a>00201 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a> <a class="code" href="classCharacterIterator.html#a0a1fd04a11c18fc3049934b353c431eb" title="Sets the iterator to refer to the &quot;position&quot;-th code unit in the text-storage...">setIndex</a>(int32_t position); <a name="l00202"></a>00202 <a name="l00214"></a>00214 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809" title="Define UChar32 as a type for single Unicode code points.">UChar32</a> <a class="code" href="classCharacterIterator.html#a380715d71de513e075e3e27d2abe595e" title="Sets the iterator to refer to the beginning of the code point that contains the &quot;position&quot;...">setIndex32</a>(int32_t position); <a name="l00215"></a>00215 <a name="l00221"></a>00221 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a> <a class="code" href="classCharacterIterator.html#a6a481f104f8b9446c1e95ea4c47d8228" title="Returns the code unit the iterator currently refers to.">current</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; <a name="l00222"></a>00222 <a name="l00228"></a>00228 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809" title="Define UChar32 as a type for single Unicode code points.">UChar32</a> <a class="code" href="classCharacterIterator.html#af2e58620e65172866d073435a3425a11" title="Returns the code point the iterator currently refers to.">current32</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; <a name="l00229"></a>00229 <a name="l00237"></a>00237 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a> <a class="code" href="classCharacterIterator.html#a82bd3961ea1e045cbb533633d15ab00d" title="Advances to the next code unit in the iteration range (toward endIndex()), and returns...">next</a>(<span class="keywordtype">void</span>); <a name="l00238"></a>00238 <a name="l00247"></a>00247 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a> <a class="code" href="classForwardCharacterIterator.html#a713194d8a27d3f50fe0454b8286921cc" title="Gets the current code unit for returning and advances to the next code unit in the...">nextPostInc</a>(<span class="keywordtype">void</span>); <a name="l00248"></a>00248 <a name="l00259"></a>00259 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809" title="Define UChar32 as a type for single Unicode code points.">UChar32</a> <a class="code" href="classCharacterIterator.html#a9521fd47c8637a99776254ee0a0d469e" title="Advances to the next code point in the iteration range (toward endIndex()), and returns...">next32</a>(<span class="keywordtype">void</span>); <a name="l00260"></a>00260 <a name="l00269"></a>00269 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809" title="Define UChar32 as a type for single Unicode code points.">UChar32</a> <a class="code" href="classForwardCharacterIterator.html#acb902b4e8c192937270157bb1afca237" title="Gets the current code point for returning and advances to the next code point in...">next32PostInc</a>(<span class="keywordtype">void</span>); <a name="l00270"></a>00270 <a name="l00280"></a>00280 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> <a class="code" href="classForwardCharacterIterator.html#ab53c28ee0b9ff659983ded76e53f6251" title="Returns FALSE if there are no more code units or code points at or after the current...">hasNext</a>(); <a name="l00281"></a>00281 <a name="l00289"></a>00289 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a> <a class="code" href="classCharacterIterator.html#a7dfde118a5b6e7755cb4b237c616873f" title="Advances to the previous code unit in the iteration range (toward startIndex()),...">previous</a>(<span class="keywordtype">void</span>); <a name="l00290"></a>00290 <a name="l00298"></a>00298 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809" title="Define UChar32 as a type for single Unicode code points.">UChar32</a> <a class="code" href="classCharacterIterator.html#a9630a5fbd755633cf46c33c3a42c5457" title="Advances to the previous code point in the iteration range (toward startIndex())...">previous32</a>(<span class="keywordtype">void</span>); <a name="l00299"></a>00299 <a name="l00309"></a>00309 <span class="keyword">virtual</span> <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> <a class="code" href="classCharacterIterator.html#a785a86ae2f1730806eef19595f14d1aa" title="Returns FALSE if there are no more code units or code points before the current position...">hasPrevious</a>(); <a name="l00310"></a>00310 <a name="l00322"></a>00322 <span class="keyword">virtual</span> int32_t <a class="code" href="classCharacterIterator.html#a16d3fd1fd0cd893b48a0a5697192d634" title="Moves the current position relative to the start or end of the iteration range, or...">move</a>(int32_t delta, <a class="code" href="classCharacterIterator.html#aa400f3cff117a0e79ab4246c606c9141" title="Origin enumeration for the move() and move32() functions.">EOrigin</a> origin); <a name="l00323"></a>00323 <a name="l00335"></a>00335 <span class="keyword">virtual</span> int32_t <a class="code" href="classCharacterIterator.html#a711c44e0d1a4dbe0a191ff8d2e14b73e" title="Moves the current position relative to the start or end of the iteration range, or...">move32</a>(int32_t delta, <a class="code" href="classCharacterIterator.html#aa400f3cff117a0e79ab4246c606c9141" title="Origin enumeration for the move() and move32() functions.">EOrigin</a> origin); <a name="l00336"></a>00336 <a name="l00341"></a>00341 <span class="keywordtype">void</span> setText(<span class="keyword">const</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>* newText, int32_t newTextLength); <a name="l00342"></a>00342 <a name="l00350"></a>00350 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classCharacterIterator.html#a03c54d93e6fe1d3be187c67acb957410" title="Copies the text under iteration into the UnicodeString referred to by &quot;result&quot;...">getText</a>(<a class="code" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>& result); <a name="l00351"></a>00351 <a name="l00357"></a>00357 <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(<span class="keywordtype">void</span>); <a name="l00358"></a>00358 <a name="l00364"></a>00364 <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="classForwardCharacterIterator.html#ac86e1b248f61b462458896b2113099b3" title="Returns a UClassID for this ForwardCharacterIterator (&quot;poor man&#39;s RTTI&quot;)...">getDynamicClassID</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; <a name="l00365"></a>00365 <a name="l00366"></a>00366 <span class="keyword">protected</span>: <a name="l00371"></a>00371 <a class="code" href="classUCharCharacterIterator.html" title="A concrete subclass of CharacterIterator that iterates over the characters (code...">UCharCharacterIterator</a>(); <a name="l00376"></a><a class="code" href="classUCharCharacterIterator.html#aa4f776d063eae1c4a0fbe30f78489ee2">00376</a> <span class="keyword">const</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned...">UChar</a>* text; <a name="l00377"></a>00377 <a name="l00378"></a>00378 }; <a name="l00379"></a>00379 <a name="l00380"></a>00380 <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="l00381"></a>00381 <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>