⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group__apr__hash.html

📁 apr函数库使用手册
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<!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>Apache Portable Runtime: Hash Tables</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.7 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>Hash Tables</h1><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>#define&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__hash.html#ga16">APR_HASH_KEY_STRING</a>&nbsp;&nbsp;&nbsp;(-1)</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="group__apr__hash.html#ga0">apr_hash_t</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>typedef <a class="el" href="group__apr__hash.html#ga1">apr_hash_index_t</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__hash.html#ga1">apr_hash_index_t</a></td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>typedef unsigned int(*&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__hash.html#ga2">apr_hashfunc_t</a> )(const char *key, apr_ssize_t *klen)</td></tr>

<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__hash.html#ga3">apr_hashfunc_default</a> (const char *key, apr_ssize_t *klen)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__hash.html#ga4">apr_hash_make</a> (<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__hash.html#ga5">apr_hash_make_custom</a> (<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool, <a class="el" href="group__apr__hash.html#ga2">apr_hashfunc_t</a> hash_func)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__hash.html#ga6">apr_hash_copy</a> (<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *pool, const <a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *h)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__hash.html#ga7">apr_hash_set</a> (<a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *ht, const void *key, apr_ssize_t klen, const void *val)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__hash.html#ga8">apr_hash_get</a> (<a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *ht, const void *key, apr_ssize_t klen)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__apr__hash.html#ga1">apr_hash_index_t</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__hash.html#ga9">apr_hash_first</a> (<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *p, <a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *ht)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__apr__hash.html#ga1">apr_hash_index_t</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__hash.html#ga10">apr_hash_next</a> (<a class="el" href="group__apr__hash.html#ga1">apr_hash_index_t</a> *hi)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__hash.html#ga11">apr_hash_this</a> (<a class="el" href="group__apr__hash.html#ga1">apr_hash_index_t</a> *hi, const void **key, apr_ssize_t *klen, void **val)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>unsigned int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__hash.html#ga12">apr_hash_count</a> (<a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *ht)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__hash.html#ga13">apr_hash_overlay</a> (<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *p, const <a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *overlay, const <a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *base)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__hash.html#ga14">apr_hash_merge</a> (<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *p, const <a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *h1, const <a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *h2, void *(*merger)(<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *p, const void *key, apr_ssize_t klen, const void *h1_val, const void *h2_val, const void *data), const void *data)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__hash.html#ga15">apr_hash_pool_get</a> (const <a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *thehash)</td></tr>

</table>
<hr><h2>Define Documentation</h2>
<a class="anchor" name="ga16" doxytag="apr_hash.h::APR_HASH_KEY_STRING" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> #define APR_HASH_KEY_STRING&nbsp;&nbsp;&nbsp;(-1)          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
When passing a key to apr_hash_set or apr_hash_get, this value can be passed to indicate a string-valued key, and have apr_hash compute the length automatically.<p>
<dl compact><dt><b>Remarks:</b></dt><dd>apr_hash will use strlen(key) for the length. The NUL terminator is not included in the hash value (why throw a constant in?). Since the hash table merely references the provided key (rather than copying it), <a class="el" href="group__apr__hash.html#ga11">apr_hash_this()</a> will return the NUL-term'd key. </dd></dl>
    </td>
  </tr>
</table>
<hr><h2>Typedef Documentation</h2>
<a class="anchor" name="ga1" doxytag="apr_hash.h::apr_hash_index_t" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="group__apr__hash.html#ga1">apr_hash_index_t</a> <a class="el" href="group__apr__hash.html#ga1">apr_hash_index_t</a>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Abstract type for scanning hash tables.     </td>
  </tr>
</table>
<a class="anchor" name="ga0" doxytag="apr_hash.h::apr_hash_t" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef struct <a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> <a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a>          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Abstract type for hash tables.     </td>
  </tr>
</table>
<a class="anchor" name="ga2" doxytag="apr_hash.h::apr_hashfunc_t" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> typedef unsigned int(* <a class="el" href="group__apr__hash.html#ga2">apr_hashfunc_t</a>)(const char *key, apr_ssize_t *klen)          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Callback functions for calculating hash values. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>key</em>&nbsp;</td><td>The key. </td></tr>
    <tr><td></td><td valign=top><em>klen</em>&nbsp;</td><td>The length of the key, or APR_HASH_KEY_STRING to use the string length. If APR_HASH_KEY_STRING then returns the actual key length. </td></tr>
  </table>
</dl>
    </td>
  </tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga6" doxytag="apr_hash.h::apr_hash_copy" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a>* apr_hash_copy           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>pool</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const <a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>h</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Make a copy of a hash table <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>pool</em>&nbsp;</td><td>The pool from which to allocate the new hash table </td></tr>
    <tr><td></td><td valign=top><em>h</em>&nbsp;</td><td>The hash table to clone </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The hash table just created </dd></dl>
<dl compact><dt><b>Remarks:</b></dt><dd>Makes a shallow copy </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga12" doxytag="apr_hash.h::apr_hash_count" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> unsigned int apr_hash_count           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>ht</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get the number of key/value pairs in the hash table. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>ht</em>&nbsp;</td><td>The hash table </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The number of key/value pairs in the hash table. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga9" doxytag="apr_hash.h::apr_hash_first" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="group__apr__hash.html#ga1">apr_hash_index_t</a>* apr_hash_first           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="group__apr__hash.html#ga0">apr_hash_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>ht</em></td>
        </tr>
        <tr>
          <td></td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -