Hash set. More...
#include "kzc_hash_code.h"#include "kzc_comparator.h"#include "kzc_hash_map.h"#include <system/kzs_types.h>#include <system/debug/kzs_error.h>#include <system/kzs_header.h>#include "kzc_hash_set_accessors_h.inl"Classes | |
| struct | KzcHashSetIterator |
| Accessor to the contents of a KzcHashSet. More... | |
Macros | |
| #define | kzcHashSetIterationBreak(hashSet) |
| Break from a hash set iteration. More... | |
| #define | kzcHashSetIterate(iterator_param) |
| Finds the next entry in the iterated hash set. More... | |
Functions | |
| kzsError | kzcHashSetCreateWithCapacity (const struct KzcMemoryManager *memoryManager, struct KzcHashMapConfiguration configuration, kzUint capacity, struct KzcHashSet **out_hashSet) |
| Creates a new initially empty hash set. More... | |
| kzsError | kzcHashSetCreate (const struct KzcMemoryManager *memoryManager, struct KzcHashMapConfiguration configuration, struct KzcHashSet **out_hashSet) |
| Creates a new initially empty hash set. More... | |
| kzsError | kzcHashSetCreateOrderedWithCapacity (const struct KzcMemoryManager *memoryManager, struct KzcHashMapConfiguration configuration, kzUint capacity, struct KzcHashSet **out_hashSet) |
| Creates a new initially empty hash set, which ensures that the iteration order is same as the order of adding elements. More... | |
| kzsError | kzcHashSetCreateOrdered (const struct KzcMemoryManager *memoryManager, struct KzcHashMapConfiguration configuration, struct KzcHashSet **out_hashSet) |
| Creates a new initially empty hash set, which ensures that the iteration order is same as the order of adding elements. More... | |
| kzsError | kzcHashSetDelete (struct KzcHashSet *hashSet) |
| Frees the memory allocated for the hash set. More... | |
| kzsError | kzcHashSetClear (const struct KzcHashSet *hashSet) |
| Clears the content of the hash set. More... | |
| struct KzcHashMapConfiguration | kzcHashSetGetConfiguration (const struct KzcHashSet *hashSet) |
| Gets configuration. More... | |
| kzUint | kzcHashSetGetSize (const struct KzcHashSet *hashSet) |
| Returns the number of entries stored in the hash set. More... | |
| kzBool | kzcHashSetIsEmpty (const struct KzcHashSet *hashSet) |
| Checks if the hash set is empty or not. More... | |
| struct KzcHashSetIterator | kzcHashSetGetIterator (const struct KzcHashSet *hashSet) |
| Returns an iterator to the hash set. More... | |
| kzBool | kzcHashSetIsValid (const struct KzcHashSet *hashSet) |
| Ensures the specified hash set is valid. More... | |
Hash set.
Hash set stores unique values, whose existence in the set can be queried in constant time.
Copyright 2008-2020 by Rightware. All rights reserved.
| #define kzcHashSetIterationBreak | ( | hashSet | ) |
Break from a hash set iteration.
| #define kzcHashSetIterate | ( | iterator_param | ) |
Finds the next entry in the iterated hash set.
| iterator_param | KzcHashSetIterator structure. |
| kzsError kzcHashSetCreateWithCapacity | ( | const struct KzcMemoryManager * | memoryManager, |
| struct KzcHashMapConfiguration | configuration, | ||
| kzUint | capacity, | ||
| struct KzcHashSet ** | out_hashSet | ||
| ) |
Creates a new initially empty hash set.
Initial capacity is given as a parameter.
| kzsError kzcHashSetCreate | ( | const struct KzcMemoryManager * | memoryManager, |
| struct KzcHashMapConfiguration | configuration, | ||
| struct KzcHashSet ** | out_hashSet | ||
| ) |
Creates a new initially empty hash set.
| kzsError kzcHashSetCreateOrderedWithCapacity | ( | const struct KzcMemoryManager * | memoryManager, |
| struct KzcHashMapConfiguration | configuration, | ||
| kzUint | capacity, | ||
| struct KzcHashSet ** | out_hashSet | ||
| ) |
Creates a new initially empty hash set, which ensures that the iteration order is same as the order of adding elements.
Initial capacity is given as a parameter.
| kzsError kzcHashSetCreateOrdered | ( | const struct KzcMemoryManager * | memoryManager, |
| struct KzcHashMapConfiguration | configuration, | ||
| struct KzcHashSet ** | out_hashSet | ||
| ) |
Creates a new initially empty hash set, which ensures that the iteration order is same as the order of adding elements.
| kzsError kzcHashSetDelete | ( | struct KzcHashSet * | hashSet | ) |
Frees the memory allocated for the hash set.
| kzsError kzcHashSetClear | ( | const struct KzcHashSet * | hashSet | ) |
Clears the content of the hash set.
| struct KzcHashMapConfiguration kzcHashSetGetConfiguration | ( | const struct KzcHashSet * | hashSet | ) |
Gets configuration.
| kzUint kzcHashSetGetSize | ( | const struct KzcHashSet * | hashSet | ) |
Returns the number of entries stored in the hash set.
| kzBool kzcHashSetIsEmpty | ( | const struct KzcHashSet * | hashSet | ) |
Checks if the hash set is empty or not.
| struct KzcHashSetIterator kzcHashSetGetIterator | ( | const struct KzcHashSet * | hashSet | ) |
Returns an iterator to the hash set.
Call kzcHashSetIterate() before accessing the first and any subsequent entries.
| kzBool kzcHashSetIsValid | ( | const struct KzcHashSet * | hashSet | ) |
Ensures the specified hash set is valid.