<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>ICU 3.6: uenum.h File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.4.7 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="classes.html"><span>Data Structures</span></a></li> <li id="current"><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li> <form action="search.php" method="get"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td><label> <u>S</u>earch for </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="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul></div> <h1>uenum.h File Reference</h1>C API: String Enumeration. <a href="#_details">More...</a> <p> <code>#include "<a class="el" href="utypes_8h-source.html">unicode/utypes.h</a>"</code><br> <p> <a href="uenum_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Typedefs</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">typedef <a class="el" href="uenum_8h.html#94e2cf04090303ede650080c6d091985">UEnumeration</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="uenum_8h.html#94e2cf04090303ede650080c6d091985">UEnumeration</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">structure representing an enumeration object instance <a href="#94e2cf04090303ede650080c6d091985"></a><br></td></tr> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="uenum_8h.html#78d23ac23d4d47f8cb1e43e3bcf3ba5a">uenum_close</a> (<a class="el" href="uenum_8h.html#94e2cf04090303ede650080c6d091985">UEnumeration</a> *en)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Disposes of resources in use by the iterator. <a href="#78d23ac23d4d47f8cb1e43e3bcf3ba5a"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="uenum_8h.html#17a3de5a23de0e196e61938b2d377977">uenum_count</a> (<a class="el" href="uenum_8h.html#94e2cf04090303ede650080c6d091985">UEnumeration</a> *en, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of elements that the iterator traverses. <a href="#17a3de5a23de0e196e61938b2d377977"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const UChar * </td><td class="memItemRight" valign="bottom"><a class="el" href="uenum_8h.html#d8c189324f8099aa17879718e7f44fad">uenum_unext</a> (<a class="el" href="uenum_8h.html#94e2cf04090303ede650080c6d091985">UEnumeration</a> *en, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *resultLength, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the next element in the iterator's list. <a href="#d8c189324f8099aa17879718e7f44fad"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="uenum_8h.html#ff6c51638624e268a640732e967f7ceb">uenum_next</a> (<a class="el" href="uenum_8h.html#94e2cf04090303ede650080c6d091985">UEnumeration</a> *en, <a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> *resultLength, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the next element in the iterator's list. <a href="#ff6c51638624e268a640732e967f7ceb"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="uenum_8h.html#3e96d8cf06b1f931a0819edf79617357">uenum_reset</a> (<a class="el" href="uenum_8h.html#94e2cf04090303ede650080c6d091985">UEnumeration</a> *en, <a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> *status)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Resets the iterator to the current list of service IDs. <a href="#3e96d8cf06b1f931a0819edf79617357"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> C API: String Enumeration. <p> <p> Definition in file <a class="el" href="uenum_8h-source.html">uenum.h</a>.<hr><h2>Typedef Documentation</h2> <a class="anchor" name="94e2cf04090303ede650080c6d091985"></a><!-- doxytag: member="uenum.h::UEnumeration" ref="94e2cf04090303ede650080c6d091985" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">typedef struct <a class="el" href="uenum_8h.html#94e2cf04090303ede650080c6d091985">UEnumeration</a> <a class="el" href="uenum_8h.html#94e2cf04090303ede650080c6d091985">UEnumeration</a> </td> </tr> </table> </div> <div class="memdoc"> <p> structure representing an enumeration object instance <p> <dl compact><dt><b><a class="el" href="stable.html#_stable000992">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl> <p> Definition at line <a class="el" href="uenum_8h-source.html#l00034">34</a> of file <a class="el" href="uenum_8h-source.html">uenum.h</a>. </div> </div><p> <hr><h2>Function Documentation</h2> <a class="anchor" name="78d23ac23d4d47f8cb1e43e3bcf3ba5a"></a><!-- doxytag: member="uenum.h::uenum_close" ref="78d23ac23d4d47f8cb1e43e3bcf3ba5a" args="(UEnumeration *en)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void uenum_close </td> <td>(</td> <td class="paramtype"><a class="el" href="uenum_8h.html#94e2cf04090303ede650080c6d091985">UEnumeration</a> * </td> <td class="paramname"> <em>en</em> </td> <td> ) </td> <td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Disposes of resources in use by the iterator. <p> If en is NULL, does nothing. After this call, any char* or UChar* pointer returned by <a class="el" href="uenum_8h.html#d8c189324f8099aa17879718e7f44fad">uenum_unext()</a> or <a class="el" href="uenum_8h.html#ff6c51638624e268a640732e967f7ceb">uenum_next()</a> is invalid. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>en</em> </td><td>UEnumeration structure pointer </td></tr> </table> </dl> <dl compact><dt><b><a class="el" href="stable.html#_stable000993">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl> </div> </div><p> <a class="anchor" name="17a3de5a23de0e196e61938b2d377977"></a><!-- doxytag: member="uenum.h::uenum_count" ref="17a3de5a23de0e196e61938b2d377977" args="(UEnumeration *en, UErrorCode *status)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> uenum_count </td> <td>(</td> <td class="paramtype"><a class="el" href="uenum_8h.html#94e2cf04090303ede650080c6d091985">UEnumeration</a> * </td> <td class="paramname"> <em>en</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> * </td> <td class="paramname"> <em>status</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Returns the number of elements that the iterator traverses. <p> If the iterator is out-of-sync with its service, status is set to U_ENUM_OUT_OF_SYNC_ERROR. 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 type of data being traversed). Use with caution and only when necessary. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>en</em> </td><td>UEnumeration structure pointer </td></tr> <tr><td valign="top"></td><td valign="top"><em>status</em> </td><td>error code, can be U_ENUM_OUT_OF_SYNC_ERROR if the iterator is out of sync. </td></tr> </table> </dl> <dl 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#_stable000994">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl> </div> </div><p> <a class="anchor" name="ff6c51638624e268a640732e967f7ceb"></a><!-- doxytag: member="uenum.h::uenum_next" ref="ff6c51638624e268a640732e967f7ceb" args="(UEnumeration *en, int32_t *resultLength, UErrorCode *status)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const char* uenum_next </td> <td>(</td> <td class="paramtype"><a class="el" href="uenum_8h.html#94e2cf04090303ede650080c6d091985">UEnumeration</a> * </td> <td class="paramname"> <em>en</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> * </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#863c11989634c998849cc946d04dfabe">UErrorCode</a> * </td> <td class="paramname"> <em>status</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Returns the next element in the iterator's list. <p> If there are no more elements, returns NULL. If the iterator is out-of-sync with its service, status is set to U_ENUM_OUT_OF_SYNC_ERROR and NULL is returned. If the native service string is a UChar* string, it is converted to char* with the invariant converter. The result is terminated by (char)0. 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 (but non-NULL). <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>en</em> </td><td>the iterator object </td></tr> <tr><td valign="top"></td><td valign="top"><em>resultLength</em> </td><td>pointer to receive the length of the result (not including the terminating \0). If the pointer is NULL it is ignored. </td></tr> <tr><td valign="top"></td><td valign="top"><em>status</em> </td><td>the error code, set to U_ENUM_OUT_OF_SYNC_ERROR if the iterator is out of sync with its service. Set to U_INVARIANT_CONVERSION_ERROR if the underlying native string is UChar* and conversion to char* with the invariant converter fails. This error pertains only to current string, so iteration might be able to continue successfully. </td></tr> </table> </dl> <dl compact><dt><b>Returns:</b></dt><dd>a pointer to the string. The string will be zero-terminated. The return pointer is owned by this iterator and must not be deleted by the caller. The pointer is valid until the next call to any uenum_... method, including <a class="el" href="uenum_8h.html#ff6c51638624e268a640732e967f7ceb">uenum_next()</a> or <a class="el" href="uenum_8h.html#d8c189324f8099aa17879718e7f44fad">uenum_unext()</a>. When all strings have been traversed, returns NULL. </dd></dl> <dl compact><dt><b><a class="el" href="stable.html#_stable000996">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl> </div> </div><p> <a class="anchor" name="3e96d8cf06b1f931a0819edf79617357"></a><!-- doxytag: member="uenum.h::uenum_reset" ref="3e96d8cf06b1f931a0819edf79617357" args="(UEnumeration *en, UErrorCode *status)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void uenum_reset </td> <td>(</td> <td class="paramtype"><a class="el" href="uenum_8h.html#94e2cf04090303ede650080c6d091985">UEnumeration</a> * </td> <td class="paramname"> <em>en</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="utypes_8h.html#863c11989634c998849cc946d04dfabe">UErrorCode</a> * </td> <td class="paramname"> <em>status</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Resets the iterator to the current list of service IDs. <p> This re-establishes sync with the service and rewinds the iterator to start at the first element. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>en</em> </td><td>the iterator object </td></tr> <tr><td valign="top"></td><td valign="top"><em>status</em> </td><td>the error code, set to U_ENUM_OUT_OF_SYNC_ERROR if the iterator is out of sync with its service. </td></tr> </table> </dl> <dl compact><dt><b><a class="el" href="stable.html#_stable000997">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl> </div> </div><p> <a class="anchor" name="d8c189324f8099aa17879718e7f44fad"></a><!-- doxytag: member="uenum.h::uenum_unext" ref="d8c189324f8099aa17879718e7f44fad" args="(UEnumeration *en, int32_t *resultLength, UErrorCode *status)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const UChar* uenum_unext </td> <td>(</td> <td class="paramtype"><a class="el" href="uenum_8h.html#94e2cf04090303ede650080c6d091985">UEnumeration</a> * </td> <td class="paramname"> <em>en</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="pwin32_8h.html#f03f47ee300d26bee7dd521b1169f394">int32_t</a> * </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#863c11989634c998849cc946d04dfabe">UErrorCode</a> * </td> <td class="paramname"> <em>status</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"></td> </tr> </table> </div> <div class="memdoc"> <p> Returns the next element in the iterator's list. <p> If there are no more elements, returns NULL. If the iterator is out-of-sync with its service, status is set to U_ENUM_OUT_OF_SYNC_ERROR and NULL is returned. If the native service string is a char* string, it is converted to UChar* with the invariant converter. The result is terminated by (UChar)0. <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>en</em> </td><td>the iterator object </td></tr> <tr><td valign="top"></td><td valign="top"><em>resultLength</em> </td><td>pointer to receive the length of the result (not including the terminating \0). If the pointer is NULL it is ignored. </td></tr> <tr><td valign="top"></td><td valign="top"><em>status</em> </td><td>the error code, set to U_ENUM_OUT_OF_SYNC_ERROR if the iterator is out of sync with its service. </td></tr> </table> </dl> <dl compact><dt><b>Returns:</b></dt><dd>a pointer to the string. The string will be zero-terminated. The return pointer is owned by this iterator and must not be deleted by the caller. The pointer is valid until the next call to any uenum_... method, including <a class="el" href="uenum_8h.html#ff6c51638624e268a640732e967f7ceb">uenum_next()</a> or <a class="el" href="uenum_8h.html#d8c189324f8099aa17879718e7f44fad">uenum_unext()</a>. When all strings have been traversed, returns NULL. </dd></dl> <dl compact><dt><b><a class="el" href="stable.html#_stable000995">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl> </div> </div><p> <hr size="1"><address style="align: right;"><small>Generated on Tue Dec 13 17:29:52 2011 for ICU 3.6 by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address> </body> </html>