<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <title>ICU 52.1: caniter.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">ICU 52.1  <span id="projectnumber">52.1</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.1.2 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</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> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="dir_bdd9a5d540de89e9fe90efdfc6973a4f.html">common</a></li><li class="navelem"><a class="el" href="dir_f59c6450ff718ff1b085cfd1c36acbd7.html">unicode</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">caniter.h</div> </div> </div><!--header--> <div class="contents"> <a href="caniter_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div> <div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> *******************************************************************************</span></div> <div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * Copyright (C) 1996-2011, International Business Machines Corporation and</span></div> <div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * others. All Rights Reserved.</span></div> <div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> *******************************************************************************</span></div> <div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> */</span></div> <div class="line"><a name="l00007"></a><span class="lineno"> 7</span> </div> <div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#ifndef CANITER_H</span></div> <div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor"></span><span class="preprocessor">#define CANITER_H</span></div> <div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <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></div> <div class="line"><a name="l00012"></a><span class="lineno"> 12</span> </div> <div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#if !UCONFIG_NO_NORMALIZATION</span></div> <div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#include "<a class="code" href="uobject_8h.html" title="C++ API: Common ICU base class UObject.">unicode/uobject.h</a>"</span></div> <div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include "<a class="code" href="unistr_8h.html" title="C++ API: Unicode String.">unicode/unistr.h</a>"</span></div> <div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div> <div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="preprocessor">#ifndef CANITER_SKIP_ZEROES</span></div> <div class="line"><a name="l00028"></a><span class="lineno"><a class="code" href="caniter_8h.html#acce620fe9bc17fed20e14e1597a8a0b8"> 28</a></span> <span class="preprocessor"></span><span class="preprocessor">#define CANITER_SKIP_ZEROES TRUE</span></div> <div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="preprocessor"></span><span class="preprocessor">#endif</span></div> <div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <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></div> <div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div> <div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="keyword">class </span>Hashtable;</div> <div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="keyword">class </span>Normalizer2;</div> <div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="keyword">class </span>Normalizer2Impl;</div> <div class="line"><a name="l00036"></a><span class="lineno"> 36</span> </div> <div class="line"><a name="l00072"></a><span class="lineno"><a class="code" href="classicu_1_1CanonicalIterator.html"> 72</a></span> <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 from outside...">U_COMMON_API</a> <a class="code" href="classicu_1_1CanonicalIterator.html" title="This class allows one to iterate through all the strings that are canonically equivalent to a given s...">CanonicalIterator</a> : <span class="keyword">public</span> <a class="code" href="classicu_1_1UObject.html" title="UObject is the common ICU "boilerplate" class.">UObject</a> {</div> <div class="line"><a name="l00073"></a><span class="lineno"> 73</span> <span class="keyword">public</span>:</div> <div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <a class="code" href="classicu_1_1CanonicalIterator.html" title="This class allows one to iterate through all the strings that are canonically equivalent to a given s...">CanonicalIterator</a>(<span class="keyword">const</span> <a class="code" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a> &source, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all C++ compilers...">UErrorCode</a> &status);</div> <div class="line"><a name="l00081"></a><span class="lineno"> 81</span> </div> <div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="keyword">virtual</span> ~<a class="code" href="classicu_1_1CanonicalIterator.html" title="This class allows one to iterate through all the strings that are canonically equivalent to a given s...">CanonicalIterator</a>();</div> <div class="line"><a name="l00087"></a><span class="lineno"> 87</span> </div> <div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <a class="code" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a> getSource();</div> <div class="line"><a name="l00094"></a><span class="lineno"> 94</span> </div> <div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="keywordtype">void</span> reset();</div> <div class="line"><a name="l00100"></a><span class="lineno"> 100</span> </div> <div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <a class="code" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a> next();</div> <div class="line"><a name="l00109"></a><span class="lineno"> 109</span> </div> <div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  <span class="keywordtype">void</span> setSource(<span class="keyword">const</span> <a class="code" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a> &newSource, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all C++ compilers...">UErrorCode</a> &status);</div> <div class="line"><a name="l00118"></a><span class="lineno"> 118</span> </div> <div class="line"><a name="l00119"></a><span class="lineno"> 119</span> <span class="preprocessor">#ifndef U_HIDE_INTERNAL_API</span></div> <div class="line"><a name="l00120"></a><span class="lineno"> 120</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="keyword">static</span> <span class="keywordtype">void</span> U_EXPORT2 permute(<a class="code" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a> &source, <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> skipZeros, Hashtable *result, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all C++ compilers...">UErrorCode</a> &status);</div> <div class="line"><a name="l00130"></a><span class="lineno"> 130</span> <span class="preprocessor">#endif </span><span class="comment">/* U_HIDE_INTERNAL_API */</span><span class="preprocessor"></span></div> <div class="line"><a name="l00131"></a><span class="lineno"> 131</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="keyword">static</span> <a class="code" href="uobject_8h.html#a22af10545208a455a6e884008df48e9f" title="UClassID is used to identify classes without using the compiler's RTTI.">UClassID</a> U_EXPORT2 getStaticClassID();</div> <div class="line"><a name="l00138"></a><span class="lineno"> 138</span> </div> <div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keyword">virtual</span> <a class="code" href="uobject_8h.html#a22af10545208a455a6e884008df48e9f" title="UClassID is used to identify classes without using the compiler's RTTI.">UClassID</a> <a class="code" href="classicu_1_1UObject.html#a1aa93096e880907080b503ff1fb0f8bc" title="ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.">getDynamicClassID</a>() <span class="keyword">const</span>;</div> <div class="line"><a name="l00145"></a><span class="lineno"> 145</span> </div> <div class="line"><a name="l00146"></a><span class="lineno"> 146</span> <span class="keyword">private</span>:</div> <div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="comment">// ===================== PRIVATES ==============================</span></div> <div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <span class="comment">// private default constructor</span></div> <div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <a class="code" href="classicu_1_1CanonicalIterator.html" title="This class allows one to iterate through all the strings that are canonically equivalent to a given s...">CanonicalIterator</a>();</div> <div class="line"><a name="l00150"></a><span class="lineno"> 150</span> </div> <div class="line"><a name="l00151"></a><span class="lineno"> 151</span> </div> <div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <a class="code" href="classicu_1_1CanonicalIterator.html" title="This class allows one to iterate through all the strings that are canonically equivalent to a given s...">CanonicalIterator</a>(<span class="keyword">const</span> <a class="code" href="classicu_1_1CanonicalIterator.html" title="This class allows one to iterate through all the strings that are canonically equivalent to a given s...">CanonicalIterator</a>& other);</div> <div class="line"><a name="l00157"></a><span class="lineno"> 157</span> </div> <div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <a class="code" href="classicu_1_1CanonicalIterator.html" title="This class allows one to iterate through all the strings that are canonically equivalent to a given s...">CanonicalIterator</a>& operator=(<span class="keyword">const</span> <a class="code" href="classicu_1_1CanonicalIterator.html" title="This class allows one to iterate through all the strings that are canonically equivalent to a given s...">CanonicalIterator</a>& other);</div> <div class="line"><a name="l00163"></a><span class="lineno"> 163</span> </div> <div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <span class="comment">// fields</span></div> <div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <a class="code" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a> source;</div> <div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <a class="code" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5" title="The ICU boolean type.">UBool</a> done;</div> <div class="line"><a name="l00167"></a><span class="lineno"> 167</span> </div> <div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <span class="comment">// 2 dimensional array holds the pieces of the string with</span></div> <div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="comment">// their different canonically equivalent representations</span></div> <div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <a class="code" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a> **pieces;</div> <div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  int32_t pieces_length;</div> <div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  int32_t *pieces_lengths;</div> <div class="line"><a name="l00173"></a><span class="lineno"> 173</span> </div> <div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <span class="comment">// current is used in iterating to combine pieces</span></div> <div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  int32_t *current;</div> <div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  int32_t current_length;</div> <div class="line"><a name="l00177"></a><span class="lineno"> 177</span> </div> <div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="comment">// transient fields</span></div> <div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <a class="code" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a> buffer;</div> <div class="line"><a name="l00180"></a><span class="lineno"> 180</span> </div> <div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <span class="keyword">const</span> <a class="code" href="classicu_1_1Normalizer2.html" title="Unicode normalization functionality for standard Unicode normalization or for using custom mapping ta...">Normalizer2</a> &nfd;</div> <div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="keyword">const</span> Normalizer2Impl &nfcImpl;</div> <div class="line"><a name="l00183"></a><span class="lineno"> 183</span> </div> <div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="comment">// we have a segment, in NFD. Find all the strings that are canonically equivalent to it.</span></div> <div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <a class="code" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a> *getEquivalents(<span class="keyword">const</span> <a class="code" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a> &segment, int32_t &result_len, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all C++ compilers...">UErrorCode</a> &status); <span class="comment">//private String[] getEquivalents(String segment)</span></div> <div class="line"><a name="l00186"></a><span class="lineno"> 186</span> </div> <div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <span class="comment">//Set getEquivalents2(String segment);</span></div> <div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  Hashtable *getEquivalents2(Hashtable *fillinResult, <span class="keyword">const</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...">UChar</a> *segment, int32_t segLen, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all C++ compilers...">UErrorCode</a> &status);</div> <div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="comment">//Hashtable *getEquivalents2(const UnicodeString &segment, int32_t segLen, UErrorCode &status);</span></div> <div class="line"><a name="l00190"></a><span class="lineno"> 190</span> </div> <div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <span class="comment">//Set extract(int comp, String segment, int segmentPos, StringBuffer buffer);</span></div> <div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  Hashtable *extract(Hashtable *fillinResult, <a class="code" href="umachine_8h.html#a09fff5c3b5a5b015324dc3ec3cf92809" title="Define UChar32 as a type for single Unicode code points.">UChar32</a> comp, <span class="keyword">const</span> <a class="code" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac" title="Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...">UChar</a> *segment, int32_t segLen, int32_t segmentPos, <a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c" title="Error code to replace exception handling, so that the code is compatible with all C++ compilers...">UErrorCode</a> &status);</div> <div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="comment">//Hashtable *extract(UChar32 comp, const UnicodeString &segment, int32_t segLen, int32_t segmentPos, UErrorCode &status);</span></div> <div class="line"><a name="l00199"></a><span class="lineno"> 199</span> </div> <div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <span class="keywordtype">void</span> cleanPieces();</div> <div class="line"><a name="l00201"></a><span class="lineno"> 201</span> </div> <div class="line"><a name="l00202"></a><span class="lineno"> 202</span> };</div> <div class="line"><a name="l00203"></a><span class="lineno"> 203</span> </div> <div class="line"><a name="l00204"></a><span class="lineno"> 204</span> <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></div> <div class="line"><a name="l00205"></a><span class="lineno"> 205</span> </div> <div class="line"><a name="l00206"></a><span class="lineno"> 206</span> <span class="preprocessor">#endif </span><span class="comment">/* #if !UCONFIG_NO_NORMALIZATION */</span><span class="preprocessor"></span></div> <div class="line"><a name="l00207"></a><span class="lineno"> 207</span> <span class="preprocessor"></span></div> <div class="line"><a name="l00208"></a><span class="lineno"> 208</span> <span class="preprocessor">#endif</span></div> </div><!-- fragment --></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Fri Oct 4 2013 14:10:21 for ICU 52.1 by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.1.2 </small></address> </body> </html>