void hashmap_iterator_remove(id self) {
    hashmap_iterator itr = cast(hashmap_iterator, self);
    hashmap hm = cast(hashmap, itr->host);
    assert (itr->aux != NULL);
    hashmap_entry curr = cast(hashmap_entry, itr->aux);
    hm->remove(hm, curr->key);
    itr->aux = NULL;
}
示例#2
0
static void removeStock(char *symbol)
{
	unsigned int	usedIndex, hashIndex, symbolHash, chainLgth;
	stock	s;

	if (hm.remove(symbol, s, symbolHash, hashIndex, usedIndex, chainLgth)) {
		cout << "removed " << left << setw(6) << symbol;
		printAdditional(symbolHash, hashIndex, usedIndex, chainLgth);
		}
	else
		cout << symbol << " not removed" << endl;
}