![]() |
![]() |
![]() |
|
[
About the Wizard's Toolkit ] [ Command-line Tools ] [ Application Program Interface ] [ Install from Source Unix Windows Binary Releases Unix Windows ] [ Download ] [ Search ] [ Sponsors: ] |
AppendValueToLinkedList() appends a value to the end of the linked-list. The format of the AppendValueToLinkedList method is:
WizardBooleanType AppendValueToLinkedList(LinkedListInfo *list_info,
const void *value)
A description of each parameter follows: list_infoThe linked-list info. valueThe value. ClearLinkedList() clears all the elements from the linked-list. The format of the ClearLinkedList method is:
void ClearLinkedList(LinkedListInfo *list_info,
void *(*relinquish_value)(void *))
A description of each parameter follows: list_infoThe linked-list info. relinquish_valueThe value deallocation method; typically RelinquishWizardMemory(). Specify the CompareHashmapString() method in NewHashmap() to find an entry in a hash-map based on the contents of a string. The format of the CompareHashmapString method is:
WizardBooleanType CompareHashmapString(const void *target,
const void *source)
A description of each parameter follows: targetThe target string. sourceThe source string. Specify the CompareHashmapStringInfo() method in NewHashmap() to find an entry in a hash-map based on the contents of a string. The format of the CompareHashmapStringInfo method is:
WizardBooleanType CompareHashmapStringInfo(const void *target,
const void *source)
A description of each parameter follows: targetThe target string. sourceThe source string. DestroyHashmap() frees the hash-map and all associated resources. The format of the DestroyHashmap method is: HashmapInfo *DestroyHashmap(HashmapInfo *hashmap_info) A description of each parameter follows: hashmap_infoThe hashmap info. DestroyLinkedList() frees the linked-list and all associated resources. The format of the DestroyLinkedList method is:
LinkedListInfo *DestroyLinkedList(LinkedListInfo *list_info,
void *(*relinquish_value)(void *))
A description of each parameter follows: list_infoThe linked-list info. relinquish_valueThe value deallocation method; typically RelinquishWizardMemory(). GetLastValueInLinkedList() gets the last value in the linked-list. The format of the GetLastValueInLinkedList method is: void *GetLastValueInLinkedList(LinkedListInfo *list_info) A description of each parameter follows: list_infoThe linked_list info. GetNextKeyInHashmap() gets the next key in the hash-map. The format of the GetNextKeyInHashmap method is: void *GetNextKeyInHashmap(HashmapInfo *hashmap_info) A description of each parameter follows: hashmap_infoThe hashmap info. GetNextValueInHashmap() gets the next value in the hash-map. The format of the GetNextValueInHashmap method is: void *GetNextValueInHashmap(HashmapInfo *hashmap_info) A description of each parameter follows: hashmap_infoThe hashmap info. GetNextValueInLinkedList() gets the next value in the linked-list. The format of the GetNextValueInLinkedList method is: void *GetNextValueInLinkedList(LinkedListInfo *list_info) A description of each parameter follows: list_infoThe linked-list info. GetNumberOfEntriesInHashmap() returns the number of entries in the hash-map. The format of the GetNumberOfEntriesInHashmap method is: unsigned long GetNumberOfEntriesInHashmap(const HashmapInfo *hashmap_info) A description of each parameter follows: hashmap_infoThe hashmap info. GetNumberOfElementsInLinkedList() returns the number of entries in the linked-list. The format of the GetNumberOfElementsInLinkedList method is:
unsigned long GetNumberOfElementsInLinkedList(
const LinkedListInfo *list_info)
A description of each parameter follows: list_infoThe linked-list info. GetValueFromHashmap() gets a value from the hash-map by its key. The format of the GetValueFromHashmap method is: void *GetValueFromHashmap(HashmapInfo *hashmap_info,const void *key) A description of each parameter follows: hashmap_infoThe hashmap info. keyThe key. GetValueFromLinkedList() gets a vlaue from the linked-list by the specified location. The format of the GetValueFromLinkedList method is:
void *GetValueFromLinkedList(LinkedListInfo *list_info,
const unsigned long index)
A description of each parameter follows: list_infoThe linked_list info. indexThe list index. Specify the HashPointerType() method in NewHashmap() to find an entry in a hash-map based on the address of a pointer. The format of the HashPointerType method is: size_t HashPointerType(const void *pointer) A description of each parameter follows: pointercompute the hash entry location from this pointer address. Specify the HashStringType() method in NewHashmap() to find an entry in a hash-map based on the contents of a string. The format of the HashStringType method is: size_t HashStringType(const void *string) A description of each parameter follows: stringcompute the hash entry location from this string. Specify the HashStringInfoType() method in NewHashmap() to find an entry in a hash-map based on the contents of a string. The format of the HashStringInfoType method is: size_t HashStringInfoType(const void *string) A description of each parameter follows: stringcompute the hash entry location from this string. InsertValueInLinkedList() inserts an element in the linked-list at the specified location. The format of the InsertValueInLinkedList method is:
WizardBooleanType InsertValueInLinkedList(ListInfo *list_info,
const unsigned long index,const void *value)
A description of each parameter follows: list_infoThe hashmap info. indexThe index. valueThe value. InsertValueInSortedLinkedList() inserts a value in the sorted linked-list. The format of the InsertValueInSortedLinkedList method is:
WizardBooleanType InsertValueInSortedLinkedList(ListInfo *list_info,
int (*compare)(const void *,const void *),void **replace,
const void *value)
A description of each parameter follows: list_infoThe hashmap info. indexThe index. compareThe compare method. replacereturn previous element here. valueThe value. IsHashmapEmpty() returns WizardTrue if the hash-map is empty. The format of the IsHashmapEmpty method is: WizardBooleanType IsHashmapEmpty(const HashmapInfo *hashmap_info) A description of each parameter follows: hashmap_infoThe hashmap info. IsLinkedListEmpty() returns WizardTrue if the linked-list is empty. The format of the IsLinkedListEmpty method is: WizardBooleanType IsLinkedListEmpty(LinkedListInfo *list_info) A description of each parameter follows: list_infoThe linked-list info. LinkedListToArray() converts the linked-list to an array. The format of the LinkedListToArray method is:
WizardBooleanType LinkedListToArray(LinkedListInfo *list_info,
void **array)
A description of each parameter follows: list_infoThe linked-list info. arrayThe array. NewHashmap() returns a pointer to a HashmapInfo structure initialized to default values. The capacity is an initial estimate. The hashmap will increase capacity dynamically as the demand requires. The format of the NewHashmap method is:
HashmapInfo *NewHashmap(const unsigned long capacity,
size_t (*hash)(const void *),
WizardBooleanType (*compare)(const void *,const void *),
void *(*relinquish_key)(void *),void *(*relinquish_value)(void *))
A description of each parameter follows: capacityThe initial number entries in the hash-map: typically SmallHashmapSize, MediumHashmapSize, or LargeHashmapSize. The hashmap will dynamically increase its capacity on demand. hashThe hash method, typically HashPointerType(), HashStringType(), or HashStringInfoType(). compareThe compare method, typically NULL, CompareHashmapString(), or CompareHashmapStringInfo(). relinquish_keyThe key deallocation method, typically RelinquishWizardMemory(), called whenever a key is removed from the hash-map. relinquish_valueThe value deallocation method; typically RelinquishWizardMemory(), called whenever a value object is removed from the hash-map. NewLinkedList() returns a pointer to a LinkedListInfo structure initialized to default values. The format of the Acquirestruct LinkedListInfomethod is: LinkedListInfo *NewLinkedList(const unsigned long capacity) A description of each parameter follows: capacityThe maximum number of elements in the list. PutEntryInHashmap() puts an entry in the hash-map. If the key already exists in the map it is first removed. The format of the PutEntryInHashmap method is:
WizardBooleanType PutEntryInHashmap(HashmapInfo *hashmap_info,
const void *key,const void *value)
A description of each parameter follows: hashmap_infoThe hashmap info. keyThe key. valueThe value. RemoveElementByValueFromLinkedList() removes an element from the linked-list by value. The format of the RemoveElementByValueFromLinkedList method is:
void *RemoveElementByValueFromLinkedList(LinkedListInfo *list_info,
const void *value)
A description of each parameter follows: list_infoThe list info. valueThe value. RemoveElementFromLinkedList() removes an element from the linked-list at the specified location. The format of the RemoveElementFromLinkedList method is:
void *RemoveElementFromLinkedList(LinkedListInfo *list_info,
const unsigned long index)
A description of each parameter follows: list_infoThe linked-list info. indexThe index. RemoveEntryFromHashmap() removes an entry from the hash-map by its key. The format of the RemoveEntryFromHashmap method is: void *RemoveEntryFromHashmap(HashmapInfo *hashmap_info,void *key) A description of each parameter follows: hashmap_infoThe hashmap info. keyThe key. RemoveLastElementFromLinkedList() removes the last element from the linked-list. The format of the RemoveLastElementFromLinkedList method is: void *RemoveLastElementFromLinkedList(LinkedListInfo *list_info) A description of each parameter follows: list_infoThe linked-list info. ResetHashmapIterator() resets the hash-map iterator. Use it in conjunction with GetNextKeyInHashmap() to iterate over all the keys in the hash-map. The format of the ResetHashmapIterator method is: ResetHashmapIterator(HashmapInfo *hashmap_info) A description of each parameter follows: hashmap_infoThe hashmap info. ResetLinkedListIterator() resets the lined-list iterator. Use it in conjunction with GetNextValueInLinkedList() to iterate over all the values in the linked-list. The format of the ResetLinkedListIterator method is: ResetLinkedListIterator(LinkedListInfo *list_info) A description of each parameter follows: list_infoThe linked-list info. |