Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > 280da2a01a3d16776505ea3f476de84f > files > 147

icu-doc-3.8.1-2mdv2008.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.8: StringEnumeration 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.5.1 -->
<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>StringEnumeration Class Reference</h1><!-- doxytag: class="StringEnumeration" --><!-- doxytag: inherits="UObject" -->Base class for 'pure' C++ implementations of uenum api.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="strenum_8h-source.html">strenum.h</a>&gt;</code>
<p>
<p>Inheritance diagram for StringEnumeration:
<p><center><img src="classStringEnumeration.png" usemap="#StringEnumeration_map" border="0" alt=""></center>
<map name="StringEnumeration_map">
<area href="classUObject.html" alt="UObject" shape="rect" coords="0,56,115,80">
<area href="classUMemory.html" alt="UMemory" shape="rect" coords="0,0,115,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">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStringEnumeration.html#2782440c508773b1c6474b7d1bc54a01">~StringEnumeration</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#2782440c508773b1c6474b7d1bc54a01"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classStringEnumeration.html">StringEnumeration</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStringEnumeration.html#ac34e21e0dc461b3b842b5ab791e99b2">clone</a> () const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clone this object, an instance of a subclass of <a class="el" href="classStringEnumeration.html">StringEnumeration</a>.  <a href="#ac34e21e0dc461b3b842b5ab791e99b2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStringEnumeration.html#936688f2a1aac35fcdd10b8138bfc62b">count</a> (<a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const=0</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStringEnumeration.html#e613631e7b63a9987c056ad5b04251e5">next</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> *resultLength, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const UChar *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStringEnumeration.html#3ea012fc20253a0d97801a1d3cee0fcf">unext</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> *resultLength, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const <a class="el" href="classUnicodeString.html">UnicodeString</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStringEnumeration.html#371d8cb385f9602fb41ef356fa425181">snext</a> (<a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)=0</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStringEnumeration.html#68de37a3dc40d92679551eacfb02006b">reset</a> (<a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)=0</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStringEnumeration.html#bf471317321a3e13fd7c41ab8170a759">operator==</a> (const <a class="el" href="classStringEnumeration.html">StringEnumeration</a> &amp;that) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compares this enumeration to other to check if both are equal.  <a href="#bf471317321a3e13fd7c41ab8170a759"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStringEnumeration.html#9b9035798f7148d42fd80d716533c540">operator!=</a> (const <a class="el" href="classStringEnumeration.html">StringEnumeration</a> &amp;that) const</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compares this enumeration to other to check if both are not equal.  <a href="#9b9035798f7148d42fd80d716533c540"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected 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="classStringEnumeration.html#c526472a3acff96f58c2b34ffabdacaf">StringEnumeration</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Default constructor for use with default implementations and subclasses.  <a href="#c526472a3acff96f58c2b34ffabdacaf"></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="classStringEnumeration.html#b7428b1c1baf1c9ac4922eca0a7ab636">ensureCharsCapacity</a> (<a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> capacity, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Ensures that chars is at least as large as the requested capacity.  <a href="#b7428b1c1baf1c9ac4922eca0a7ab636"></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="classStringEnumeration.html#80c0dcfe1fa814cc0d404fe0dbf2b267">setChars</a> (const char *s, <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> <a class="el" href="ucnv_8h.html#2b811fa5f6e9b580fa0122d38e9849b5">length</a>, <a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Converts s to Unicode and sets unistr to the result.  <a href="#80c0dcfe1fa814cc0d404fe0dbf2b267"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Protected Attributes</h2></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="classStringEnumeration.html#d6e99301df88ba7d1fac67181f98bd2e">unistr</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classUnicodeString.html">UnicodeString</a> field for use with default implementations and subclasses.  <a href="#d6e99301df88ba7d1fac67181f98bd2e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStringEnumeration.html#c6e6a6266dc50407ac399440a136195e">charsBuffer</a> [32]</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">char * default buffer for use with default implementations and subclasses.  <a href="#c6e6a6266dc50407ac399440a136195e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStringEnumeration.html#a91f702f4920744b448ef3b45e957ed7">chars</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">char * buffer for use with default implementations and subclasses.  <a href="#a91f702f4920744b448ef3b45e957ed7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classStringEnumeration.html#34d0dc24d6f6ea33fbb5cc9186f03c58">charsCapacity</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Capacity of chars, for use with default implementations and subclasses.  <a href="#34d0dc24d6f6ea33fbb5cc9186f03c58"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Base class for 'pure' C++ implementations of uenum api. 
<p>
Adds a method that returns the next <a class="el" href="classUnicodeString.html">UnicodeString</a> since in C++ this can be a common storage format for strings.<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>
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="classStringEnumeration.html">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>
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>
ICU 2.8 adds some default implementations and helper functions for subclasses.<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable000315">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

<p>

<p>
Definition at line <a class="el" href="strenum_8h-source.html#l00055">55</a> of file <a class="el" href="strenum_8h-source.html">strenum.h</a>.<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="2782440c508773b1c6474b7d1bc54a01"></a><!-- doxytag: member="StringEnumeration::~StringEnumeration" ref="2782440c508773b1c6474b7d1bc54a01" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual StringEnumeration::~StringEnumeration           </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. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable000316">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

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

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

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="ac34e21e0dc461b3b842b5ab791e99b2"></a><!-- doxytag: member="StringEnumeration::clone" ref="ac34e21e0dc461b3b842b5ab791e99b2" args="() const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classStringEnumeration.html">StringEnumeration</a>* StringEnumeration::clone           </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>
Clone this object, an instance of a subclass of <a class="el" href="classStringEnumeration.html">StringEnumeration</a>. 
<p>
Clones can be used concurrently in multiple threads. If a subclass does not implement <a class="el" href="classStringEnumeration.html#ac34e21e0dc461b3b842b5ab791e99b2">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="return" compact><dt><b>Returns:</b></dt><dd>a clone of this object</dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="classUObject.html#ce1dd31fb2c6f2c07dfebe8fd240ec37">getDynamicClassID</a> </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000317">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

</div>
</div><p>
<a class="anchor" name="936688f2a1aac35fcdd10b8138bfc62b"></a><!-- doxytag: member="StringEnumeration::count" ref="936688f2a1aac35fcdd10b8138bfc62b" args="(UErrorCode &amp;status) const=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> StringEnumeration::count           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [pure virtual]</code></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>
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>
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 compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>the error code. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>number of elements in the iterator.</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000318">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="e613631e7b63a9987c056ad5b04251e5"></a><!-- doxytag: member="StringEnumeration::next" ref="e613631e7b63a9987c056ad5b04251e5" args="(int32_t *resultLength, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char* StringEnumeration::next           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> *&nbsp;</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#3343c1c8a8377277046774691c98d78c">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> [virtual]</code></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>
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>
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>
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>
Starting with ICU 2.8, the default implementation calls <a class="el" href="classStringEnumeration.html#371d8cb385f9602fb41ef356fa425181">snext()</a> and handles the conversion.<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>status</em>&nbsp;</td><td>the error code. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>resultLength</em>&nbsp;</td><td>a pointer to receive the length, can be NULL. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>a pointer to the string, or NULL.</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000319">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="3ea012fc20253a0d97801a1d3cee0fcf"></a><!-- doxytag: member="StringEnumeration::unext" ref="3ea012fc20253a0d97801a1d3cee0fcf" args="(int32_t *resultLength, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const UChar* StringEnumeration::unext           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> *&nbsp;</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#3343c1c8a8377277046774691c98d78c">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> [virtual]</code></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>
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>
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>
Starting with ICU 2.8, the default implementation calls <a class="el" href="classStringEnumeration.html#371d8cb385f9602fb41ef356fa425181">snext()</a> and handles the conversion.<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>status</em>&nbsp;</td><td>the error code. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>resultLength</em>&nbsp;</td><td>a ponter to receive the length, can be NULL. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>a pointer to the string, or NULL.</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000320">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="371d8cb385f9602fb41ef356fa425181"></a><!-- doxytag: member="StringEnumeration::snext" ref="371d8cb385f9602fb41ef356fa425181" args="(UErrorCode &amp;status)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual const <a class="el" href="classUnicodeString.html">UnicodeString</a>* StringEnumeration::snext           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the next element a UnicodeString*. If there are no more elements, returns NULL.<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>
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>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>the error code. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>a pointer to the string, or NULL.</dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000321">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="68de37a3dc40d92679551eacfb02006b"></a><!-- doxytag: member="StringEnumeration::reset" ref="68de37a3dc40d92679551eacfb02006b" args="(UErrorCode &amp;status)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void StringEnumeration::reset           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [pure virtual]</code></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>
Previous pointers returned by next, unext, or snext become invalid, and the value returned by count might change.<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>status</em>&nbsp;</td><td>the error code.</td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000322">Stable:</a></b></dt><dd>ICU 2.4 </dd></dl>

</div>
</div><p>
<a class="anchor" name="bf471317321a3e13fd7c41ab8170a759"></a><!-- doxytag: member="StringEnumeration::operator==" ref="bf471317321a3e13fd7c41ab8170a759" args="(const StringEnumeration &amp;that) const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> StringEnumeration::operator==           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classStringEnumeration.html">StringEnumeration</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>that</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Compares this enumeration to other to check if both are equal. 
<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>that</em>&nbsp;</td><td>The other string enumeration to compare this object to </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if the enumerations are equal. FALSE if not. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000323">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="9b9035798f7148d42fd80d716533c540"></a><!-- doxytag: member="StringEnumeration::operator!=" ref="9b9035798f7148d42fd80d716533c540" args="(const StringEnumeration &amp;that) const" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#349ef00011f20ccd1d3b424445681aa5">UBool</a> StringEnumeration::operator!=           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classStringEnumeration.html">StringEnumeration</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>that</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Compares this enumeration to other to check if both are not equal. 
<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>that</em>&nbsp;</td><td>The other string enumeration to compare this object to </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>TRUE if the enumerations are equal. FALSE if not. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000324">Stable:</a></b></dt><dd>ICU 3.6 </dd></dl>

</div>
</div><p>
<a class="anchor" name="b7428b1c1baf1c9ac4922eca0a7ab636"></a><!-- doxytag: member="StringEnumeration::ensureCharsCapacity" ref="b7428b1c1baf1c9ac4922eca0a7ab636" args="(int32_t capacity, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void StringEnumeration::ensureCharsCapacity           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</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#3343c1c8a8377277046774691c98d78c">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> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Ensures that chars is at least as large as the requested capacity. 
<p>
For use with default implementations and subclasses.<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>capacity</em>&nbsp;</td><td>Requested capacity. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>ICU in/out error code. </td></tr>
  </table>
</dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000330">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

</div>
</div><p>
<a class="anchor" name="80c0dcfe1fa814cc0d404fe0dbf2b267"></a><!-- doxytag: member="StringEnumeration::setChars" ref="80c0dcfe1fa814cc0d404fe0dbf2b267" args="(const char *s, int32_t length, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a>* StringEnumeration::setChars           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a>&nbsp;</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#3343c1c8a8377277046774691c98d78c">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> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Converts s to Unicode and sets unistr to the result. 
<p>
For use with default implementations and subclasses, especially for implementations of <a class="el" href="classStringEnumeration.html#371d8cb385f9602fb41ef356fa425181">snext()</a> in terms of <a class="el" href="classStringEnumeration.html#e613631e7b63a9987c056ad5b04251e5">next()</a>. This is provided with a helper function instead of a default implementation of <a class="el" href="classStringEnumeration.html#371d8cb385f9602fb41ef356fa425181">snext()</a> to avoid potential infinite loops between <a class="el" href="classStringEnumeration.html#e613631e7b63a9987c056ad5b04251e5">next()</a> and <a class="el" href="classStringEnumeration.html#371d8cb385f9602fb41ef356fa425181">snext()</a>.<p>
For example: <div class="fragment"><pre class="fragment"> <span class="keyword">const</span> <a class="code" href="classUnicodeString.html">UnicodeString</a>* <a class="code" href="classStringEnumeration.html#371d8cb385f9602fb41ef356fa425181">snext</a>(<a class="code" href="utypes_8h.html#3343c1c8a8377277046774691c98d78c">UErrorCode</a>&amp; status) {
   <a class="code" href="platform_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> resultLength=0;
   <span class="keyword">const</span> <span class="keywordtype">char</span> *s=<a class="code" href="classStringEnumeration.html#e613631e7b63a9987c056ad5b04251e5">next</a>(&amp;resultLength, status);
   <span class="keywordflow">return</span> <a class="code" href="classStringEnumeration.html#80c0dcfe1fa814cc0d404fe0dbf2b267">setChars</a>(s, resultLength, status);
 }
</pre></div><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>s</em>&nbsp;</td><td>String to be converted to Unicode. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>Length of the string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>ICU in/out error code. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>A pointer to unistr. </dd></dl>
<dl compact><dt><b><a class="el" href="stable.html#_stable000331">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

</div>
</div><p>
<hr><h2>Field Documentation</h2>
<a class="anchor" name="d6e99301df88ba7d1fac67181f98bd2e"></a><!-- doxytag: member="StringEnumeration::unistr" ref="d6e99301df88ba7d1fac67181f98bd2e" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a> <a class="el" href="classStringEnumeration.html#d6e99301df88ba7d1fac67181f98bd2e">StringEnumeration::unistr</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<a class="el" href="classUnicodeString.html">UnicodeString</a> field for use with default implementations and subclasses. 
<p>
<dl compact><dt><b><a class="el" href="stable.html#_stable000325">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

<p>
Definition at line <a class="el" href="strenum_8h-source.html#l00209">209</a> of file <a class="el" href="strenum_8h-source.html">strenum.h</a>.
</div>
</div><p>
<a class="anchor" name="c6e6a6266dc50407ac399440a136195e"></a><!-- doxytag: member="StringEnumeration::charsBuffer" ref="c6e6a6266dc50407ac399440a136195e" args="[32]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char <a class="el" href="classStringEnumeration.html#c6e6a6266dc50407ac399440a136195e">StringEnumeration::charsBuffer</a>[32]<code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

<p>
Definition at line <a class="el" href="strenum_8h-source.html#l00214">214</a> of file <a class="el" href="strenum_8h-source.html">strenum.h</a>.
</div>
</div><p>
<a class="anchor" name="a91f702f4920744b448ef3b45e957ed7"></a><!-- doxytag: member="StringEnumeration::chars" ref="a91f702f4920744b448ef3b45e957ed7" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* <a class="el" href="classStringEnumeration.html#a91f702f4920744b448ef3b45e957ed7">StringEnumeration::chars</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
char * buffer for use with default implementations and subclasses. 
<p>
Allocated in constructor and in <a class="el" href="classStringEnumeration.html#b7428b1c1baf1c9ac4922eca0a7ab636">ensureCharsCapacity()</a>. <dl compact><dt><b><a class="el" href="stable.html#_stable000327">Stable:</a></b></dt><dd>ICU 2.8 </dd></dl>

<p>
Definition at line <a class="el" href="strenum_8h-source.html#l00220">220</a> of file <a class="el" href="strenum_8h-source.html">strenum.h</a>.
</div>
</div><p>
<a class="anchor" name="34d0dc24d6f6ea33fbb5cc9186f03c58"></a><!-- doxytag: member="StringEnumeration::charsCapacity" ref="34d0dc24d6f6ea33fbb5cc9186f03c58" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="pwin32_8h.html#b1967d8591af1a4e48c37fd2b0f184d0">int32_t</a> <a class="el" href="classStringEnumeration.html#34d0dc24d6f6ea33fbb5cc9186f03c58">StringEnumeration::charsCapacity</a><code> [protected]</code>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

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

<p>
Definition at line <a class="el" href="strenum_8h-source.html#l00225">225</a> of file <a class="el" href="strenum_8h-source.html">strenum.h</a>.
</div>
</div><p>
<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></ul>
<hr size="1"><address style="align: right;"><small>Generated on Fri Sep 14 12:59:46 2007 for ICU 3.8 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
</body>
</html>