hash_table = (wxList**) NULL;
Create(the_key_type, size);
m_count = 0;
+ m_deleteContents = FALSE;
/*
n = size;
current_position = -1;
int position = (int) (k % n);
if (!hash_table[position])
+ {
hash_table[position] = new wxList (wxKEY_INTEGER);
+ if (m_deleteContents) hash_table[position]->DeleteContents(TRUE);
+ }
hash_table[position]->Append (value, object);
m_count++;
int position = (int) (k % n);
if (!hash_table[position])
+ {
hash_table[position] = new wxList (wxKEY_INTEGER);
+ if (m_deleteContents) hash_table[position]->DeleteContents(TRUE);
+ }
hash_table[position]->Append (value, object);
m_count++;
int position = (int) (k % n);
if (!hash_table[position])
+ {
hash_table[position] = new wxList (wxKEY_INTEGER);
-
+ if (m_deleteContents) hash_table[position]->DeleteContents(TRUE);
+ }
+
hash_table[position]->Append (k, object);
m_count++;
}
int position = (int) (MakeKey (key) % n);
if (!hash_table[position])
+ {
hash_table[position] = new wxList (wxKEY_STRING);
+ if (m_deleteContents) hash_table[position]->DeleteContents(TRUE);
+ }
hash_table[position]->Append (key, object);
m_count++;
void wxHashTable::DeleteContents (bool flag)
{
int i;
+ m_deleteContents = flag;
for (i = 0; i < n; i++)
{
if (hash_table[i])