From f4c20290509d7ed3a8fd5304577e7a4cc0b9d974 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 3 Apr 2007 03:49:53 +0000 Subject: Ok, no code is left in src, it's all in src/old. We'll gradually move code back into src as it's fixed and re-org'd. This includes tests, which, I may write a unit test system into libbu++ just to make my life easier. --- src/hashfunction.h | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 src/hashfunction.h (limited to 'src/hashfunction.h') diff --git a/src/hashfunction.h b/src/hashfunction.h deleted file mode 100644 index cbcf70f..0000000 --- a/src/hashfunction.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef HASH_FUNCTION -#define HASH_FUNCTION - -/** This represents the shell of a hash function. It must be aggregated in - * order to be used. Please read about it's two functions for specificatins - * relating to what values will be passed to them and what they should return - * for creating your own hash functions. - *@author Mike Buland. - */ -class HashFunction -{ -public: - /** - * Standard Constructor. - */ - HashFunction(); - - /** - * Standard Deconstructor. - */ - virtual ~HashFunction(); - - /** Hashes the value represnted by id. This must return a fairly unique - * number in the range of 0-2^32 (or whatever the size of an unsigned long - * is on your system) based on the id given. The faster the number changes - * the better in a general sence. The return value will be the index - * (after probing takes place) to the data assosiated with an id, so this - * function should always produce the same number for any given id. - *@param id The identifier to use to create a unique numerical identifier. - *@returns A mostly unique numerical identifier generated using the given - * id. - */ - virtual unsigned long int hash( const void *id ) = 0; - - /** This function must compare two ids in the format that this hashfunction - * accepts. For example, if the hash function hashes strings it should - * probably { return strcmp( id1, id2 ) == 0 }. - *@param id1 One value to use in the comparison - *@param id2 Another value to use in the comparison - *@returns True if the two values match, otherwise false. - */ - virtual bool cmpIDs( const void *id1, const void *id2 ) = 0; - -// virtual void *createPersistantID( const void *id ) = 0; -// virtual void destroyPersistantID( const void *id ) = 0; -}; - -#endif -- cgit v1.2.3