diff options
| author | Mike Wey | 2011-01-08 17:48:30 +0100 |
|---|---|---|
| committer | Mike Wey | 2011-01-08 17:48:30 +0100 |
| commit | cbac78bbec726017355cb455a776f193e7fc3022 (patch) | |
| tree | a41c564c7ef5aec9dd2b18e58e94b213193044be /dmagick/c/hashmap.d | |
initial checkin
Diffstat (limited to 'dmagick/c/hashmap.d')
| -rw-r--r-- | dmagick/c/hashmap.d | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/dmagick/c/hashmap.d b/dmagick/c/hashmap.d new file mode 100644 index 0000000..a0bcfb2 --- /dev/null +++ b/dmagick/c/hashmap.d @@ -0,0 +1,47 @@ +module dmagick.c.hashmap; + +import dmagick.c.magickType; + +extern(C) +{ + struct HashmapInfo {} + + struct LinkedListInfo {} + + HashmapInfo* DestroyHashmap(HashmapInfo*); + HashmapInfo* NewHashmap(const size_t, size_t function(const void*), + MagickBooleanType function(const void*, const void*), void* function(void*), void* function(void*)); + + LinkedListInfo* DestroyLinkedList(LinkedListInfo*, void* function(void*)); + LinkedListInfo* NewLinkedList(const size_t); + + MagickBooleanType AppendValueToLinkedList(LinkedListInfo*, const void*); + MagickBooleanType CompareHashmapString(const void*, const void*); + MagickBooleanType CompareHashmapStringInfo(const void*, const void*); + MagickBooleanType InsertValueInLinkedList(LinkedListInfo*, const size_t, const void*); + MagickBooleanType InsertValueInSortedLinkedList(LinkedListInfo*, int function(const void*, const void*), void**, const void*); + MagickBooleanType IsHashmapEmpty(const HashmapInfo*); + MagickBooleanType IsLinkedListEmpty(const LinkedListInfo*); + MagickBooleanType LinkedListToArray(LinkedListInfo*, void**); + MagickBooleanType PutEntryInHashmap(HashmapInfo*, const void*, const void*); + + size_t GetNumberOfElementsInLinkedList(const LinkedListInfo*); + size_t GetNumberOfEntriesInHashmap(const HashmapInfo*); + size_t HashPointerType(const void*); + size_t HashStringType(const void*); + size_t HashStringInfoType(const void*); + + void ClearLinkedList(LinkedListInfo*, void* function(void*)); + void* GetLastValueInLinkedList(LinkedListInfo*); + void* GetNextKeyInHashmap(HashmapInfo*); + void* GetNextValueInHashmap(HashmapInfo*); + void* GetNextValueInLinkedList(LinkedListInfo*); + void* GetValueFromHashmap(HashmapInfo*, const void*); + void* GetValueFromLinkedList(LinkedListInfo*, const size_t); + void* RemoveElementByValueFromLinkedList(LinkedListInfo*, const void*); + void* RemoveElementFromLinkedList(LinkedListInfo*, const size_t); + void* RemoveEntryFromHashmap(HashmapInfo*, const void*); + void* RemoveLastElementFromLinkedList(LinkedListInfo*); + void ResetHashmapIterator(HashmapInfo*); + void ResetLinkedListIterator(LinkedListInfo*); +} |
