/**

  * Class for getting an index into an array based

  * on DPNID - simple and dumb....yes....but works

  *

  * Written By Andrew Strauss 4-25-04

  *

  **/

 

/**

  * bool Hashmap::Init(int size)

  *

  * Description: Initilizes the hashmap to

  * hold the amount of items passed in.

  * Set the max size to the amount of items passed in

  * and the num of items in the map to 0.

  *

  * Return Value:

  *   true - success

  *   false - failure - bad size

  *

  **/

bool Hashmap::Init(int size)

 

/**

  * int Hashmap::Insert(DPNID id)

  *

  * Description: Inserts a DPNID into the hashmap

  *

  * Return Value:

  *   -1 if the hashmap is full, the id is null,

  *      or another error occured

  *  OR

  *   the index into the array for the DPNID

  *

  **/

int Hashmap::Insert(DPNID id)

 

/**

  * int Hashmap::Lookup(DPNID id)

  *

  * Description: Finds a DPNID into the hashmap

  *

  * Return Value:

  *   -1 if the hashmap is empty, the id is null,

  *      or the item was not found

  *  OR

  *   the index into the array for the DPNID

  *

  **/

int Hashmap::Lookup(DPNID id)

 

/**

  * int Hashmap::Remove(DPNID id)

  *

  * Description: Removes a DPNID into the hashmap

  *

  * Return Value:

  *   -1 if the hashmap is empty, the id is null,

  *      or the item was not found

  *  OR

  *   the index into the array for the DPNID

  *

  **/

int Hashmap::Remove(DPNID id)

 

/**

  * bool Hashmap::Cleanup()

  *

  * Description: deletes the array

  *

  * Return Value:

  *   true

  *

  **/

bool Hashmap::Cleanup()