Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > ae3ac0f3c84b68877416000d08e53ca8 > files > 672

libicu-doc-49.1.1-12.fc18.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.3.1"/>
<title>ICU 49.1.1: uenum.h File 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 style="padding-left: 0.5em;">
   <div id="projectname">ICU 49.1.1
   &#160;<span id="projectnumber">49.1.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
  <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="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_bdd9a5d540de89e9fe90efdfc6973a4f.html">common</a></li><li class="navelem"><a class="el" href="dir_f59c6450ff718ff1b085cfd1c36acbd7.html">unicode</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">uenum.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>C API: String Enumeration.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="utypes_8h_source.html">unicode/utypes.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="localpointer_8h_source.html">unicode/localpointer.h</a>&quot;</code><br/>
</div>
<p><a href="uenum_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a32b7253b2148022535be36a9fcdb5a8d"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="uenum_8h.html#a32b7253b2148022535be36a9fcdb5a8d">UEnumeration</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uenum_8h.html#a32b7253b2148022535be36a9fcdb5a8d">UEnumeration</a></td></tr>
<tr class="memdesc:a32b7253b2148022535be36a9fcdb5a8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">structure representing an enumeration object instance  <a href="#a32b7253b2148022535be36a9fcdb5a8d">More...</a><br/></td></tr>
<tr class="separator:a32b7253b2148022535be36a9fcdb5a8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:af8bf1abcf3a486f07ee3384c7fce89df"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uenum_8h.html#af8bf1abcf3a486f07ee3384c7fce89df">uenum_close</a> (<a class="el" href="uenum_8h.html#a32b7253b2148022535be36a9fcdb5a8d">UEnumeration</a> *en)</td></tr>
<tr class="memdesc:af8bf1abcf3a486f07ee3384c7fce89df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disposes of resources in use by the iterator.  <a href="#af8bf1abcf3a486f07ee3384c7fce89df">More...</a><br/></td></tr>
<tr class="separator:af8bf1abcf3a486f07ee3384c7fce89df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8be6db20419d79ecdd71e717a9521773"><td class="memItemLeft" align="right" valign="top">int32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uenum_8h.html#a8be6db20419d79ecdd71e717a9521773">uenum_count</a> (<a class="el" href="uenum_8h.html#a32b7253b2148022535be36a9fcdb5a8d">UEnumeration</a> *en, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a8be6db20419d79ecdd71e717a9521773"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of elements that the iterator traverses.  <a href="#a8be6db20419d79ecdd71e717a9521773">More...</a><br/></td></tr>
<tr class="separator:a8be6db20419d79ecdd71e717a9521773"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af7afc38ba0ea6071b03b052209e2e07d"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uenum_8h.html#af7afc38ba0ea6071b03b052209e2e07d">uenum_unext</a> (<a class="el" href="uenum_8h.html#a32b7253b2148022535be36a9fcdb5a8d">UEnumeration</a> *en, int32_t *resultLength, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:af7afc38ba0ea6071b03b052209e2e07d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the next element in the iterator's list.  <a href="#af7afc38ba0ea6071b03b052209e2e07d">More...</a><br/></td></tr>
<tr class="separator:af7afc38ba0ea6071b03b052209e2e07d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99298eabaa3874cdfd9793b207848f68"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uenum_8h.html#a99298eabaa3874cdfd9793b207848f68">uenum_next</a> (<a class="el" href="uenum_8h.html#a32b7253b2148022535be36a9fcdb5a8d">UEnumeration</a> *en, int32_t *resultLength, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a99298eabaa3874cdfd9793b207848f68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the next element in the iterator's list.  <a href="#a99298eabaa3874cdfd9793b207848f68">More...</a><br/></td></tr>
<tr class="separator:a99298eabaa3874cdfd9793b207848f68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76b3866509601b228ee72fa4089107bb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="uenum_8h.html#a76b3866509601b228ee72fa4089107bb">uenum_reset</a> (<a class="el" href="uenum_8h.html#a32b7253b2148022535be36a9fcdb5a8d">UEnumeration</a> *en, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *status)</td></tr>
<tr class="memdesc:a76b3866509601b228ee72fa4089107bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Resets the iterator to the current list of service IDs.  <a href="#a76b3866509601b228ee72fa4089107bb">More...</a><br/></td></tr>
<tr class="separator:a76b3866509601b228ee72fa4089107bb"><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>C API: String Enumeration. </p>

<p>Definition in file <a class="el" href="uenum_8h_source.html">uenum.h</a>.</p>
</div><h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="a32b7253b2148022535be36a9fcdb5a8d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="uenum_8h.html#a32b7253b2148022535be36a9fcdb5a8d">UEnumeration</a> <a class="el" href="uenum_8h.html#a32b7253b2148022535be36a9fcdb5a8d">UEnumeration</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>structure representing an enumeration object instance </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001502">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl>

<p>Definition at line <a class="el" href="uenum_8h_source.html#l00039">39</a> of file <a class="el" href="uenum_8h_source.html">uenum.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="af8bf1abcf3a486f07ee3384c7fce89df"></a>
<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#a32b7253b2148022535be36a9fcdb5a8d">UEnumeration</a> *&#160;</td>
          <td class="paramname"><em>en</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disposes of resources in use by the iterator. </p>
<p>If en is NULL, does nothing. After this call, any char* or UChar* pointer returned by <a class="el" href="uenum_8h.html#af7afc38ba0ea6071b03b052209e2e07d" title="Returns the next element in the iterator&#39;s list.">uenum_unext()</a> or <a class="el" href="uenum_8h.html#a99298eabaa3874cdfd9793b207848f68" title="Returns the next element in the iterator&#39;s list.">uenum_next()</a> is invalid. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">en</td><td>UEnumeration structure pointer </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001503">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a8be6db20419d79ecdd71e717a9521773"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int32_t uenum_count </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uenum_8h.html#a32b7253b2148022535be36a9fcdb5a8d">UEnumeration</a> *&#160;</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#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the number of elements that the iterator traverses. </p>
<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. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">en</td><td>UEnumeration structure pointer </td></tr>
    <tr><td class="paramname">status</td><td>error code, can be U_ENUM_OUT_OF_SYNC_ERROR if the iterator is out of sync. </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#_stable001504">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a99298eabaa3874cdfd9793b207848f68"></a>
<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#a32b7253b2148022535be36a9fcdb5a8d">UEnumeration</a> *&#160;</td>
          <td class="paramname"><em>en</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></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> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the next element in the iterator's list. </p>
<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). </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">en</td><td>the iterator object </td></tr>
    <tr><td class="paramname">resultLength</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 class="paramname">status</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>
  </dd>
</dl>
<dl class="section return"><dt>Returns</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#a99298eabaa3874cdfd9793b207848f68" title="Returns the next element in the iterator&#39;s list.">uenum_next()</a> or <a class="el" href="uenum_8h.html#af7afc38ba0ea6071b03b052209e2e07d" title="Returns the next element in the iterator&#39;s list.">uenum_unext()</a>. When all strings have been traversed, returns NULL. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001506">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl>

</div>
</div>
<a class="anchor" id="a76b3866509601b228ee72fa4089107bb"></a>
<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#a32b7253b2148022535be36a9fcdb5a8d">UEnumeration</a> *&#160;</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#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Resets the iterator to the current list of service IDs. </p>
<p>This re-establishes sync with the service and rewinds the iterator to start at the first element. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">en</td><td>the iterator object </td></tr>
    <tr><td class="paramname">status</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>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001507">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl>

</div>
</div>
<a class="anchor" id="af7afc38ba0ea6071b03b052209e2e07d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="umachine_8h.html#a6bb9fad572d65b305324ef288165e2ac">UChar</a>* uenum_unext </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="uenum_8h.html#a32b7253b2148022535be36a9fcdb5a8d">UEnumeration</a> *&#160;</td>
          <td class="paramname"><em>en</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></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> *&#160;</td>
          <td class="paramname"><em>status</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the next element in the iterator's list. </p>
<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. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">en</td><td>the iterator object </td></tr>
    <tr><td class="paramname">resultLength</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 class="paramname">status</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>
  </dd>
</dl>
<dl class="section return"><dt>Returns</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#a99298eabaa3874cdfd9793b207848f68" title="Returns the next element in the iterator&#39;s list.">uenum_next()</a> or <a class="el" href="uenum_8h.html#af7afc38ba0ea6071b03b052209e2e07d" title="Returns the next element in the iterator&#39;s list.">uenum_unext()</a>. When all strings have been traversed, returns NULL. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable001505">Stable:</a></b></dt><dd>ICU 2.2 </dd></dl>

</div>
</div>
</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.3.1
</small></address>
</body>
</html>