axis2_hash.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2004,2005 The Apache Software Foundation.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * 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 AXIS2_HASH_H
00018 #define AXIS2_HASH_H
00019 
00025 #include <axis2_utils_defines.h>
00026 #include <axis2_env.h>
00027 
00028 #ifdef __cplusplus
00029 extern "C"
00030 {
00031 #endif
00032 
00049 #define AXIS2_HASH_KEY_STRING     (-1)
00050 
00054     typedef struct axis2_hash_t axis2_hash_t;
00055 
00059     typedef struct axis2_hash_index_t axis2_hash_index_t;
00060 
00067     typedef unsigned int (*axis2_hashfunc_t) (const char *key, axis2_ssize_t *klen);
00068 
00072     unsigned int axis2_hashfunc_default (const char *key, axis2_ssize_t *klen);
00073 
00079   AXIS2_EXTERN axis2_hash_t* AXIS2_CALL axis2_hash_make (const axis2_env_t *env);
00080 
00087    AXIS2_EXTERN axis2_hash_t* AXIS2_CALL axis2_hash_make_custom (const axis2_env_t *env
00088             , axis2_hashfunc_t hash_func);
00089 
00097   AXIS2_EXTERN axis2_hash_t* AXIS2_CALL axis2_hash_copy (const axis2_hash_t *ht
00098            , const axis2_env_t *env);
00099 
00108   AXIS2_EXTERN void AXIS2_CALL axis2_hash_set (axis2_hash_t *ht, const void *key
00109            , axis2_ssize_t klen, const void *val);
00110 
00118    AXIS2_EXTERN void* AXIS2_CALL axis2_hash_get (axis2_hash_t *ht, const void *key
00119             , axis2_ssize_t klen);
00120 
00149  AXIS2_EXTERN axis2_hash_index_t* AXIS2_CALL axis2_hash_first (axis2_hash_t *ht
00150           ,const axis2_env_t *env);
00151 
00158  AXIS2_EXTERN axis2_hash_index_t* AXIS2_CALL axis2_hash_next (const axis2_env_t *env
00159           , axis2_hash_index_t *hi);
00160 
00170  AXIS2_EXTERN void AXIS2_CALL axis2_hash_this (axis2_hash_index_t *hi, const void **key
00171             , axis2_ssize_t *klen, void **val);
00172 
00178   AXIS2_EXTERN  unsigned int AXIS2_CALL axis2_hash_count (axis2_hash_t *ht);
00179 
00189   AXIS2_EXTERN axis2_hash_t* AXIS2_CALL axis2_hash_overlay (const axis2_hash_t *overlay
00190            ,const axis2_env_t *env, const axis2_hash_t *base);
00191 
00206   AXIS2_EXTERN axis2_hash_t* AXIS2_CALL axis2_hash_merge (const axis2_hash_t *h1
00207            , const axis2_env_t *env, const axis2_hash_t *h2
00208             , void *(*merger) (const axis2_env_t *env, const void *key
00209             , axis2_ssize_t klen, const void *h1_val, const void *h2_val
00210             , const void *data), const void *data);
00211 
00219 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
00220 axis2_hash_contains_key (
00221         axis2_hash_t *ht, 
00222         const axis2_env_t *env,
00223         const axis2_char_t *key);
00224                            
00232 AXIS2_EXTERN axis2_status_t AXIS2_CALL axis2_hash_free(axis2_hash_t *ht
00233       , const axis2_env_t *env);
00234                            
00242 AXIS2_EXTERN axis2_status_t AXIS2_CALL
00243 axis2_hash_free_void_arg (void *ht_void, const axis2_env_t* env);
00244 
00247 #ifdef __cplusplus
00248 }
00249 #endif
00250 
00251 #endif                          /* !AXIS2_HASH_H */

Generated on Tue Oct 3 18:21:09 2006 for Axis2/C by  doxygen 1.4.7