OPhashMap.h

KeyValuePair

  • OPchar* key
  • void* value
_____ _ _
/ ____| | | |
(___ | |_ _ __ _ _ ___| |_ ___
\___ \| __| '__| | | |/ __| __/ __|
____) | |_| | | |_| | (__| |_\__ \
\__|_| \__,_|\___|\__|___/

Bucket

  • OPuint count
  • KeyValuePair* pairs

OPhashMap

  • OPuint count
  • Bucket* buckets

Globals

Functions

  • void OPhashMapInit ( OPhashMap* hashMap, OPuint capacity )
  • OPhashMap* OPhashMapCreate ( OPuint capacity )
Creates a HashMap (Dictionary)
  • void OPhashMapDestroy ( OPhashMap* map )
Destroys an OPhashMap
  • OPint OPhashMapGet ( const OPhashMap* hashMap, const OPchar* key, void* value )
Gets a value out of an OPhashMap
  • OPint OPhashMapExists ( const OPhashMap* map, const OPchar* key )
Determines if an OPhashMap contains a value with a key
  • OPint OPhashMapPut ( OPhashMap* map, const OPchar* key, void* value )
Puts a value by a key into an OPhashMap. If all buckets have been used it will fail.
  • OPint OPhashMapCount ( const OPhashMap* map )
Gets the number of buckets being used by an OPhashMap