Gainput  v1.0.0
Classes | Public Types | Public Member Functions | Static Public Attributes | List of all members
gainput::HashMap< K, V > Class Template Reference

A hash table mapping keys to POD-type values. More...

#include <GainputContainers.h>

Classes

struct  Node
 An element of the hash table. More...
 

Public Types

enum  { InvalidKey = unsigned(-1) }
 
typedef Nodeiterator
 
typedef const Nodeconst_iterator
 

Public Member Functions

 HashMap (Allocator &allocator=GetDefaultAllocator())
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
size_t size () const
 
bool empty () const
 
size_t count (const K &k) const
 
iterator find (const K &k)
 
const_iterator find (const K &k) const
 
iterator insert (const K &k, const V &v)
 
V & operator[] (const K &k)
 
size_t erase (const K &k)
 
void clear ()
 

Static Public Attributes

static const unsigned Seed = 329856235
 

Detailed Description

template<class K, class V>
class gainput::HashMap< K, V >

A hash table mapping keys to POD-type values.

Template Parameters
KThe key pointing to a value.
VPOD-type being stored in the table.

The documentation for this class was generated from the following file: