Axis2/C: axutil_hash.h Source File

- Main Page
- Modules
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

# axutil_hash.h

Go to the documentation of this file.

    00001
    00002 /*
    00003  * Licensed to the Apache Software Foundation (ASF) under one or more
    00004  * contributor license agreements.  See the NOTICE file distributed with
    00005  * this work for additional information regarding copyright ownership.
    00006  * The ASF licenses this file to You under the Apache License, Version 2.0
    00007  * (the "License"); you may not use this file except in compliance with
    00008  * the License.  You may obtain a copy of the License at
    00009  *
    00010  *      http://www.apache.org/licenses/LICENSE-2.0
    00011  *
    00012  * Unless required by applicable law or agreed to in writing, software
    00013  * distributed under the License is distributed on an "AS IS" BASIS,
    00014  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00015  * See the License for the specific language governing permissions and
    00016  * limitations under the License.
    00017  */
    00018
    00019 #ifndef AXUTIL_HASH_H
    00020 #define AXUTIL_HASH_H
    00021
    00027 #include <axutil_utils_defines.h>
    00028 #include <axutil_env.h>
    00029
    00030 #ifdef __cplusplus
    00031 extern "C"
    00032 {
    00033 #endif
    00034
    00051 #define AXIS2_HASH_KEY_STRING     (unsigned int)(-1)
    00052
    00056     typedef struct axutil_hash_t axutil_hash_t;
    00057
    00061     typedef struct axutil_hash_index_t axutil_hash_index_t;
    00062
    00069     typedef unsigned int(
    00070         *axutil_hashfunc_t)(
    00071             const char *key,
    00072             axis2_ssize_t * klen);
    00073
    00077     unsigned int axutil_hashfunc_default(
    00078         const char *key,
    00079         axis2_ssize_t * klen);
    00080
    00086     AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
    00087     axutil_hash_make(
    00088         const axutil_env_t * env);
    00089
    00096     AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
    00097     axutil_hash_make_custom(
    00098         const axutil_env_t * env,
    00099         axutil_hashfunc_t hash_func);
    00100
    00108     AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
    00109     axutil_hash_copy(
    00110         const axutil_hash_t * ht,
    00111         const axutil_env_t * env);
    00112
    00121     AXIS2_EXTERN void AXIS2_CALL
    00122     axutil_hash_set(
    00123         axutil_hash_t * ht,
    00124         const void *key,
    00125         axis2_ssize_t klen,
    00126         const void *val);
    00127
    00135     AXIS2_EXTERN void *AXIS2_CALL
    00136     axutil_hash_get(
    00137         axutil_hash_t * ht,
    00138         const void *key,
    00139         axis2_ssize_t klen);
    00140
    00170     AXIS2_EXTERN axutil_hash_index_t *AXIS2_CALL
    00171     axutil_hash_first(
    00172         axutil_hash_t * ht,
    00173         const axutil_env_t * env);
    00174
    00181     AXIS2_EXTERN axutil_hash_index_t *AXIS2_CALL
    00182     axutil_hash_next(
    00183         const axutil_env_t * env,
    00184         axutil_hash_index_t * hi);
    00185
    00195     AXIS2_EXTERN void AXIS2_CALL
    00196     axutil_hash_this(
    00197         axutil_hash_index_t * hi,
    00198         const void **key,
    00199         axis2_ssize_t * klen,
    00200         void **val);
    00201
    00207     AXIS2_EXTERN unsigned int AXIS2_CALL
    00208     axutil_hash_count(
    00209         axutil_hash_t * ht);
    00210
    00220     AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
    00221     axutil_hash_overlay(
    00222         const axutil_hash_t * overlay,
    00223         const axutil_env_t * env,
    00224         const axutil_hash_t * base);
    00225
    00240     AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
    00241     axutil_hash_merge(
    00242         const axutil_hash_t * h1,
    00243         const axutil_env_t * env,
    00244         const axutil_hash_t * h2,
    00245         void *(*merger)(const axutil_env_t * env,
    00246                 const void *key,
    00247                 axis2_ssize_t klen,
    00248                 const void *h1_val,
    00249                 const void *h2_val,
    00250                 const void *data),
    00251         const void *data);
    00252
    00260     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    00261     axutil_hash_contains_key(
    00262         axutil_hash_t * ht,
    00263         const axutil_env_t * env,
    00264         const axis2_char_t * key);
    00265
    00273     AXIS2_EXTERN void AXIS2_CALL
    00274     axutil_hash_free(
    00275         axutil_hash_t * ht,
    00276         const axutil_env_t * env);
    00277
    00285     AXIS2_EXTERN void AXIS2_CALL
    00286     axutil_hash_free_void_arg(
    00287         void *ht_void,
    00288         const axutil_env_t * env);
    00289
    00290     AXIS2_EXTERN void AXIS2_CALL
    00291     axutil_hash_set_env(
    00292         axutil_hash_t * ht,
    00293         const axutil_env_t * env);
    00294
    00297 #ifdef __cplusplus
    00298 }
    00299 #endif
    00300
    00301 #endif                          /* !AXIS2_HASH_H */