34typedef struct HashTableInterface HashTableInterface;
69typedef struct HashTableEntry {
72 struct HashTableEntry *
next;
134struct HashTableInterface {
139 ObjectInterface objectInterface;
static int hash(const Object *self)
bool(* HashTableEqualFunc)(const ident a, const ident b)
A function that tests equality of two keys.
OBJECTIVELY_EXPORT size_t HashTableHashStr(const ident key)
Common hash functions for use with HashTable.
OBJECTIVELY_EXPORT Class * _HashTable(void)
size_t(* HashTableHashFunc)(const ident key)
A function that computes a hash for the given key.
OBJECTIVELY_EXPORT bool HashTableEqualDirect(const ident a, const ident b)
OBJECTIVELY_EXPORT bool HashTableEqualStr(const ident a, const ident b)
OBJECTIVELY_EXPORT bool HashTableEqualStri(const ident a, const ident b)
void(* HashTableEnumerator)(const HashTable *table, ident key, ident value, ident data)
The HashTableEnumerator function type.
OBJECTIVELY_EXPORT size_t HashTableHashDirect(const ident key)
OBJECTIVELY_EXPORT size_t HashTableHashStri(const ident key)
Object is the root Class of The Objectively Class hierarchy.
static Unicode next(StringReader *self, StringReaderMode mode)
void * ident
The identity type, similar to Objective-C id.
#define OBJECTIVELY_EXPORT
void(* Consumer)(ident data)
The Consumer function type.
The runtime representation of a Class.
Hash tables with user-supplied hash and equality functions.
Object object
The superclass.
HashTableInterface * interface
The interface.
size_t capacity
The number of buckets.
HashTableEntry ** buckets
The buckets.
size_t count
The number of entries.
Consumer destroyKey
Optional destructor called when a key is removed or replaced.
HashTableHashFunc hash
The hash function.
Consumer destroyValue
Optional destructor called when a value is removed or replaced.
HashTableEqualFunc equal
The equality function.
Object is the root Class of The Objectively Class hierarchy.