Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
string_hash_table.h
Go to the documentation of this file.
1 /*
2 ** Copyright 2014-2016 The Earlham Institute
3 **
4 ** Licensed under the Apache License, Version 2.0 (the "License");
5 ** you may not use this file except in compliance with the License.
6 ** You may obtain a copy of the License at
7 **
8 ** http://www.apache.org/licenses/LICENSE-2.0
9 **
10 ** Unless required by applicable law or agreed to in writing, software
11 ** distributed under the License is distributed on an "AS IS" BASIS,
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ** See the License for the specific language governing permissions and
14 ** limitations under the License.
15 */
16 
21 #ifndef STRING_HASH_TABLE_H
22 #define STRING_HASH_TABLE_H
23 
24 #include "hash_table.h"
26 
27 #ifdef __cplusplus
28  extern "C" {
29 #endif
30 
31 
42 GRASSROOTS_UTIL_API HashTable *GetHashTableOfStrings (const uint32 initial_capacity, const uint8 load_percentage);
43 
44 
45 
56 GRASSROOTS_UTIL_API HashTable *GetHashTableOfStringInts (const uint32 initial_capacity, const uint8 load_percentage);
57 
58 
69 GRASSROOTS_UTIL_API bool CompareStringHashBuckets (const void * const bucket_key_p, const void * const key_p);
70 
71 
82 GRASSROOTS_UTIL_API int CompareKeysAlphabetically (const void *v0_p, const void *v1_p);
83 
84 
85 #ifdef __cplusplus
86 }
87 #endif
88 
89 #endif /* #ifndef STRING_HASH_TABLE_H */
grassroots_util_library.h
GetHashTableOfStringInts
HashTable * GetHashTableOfStringInts(const uint32 initial_capacity, const uint8 load_percentage)
Create a HashTable where the keys are strings and the values are uint32.
GetHashTableOfStrings
HashTable * GetHashTableOfStrings(const uint32 initial_capacity, const uint8 load_percentage)
Create a HashTable where both the keys and values are strings.
CompareStringHashBuckets
bool CompareStringHashBuckets(const void *const bucket_key_p, const void *const key_p)
Compare the keys of two StringHashBuckets.
CompareKeysAlphabetically
int CompareKeysAlphabetically(const void *v0_p, const void *v1_p)
Compare two strings alphabetically.
GRASSROOTS_UTIL_API
#define GRASSROOTS_UTIL_API
Definition: grassroots_util_library.h:47
hash_table.h
HashTable
A container using HashBuckets to allow for fast lookup of key-value pairs.
Definition: hash_table.h:139