CAPD RedHom Library
data_structures::HashMap< Key, Value, Hasher > Class Template Reference

#include <capd/redAlg/data_structures/hash_map.h>

Classes

class  const_iterator
 

Public Types

typedef int IntType
 
typedef std::pair< Key, Value > KeyValuePair
 

Public Member Functions

 HashMap ()
 
 HashMap (int capacity)
 
 HashMap (const HashMap &other)
 
const HashMapoperator= (const HashMap &other)
 
 ~HashMap ()
 
const_iterator begin () const
 
const_iterator end () const
 
bool empty () const
 
int size () const
 
const_iterator find (const Key &key) const
 
bool contains (const Key &key) const
 
void insert_non_existing (const Key &key, const Value &value)
 
Value & operator[] (const Key &key)
 
void erase (const Key &key)
 
void swap (HashMap &other)
 

Member Typedef Documentation

template<typename Key , typename Value , typename Hasher >
typedef int data_structures::HashMap< Key, Value, Hasher >::IntType
template<typename Key , typename Value , typename Hasher >
typedef std::pair<Key, Value> data_structures::HashMap< Key, Value, Hasher >::KeyValuePair

Constructor & Destructor Documentation

template<typename Key , typename Value , typename Hasher >
data_structures::HashMap< Key, Value, Hasher >::HashMap ( )
inline
template<typename Key , typename Value , typename Hasher >
data_structures::HashMap< Key, Value, Hasher >::HashMap ( int  capacity)
inline
template<typename Key , typename Value , typename Hasher >
data_structures::HashMap< Key, Value, Hasher >::HashMap ( const HashMap< Key, Value, Hasher > &  other)
inline
template<typename Key , typename Value , typename Hasher >
data_structures::HashMap< Key, Value, Hasher >::~HashMap ( )
inline

Member Function Documentation

template<typename Key , typename Value , typename Hasher >
const_iterator data_structures::HashMap< Key, Value, Hasher >::begin ( ) const
inline
template<typename Key , typename Value , typename Hasher >
bool data_structures::HashMap< Key, Value, Hasher >::contains ( const Key &  key) const
inline
template<typename Key , typename Value , typename Hasher >
bool data_structures::HashMap< Key, Value, Hasher >::empty ( ) const
inline
template<typename Key , typename Value , typename Hasher >
const_iterator data_structures::HashMap< Key, Value, Hasher >::end ( ) const
inline
template<typename Key , typename Value , typename Hasher >
void data_structures::HashMap< Key, Value, Hasher >::erase ( const Key &  key)
inline
template<typename Key , typename Value , typename Hasher >
const_iterator data_structures::HashMap< Key, Value, Hasher >::find ( const Key &  key) const
inline
template<typename Key , typename Value , typename Hasher >
void data_structures::HashMap< Key, Value, Hasher >::insert_non_existing ( const Key &  key,
const Value &  value 
)
inline
template<typename Key , typename Value , typename Hasher >
const HashMap& data_structures::HashMap< Key, Value, Hasher >::operator= ( const HashMap< Key, Value, Hasher > &  other)
inline
template<typename Key , typename Value , typename Hasher >
Value& data_structures::HashMap< Key, Value, Hasher >::operator[] ( const Key &  key)
inline
template<typename Key , typename Value , typename Hasher >
int data_structures::HashMap< Key, Value, Hasher >::size ( ) const
inline
template<typename Key , typename Value , typename Hasher >
void data_structures::HashMap< Key, Value, Hasher >::swap ( HashMap< Key, Value, Hasher > &  other)
inline