<!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"/> <meta name="generator" content="Doxygen 1.8.11"/> <title>ICU 58.2: icu::UCharsTrie::Iterator Class Reference</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 id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">ICU 58.2  <span id="projectnumber">58.2</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.11 --> <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 class="current"><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="classes.html"><span>Data Structure Index</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Data Fields</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceicu.html">icu</a></li><li class="navelem"><a class="el" href="classicu_1_1UCharsTrie.html">UCharsTrie</a></li><li class="navelem"><a class="el" href="classicu_1_1UCharsTrie_1_1Iterator.html">Iterator</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> </div> <div class="headertitle"> <div class="title">icu::UCharsTrie::Iterator Class Reference</div> </div> </div><!--header--> <div class="contents"> <p><a class="el" href="classicu_1_1UCharsTrie_1_1Iterator.html" title="Iterator for all of the (string, value) pairs in a UCharsTrie. ">Iterator</a> for all of the (string, value) pairs in a <a class="el" href="classicu_1_1UCharsTrie.html" title="Light-weight, non-const reader class for a UCharsTrie. ">UCharsTrie</a>. <a href="classicu_1_1UCharsTrie_1_1Iterator.html#details">More...</a></p> <p><code>#include <<a class="el" href="ucharstrie_8h_source.html">ucharstrie.h</a>></code></p> <div class="dynheader"> Inheritance diagram for icu::UCharsTrie::Iterator:</div> <div class="dyncontent"> <div class="center"> <img src="classicu_1_1UCharsTrie_1_1Iterator.png" usemap="#icu::UCharsTrie::Iterator_map" alt=""/> <map id="icu::UCharsTrie::Iterator_map" name="icu::UCharsTrie::Iterator_map"> <area href="classicu_1_1UMemory.html" title="UMemory is the common ICU base class. " alt="icu::UMemory" shape="rect" coords="0,0,145,24"/> </map> </div></div> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:a466df4c684d5cd94d32bccbf66d1b583"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1UCharsTrie_1_1Iterator.html#a466df4c684d5cd94d32bccbf66d1b583">Iterator</a> (const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *trieUChars, int32_t maxStringLength, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &errorCode)</td></tr> <tr class="memdesc:a466df4c684d5cd94d32bccbf66d1b583"><td class="mdescLeft"> </td><td class="mdescRight">Iterates from the root of a UChar-serialized <a class="el" href="classicu_1_1UCharsTrie.html" title="Light-weight, non-const reader class for a UCharsTrie. ">UCharsTrie</a>. <a href="#a466df4c684d5cd94d32bccbf66d1b583">More...</a><br /></td></tr> <tr class="separator:a466df4c684d5cd94d32bccbf66d1b583"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ae776b67b4946b55390a0f77ab649d42f"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1UCharsTrie_1_1Iterator.html#ae776b67b4946b55390a0f77ab649d42f">Iterator</a> (const <a class="el" href="classicu_1_1UCharsTrie.html">UCharsTrie</a> &trie, int32_t maxStringLength, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &errorCode)</td></tr> <tr class="memdesc:ae776b67b4946b55390a0f77ab649d42f"><td class="mdescLeft"> </td><td class="mdescRight">Iterates from the current state of the specified <a class="el" href="classicu_1_1UCharsTrie.html" title="Light-weight, non-const reader class for a UCharsTrie. ">UCharsTrie</a>. <a href="#ae776b67b4946b55390a0f77ab649d42f">More...</a><br /></td></tr> <tr class="separator:ae776b67b4946b55390a0f77ab649d42f"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a8d4ea40dceceeb4e76bff1e8ddfb6e2e"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1UCharsTrie_1_1Iterator.html#a8d4ea40dceceeb4e76bff1e8ddfb6e2e">~Iterator</a> ()</td></tr> <tr class="memdesc:a8d4ea40dceceeb4e76bff1e8ddfb6e2e"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#a8d4ea40dceceeb4e76bff1e8ddfb6e2e">More...</a><br /></td></tr> <tr class="separator:a8d4ea40dceceeb4e76bff1e8ddfb6e2e"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a138e47f25a26068ea5ec3f890f02f551"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1UCharsTrie_1_1Iterator.html">Iterator</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1UCharsTrie_1_1Iterator.html#a138e47f25a26068ea5ec3f890f02f551">reset</a> ()</td></tr> <tr class="memdesc:a138e47f25a26068ea5ec3f890f02f551"><td class="mdescLeft"> </td><td class="mdescRight">Resets this iterator to its initial state. <a href="#a138e47f25a26068ea5ec3f890f02f551">More...</a><br /></td></tr> <tr class="separator:a138e47f25a26068ea5ec3f890f02f551"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a0e00c0ef4abb59c3ac6b13b82c4b7a85"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1UCharsTrie_1_1Iterator.html#a0e00c0ef4abb59c3ac6b13b82c4b7a85">hasNext</a> () const </td></tr> <tr class="separator:a0e00c0ef4abb59c3ac6b13b82c4b7a85"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a9d8e9a008f19806d8a04bc792d4acdc6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1UCharsTrie_1_1Iterator.html#a9d8e9a008f19806d8a04bc792d4acdc6">next</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &errorCode)</td></tr> <tr class="memdesc:a9d8e9a008f19806d8a04bc792d4acdc6"><td class="mdescLeft"> </td><td class="mdescRight">Finds the next (string, value) pair if there is one. <a href="#a9d8e9a008f19806d8a04bc792d4acdc6">More...</a><br /></td></tr> <tr class="separator:a9d8e9a008f19806d8a04bc792d4acdc6"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a581665f141f21fa24cba8b6dc431bbf3"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1UCharsTrie_1_1Iterator.html#a581665f141f21fa24cba8b6dc431bbf3">getString</a> () const </td></tr> <tr class="separator:a581665f141f21fa24cba8b6dc431bbf3"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a1382af497f173ce2f9007df15a8973c8"><td class="memItemLeft" align="right" valign="top">int32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1UCharsTrie_1_1Iterator.html#a1382af497f173ce2f9007df15a8973c8">getValue</a> () const </td></tr> <tr class="separator:a1382af497f173ce2f9007df15a8973c8"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p><a class="el" href="classicu_1_1UCharsTrie_1_1Iterator.html" title="Iterator for all of the (string, value) pairs in a UCharsTrie. ">Iterator</a> for all of the (string, value) pairs in a <a class="el" href="classicu_1_1UCharsTrie.html" title="Light-weight, non-const reader class for a UCharsTrie. ">UCharsTrie</a>. </p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable001407">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl> <p>Definition at line <a class="el" href="ucharstrie_8h_source.html#l00258">258</a> of file <a class="el" href="ucharstrie_8h_source.html">ucharstrie.h</a>.</p> </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> <a class="anchor" id="a466df4c684d5cd94d32bccbf66d1b583"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">icu::UCharsTrie::Iterator::Iterator </td> <td>(</td> <td class="paramtype">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> * </td> <td class="paramname"><em>trieUChars</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"><em>maxStringLength</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td> <td class="paramname"><em>errorCode</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Iterates from the root of a UChar-serialized <a class="el" href="classicu_1_1UCharsTrie.html" title="Light-weight, non-const reader class for a UCharsTrie. ">UCharsTrie</a>. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">trieUChars</td><td>The trie UChars. </td></tr> <tr><td class="paramname">maxStringLength</td><td>If 0, the iterator returns full strings. Otherwise, the iterator returns strings with this maximum length. </td></tr> <tr><td class="paramname">errorCode</td><td>Standard ICU error code. Its input value must pass the <a class="el" href="utypes_8h.html#a527f2c69e6b2e3b2c53ad8a99fb36711" title="Does the error code indicate success? ">U_SUCCESS()</a> test, or else the function returns immediately. Check for <a class="el" href="utypes_8h.html#a4d202200b6aa6f3c965ea370e0c8155f" title="Does the error code indicate a failure? ">U_FAILURE()</a> on output or use with function chaining. (See User Guide for details.) </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable001409">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl> </div> </div> <a class="anchor" id="ae776b67b4946b55390a0f77ab649d42f"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">icu::UCharsTrie::Iterator::Iterator </td> <td>(</td> <td class="paramtype">const <a class="el" href="classicu_1_1UCharsTrie.html">UCharsTrie</a> & </td> <td class="paramname"><em>trie</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int32_t </td> <td class="paramname"><em>maxStringLength</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td> <td class="paramname"><em>errorCode</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Iterates from the current state of the specified <a class="el" href="classicu_1_1UCharsTrie.html" title="Light-weight, non-const reader class for a UCharsTrie. ">UCharsTrie</a>. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">trie</td><td>The trie whose state will be copied for iteration. </td></tr> <tr><td class="paramname">maxStringLength</td><td>If 0, the iterator returns full strings. Otherwise, the iterator returns strings with this maximum length. </td></tr> <tr><td class="paramname">errorCode</td><td>Standard ICU error code. Its input value must pass the <a class="el" href="utypes_8h.html#a527f2c69e6b2e3b2c53ad8a99fb36711" title="Does the error code indicate success? ">U_SUCCESS()</a> test, or else the function returns immediately. Check for <a class="el" href="utypes_8h.html#a4d202200b6aa6f3c965ea370e0c8155f" title="Does the error code indicate a failure? ">U_FAILURE()</a> on output or use with function chaining. (See User Guide for details.) </td></tr> </table> </dd> </dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable001410">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl> </div> </div> <a class="anchor" id="a8d4ea40dceceeb4e76bff1e8ddfb6e2e"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">icu::UCharsTrie::Iterator::~Iterator </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Destructor. </p> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable001411">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl> </div> </div> <h2 class="groupheader">Member Function Documentation</h2> <a class="anchor" id="a581665f141f21fa24cba8b6dc431bbf3"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a>& icu::UCharsTrie::Iterator::getString </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inline</span></span> </td> </tr> </table> </div><div class="memdoc"> <dl class="section return"><dt>Returns</dt><dd>The string for the last successful <a class="el" href="classicu_1_1UCharsTrie_1_1Iterator.html#a9d8e9a008f19806d8a04bc792d4acdc6" title="Finds the next (string, value) pair if there is one. ">next()</a>. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable001415">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl> <p>Definition at line <a class="el" href="ucharstrie_8h_source.html#l00325">325</a> of file <a class="el" href="ucharstrie_8h_source.html">ucharstrie.h</a>.</p> </div> </div> <a class="anchor" id="a1382af497f173ce2f9007df15a8973c8"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">int32_t icu::UCharsTrie::Iterator::getValue </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">inline</span></span> </td> </tr> </table> </div><div class="memdoc"> <dl class="section return"><dt>Returns</dt><dd>The value for the last successful <a class="el" href="classicu_1_1UCharsTrie_1_1Iterator.html#a9d8e9a008f19806d8a04bc792d4acdc6" title="Finds the next (string, value) pair if there is one. ">next()</a>. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable001416">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl> <p>Definition at line <a class="el" href="ucharstrie_8h_source.html#l00330">330</a> of file <a class="el" href="ucharstrie_8h_source.html">ucharstrie.h</a>.</p> <p>References <a class="el" href="utypes_8h_source.html#l00188">NULL</a>, <a class="el" href="umachine_8h_source.html#l00263">TRUE</a>, <a class="el" href="uversion_8h_source.html#l00132">U_NAMESPACE_END</a>, and <a class="el" href="ustringtrie_8h_source.html#l00066">USTRINGTRIE_INTERMEDIATE_VALUE</a>.</p> </div> </div> <a class="anchor" id="a0e00c0ef4abb59c3ac6b13b82c4b7a85"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> icu::UCharsTrie::Iterator::hasNext </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> <dl class="section return"><dt>Returns</dt><dd>TRUE if there are more elements. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable001413">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl> </div> </div> <a class="anchor" id="a9d8e9a008f19806d8a04bc792d4acdc6"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> icu::UCharsTrie::Iterator::next </td> <td>(</td> <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> & </td> <td class="paramname"><em>errorCode</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Finds the next (string, value) pair if there is one. </p> <p>If the string is truncated to the maximum length and does not have a real value, then the value is set to -1. In this case, this "not a real value" is indistinguishable from a real value of -1. </p><dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">errorCode</td><td>Standard ICU error code. Its input value must pass the <a class="el" href="utypes_8h.html#a527f2c69e6b2e3b2c53ad8a99fb36711" title="Does the error code indicate success? ">U_SUCCESS()</a> test, or else the function returns immediately. Check for <a class="el" href="utypes_8h.html#a4d202200b6aa6f3c965ea370e0c8155f" title="Does the error code indicate a failure? ">U_FAILURE()</a> on output or use with function chaining. (See User Guide for details.) </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>TRUE if there is another element. </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable001414">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl> </div> </div> <a class="anchor" id="a138e47f25a26068ea5ec3f890f02f551"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classicu_1_1UCharsTrie_1_1Iterator.html">Iterator</a>& icu::UCharsTrie::Iterator::reset </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Resets this iterator to its initial state. </p> <dl class="section return"><dt>Returns</dt><dd>*this </dd></dl> <dl class="stable"><dt><b><a class="el" href="stable.html#_stable001412">Stable:</a></b></dt><dd>ICU 4.8 </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li><a class="el" href="ucharstrie_8h_source.html">ucharstrie.h</a></li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.11 </small></address> </body> </html>