ECP-VELOC Components
User documentation for all components
kvtree_util.h
Go to the documentation of this file.
1 
5 #ifndef KVTREE_UTIL_H
6 #define KVTREE_UTIL_H
7 
8 #include "kvtree.h"
9 
10 /* compute crc32 */
11 #include <zlib.h>
12 
13 /* enable C++ codes to include this header directly */
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
21 int kvtree_util_set_bytecount(kvtree* hash, const char* key, unsigned long count);
23 
24 int kvtree_util_set_crc32(kvtree* hash, const char* key, uLong crc);
25 
26 int kvtree_util_set_int(kvtree* hash, const char* key, int value);
27 
28 int kvtree_util_set_unsigned_long(kvtree* hash, const char* key, unsigned long value);
29 
30 int kvtree_util_set_str(kvtree* hash, const char* key, const char* value);
31 
32 int kvtree_util_set_int64(kvtree* hash, const char* key, int64_t value);
33 
34 int kvtree_util_set_double(kvtree* hash, const char* key, double value);
35 
36 int kvtree_util_set_ptr(kvtree* hash, const char* key, void* ptr);
38 
46 int kvtree_util_get_bytecount(const kvtree* hash, const char* key, unsigned long* val);
48 
49 int kvtree_util_get_crc32(const kvtree* hash, const char* key, uLong* val);
50 
51 int kvtree_util_get_int(const kvtree* hash, const char* key, int* value);
52 
53 int kvtree_util_get_unsigned_long(const kvtree* hash, const char* key, unsigned long* value);
54 
55 int kvtree_util_get_str(const kvtree* hash, const char* key, char** value);
56 
57 int kvtree_util_get_int64(const kvtree* hash, const char* key, int64_t* value);
58 
59 int kvtree_util_get_double(const kvtree* hash, const char* key, double* value);
60 
61 int kvtree_util_get_ptr(const kvtree* hash, const char* key, void** value);
63 
64 /* enable C++ codes to include this header directly */
65 #ifdef __cplusplus
66 } /* extern "C" */
67 #endif
68 
69 #endif
kvtree_util_set_crc32
int kvtree_util_set_crc32(kvtree *hash, const char *key, uLong crc)
kvtree_util_get_bytecount
int kvtree_util_get_bytecount(const kvtree *hash, const char *key, unsigned long *val)
kvtree_util_set_unsigned_long
int kvtree_util_set_unsigned_long(kvtree *hash, const char *key, unsigned long value)
kvtree_util_set_double
int kvtree_util_set_double(kvtree *hash, const char *key, double value)
kvtree_util_set_int64
int kvtree_util_set_int64(kvtree *hash, const char *key, int64_t value)
kvtree_util_get_int
int kvtree_util_get_int(const kvtree *hash, const char *key, int *value)
kvtree.h
This file defines the data structure for a hash, which is an unordered list of elements,...
kvtree_util_get_unsigned_long
int kvtree_util_get_unsigned_long(const kvtree *hash, const char *key, unsigned long *value)
kvtree_util_get_double
int kvtree_util_get_double(const kvtree *hash, const char *key, double *value)
kvtree_util_get_crc32
int kvtree_util_get_crc32(const kvtree *hash, const char *key, uLong *val)
kvtree_util_set_str
int kvtree_util_set_str(kvtree *hash, const char *key, const char *value)
kvtree_elem_struct::hash
struct kvtree_struct * hash
Definition: kvtree.h:94
kvtree_util_set_ptr
int kvtree_util_set_ptr(kvtree *hash, const char *key, void *ptr)
kvtree_util_set_bytecount
int kvtree_util_set_bytecount(kvtree *hash, const char *key, unsigned long count)
kvtree_util_get_int64
int kvtree_util_get_int64(const kvtree *hash, const char *key, int64_t *value)
kvtree_util_get_ptr
int kvtree_util_get_ptr(const kvtree *hash, const char *key, void **value)
kvtree_util_set_int
int kvtree_util_set_int(kvtree *hash, const char *key, int value)
kvtree_util_get_str
int kvtree_util_get_str(const kvtree *hash, const char *key, char **value)
kvtree_elem_struct::key
char * key
Definition: kvtree.h:93