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.
  Fossies Dox: irods-4.2.8.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

hashtable.cpp File Reference
#include "irods_hashtable.h"
#include <cstdlib>
Include dependency graph for hashtable.cpp:

Go to the source code of this file.

Functions

static char * cpStringExtForHashTable (const char *str, Region *r)
 
struct bucketnewBucket (const char *key, const void *value)
 
struct bucketnewBucket2 (char *key, const void *value, Region *r)
 
HashtablenewHashTable (int size)
 
HashtablenewHashTable2 (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)
 
struct bucketlookupBucketFromHashTable (Hashtable *h, const char *key)
 
struct bucketnextBucket (struct bucket *b0, const char *key)
 
void deleteHashTable (Hashtable *h, void(*f)(const void *))
 
void deleteBucket (struct bucket *b0, void(*f)(const void *))
 
void nop (const void *)
 
void free_const (const void *a)
 
unsigned long B_hash (unsigned char *string)
 
unsigned long sdbm_hash (char *str)
 

Function Documentation

◆ B_hash()

unsigned long B_hash ( unsigned char *  string)

Definition at line 293 of file hashtable.cpp.

References HASH_BASE, and int().

Here is the call graph for this function:

◆ cpStringExtForHashTable()

static char* cpStringExtForHashTable ( const char *  str,
Region r 
)
static

Allocated dynamically returns NULL if out of memory

Definition at line 11 of file hashtable.cpp.

References region_alloc().

Referenced by insertIntoHashTable().

Here is the call graph for this function:

◆ deleteBucket()

void deleteBucket ( struct bucket b0,
void(*)(const void *)  f 
)

Definition at line 273 of file hashtable.cpp.

References bucket::key, bucket::next, NULL, and bucket::value.

Referenced by deleteHashTable().

◆ deleteFromHashTable()

◆ deleteHashTable()

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().

Here is the call graph for this function:

◆ free_const()

void free_const ( const void *  a)

Definition at line 287 of file hashtable.cpp.

Referenced by clearIndex(), and createFuncMapDefIndex().

◆ insertIntoHashTable()

int insertIntoHashTable ( Hashtable h,
const char *  key,
const void *  value 
)

◆ lookupBucketFromHashTable()

struct bucket* lookupBucketFromHashTable ( Hashtable h,
const char *  key 
)

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.

◆ lookupFromHashTable()

◆ newBucket()

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().

Here is the call graph for this function:

◆ newBucket2()

struct bucket* newBucket2 ( char *  key,
const void *  value,
Region r 
)

Allocated in regions

Definition at line 32 of file hashtable.cpp.

References irods.six::b(), bucket::key, NULL, region_alloc(), and get_irods_version::value.

Referenced by insertIntoHashTable().

Here is the call graph for this function:

◆ newHashTable()

Hashtable* newHashTable ( int  size)

◆ newHashTable2()

Hashtable* newHashTable2 ( int  size,
Region r 
)

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().

Here is the call graph for this function:

◆ nextBucket()

struct bucket* nextBucket ( struct bucket b0,
const char *  key 
)

Definition at line 249 of file hashtable.cpp.

References bucket::key, bucket::next, and NULL.

◆ nop()

void nop ( const void *  )

Definition at line 284 of file hashtable.cpp.

Referenced by clearDelayed(), copyCache(), deleteCondIndexVal(), and smsi_query().

◆ sdbm_hash()

unsigned long sdbm_hash ( char *  str)

Definition at line 302 of file hashtable.cpp.

References int().

Here is the call graph for this function:

◆ updateInHashTable()

const void* updateInHashTable ( Hashtable h,
const char *  key,
const void *  value 
)