FreeRDP
HashTable.c File Reference
#include <winpr/config.h>
#include <winpr/crt.h>
#include <winpr/assert.h>
#include <winpr/collections.h>

Functions

BOOL HashTable_PointerCompare (const void *pointer1, const void *pointer2)
 
UINT32 HashTable_PointerHash (const void *pointer)
 
BOOL HashTable_StringCompare (const void *string1, const void *string2)
 
UINT32 HashTable_StringHash (const void *key)
 
void * HashTable_StringClone (const void *str)
 
void HashTable_StringFree (void *str)
 
static INLINE BOOL HashTable_IsProbablePrime (size_t oddNumber)
 
static INLINE size_t HashTable_CalculateIdealNumOfBuckets (wHashTable *table)
 
static INLINE void HashTable_Rehash (wHashTable *table, size_t numOfBuckets)
 
static INLINE BOOL HashTable_Equals (wHashTable *table, const wKeyValuePair *pair, const void *key)
 
static INLINE wKeyValuePair * HashTable_Get (wHashTable *table, const void *key)
 
static INLINE void disposeKey (wHashTable *table, void *key)
 
static INLINE void disposeValue (wHashTable *table, void *value)
 
static INLINE void disposePair (wHashTable *table, wKeyValuePair *pair)
 
static INLINE void setKey (wHashTable *table, wKeyValuePair *pair, const void *key)
 
static INLINE void setValue (wHashTable *table, wKeyValuePair *pair, const void *value)
 
size_t HashTable_Count (wHashTable *table)
 
BOOL HashTable_Insert (wHashTable *table, const void *key, const void *value)
 
BOOL HashTable_Remove (wHashTable *table, const void *key)
 
void * HashTable_GetItemValue (wHashTable *table, const void *key)
 
BOOL HashTable_SetItemValue (wHashTable *table, const void *key, const void *value)
 
void HashTable_Clear (wHashTable *table)
 
size_t HashTable_GetKeys (wHashTable *table, ULONG_PTR **ppKeys)
 
BOOL HashTable_Foreach (wHashTable *table, HASH_TABLE_FOREACH_FN fn, VOID *arg)
 
BOOL HashTable_Contains (wHashTable *table, const void *key)
 
BOOL HashTable_ContainsKey (wHashTable *table, const void *key)
 
BOOL HashTable_ContainsValue (wHashTable *table, const void *value)
 
wHashTable * HashTable_New (BOOL synchronized)
 
void HashTable_Free (wHashTable *table)
 
void HashTable_Lock (wHashTable *table)
 
void HashTable_Unlock (wHashTable *table)
 
wObjectHashTable_KeyObject (wHashTable *table)
 
wObjectHashTable_ValueObject (wHashTable *table)
 
BOOL HashTable_SetHashFunction (wHashTable *table, HASH_TABLE_HASH_FN fn)
 
BOOL HashTable_SetupForStringData (wHashTable *table, BOOL stringValues)
 

Function Documentation

◆ disposeKey()

static INLINE void disposeKey ( wHashTable *  table,
void *  key 
)
static
Here is the caller graph for this function:

◆ disposePair()

static INLINE void disposePair ( wHashTable *  table,
wKeyValuePair *  pair 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ disposeValue()

static INLINE void disposeValue ( wHashTable *  table,
void *  value 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_CalculateIdealNumOfBuckets()

static INLINE size_t HashTable_CalculateIdealNumOfBuckets ( wHashTable *  table)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_Clear()

void HashTable_Clear ( wHashTable *  table)

Removes all elements from the HashTable.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_Contains()

BOOL HashTable_Contains ( wHashTable *  table,
const void *  key 
)

Determines whether the HashTable contains a specific key.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_ContainsKey()

BOOL HashTable_ContainsKey ( wHashTable *  table,
const void *  key 
)

Determines whether the HashTable contains a specific key.

Here is the call graph for this function:

◆ HashTable_ContainsValue()

BOOL HashTable_ContainsValue ( wHashTable *  table,
const void *  value 
)

Determines whether the HashTable contains a specific value.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_Count()

size_t HashTable_Count ( wHashTable *  table)

C equivalent of the C# Hashtable Class: http://msdn.microsoft.com/en-us/library/system.collections.hashtable.aspx Properties Gets the number of key/value pairs contained in the HashTable.

Here is the caller graph for this function:

◆ HashTable_Equals()

static INLINE BOOL HashTable_Equals ( wHashTable *  table,
const wKeyValuePair *  pair,
const void *  key 
)
static
Here is the caller graph for this function:

◆ HashTable_Foreach()

BOOL HashTable_Foreach ( wHashTable *  table,
HASH_TABLE_FOREACH_FN  fn,
VOID *  arg 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_Free()

void HashTable_Free ( wHashTable *  table)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_Get()

static INLINE wKeyValuePair* HashTable_Get ( wHashTable *  table,
const void *  key 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_GetItemValue()

void* HashTable_GetItemValue ( wHashTable *  table,
const void *  key 
)

Get an item value using key

Here is the call graph for this function:

◆ HashTable_GetKeys()

size_t HashTable_GetKeys ( wHashTable *  table,
ULONG_PTR **  ppKeys 
)

Gets the list of keys as an array

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_Insert()

BOOL HashTable_Insert ( wHashTable *  table,
const void *  key,
const void *  value 
)

Methods Adds an element with the specified key and value into the HashTable.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_IsProbablePrime()

static INLINE BOOL HashTable_IsProbablePrime ( size_t  oddNumber)
static
Here is the caller graph for this function:

◆ HashTable_KeyObject()

wObject* HashTable_KeyObject ( wHashTable *  table)
Here is the caller graph for this function:

◆ HashTable_Lock()

void HashTable_Lock ( wHashTable *  table)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_New()

wHashTable* HashTable_New ( BOOL  synchronized)

Construction, Destruction

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_PointerCompare()

BOOL HashTable_PointerCompare ( const void *  pointer1,
const void *  pointer2 
)
Here is the caller graph for this function:

◆ HashTable_PointerHash()

UINT32 HashTable_PointerHash ( const void *  pointer)
Here is the caller graph for this function:

◆ HashTable_Rehash()

static INLINE void HashTable_Rehash ( wHashTable *  table,
size_t  numOfBuckets 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_Remove()

BOOL HashTable_Remove ( wHashTable *  table,
const void *  key 
)

Removes the element with the specified key from the HashTable.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_SetHashFunction()

BOOL HashTable_SetHashFunction ( wHashTable *  table,
HASH_TABLE_HASH_FN  fn 
)
Here is the caller graph for this function:

◆ HashTable_SetItemValue()

BOOL HashTable_SetItemValue ( wHashTable *  table,
const void *  key,
const void *  value 
)

Set an item value using key

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_SetupForStringData()

BOOL HashTable_SetupForStringData ( wHashTable *  table,
BOOL  stringValues 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_StringClone()

void* HashTable_StringClone ( const void *  str)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_StringCompare()

BOOL HashTable_StringCompare ( const void *  string1,
const void *  string2 
)
Here is the caller graph for this function:

◆ HashTable_StringFree()

void HashTable_StringFree ( void *  str)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_StringHash()

UINT32 HashTable_StringHash ( const void *  key)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_Unlock()

void HashTable_Unlock ( wHashTable *  table)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HashTable_ValueObject()

wObject* HashTable_ValueObject ( wHashTable *  table)
Here is the caller graph for this function:

◆ setKey()

static INLINE void setKey ( wHashTable *  table,
wKeyValuePair *  pair,
const void *  key 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setValue()

static INLINE void setValue ( wHashTable *  table,
wKeyValuePair *  pair,
const void *  value 
)
static
Here is the call graph for this function:
Here is the caller graph for this function: