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

Functions

BOOL HashTable_PointerCompare (void *pointer1, void *pointer2)
 
UINT32 HashTable_PointerHash (void *pointer)
 
BOOL HashTable_StringCompare (void *string1, void *string2)
 
UINT32 HashTable_StringHash (void *key)
 
voidHashTable_StringClone (void *str)
 
void HashTable_StringFree (void *str)
 
static int HashTable_IsProbablePrime (int oddNumber)
 
static long HashTable_CalculateIdealNumOfBuckets (wHashTable *table)
 
void HashTable_Rehash (wHashTable *table, int numOfBuckets)
 
void HashTable_SetIdealRatio (wHashTable *table, float idealRatio, float lowerRehashThreshold, float upperRehashThreshold)
 
wKeyValuePair * HashTable_Get (wHashTable *table, void *key)
 
int HashTable_Count (wHashTable *table)
 
int HashTable_Add (wHashTable *table, void *key, void *value)
 
BOOL HashTable_Remove (wHashTable *table, void *key)
 
voidHashTable_GetItemValue (wHashTable *table, void *key)
 
BOOL HashTable_SetItemValue (wHashTable *table, void *key, void *value)
 
void HashTable_Clear (wHashTable *table)
 
int HashTable_GetKeys (wHashTable *table, ULONG_PTR **ppKeys)
 
BOOL HashTable_Contains (wHashTable *table, void *key)
 
BOOL HashTable_ContainsKey (wHashTable *table, void *key)
 
BOOL HashTable_ContainsValue (wHashTable *table, void *value)
 
wHashTable * HashTable_New (BOOL synchronized)
 
void HashTable_Free (wHashTable *table)
 

Function Documentation

int HashTable_Add ( wHashTable *  table,
void key,
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:

static long HashTable_CalculateIdealNumOfBuckets ( wHashTable *  table)
static

Here is the call graph for this function:

Here is the caller graph for this function:

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:

BOOL HashTable_Contains ( wHashTable *  table,
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:

BOOL HashTable_ContainsKey ( wHashTable *  table,
void key 
)

Determines whether the HashTable contains a specific key.

Here is the call graph for this function:

BOOL HashTable_ContainsValue ( wHashTable *  table,
void value 
)

Determines whether the HashTable contains a specific value.

Here is the call graph for this function:

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

void HashTable_Free ( wHashTable *  table)

Here is the call graph for this function:

Here is the caller graph for this function:

wKeyValuePair* HashTable_Get ( wHashTable *  table,
void key 
)

Here is the caller graph for this function:

void* HashTable_GetItemValue ( wHashTable *  table,
void key 
)

Get an item value using key

Here is the call graph for this function:

Here is the caller graph for this function:

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

static int HashTable_IsProbablePrime ( int  oddNumber)
static

Here is the caller graph for this function:

wHashTable* HashTable_New ( BOOL  synchronized)

Construction, Destruction

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL HashTable_PointerCompare ( void pointer1,
void pointer2 
)

WinPR: Windows Portable Runtime System.Collections.Hashtable

Copyright 2014 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. This implementation is based on the public domain hash table implementation made by Keith Pomakis:

http://www.pomakis.com/hashtable/hashtable.c http://www.pomakis.com/hashtable/hashtable.h

Here is the caller graph for this function:

UINT32 HashTable_PointerHash ( void pointer)

Here is the caller graph for this function:

void HashTable_Rehash ( wHashTable *  table,
int  numOfBuckets 
)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL HashTable_Remove ( wHashTable *  table,
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:

void HashTable_SetIdealRatio ( wHashTable *  table,
float  idealRatio,
float  lowerRehashThreshold,
float  upperRehashThreshold 
)
BOOL HashTable_SetItemValue ( wHashTable *  table,
void key,
void value 
)

Set an item value using key

Here is the call graph for this function:

Here is the caller graph for this function:

void* HashTable_StringClone ( void str)

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL HashTable_StringCompare ( void string1,
void string2 
)

Here is the caller graph for this function:

void HashTable_StringFree ( void str)

Here is the caller graph for this function:

UINT32 HashTable_StringHash ( void key)

Here is the call graph for this function:

Here is the caller graph for this function: