axis2_hash.h

Go to the documentation of this file.
00001 /*
00002  * Licensed to the Apache Software Foundation (ASF) under one or more
00003  * contributor license agreements.  See the NOTICE file distributed with
00004  * this work for additional information regarding copyright ownership.
00005  * The ASF licenses this file to You under the Apache License, Version 2.0
00006  * (the "License"); you may not use this file except in compliance with
00007  * the License.  You may obtain a copy of the License at
00008  *
00009  *      http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00018 #ifndef AXIS2_HASH_H
00019 #define AXIS2_HASH_H
00020 
00026 #include <axis2_utils_defines.h>
00027 #include <axis2_env.h>
00028 
00029 #ifdef __cplusplus
00030 extern "C"
00031 {
00032 #endif
00033 
00050 #define AXIS2_HASH_KEY_STRING     (-1)
00051 
00055     typedef struct axis2_hash_t axis2_hash_t;
00056 
00060     typedef struct axis2_hash_index_t axis2_hash_index_t;
00061 
00068     typedef unsigned int (*axis2_hashfunc_t) (const char *key, axis2_ssize_t *klen);
00069 
00073     unsigned int axis2_hashfunc_default (const char *key, axis2_ssize_t *klen);
00074 
00080   AXIS2_EXTERN axis2_hash_t* AXIS2_CALL axis2_hash_make (const axis2_env_t *env);
00081 
00088    AXIS2_EXTERN axis2_hash_t* AXIS2_CALL axis2_hash_make_custom (const axis2_env_t *env
00089             , axis2_hashfunc_t hash_func);
00090 
00098   AXIS2_EXTERN axis2_hash_t* AXIS2_CALL axis2_hash_copy (const axis2_hash_t *ht
00099            , const axis2_env_t *env);
00100 
00109   AXIS2_EXTERN void AXIS2_CALL axis2_hash_set (axis2_hash_t *ht, const void *key
00110            , axis2_ssize_t klen, const void *val);
00111 
00119    AXIS2_EXTERN void* AXIS2_CALL axis2_hash_get (axis2_hash_t *ht, const void *key
00120             , axis2_ssize_t klen);
00121 
00150  AXIS2_EXTERN axis2_hash_index_t* AXIS2_CALL axis2_hash_first (axis2_hash_t *ht
00151           ,const axis2_env_t *env);
00152 
00159  AXIS2_EXTERN axis2_hash_index_t* AXIS2_CALL axis2_hash_next (const axis2_env_t *env
00160           , axis2_hash_index_t *hi);
00161 
00171  AXIS2_EXTERN void AXIS2_CALL axis2_hash_this (axis2_hash_index_t *hi, const void **key
00172             , axis2_ssize_t *klen, void **val);
00173 
00179   AXIS2_EXTERN  unsigned int AXIS2_CALL axis2_hash_count (axis2_hash_t *ht);
00180 
00190   AXIS2_EXTERN axis2_hash_t* AXIS2_CALL axis2_hash_overlay (const axis2_hash_t *overlay
00191            ,const axis2_env_t *env, const axis2_hash_t *base);
00192 
00207   AXIS2_EXTERN axis2_hash_t* AXIS2_CALL axis2_hash_merge (const axis2_hash_t *h1
00208            , const axis2_env_t *env, const axis2_hash_t *h2
00209             , void *(*merger) (const axis2_env_t *env, const void *key
00210             , axis2_ssize_t klen, const void *h1_val, const void *h2_val
00211             , const void *data), const void *data);
00212 
00220 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
00221 axis2_hash_contains_key (
00222         axis2_hash_t *ht, 
00223         const axis2_env_t *env,
00224         const axis2_char_t *key);
00225                            
00233 AXIS2_EXTERN axis2_status_t AXIS2_CALL axis2_hash_free(axis2_hash_t *ht
00234       , const axis2_env_t *env);
00235                            
00243 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00244 axis2_hash_free_void_arg (void *ht_void, const axis2_env_t* env);
00245 
00248 #ifdef __cplusplus
00249 }
00250 #endif
00251 
00252 #endif                          /* !AXIS2_HASH_H */

Generated on Wed Dec 20 20:34:49 2006 for Axis2/C by  doxygen 1.5.1