diff options
author | Mike Buland <eichlan@xagasoft.com> | 2007-04-03 05:10:59 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2007-04-03 05:10:59 +0000 |
commit | 997f13ec4791adcda91cd4db41cdb5962b73d47d (patch) | |
tree | 8207c21db09f988e58684d70629d2405dc844eda /src/old/hashfunction.h | |
parent | c884da672645231b5ec47706c886381dab1b391a (diff) | |
download | libbu++-997f13ec4791adcda91cd4db41cdb5962b73d47d.tar.gz libbu++-997f13ec4791adcda91cd4db41cdb5962b73d47d.tar.bz2 libbu++-997f13ec4791adcda91cd4db41cdb5962b73d47d.tar.xz libbu++-997f13ec4791adcda91cd4db41cdb5962b73d47d.zip |
Just deleted a few things from old that definately have to go.
Diffstat (limited to '')
-rw-r--r-- | src/old/hashfunction.h | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/old/hashfunction.h b/src/old/hashfunction.h deleted file mode 100644 index cbcf70f..0000000 --- a/src/old/hashfunction.h +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | #ifndef HASH_FUNCTION | ||
2 | #define HASH_FUNCTION | ||
3 | |||
4 | /** This represents the shell of a hash function. It must be aggregated in | ||
5 | * order to be used. Please read about it's two functions for specificatins | ||
6 | * relating to what values will be passed to them and what they should return | ||
7 | * for creating your own hash functions. | ||
8 | *@author Mike Buland. | ||
9 | */ | ||
10 | class HashFunction | ||
11 | { | ||
12 | public: | ||
13 | /** | ||
14 | * Standard Constructor. | ||
15 | */ | ||
16 | HashFunction(); | ||
17 | |||
18 | /** | ||
19 | * Standard Deconstructor. | ||
20 | */ | ||
21 | virtual ~HashFunction(); | ||
22 | |||
23 | /** Hashes the value represnted by id. This must return a fairly unique | ||
24 | * number in the range of 0-2^32 (or whatever the size of an unsigned long | ||
25 | * is on your system) based on the id given. The faster the number changes | ||
26 | * the better in a general sence. The return value will be the index | ||
27 | * (after probing takes place) to the data assosiated with an id, so this | ||
28 | * function should always produce the same number for any given id. | ||
29 | *@param id The identifier to use to create a unique numerical identifier. | ||
30 | *@returns A mostly unique numerical identifier generated using the given | ||
31 | * id. | ||
32 | */ | ||
33 | virtual unsigned long int hash( const void *id ) = 0; | ||
34 | |||
35 | /** This function must compare two ids in the format that this hashfunction | ||
36 | * accepts. For example, if the hash function hashes strings it should | ||
37 | * probably { return strcmp( id1, id2 ) == 0 }. | ||
38 | *@param id1 One value to use in the comparison | ||
39 | *@param id2 Another value to use in the comparison | ||
40 | *@returns True if the two values match, otherwise false. | ||
41 | */ | ||
42 | virtual bool cmpIDs( const void *id1, const void *id2 ) = 0; | ||
43 | |||
44 | // virtual void *createPersistantID( const void *id ) = 0; | ||
45 | // virtual void destroyPersistantID( const void *id ) = 0; | ||
46 | }; | ||
47 | |||
48 | #endif | ||