// //########################################################################### // AddValueImplementation //########################################################################### // void Hash::AddValueImplementation( Plug *plug, const void *value ) { Check_Object(this); Check_Object(plug); Check_Pointer(value); // //------------------------------------------------------------- // Verify that value has not been added //------------------------------------------------------------- // Verify(HasUniqueEntries() ? (FindImplementation(value) == NULL) : (bool)true); // //------------------------------------------------------------- // Find hash entry //------------------------------------------------------------- // IteratorPosition index; index = GetHashIndex(value); // //------------------------------------------------------------- // Get vchain for this index //------------------------------------------------------------- // SortedChain *vchain; Check_Pointer(hashTable); Verify_Index(index); if ((vchain = hashTable[index]) == NULL) { vchain = MakeSortedChain(); Register_Object(vchain); hashTable[index] = vchain; } // //------------------------------------------------------------- // Add to the vchain //------------------------------------------------------------- // Check_Object(vchain); vchain->AddValuePlug(plug, value); }
T Find(const V &value) {return (T)FindImplementation(&value);}
Plug* FindPlug(PCVOID value) { return FindImplementation(value); }
Plug* FindPlug(const void *value) {return FindImplementation(value);}