Sophie

Sophie

distrib > CentOS > 5 > x86_64 > by-pkgid > 34ae14235711d1471f043ac894a061f9 > files > 35

libicu-doc-3.6-5.16.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>ICU 3.6: CanonicalIterator Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.7 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="modules.html"><span>Modules</span></a></li>
    <li id="current"><a href="classes.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
  </ul></div>
<h1>CanonicalIterator Class Reference</h1><!-- doxytag: class="CanonicalIterator" --><!-- doxytag: inherits="UObject" -->This class allows one to iterate through all the strings that are canonically equivalent to a given string.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="caniter_8h-source.html">caniter.h</a>&gt;</code>
<p>
<p>Inheritance diagram for CanonicalIterator:
<p><center><img src="classCanonicalIterator.png" usemap="#CanonicalIterator_map" border="0" alt=""></center>
<map name="CanonicalIterator_map">
<area href="classUObject.html" alt="UObject" shape="rect" coords="0,56,109,80">
<area href="classUMemory.html" alt="UMemory" shape="rect" coords="0,0,109,24">
</map>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCanonicalIterator.html#b5b0cde93521ce2f9bc806eb8aff998e">CanonicalIterator</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;source, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct a <a class="el" href="classCanonicalIterator.html">CanonicalIterator</a> object.  <a href="#b5b0cde93521ce2f9bc806eb8aff998e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCanonicalIterator.html#46576c98d72d71e7fdaa7b9b2b5fb4a4">~CanonicalIterator</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor Cleans pieces.  <a href="#46576c98d72d71e7fdaa7b9b2b5fb4a4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCanonicalIterator.html#5d028eda85f388ece268c4ab5d335f43">getSource</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the NFD form of the current source we are iterating over.  <a href="#5d028eda85f388ece268c4ab5d335f43"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCanonicalIterator.html#879e511d37f326a400ea32326b86fdaf">reset</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets the iterator so that one can start again from the beginning.  <a href="#879e511d37f326a400ea32326b86fdaf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCanonicalIterator.html#61830aa349a41ba07eb391512491d309">next</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the next canonically equivalent string.  <a href="#61830aa349a41ba07eb391512491d309"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCanonicalIterator.html#e381083bee493358ea97e20b648fd79e">setSource</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;newSource, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set a new source for this iterator.  <a href="#e381083bee493358ea97e20b648fd79e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="utypes_8h.html#452dc3c7d14eb1a1837ae1aa0b2d6724">UClassID</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCanonicalIterator.html#a29af63382b11e7ac26b8629ce2570b2">getDynamicClassID</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">ICU "poor man's RTTI", returns a UClassID for the actual class.  <a href="#a29af63382b11e7ac26b8629ce2570b2"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCanonicalIterator.html#1d24447146e1a24851b8f53574d824d6">permute</a> (<a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;source, <a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a> skipZeros, Hashtable *result, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Dumb recursive implementation of permutation.  <a href="#1d24447146e1a24851b8f53574d824d6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="utypes_8h.html#452dc3c7d14eb1a1837ae1aa0b2d6724">UClassID</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classCanonicalIterator.html#06f36ae1ce96324020bf9a19097b15e6">getStaticClassID</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">ICU "poor man's RTTI", returns a UClassID for this class.  <a href="#06f36ae1ce96324020bf9a19097b15e6"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This class allows one to iterate through all the strings that are canonically equivalent to a given string. 
<p>
For example, here are some sample results: Results for: {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA} 1: \u0041\u030A\u0064\u0307\u0327 = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA} 2: \u0041\u030A\u0064\u0327\u0307 = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D}{COMBINING CEDILLA}{COMBINING DOT ABOVE} 3: \u0041\u030A\u1E0B\u0327 = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D WITH DOT ABOVE}{COMBINING CEDILLA} 4: \u0041\u030A\u1E11\u0307 = {LATIN CAPITAL LETTER A}{COMBINING RING ABOVE}{LATIN SMALL LETTER D WITH CEDILLA}{COMBINING DOT ABOVE} 5: \u00C5\u0064\u0307\u0327 = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA} 6: \u00C5\u0064\u0327\u0307 = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D}{COMBINING CEDILLA}{COMBINING DOT ABOVE} 7: \u00C5\u1E0B\u0327 = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D WITH DOT ABOVE}{COMBINING CEDILLA} 8: \u00C5\u1E11\u0307 = {LATIN CAPITAL LETTER A WITH RING ABOVE}{LATIN SMALL LETTER D WITH CEDILLA}{COMBINING DOT ABOVE} 9: \u212B\u0064\u0307\u0327 = {ANGSTROM SIGN}{LATIN SMALL LETTER D}{COMBINING DOT ABOVE}{COMBINING CEDILLA} 10: \u212B\u0064\u0327\u0307 = {ANGSTROM SIGN}{LATIN SMALL LETTER D}{COMBINING CEDILLA}{COMBINING DOT ABOVE} 11: \u212B\u1E0B\u0327 = {ANGSTROM SIGN}{LATIN SMALL LETTER D WITH DOT ABOVE}{COMBINING CEDILLA} 12: \u212B\u1E11\u0307 = {ANGSTROM SIGN}{LATIN SMALL LETTER D WITH CEDILLA}{COMBINING DOT ABOVE} <br>
Note: the code is intended for use with small strings, and is not suitable for larger ones, since it has not been optimized for that situation. Note, <a class="el" href="classCanonicalIterator.html">CanonicalIterator</a> is not intended to be subclassed. <dl compact><dt><b>Author:</b></dt><dd>M. Davis <p>
C++ port by V. Weinstein </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000034">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>

<p>
Definition at line <a class="el" href="caniter_8h-source.html#l00070">70</a> of file <a class="el" href="caniter_8h-source.html">caniter.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="b5b0cde93521ce2f9bc806eb8aff998e"></a><!-- doxytag: member="CanonicalIterator::CanonicalIterator" ref="b5b0cde93521ce2f9bc806eb8aff998e" args="(const UnicodeString &amp;source, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CanonicalIterator::CanonicalIterator           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Construct a <a class="el" href="classCanonicalIterator.html">CanonicalIterator</a> object. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>string to get results for </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Fill-in parameter which receives the status of this operation. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000035">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="46576c98d72d71e7fdaa7b9b2b5fb4a4"></a><!-- doxytag: member="CanonicalIterator::~CanonicalIterator" ref="46576c98d72d71e7fdaa7b9b2b5fb4a4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual CanonicalIterator::~CanonicalIterator           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Destructor Cleans pieces. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable000036">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a29af63382b11e7ac26b8629ce2570b2"></a><!-- doxytag: member="CanonicalIterator::getDynamicClassID" ref="a29af63382b11e7ac26b8629ce2570b2" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="utypes_8h.html#452dc3c7d14eb1a1837ae1aa0b2d6724">UClassID</a> CanonicalIterator::getDynamicClassID           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
ICU "poor man's RTTI", returns a UClassID for the actual class. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable000042">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl>

<p>
Implements <a class="el" href="classUObject.html#60f3fba82b9d7edfe3d3f9d423ab826d">UObject</a>.
</div>
</div><p>
<a class="anchor" name="5d028eda85f388ece268c4ab5d335f43"></a><!-- doxytag: member="CanonicalIterator::getSource" ref="5d028eda85f388ece268c4ab5d335f43" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a> CanonicalIterator::getSource           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Gets the NFD form of the current source we are iterating over. 
<p>
<dl compact><dt><b>Returns:</b></dt><dd>gets the source: NOTE: it is the NFD form of source </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000037">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="06f36ae1ce96324020bf9a19097b15e6"></a><!-- doxytag: member="CanonicalIterator::getStaticClassID" ref="06f36ae1ce96324020bf9a19097b15e6" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="utypes_8h.html#452dc3c7d14eb1a1837ae1aa0b2d6724">UClassID</a> CanonicalIterator::getStaticClassID           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
ICU "poor man's RTTI", returns a UClassID for this class. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable000041">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl>

</div>
</div><p>
<a class="anchor" name="61830aa349a41ba07eb391512491d309"></a><!-- doxytag: member="CanonicalIterator::next" ref="61830aa349a41ba07eb391512491d309" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a> CanonicalIterator::next           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Get the next canonically equivalent string. 
<p>
<br>
<b>Warning: The strings are not guaranteed to be in any particular order.</b> <dl compact><dt><b>Returns:</b></dt><dd>the next string that is canonically equivalent. A bogus string is returned when the iteration is done. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000039">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="1d24447146e1a24851b8f53574d824d6"></a><!-- doxytag: member="CanonicalIterator::permute" ref="1d24447146e1a24851b8f53574d824d6" args="(UnicodeString &amp;source, UBool skipZeros, Hashtable *result, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void CanonicalIterator::permute           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="umachine_8h.html#d373ce262c37cc047b0df2ad7b5dbba7">UBool</a>&nbsp;</td>
          <td class="paramname"> <em>skipZeros</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Hashtable *&nbsp;</td>
          <td class="paramname"> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Dumb recursive implementation of permutation. 
<p>
TODO: optimize <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>the string to find permutations for </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>skipZeros</em>&nbsp;</td><td>determine if skip zeros </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>the results in a set. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Fill-in parameter which receives the status of this operation. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="internal.html#_internal000006">Internal:</a></b></dt><dd>Do not use. This API is for interal use only.  </dd></dl>

</div>
</div><p>
<a class="anchor" name="879e511d37f326a400ea32326b86fdaf"></a><!-- doxytag: member="CanonicalIterator::reset" ref="879e511d37f326a400ea32326b86fdaf" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CanonicalIterator::reset           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Resets the iterator so that one can start again from the beginning. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable000038">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="e381083bee493358ea97e20b648fd79e"></a><!-- doxytag: member="CanonicalIterator::setSource" ref="e381083bee493358ea97e20b648fd79e" args="(const UnicodeString &amp;newSource, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CanonicalIterator::setSource           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>newSource</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Set a new source for this iterator. 
<p>
Allows object reuse. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>newSource</em>&nbsp;</td><td>the source string to iterate against. This allows the same iterator to be used while changing the source string, saving object creation. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>Fill-in parameter which receives the status of this operation. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000040">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="caniter_8h-source.html">caniter.h</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Tue Dec 13 17:29:54 2011 for ICU 3.6 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
</body>
</html>