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)  

irods_hashtable.h File Reference
#include <string.h>
#include <stdio.h>
#include "region.h"
Include dependency graph for irods_hashtable.h:
This graph shows which files directly or indirectly include this file:

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 bucketnewBucket (const char *key, const void *value)
 
unsigned long B_hash (unsigned char *string)
 
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)
 
void deleteHashTable (Hashtable *h, void(*f)(const void *))
 
void deleteBucket (struct bucket *h, void(*f)(const void *))
 
struct bucketlookupBucketFromHashTable (Hashtable *h, const char *key)
 
struct bucketnextBucket (struct bucket *h, const char *key)
 
void nop (const void *a)
 
void free_const (const void *a)
 

Macro Definition Documentation

◆ HASH_BASE

#define HASH_BASE   5381

Definition at line 9 of file irods_hashtable.h.

◆ myhash

#define myhash (   x)    B_hash((unsigned char*)(x))

Definition at line 10 of file irods_hashtable.h.

Typedef Documentation

◆ Hashtable

typedef struct hashtable Hashtable

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:

◆ deleteBucket()

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

◆ 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:

◆ 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 h,
const char *  key 
)

Definition at line 249 of file hashtable.cpp.

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

◆ nop()

void nop ( const void *  a)

Definition at line 284 of file hashtable.cpp.

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

◆ updateInHashTable()

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