IBM Visualization Data Explorer Programmer's Reference

[ Bottom of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]

DXInsertHashElement

Function

Inserts an element into a hash table.

Syntax

#include <dx/dx.h>


Error DXInsertHashElement(HashTable hashtable, Element element)

Functional Details

If a hash function was provided at the time the hash table was created, then that function will be used to derive a pseudokey from the contents of element. If no hash function was provided, then the first long integer of element is assumed to be the pseudokey.

If there is already an element stored in the hash table with that pseudokey, the behavior will depend on whether or not a compare function was provided at the time the hash table was created. If one was not provided, the already-stored element will be overwritten with the new one. If a compare function was provided, then it will be used to determine whether the keys associated with the elements are in fact unique. If they are, then each will be stored, up to a maximum of 16 for a given pseudokey.

Element is defined as:

typedef Pointer Element;

Return Value

Returns OK or returns ERROR and sets an error code.

See Also

DXCreateHash

14.5 , "Hashing".


[ Top of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]
[Data Explorer Documentation | QuickStart Guide | User's Guide | User's Reference | Programmer's Reference | Installation and Configuration Guide ]

[Data Explorer Home Page]


[IBM Home Page | Order | Search | Contact IBM | Legal ]