You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Ian Holsman <ia...@cnet.com> on 2001/08/15 20:08:30 UTC

Re: [DOX] apr_hash.h -- resend

Ian Holsman wrote:

> forgot one.
>
> Index: apr_hash.h
> ===================================================================
> RCS file: /home/cvspublic/apr/include/apr_hash.h,v
> retrieving revision 1.28
> diff -u -r1.28 apr_hash.h
> --- apr_hash.h    2001/08/02 00:03:44    1.28
> +++ apr_hash.h    2001/08/14 04:14:48
> @@ -62,34 +62,37 @@
> #ifdef __cplusplus
> extern "C" {
> #endif
> -
> +/**
> + * @file apr_hash.h
> + * @brief APR Hash Tables
> + */
> /**
> - * @package Hash Tables
> + * @defgroup APR_Hash Hash Tables
> + * @ingroup APR
> + * @{
>  */
>
> #include "apr_pools.h"
>
> -/*
> +/**
>  * 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.
>  *
> - * Note: apr_hash will use strlen(key) for the length. The 
> null-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), apr_hash_this() will return the 
> null-term'd key.
> + * @remark apr_hash will use strlen(key) for the length. The 
> null-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), apr_hash_this() will return the 
> null-term'd key.
>  */
> #define APR_HASH_KEY_STRING     (-1)
>
> /**
>  * Abstract type for hash tables.
> - * @defvar apr_hash_t
>  */
> typedef struct apr_hash_t apr_hash_t;
>
> /**
>  * Abstract type for scanning hash tables.
> - * @defvar apr_hash_index_t
>  */
> typedef struct apr_hash_index_t apr_hash_index_t;
>
> @@ -97,7 +100,6 @@
>  * Create a hash table.
>  * @param pool The pool to allocate the hash table out of
>  * @return The hash table just created
> - * @deffunc apr_hash_t *apr_hash_make(apr_pool_t *pool)
>  */
> APR_DECLARE(apr_hash_t *) apr_hash_make(apr_pool_t *pool);
>
> @@ -107,8 +109,7 @@
>  * @param key Pointer to the key
>  * @param klen Length of the key. Can be APR_HASH_KEY_STRING to use 
> the string length.
>  * @param val Value to associate with the key
> - * @tip If the value is NULL the hash entry is deleted.
> - * @deffunc void apr_hash_set(apr_hash_t *ht, const void *key, 
> apr_size_t klen, const void *val)
> + * @remark If the value is NULL the hash entry is deleted.
>  */
> APR_DECLARE(void) apr_hash_set(apr_hash_t *ht, const void *key,
>                                apr_ssize_t klen, const void *val);
> @@ -119,7 +120,6 @@
>  * @param key Pointer to the key
>  * @param klen Length of the key. Can be APR_HASH_KEY_STRING to use 
> the string length.
>  * @return Returns NULL if the key is not present.
> - * @deffunc void *apr_hash_get(apr_hash_t *ht, const void *key, 
> apr_ssize_t klen)
>  */
> APR_DECLARE(void *) apr_hash_get(apr_hash_t *ht, const void *key,
>                                  apr_ssize_t klen);
> @@ -129,8 +129,11 @@
>  * @param p The pool to allocate the apr_hash_index_t iterator
>  * @param ht The hash table
>  * @return a pointer to the iteration state, or NULL if there are no 
> entries.
> - * @tip Example:
> + * @example
> + */
> +/**
>  * <PRE>
> + * An Example:
>  *
>  *     int sum_values(apr_pool_t *p, apr_hash_t *ht)
>  *     {
> @@ -149,7 +152,6 @@
>  * is delete the current entry) and multiple iterations can be in
>  * progress at the same time.
>  * </PRE>
> - * @deffunc apr_hash_index_t *apr_hash_first(apr_pool_t *p, 
> apr_hash_t *ht)
>  */
> APR_DECLARE(apr_hash_index_t *) apr_hash_first(apr_pool_t *p, 
> apr_hash_t *ht);
>
> @@ -157,7 +159,6 @@
>  * Continue iterating over the entries in a hash table.
>  * @param hi The iteration state
>  * @return a pointer to the updated iteration state.  NULL if there 
> are no more  *         entries.
> - * @deffunc apr_hash_index_t *apr_hash_next(apr_hash_index_t *hi)
>  */
> APR_DECLARE(apr_hash_index_t *) apr_hash_next(apr_hash_index_t *hi);
>
> @@ -167,9 +168,9 @@
>  * @param key Return pointer for the pointer to the key.
>  * @param klen Return pointer for the key length.
>  * @param val Return pointer for the associated value.
> - * @tip The return pointers should point to a variable that will be 
> set to the
> - *      corresponding data, or they may be NULL if the data isn't 
> interesting.
> - * @deffunc void apr_hash_this(apr_hash_index_t *hi, const void 
> **key, apr_ssize_t *klen, void **val);
> + * @remark The return pointers should point to a variable that will 
> be set
> + *         to the corresponding data, or they may be NULL if the data
> + *         isn't interesting.
>  */
> APR_DECLARE(void) apr_hash_this(apr_hash_index_t *hi, const void **key,
>                                 apr_ssize_t *klen, void **val);
> @@ -178,7 +179,6 @@
>  * Get the number of key/value pairs in the hash table.
>  * @param ht The hash table
>  * @return The number of key/value pairs in the hash table.
> - * @deffunc int apr_hash_count(apr_hash_t *ht);
>  */
> APR_DECLARE(int) apr_hash_count(apr_hash_t *ht);
>
> @@ -189,14 +189,17 @@
>  * @param overlay The table to add to the initial table
>  * @param base The table that represents the initial values of the new 
> table
>  * @return A new hash table containing all of the data from the two 
> passed in
> - * @deffunc apr_hash_t *apr_hash_overlay(apr_pool_t *p, const 
> apr_table_t *over
> -lay, const apr_table_t *base);
>  */
> APR_DECLARE(apr_hash_t *) apr_hash_overlay(apr_pool_t *p,
>                                            const apr_hash_t *overlay,
>                                            const apr_hash_t *base);
> -
> +/**
> + * The Pool that the hash table was created from
> + * @param hash the hash table
> + * @return the pool
> + */
> APR_DECLARE(apr_pool_t *) apr_hash_pool_get(apr_hash_t *hash);
> +/** @} */
> #ifdef __cplusplus
> }
> #endif