WizardsToolkit  1.0.7
hashmap.c File Reference
#include "wizard/studio.h"
#include "wizard/exception.h"
#include "wizard/exception-private.h"
#include "wizard/hash.h"
#include "wizard/hashmap.h"
#include "wizard/memory_.h"
#include "wizard/semaphore.h"
#include "wizard/string_.h"
Include dependency graph for hashmap.c:

Go to the source code of this file.

Data Structures

struct  _ElementInfo
struct  _EntryInfo
struct  _LinkedListInfo
struct  _HashmapInfo

Defines

#define MaxCapacities   20

Typedefs

typedef struct _ElementInfo ElementInfo
typedef struct _EntryInfo EntryInfo

Functions

WizardExport WizardBooleanType AppendValueToLinkedList (LinkedListInfo *list_info, const void *value)
WizardExport void ClearLinkedList (LinkedListInfo *list_info, void *(*relinquish_value)(void *))
WizardExport WizardBooleanType CompareHashmapString (const void *target, const void *source)
WizardExport WizardBooleanType CompareHashmapStringInfo (const void *target, const void *source)
WizardExport HashmapInfoDestroyHashmap (HashmapInfo *hashmap_info)
WizardExport LinkedListInfoDestroyLinkedList (LinkedListInfo *list_info, void *(*relinquish_value)(void *))
WizardExport void * GetLastValueInLinkedList (LinkedListInfo *list_info)
WizardExport void * GetNextKeyInHashmap (HashmapInfo *hashmap_info)
WizardExport void * GetNextValueInHashmap (HashmapInfo *hashmap_info)
WizardExport void * GetNextValueInLinkedList (LinkedListInfo *list_info)
WizardExport size_t GetNumberOfEntriesInHashmap (const HashmapInfo *hashmap_info)
WizardExport size_t GetNumberOfElementsInLinkedList (const LinkedListInfo *list_info)
WizardExport void * GetValueFromHashmap (HashmapInfo *hashmap_info, const void *key)
WizardExport void * GetValueFromLinkedList (LinkedListInfo *list_info, const size_t index)
WizardExport size_t HashPointerType (const void *pointer)
WizardExport size_t HashStringType (const void *string)
WizardExport size_t HashStringInfoType (const void *string)
WizardExport WizardBooleanType InsertValueInLinkedList (LinkedListInfo *list_info, const size_t index, const void *value)
WizardExport WizardBooleanType InsertValueInSortedLinkedList (LinkedListInfo *list_info, int(*compare)(const void *, const void *), void **replace, const void *value)
WizardExport WizardBooleanType IsHashmapEmpty (const HashmapInfo *hashmap_info)
WizardExport WizardBooleanType IsLinkedListEmpty (const LinkedListInfo *list_info)
WizardExport WizardBooleanType LinkedListToArray (LinkedListInfo *list_info, void **array)
WizardExport HashmapInfoNewHashmap (const size_t capacity, size_t(*hash)(const void *), WizardBooleanType(*compare)(const void *, const void *), void *(*relinquish_key)(void *), void *(*relinquish_value)(void *))
WizardExport LinkedListInfoNewLinkedList (const size_t capacity)
static WizardBooleanType IncreaseHashmapCapacity (HashmapInfo *hashmap_info)
WizardExport WizardBooleanType PutEntryInHashmap (HashmapInfo *hashmap_info, const void *key, const void *value)
WizardExport void * RemoveElementByValueFromLinkedList (LinkedListInfo *list_info, const void *value)
WizardExport void * RemoveElementFromLinkedList (LinkedListInfo *list_info, const size_t index)
WizardExport void * RemoveEntryFromHashmap (HashmapInfo *hashmap_info, const void *key)
WizardExport void * RemoveLastElementFromLinkedList (LinkedListInfo *list_info)
WizardExport void ResetHashmapIterator (HashmapInfo *hashmap_info)
WizardExport void ResetLinkedListIterator (LinkedListInfo *list_info)

Define Documentation

#define MaxCapacities   20

Referenced by IncreaseHashmapCapacity().


Typedef Documentation

typedef struct _ElementInfo ElementInfo
typedef struct _EntryInfo EntryInfo

Function Documentation

WizardExport WizardBooleanType CompareHashmapString ( const void *  target,
const void *  source 
)

Definition at line 267 of file hashmap.c.

References WizardTrue, and WizardFalse.

WizardExport WizardBooleanType CompareHashmapStringInfo ( const void *  target,
const void *  source 
)

Definition at line 305 of file hashmap.c.

References CompareStringInfo(), WizardTrue, and WizardFalse.

WizardExport size_t GetNumberOfEntriesInHashmap ( const HashmapInfo hashmap_info)
WizardExport size_t HashPointerType ( const void *  pointer)

Definition at line 877 of file hashmap.c.

Referenced by NewHashmap().

WizardExport size_t HashStringInfoType ( const void *  string)

Definition at line 971 of file hashmap.c.

References GetStringInfoDatum(), and GetStringInfoLength().

WizardExport size_t HashStringType ( const void *  string)