irods
4.2.8
About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.
![]() ![]() |
Go to the source code of this file.
Classes | |
struct | bucket |
struct | hashtable |
Macros | |
#define | HASH_BASE 5381 |
#define | myhash(x) B_hash((unsigned char*)(x)) |
Typedefs | |
typedef struct hashtable | Hashtable |
Functions | |
struct bucket * | newBucket (const char *key, const void *value) |
unsigned long | B_hash (unsigned char *string) |
Hashtable * | newHashTable (int size) |
Hashtable * | newHashTable2 (int size, Region *r) |
int | insertIntoHashTable (Hashtable *h, const char *key, const void *value) |
const void * | updateInHashTable (Hashtable *h, const char *key, const void *value) |
const void * | deleteFromHashTable (Hashtable *h, const char *key) |
const void * | lookupFromHashTable (Hashtable *h, const char *key) |
void | deleteHashTable (Hashtable *h, void(*f)(const void *)) |
void | deleteBucket (struct bucket *h, void(*f)(const void *)) |
struct bucket * | lookupBucketFromHashTable (Hashtable *h, const char *key) |
struct bucket * | nextBucket (struct bucket *h, const char *key) |
void | nop (const void *a) |
void | free_const (const void *a) |
#define HASH_BASE 5381 |
Definition at line 9 of file irods_hashtable.h.
#define myhash | ( | x | ) | B_hash((unsigned char*)(x)) |
Definition at line 10 of file irods_hashtable.h.
unsigned long B_hash | ( | unsigned char * | string | ) |
Definition at line 293 of file hashtable.cpp.
References HASH_BASE, and int().
void deleteBucket | ( | struct bucket * | h, |
void(*)(const void *) | f | ||
) |
Definition at line 273 of file hashtable.cpp.
References bucket::key, bucket::next, NULL, and bucket::value.
Referenced by deleteHashTable().
const void* deleteFromHashTable | ( | Hashtable * | h, |
const char * | key | ||
) |
delete from hash table
Definition at line 184 of file hashtable.cpp.
References hashtable::buckets, hashtable::dynamic, bucket::key, hashtable::len, myhash, bucket::next, NULL, hashtable::size, and bucket::value.
Referenced by computeExpressionWithParams(), parseAndComputeExpressionAdapter(), parseAndComputeRuleAdapter(), parseAndComputeRuleNewEnv(), removeRuleFromExtIndex(), smsi_forEach2Exec(), and smsiCollectionSpider().
void deleteHashTable | ( | Hashtable * | h, |
void(*)(const void *) | f | ||
) |
Definition at line 260 of file hashtable.cpp.
References hashtable::buckets, deleteBucket(), hashtable::dynamic, NULL, and hashtable::size.
Referenced by clearDelayed(), clearIndex(), copyCache(), createFuncMapDefIndex(), deleteCondIndexVal(), parseResForCollInp(), processXMsg(), and smsi_query().
void free_const | ( | const void * | a | ) |
Definition at line 287 of file hashtable.cpp.
Referenced by clearIndex(), and createFuncMapDefIndex().
the key is duplicated but the value is not duplicated. MM: the key is managed by hashtable while the value is managed by the caller. returns 0 if out of memory
Definition at line 99 of file hashtable.cpp.
References irods.six::b(), hashtable::bucketRegion, hashtable::buckets, cpStringExtForHashTable(), hashtable::dynamic, bucket::key, hashtable::len, myhash, newBucket(), newBucket2(), newHashTable2(), bucket::next, NULL, hashtable::size, and get_irods_version::value.
Referenced by addToEquivalenceClass(), appendRuleIntoExtIndex(), createCondIndex(), createFuncMapDefIndex(), createRuleNodeIndex(), createRuleStructIndex(), createSimpleConstraint(), createType(), dupTypeAux(), generateRuleTypes(), getSystemFunctions(), initializeEnv(), matchPattern(), nextRuleGen_Type(), prependRuleIntoAppIndex(), processXMsg(), setVariableValue(), smsi_query(), splitVarL(), splitVarR(), typeExpression3(), typeFunction3(), typeRuleSet(), unifyTVarL(), unifyTVarR(), unifyWith(), and updateInEnv().
returns NULL if not found
Definition at line 237 of file hashtable.cpp.
References hashtable::buckets, bucket::key, myhash, bucket::next, NULL, and hashtable::size.
const void* lookupFromHashTable | ( | Hashtable * | h, |
const char * | key | ||
) |
returns NULL if not found
Definition at line 222 of file hashtable.cpp.
References hashtable::buckets, bucket::key, myhash, bucket::next, NULL, hashtable::size, and bucket::value.
Referenced by actionTableLookUp2(), appendRuleIntoExtIndex(), copyFromEnv(), createCondIndex(), createRuleNodeIndex(), dereference(), dupTypeAux(), eqExprNodeSyntacticVarMapping(), execRule(), execRuleFromCondIndex(), findNextRuleFromIndex(), getEquivalenceClassRep(), lookupFromEnv(), mapExternalFuncToInternalProc2(), prependRuleIntoAppIndex(), processXMsg(), removeRuleFromExtIndex(), smsi_forEach2Exec(), smsi_query(), smsiCollectionSpider(), typeExpression3(), typeFunction3(), typeRuleSet(), and updateInEnv().
struct bucket* newBucket | ( | const char * | key, |
const void * | value | ||
) |
Definition at line 18 of file hashtable.cpp.
References irods.six::b(), bucket::key, NULL, and get_irods_version::value.
Referenced by insertIntoHashTable().
returns NULL if out of memory
Definition at line 46 of file hashtable.cpp.
References hashtable::bucketRegion, hashtable::buckets, hashtable::dynamic, hashtable::len, NULL, hashtable::size, and size.
Referenced by copyCache(), createFuncMapDefIndex(), parseResForCollInp(), processXMsg(), restoreCache(), and smsi_query().
hashtable with dynamic expansion returns NULL if out of memory
Definition at line 72 of file hashtable.cpp.
References hashtable::bucketRegion, hashtable::buckets, hashtable::dynamic, hashtable::len, NULL, region_alloc(), hashtable::size, and size.
Referenced by checkPointExtRuleSet(), computeExpressionWithParams(), computeNode(), createCondIndex(), defaultEnv(), dupType(), evaluateFunction3(), execRuleFromCondIndex(), execRuleNodeRes(), getSessionVar(), insertIntoHashTable(), newParserContext(), parseAndComputeRule(), processCoercion(), readRuleSetFromDB(), setVariableValue(), simplify(), smsi_letExec(), smsi_matchExec(), and typeRuleSet().
Definition at line 249 of file hashtable.cpp.
References bucket::key, bucket::next, and NULL.
void nop | ( | const void * | a | ) |
Definition at line 284 of file hashtable.cpp.
Referenced by clearDelayed(), copyCache(), deleteCondIndexVal(), and smsi_query().
const void* updateInHashTable | ( | Hashtable * | h, |
const char * | key, | ||
const void * | value | ||
) |
update hash table returns the pointer to the old value
Definition at line 164 of file hashtable.cpp.
References hashtable::buckets, bucket::key, myhash, bucket::next, NULL, hashtable::size, bucket::value, and get_irods_version::value.
Referenced by appendRuleIntoExtIndex(), createCondIndex(), createRuleNodeIndex(), getEquivalenceClassRep(), processCoercion(), typeFunction3(), unifyWith(), and updateInEnv().