Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-release > by-pkgid > 3a4e91bde08970529a0aa07935652fe8 > files > 258

icu-doc-58.2-3.mga6.noarch.rpm

<!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::StringEnumeration 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
   &#160;<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&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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&#160;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&#160;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&#160;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_1StringEnumeration.html">StringEnumeration</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<div class="title">icu::StringEnumeration Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Base class for 'pure' C++ implementations of uenum api.  
 <a href="classicu_1_1StringEnumeration.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="strenum_8h_source.html">strenum.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for icu::StringEnumeration:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classicu_1_1StringEnumeration.png" usemap="#icu::StringEnumeration_map" alt=""/>
  <map id="icu::StringEnumeration_map" name="icu::StringEnumeration_map">
<area href="classicu_1_1UObject.html" title="UObject is the common ICU &quot;boilerplate&quot; class. " alt="icu::UObject" shape="rect" coords="0,56,138,80"/>
<area href="classicu_1_1UMemory.html" title="UMemory is the common ICU base class. " alt="icu::UMemory" shape="rect" coords="0,0,138,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:ac126117d6731f8fffe638d0bd2792cb9"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1StringEnumeration.html#ac126117d6731f8fffe638d0bd2792cb9">~StringEnumeration</a> ()</td></tr>
<tr class="memdesc:ac126117d6731f8fffe638d0bd2792cb9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#ac126117d6731f8fffe638d0bd2792cb9">More...</a><br /></td></tr>
<tr class="separator:ac126117d6731f8fffe638d0bd2792cb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe908e2b4a7ca9d06bc2ee51cccb115b"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classicu_1_1StringEnumeration.html">StringEnumeration</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1StringEnumeration.html#abe908e2b4a7ca9d06bc2ee51cccb115b">clone</a> () const </td></tr>
<tr class="memdesc:abe908e2b4a7ca9d06bc2ee51cccb115b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clone this object, an instance of a subclass of <a class="el" href="classicu_1_1StringEnumeration.html" title="Base class for &#39;pure&#39; C++ implementations of uenum api. ">StringEnumeration</a>.  <a href="#abe908e2b4a7ca9d06bc2ee51cccb115b">More...</a><br /></td></tr>
<tr class="separator:abe908e2b4a7ca9d06bc2ee51cccb115b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86d5dca1417957f07e59491d91bb4c51"><td class="memItemLeft" align="right" valign="top">virtual int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1StringEnumeration.html#a86d5dca1417957f07e59491d91bb4c51">count</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const =0</td></tr>
<tr class="separator:a86d5dca1417957f07e59491d91bb4c51"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab30fc98cec84c5540e9ffbabea8e4891"><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1StringEnumeration.html#ab30fc98cec84c5540e9ffbabea8e4891">next</a> (int32_t *resultLength, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr class="separator:ab30fc98cec84c5540e9ffbabea8e4891"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af46c4996072db5e99f9eec2d11eccc64"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1StringEnumeration.html#af46c4996072db5e99f9eec2d11eccc64">unext</a> (int32_t *resultLength, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr class="separator:af46c4996072db5e99f9eec2d11eccc64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9a53215e559b8c4001d472da702bf5c"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1StringEnumeration.html#ad9a53215e559b8c4001d472da702bf5c">snext</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr class="separator:ad9a53215e559b8c4001d472da702bf5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae156678fc4e31fb34415e1e2d296c94d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1StringEnumeration.html#ae156678fc4e31fb34415e1e2d296c94d">reset</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)=0</td></tr>
<tr class="separator:ae156678fc4e31fb34415e1e2d296c94d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a031ba48883a21a9d2c0cf889a6c3dc"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1StringEnumeration.html#a1a031ba48883a21a9d2c0cf889a6c3dc">operator==</a> (const <a class="el" href="classicu_1_1StringEnumeration.html">StringEnumeration</a> &amp;that) const </td></tr>
<tr class="memdesc:a1a031ba48883a21a9d2c0cf889a6c3dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares this enumeration to other to check if both are equal.  <a href="#a1a031ba48883a21a9d2c0cf889a6c3dc">More...</a><br /></td></tr>
<tr class="separator:a1a031ba48883a21a9d2c0cf889a6c3dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a638817b04cf604228b434babf3a1ab09"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1StringEnumeration.html#a638817b04cf604228b434babf3a1ab09">operator!=</a> (const <a class="el" href="classicu_1_1StringEnumeration.html">StringEnumeration</a> &amp;that) const </td></tr>
<tr class="memdesc:a638817b04cf604228b434babf3a1ab09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares this enumeration to other to check if both are not equal.  <a href="#a638817b04cf604228b434babf3a1ab09">More...</a><br /></td></tr>
<tr class="separator:a638817b04cf604228b434babf3a1ab09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classicu_1_1UObject"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classicu_1_1UObject')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classicu_1_1UObject.html">icu::UObject</a></td></tr>
<tr class="memitem:af10026497704f510d3d1f2eff50acb18 inherit pub_methods_classicu_1_1UObject"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1UObject.html#af10026497704f510d3d1f2eff50acb18">~UObject</a> ()</td></tr>
<tr class="memdesc:af10026497704f510d3d1f2eff50acb18 inherit pub_methods_classicu_1_1UObject"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#af10026497704f510d3d1f2eff50acb18">More...</a><br /></td></tr>
<tr class="separator:af10026497704f510d3d1f2eff50acb18 inherit pub_methods_classicu_1_1UObject"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1aa93096e880907080b503ff1fb0f8bc inherit pub_methods_classicu_1_1UObject"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="uobject_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1UObject.html#a1aa93096e880907080b503ff1fb0f8bc">getDynamicClassID</a> () const </td></tr>
<tr class="memdesc:a1aa93096e880907080b503ff1fb0f8bc inherit pub_methods_classicu_1_1UObject"><td class="mdescLeft">&#160;</td><td class="mdescRight">ICU4C "poor man's RTTI", returns a UClassID for the actual ICU class.  <a href="#a1aa93096e880907080b503ff1fb0f8bc">More...</a><br /></td></tr>
<tr class="separator:a1aa93096e880907080b503ff1fb0f8bc inherit pub_methods_classicu_1_1UObject"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a61478f73b5cf95e969999df44db5a9ab"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1StringEnumeration.html#a61478f73b5cf95e969999df44db5a9ab">StringEnumeration</a> ()</td></tr>
<tr class="memdesc:a61478f73b5cf95e969999df44db5a9ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor for use with default implementations and subclasses.  <a href="#a61478f73b5cf95e969999df44db5a9ab">More...</a><br /></td></tr>
<tr class="separator:a61478f73b5cf95e969999df44db5a9ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b17d1df2dc64b8e3d56eab09cb66025"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1StringEnumeration.html#a7b17d1df2dc64b8e3d56eab09cb66025">ensureCharsCapacity</a> (int32_t capacity, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr class="memdesc:a7b17d1df2dc64b8e3d56eab09cb66025"><td class="mdescLeft">&#160;</td><td class="mdescRight">Ensures that chars is at least as large as the requested capacity.  <a href="#a7b17d1df2dc64b8e3d56eab09cb66025">More...</a><br /></td></tr>
<tr class="separator:a7b17d1df2dc64b8e3d56eab09cb66025"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0073630a1e1dd0b2f25ff86eaa57d235"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1StringEnumeration.html#a0073630a1e1dd0b2f25ff86eaa57d235">setChars</a> (const char *s, int32_t length, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr class="memdesc:a0073630a1e1dd0b2f25ff86eaa57d235"><td class="mdescLeft">&#160;</td><td class="mdescRight">Converts s to Unicode and sets unistr to the result.  <a href="#a0073630a1e1dd0b2f25ff86eaa57d235">More...</a><br /></td></tr>
<tr class="separator:a0073630a1e1dd0b2f25ff86eaa57d235"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a85fd413ec305467e295e61c7dddc1d8b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1StringEnumeration.html#a85fd413ec305467e295e61c7dddc1d8b">unistr</a></td></tr>
<tr class="memdesc:a85fd413ec305467e295e61c7dddc1d8b"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a> field for use with default implementations and subclasses.  <a href="#a85fd413ec305467e295e61c7dddc1d8b">More...</a><br /></td></tr>
<tr class="separator:a85fd413ec305467e295e61c7dddc1d8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8376840fdc1115fe5cb702f053ea2e83"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1StringEnumeration.html#a8376840fdc1115fe5cb702f053ea2e83">charsBuffer</a> [32]</td></tr>
<tr class="memdesc:a8376840fdc1115fe5cb702f053ea2e83"><td class="mdescLeft">&#160;</td><td class="mdescRight">char * default buffer for use with default implementations and subclasses.  <a href="#a8376840fdc1115fe5cb702f053ea2e83">More...</a><br /></td></tr>
<tr class="separator:a8376840fdc1115fe5cb702f053ea2e83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a35d9a6d36d0be9229ebba50348ad89"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1StringEnumeration.html#a5a35d9a6d36d0be9229ebba50348ad89">chars</a></td></tr>
<tr class="memdesc:a5a35d9a6d36d0be9229ebba50348ad89"><td class="mdescLeft">&#160;</td><td class="mdescRight">char * buffer for use with default implementations and subclasses.  <a href="#a5a35d9a6d36d0be9229ebba50348ad89">More...</a><br /></td></tr>
<tr class="separator:a5a35d9a6d36d0be9229ebba50348ad89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51a09085b3b6970f300a7c2ded569f4a"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classicu_1_1StringEnumeration.html#a51a09085b3b6970f300a7c2ded569f4a">charsCapacity</a></td></tr>
<tr class="memdesc:a51a09085b3b6970f300a7c2ded569f4a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Capacity of chars, for use with default implementations and subclasses.  <a href="#a51a09085b3b6970f300a7c2ded569f4a">More...</a><br /></td></tr>
<tr class="separator:a51a09085b3b6970f300a7c2ded569f4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Base class for 'pure' C++ implementations of uenum api. </p>
<p>Adds a method that returns the next <a class="el" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a> since in C++ this can be a common storage format for strings.</p>
<p>The model is that the enumeration is over strings maintained by a 'service.' At any point, the service might change, invalidating the enumerator (though this is expected to be rare). The iterator returns an error if this has occurred. Lack of the error is no guarantee that the service didn't change immediately after the call, so the returned string still might not be 'valid' on subsequent use.</p>
<p>Strings may take the form of const char*, const UChar*, or const UnicodeString*. The type you get is determine by the variant of 'next' that you call. In general the <a class="el" href="classicu_1_1StringEnumeration.html" title="Base class for &#39;pure&#39; C++ implementations of uenum api. ">StringEnumeration</a> is optimized for one of these types, but all StringEnumerations can return all types. Returned strings are each terminated with a NUL. Depending on the service data, they might also include embedded NUL characters, so API is provided to optionally return the true length, counting the embedded NULs but not counting the terminating NUL.</p>
<p>The pointers returned by next, unext, and snext become invalid upon any subsequent call to the enumeration's destructor, next, unext, snext, or reset.</p>
<p>ICU 2.8 adds some default implementations and helper functions for subclasses.</p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000577">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>Definition at line <a class="el" href="strenum_8h_source.html#l00057">57</a> of file <a class="el" href="strenum_8h_source.html">strenum.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ac126117d6731f8fffe638d0bd2792cb9"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual icu::StringEnumeration::~StringEnumeration </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

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

</div>
</div>
<a class="anchor" id="a61478f73b5cf95e969999df44db5a9ab"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">icu::StringEnumeration::StringEnumeration </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Default constructor for use with default implementations and subclasses. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000591">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="abe908e2b4a7ca9d06bc2ee51cccb115b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classicu_1_1StringEnumeration.html">StringEnumeration</a>* icu::StringEnumeration::clone </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">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Clone this object, an instance of a subclass of <a class="el" href="classicu_1_1StringEnumeration.html" title="Base class for &#39;pure&#39; C++ implementations of uenum api. ">StringEnumeration</a>. </p>
<p>Clones can be used concurrently in multiple threads. If a subclass does not implement <a class="el" href="classicu_1_1StringEnumeration.html#abe908e2b4a7ca9d06bc2ee51cccb115b" title="Clone this object, an instance of a subclass of StringEnumeration. ">clone()</a>, or if an error occurs, then NULL is returned. The clone functions in all subclasses return a base class pointer because some compilers do not support covariant (same-as-this) return types; cast to the appropriate subclass if necessary. The caller must delete the clone.</p>
<dl class="section return"><dt>Returns</dt><dd>a clone of this object</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classicu_1_1UObject.html#a1aa93096e880907080b503ff1fb0f8bc" title="ICU4C &quot;poor man&#39;s RTTI&quot;, returns a UClassID for the actual ICU class. ">getDynamicClassID</a> </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000579">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

</div>
</div>
<a class="anchor" id="a86d5dca1417957f07e59491d91bb4c51"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int32_t icu::StringEnumeration::count </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>status</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Return the number of elements that the iterator traverses. If the iterator is out of sync with its service, status is set to U_ENUM_OUT_OF_SYNC_ERROR, and the return value is zero.</p>
<p>The return value will not change except possibly as a result of a subsequent call to reset, or if the iterator becomes out of sync.</p>
<p>This is a convenience function. It can end up being very expensive as all the items might have to be pre-fetched (depending on the storage format of the data being traversed).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">status</td><td>the error code. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>number of elements in the iterator.</dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000580">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a7b17d1df2dc64b8e3d56eab09cb66025"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void icu::StringEnumeration::ensureCharsCapacity </td>
          <td>(</td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>capacity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Ensures that chars is at least as large as the requested capacity. </p>
<p>For use with default implementations and subclasses.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">capacity</td><td>Requested capacity. </td></tr>
    <tr><td class="paramname">status</td><td>ICU in/out error code. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000592">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

</div>
</div>
<a class="anchor" id="ab30fc98cec84c5540e9ffbabea8e4891"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char* icu::StringEnumeration::next </td>
          <td>(</td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>resultLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the next element as a NUL-terminated char*. If there are no more elements, returns NULL. If the resultLength pointer is not NULL, the length of the string (not counting the terminating NUL) is returned at that address. If an error status is returned, the value at resultLength is undefined.</p>
<p>The returned pointer is owned by this iterator and must not be deleted by the caller. The pointer is valid until the next call to next, unext, snext, reset, or the enumerator's destructor.</p>
<p>If the iterator is out of sync with its service, status is set to U_ENUM_OUT_OF_SYNC_ERROR and NULL is returned.</p>
<p>If the native service string is a UChar* string, it is converted to char* with the invariant converter. If the conversion fails (because a character cannot be converted) then status is set to U_INVARIANT_CONVERSION_ERROR and the return value is undefined (though not NULL).</p>
<p>Starting with ICU 2.8, the default implementation calls <a class="el" href="classicu_1_1StringEnumeration.html#ad9a53215e559b8c4001d472da702bf5c">snext()</a> and handles the conversion. Either <a class="el" href="classicu_1_1StringEnumeration.html#ab30fc98cec84c5540e9ffbabea8e4891">next()</a> or <a class="el" href="classicu_1_1StringEnumeration.html#ad9a53215e559b8c4001d472da702bf5c">snext()</a> must be implemented differently by a subclass.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">status</td><td>the error code. </td></tr>
    <tr><td class="paramname">resultLength</td><td>a pointer to receive the length, can be NULL. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer to the string, or NULL.</dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000581">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a638817b04cf604228b434babf3a1ab09"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> icu::StringEnumeration::operator!= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1StringEnumeration.html">StringEnumeration</a> &amp;&#160;</td>
          <td class="paramname"><em>that</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compares this enumeration to other to check if both are not equal. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">that</td><td>The other string enumeration to compare this object to </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE if the enumerations are equal. FALSE if not. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000586">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="a1a031ba48883a21a9d2c0cf889a6c3dc"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> icu::StringEnumeration::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classicu_1_1StringEnumeration.html">StringEnumeration</a> &amp;&#160;</td>
          <td class="paramname"><em>that</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compares this enumeration to other to check if both are equal. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">that</td><td>The other string enumeration to compare this object to </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TRUE if the enumerations are equal. FALSE if not. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000585">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div>
<a class="anchor" id="ae156678fc4e31fb34415e1e2d296c94d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void icu::StringEnumeration::reset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>status</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Resets the iterator. This re-establishes sync with the service and rewinds the iterator to start at the first element.</p>
<p>Previous pointers returned by next, unext, or snext become invalid, and the value returned by count might change.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">status</td><td>the error code.</td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000584">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="a0073630a1e1dd0b2f25ff86eaa57d235"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a>* icu::StringEnumeration::setChars </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32_t&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Converts s to Unicode and sets unistr to the result. </p>
<p>For use with default implementations and subclasses, especially for implementations of <a class="el" href="classicu_1_1StringEnumeration.html#ad9a53215e559b8c4001d472da702bf5c">snext()</a> in terms of <a class="el" href="classicu_1_1StringEnumeration.html#ab30fc98cec84c5540e9ffbabea8e4891">next()</a>. This is provided with a helper function instead of a default implementation of <a class="el" href="classicu_1_1StringEnumeration.html#ad9a53215e559b8c4001d472da702bf5c">snext()</a> to avoid potential infinite loops between <a class="el" href="classicu_1_1StringEnumeration.html#ab30fc98cec84c5540e9ffbabea8e4891">next()</a> and <a class="el" href="classicu_1_1StringEnumeration.html#ad9a53215e559b8c4001d472da702bf5c">snext()</a>.</p>
<p>For example: </p><div class="fragment"><div class="line"><span class="keyword">const</span> UnicodeString* <a class="code" href="classicu_1_1StringEnumeration.html#ad9a53215e559b8c4001d472da702bf5c">snext</a>(<a class="code" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a>&amp; status) {</div><div class="line">  int32_t resultLength=0;</div><div class="line">  <span class="keyword">const</span> <span class="keywordtype">char</span> *s=<a class="code" href="classicu_1_1StringEnumeration.html#ab30fc98cec84c5540e9ffbabea8e4891">next</a>(&amp;resultLength, status);</div><div class="line">  <span class="keywordflow">return</span> <a class="code" href="classicu_1_1StringEnumeration.html#a0073630a1e1dd0b2f25ff86eaa57d235">setChars</a>(s, resultLength, status);</div><div class="line">}</div></div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>String to be converted to Unicode. </td></tr>
    <tr><td class="paramname">length</td><td>Length of the string. </td></tr>
    <tr><td class="paramname">status</td><td>ICU in/out error code. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A pointer to unistr. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000593">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

</div>
</div>
<a class="anchor" id="ad9a53215e559b8c4001d472da702bf5c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a>* icu::StringEnumeration::snext </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>status</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the next element a UnicodeString*. If there are no more elements, returns NULL.</p>
<p>The returned pointer is owned by this iterator and must not be deleted by the caller. The pointer is valid until the next call to next, unext, snext, reset, or the enumerator's destructor.</p>
<p>If the iterator is out of sync with its service, status is set to U_ENUM_OUT_OF_SYNC_ERROR and NULL is returned.</p>
<p>Starting with ICU 2.8, the default implementation calls <a class="el" href="classicu_1_1StringEnumeration.html#ab30fc98cec84c5540e9ffbabea8e4891">next()</a> and handles the conversion. Either <a class="el" href="classicu_1_1StringEnumeration.html#ab30fc98cec84c5540e9ffbabea8e4891">next()</a> or <a class="el" href="classicu_1_1StringEnumeration.html#ad9a53215e559b8c4001d472da702bf5c">snext()</a> must be implemented differently by a subclass.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">status</td><td>the error code. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer to the string, or NULL.</dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000583">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<a class="anchor" id="af46c4996072db5e99f9eec2d11eccc64"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* icu::StringEnumeration::unext </td>
          <td>(</td>
          <td class="paramtype">int32_t *&#160;</td>
          <td class="paramname"><em>resultLength</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns the next element as a NUL-terminated UChar*. If there are no more elements, returns NULL. If the resultLength pointer is not NULL, the length of the string (not counting the terminating NUL) is returned at that address. If an error status is returned, the value at resultLength is undefined.</p>
<p>The returned pointer is owned by this iterator and must not be deleted by the caller. The pointer is valid until the next call to next, unext, snext, reset, or the enumerator's destructor.</p>
<p>If the iterator is out of sync with its service, status is set to U_ENUM_OUT_OF_SYNC_ERROR and NULL is returned.</p>
<p>Starting with ICU 2.8, the default implementation calls <a class="el" href="classicu_1_1StringEnumeration.html#ad9a53215e559b8c4001d472da702bf5c">snext()</a> and handles the conversion.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">status</td><td>the error code. </td></tr>
    <tr><td class="paramname">resultLength</td><td>a ponter to receive the length, can be NULL. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pointer to the string, or NULL.</dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000582">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div>
<h2 class="groupheader">Field Documentation</h2>
<a class="anchor" id="a5a35d9a6d36d0be9229ebba50348ad89"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">char* icu::StringEnumeration::chars</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>char * buffer for use with default implementations and subclasses. </p>
<p>Allocated in constructor and in <a class="el" href="classicu_1_1StringEnumeration.html#a7b17d1df2dc64b8e3d56eab09cb66025" title="Ensures that chars is at least as large as the requested capacity. ">ensureCharsCapacity()</a>. </p><dl class="stable"><dt><b><a class="el" href="stable.html#_stable000589">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

<p>Definition at line <a class="el" href="strenum_8h_source.html#l00227">227</a> of file <a class="el" href="strenum_8h_source.html">strenum.h</a>.</p>

</div>
</div>
<a class="anchor" id="a8376840fdc1115fe5cb702f053ea2e83"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">char icu::StringEnumeration::charsBuffer[32]</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>char * default buffer for use with default implementations and subclasses. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000588">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

<p>Definition at line <a class="el" href="strenum_8h_source.html#l00221">221</a> of file <a class="el" href="strenum_8h_source.html">strenum.h</a>.</p>

</div>
</div>
<a class="anchor" id="a51a09085b3b6970f300a7c2ded569f4a"></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::StringEnumeration::charsCapacity</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Capacity of chars, for use with default implementations and subclasses. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000590">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

<p>Definition at line <a class="el" href="strenum_8h_source.html#l00232">232</a> of file <a class="el" href="strenum_8h_source.html">strenum.h</a>.</p>

</div>
</div>
<a class="anchor" id="a85fd413ec305467e295e61c7dddc1d8b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classicu_1_1UnicodeString.html">UnicodeString</a> icu::StringEnumeration::unistr</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="classicu_1_1UnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides similar function...">UnicodeString</a> field for use with default implementations and subclasses. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable000587">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

<p>Definition at line <a class="el" href="strenum_8h_source.html#l00216">216</a> of file <a class="el" href="strenum_8h_source.html">strenum.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="strenum_8h_source.html">strenum.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>