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)
 
void * HashTable_StringClone (void *str)
 
void HashTable_StringFree (void *str)
 
static int HashTable_IsProbablePrime (int oddNumber)
 
static long HashTable_CalculateIdealNumOfBuckets (wHashTable *table)
 
static void HashTable_Rehash (wHashTable *table, int numOfBuckets)
 
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)
 
void * HashTable_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

◆ HashTable_Add()

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:

◆ HashTable_CalculateIdealNumOfBuckets()

static long 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,
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,
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,
void *  value 
)

Determines whether the HashTable contains a specific value.

Here is the call graph for this function:

◆ HashTable_Count()

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:

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

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

◆ HashTable_GetItemValue()

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:

◆ HashTable_GetKeys()

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:

◆ HashTable_IsProbablePrime()

static int HashTable_IsProbablePrime ( int  oddNumber)
static
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 ( 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:

◆ HashTable_PointerHash()

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

◆ HashTable_Rehash()

static void HashTable_Rehash ( wHashTable *  table,
int  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,
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_SetItemValue()

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:

◆ HashTable_StringClone()

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

◆ HashTable_StringCompare()

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

◆ HashTable_StringFree()

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

◆ HashTable_StringHash()

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