apr_hash.h

Go to the documentation of this file.
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
00002  * contributor license agreements.  See the NOTICE file distributed with
00003  * this work for additional information regarding copyright ownership.
00004  * The ASF licenses this file to You under the Apache License, Version 2.0
00005  * (the "License"); you may not use this file except in compliance with
00006  * the License.  You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef APR_HASH_H
00018 #define APR_HASH_H
00019 
00025 #include "apr_pools.h"
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030 
00047 #define APR_HASH_KEY_STRING     (-1)
00048 
00052 typedef struct apr_hash_t apr_hash_t;
00053 
00057 typedef struct apr_hash_index_t apr_hash_index_t;
00058 
00064 APR_DECLARE(apr_hash_t *) apr_hash_make(apr_pool_t *pool);
00065 
00073 APR_DECLARE(apr_hash_t *) apr_hash_copy(apr_pool_t *pool,
00074                                         const apr_hash_t *h);
00075 
00084 APR_DECLARE(void) apr_hash_set(apr_hash_t *ht, const void *key,
00085                                apr_ssize_t klen, const void *val);
00086 
00094 APR_DECLARE(void *) apr_hash_get(apr_hash_t *ht, const void *key,
00095                                  apr_ssize_t klen);
00096 
00125 APR_DECLARE(apr_hash_index_t *) apr_hash_first(apr_pool_t *p, apr_hash_t *ht);
00126 
00133 APR_DECLARE(apr_hash_index_t *) apr_hash_next(apr_hash_index_t *hi);
00134 
00144 APR_DECLARE(void) apr_hash_this(apr_hash_index_t *hi, const void **key, 
00145                                 apr_ssize_t *klen, void **val);
00146 
00152 APR_DECLARE(unsigned int) apr_hash_count(apr_hash_t *ht);
00153 
00162 APR_DECLARE(apr_hash_t *) apr_hash_overlay(apr_pool_t *p,
00163                                            const apr_hash_t *overlay, 
00164                                            const apr_hash_t *base);
00165 
00179 APR_DECLARE(apr_hash_t *) apr_hash_merge(apr_pool_t *p,
00180                                          const apr_hash_t *h1,
00181                                          const apr_hash_t *h2,
00182                                          void * (*merger)(apr_pool_t *p,
00183                                                      const void *key,
00184                                                      apr_ssize_t klen,
00185                                                      const void *h1_val,
00186                                                      const void *h2_val,
00187                                                      const void *data),
00188                                          const void *data);
00189 
00193 APR_POOL_DECLARE_ACCESSOR(hash);
00194 
00197 #ifdef __cplusplus
00198 }
00199 #endif
00200 
00201 #endif  /* !APR_HASH_H */

Generated on Mon Nov 26 11:47:26 2007 for Apache Portable Runtime by  doxygen 1.5.2