DS3 C SDK  5.0.0
Provides access to the Spectra S3 API with C
ds3_string_multimap.h
Go to the documentation of this file.
1 /*
2  * ******************************************************************************
3  * Copyright 2014-2017 Spectra Logic Corporation. All Rights Reserved.
4  * Licensed under the Apache License, Version 2.0 (the "License"). You may not use
5  * this file except in compliance with the License. A copy of the License is located at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * or in the "license" file accompanying this file.
10  * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
11  * CONDITIONS OF ANY KIND, either express or implied. See the License for the
12  * specific language governing permissions and limitations under the License.
13  * ****************************************************************************
14  */
15 
16 #ifndef __DS3_STRING_MULTIMAP__
17 #define __DS3_STRING_MULTIMAP__
18 
19 #include "ds3_string.h"
20 #include "ds3_library_exports.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
28 
29 
30 //operations for manipulating a hash map as a ds3_str multi map
33 LIBRARY_API void ds3_string_multimap_insert_entry(ds3_string_multimap* map, const ds3_string_multimap_entry* entry); // caller frees all passed in values
36 
37 
38 //operations for manipulating a ds3_string_multi_map_entry
46 
47 
48 /*
49 // TODO implement this as a future refactor
50 // operations for multimaps
51 typedef struct _ds3_multi_map ds3_multi_map;
52 
53 typedef unsigned int (*ds3_hash_func)(void* pointer);
54 typedef int (*ds3_equal_func)(void* pointer);
55 
56 LIBRARY_API ds3_multi_map* ds3_multi_map_init(ds3_hash_func hash, ds3_equal_func equal);
57 LIBRARY_API void ds3_multi_map_put(void* key, void* data);
58 LIBRARY_API void* ds3_multi_map_get(void* key);
59 LIBRARY_API void ds3_multi_map_free(ds3_multi_map* map);
60 */
61 #ifdef __cplusplus
62 }
63 #endif
64 #endif
ds3_str * key
LIBRARY_API void ds3_string_multimap_entry_free(ds3_string_multimap_entry *entry)
LIBRARY_API void ds3_string_multimap_insert(ds3_string_multimap *map, const ds3_str *key, const ds3_str *value)
LIBRARY_API ds3_string_multimap_entry * ds3_string_multimap_lookup(ds3_string_multimap *map, const ds3_str *key)
LIBRARY_API void ds3_string_multimap_insert_entry(ds3_string_multimap *map, const ds3_string_multimap_entry *entry)
LIBRARY_API ds3_string_multimap * ds3_string_multimap_init(void)
LIBRARY_API void ds3_string_multimap_free(ds3_string_multimap *map)
LIBRARY_API ds3_string_multimap_entry * ds3_string_multimap_entry_init(const ds3_str *key)
LIBRARY_API void ds3_string_multimap_entry_add_value(ds3_string_multimap_entry *entry, const ds3_str *value)
LIBRARY_API ds3_str * ds3_string_multimap_entry_get_key(const ds3_string_multimap_entry *entry)
LIBRARY_API ds3_string_multimap_entry * ds3_string_multimap_entry_dup(const ds3_string_multimap_entry *entry)
#define LIBRARY_API
LIBRARY_API ds3_str * ds3_string_multimap_entry_get_value_by_index(const ds3_string_multimap_entry *entry, unsigned int index)
LIBRARY_API unsigned int ds3_string_multimap_entry_get_num_values(const ds3_string_multimap_entry *map_entry)