BALL::HashMap< Key, T > Class Template Reference

HashMap class based on the STL map (containing serveral convenience functions). More...

#include <BALL/DATATYPE/hashMap.h>

Inheritance diagram for BALL::HashMap< Key, T >:
Inheritance graph
[legend]

List of all members.

Classes

class  IllegalKey
 HashMap illegal key exception. More...

Public Types

OpenMS style typedefs

typedef BALL_MAP_NAME Base
typedef Base::value_type ValueType
typedef Key KeyType
typedef Base::value_type * PointerType
typedef Base::iterator Iterator
typedef Base::const_iterator ConstIterator

Public Member Functions

bool has (const Key &key) const
 Test whether the map contains the given key.
const T & operator[] (const Key &key) const
 Return a constant reference to the element whose key is key.
T & operator[] (const Key &key)
 Return a mutable reference to the element whose key is key. If an element with the key key does not exist, it is inserted.
bool operator== (const HashMap< Key, T > &rhs) const
 Equality operator. Check whether two two hashmaps contain the same elements. O(n) runtime.
Size size () const

Detailed Description

template<class Key, class T>
class BALL::HashMap< Key, T >

HashMap class based on the STL map (containing serveral convenience functions).

Definition at line 180 of file hashMap.h.


Member Typedef Documentation

template<class Key, class T>
typedef BALL_MAP_NAME BALL::HashMap< Key, T >::Base

Definition at line 202 of file hashMap.h.

template<class Key, class T>
typedef Base::const_iterator BALL::HashMap< Key, T >::ConstIterator
template<class Key, class T>
typedef Base::iterator BALL::HashMap< Key, T >::Iterator
template<class Key, class T>
typedef Key BALL::HashMap< Key, T >::KeyType

Definition at line 204 of file hashMap.h.

template<class Key, class T>
typedef Base::value_type* BALL::HashMap< Key, T >::PointerType

Definition at line 205 of file hashMap.h.

template<class Key, class T>
typedef Base::value_type BALL::HashMap< Key, T >::ValueType

Member Function Documentation

template<class Key, class T>
bool BALL::HashMap< Key, T >::has ( const Key &  key  )  const [inline]
template<class Key, class T>
bool BALL::HashMap< Key, T >::operator== ( const HashMap< Key, T > &  rhs  )  const [inline]

Equality operator. Check whether two two hashmaps contain the same elements. O(n) runtime.

Definition at line 252 of file hashMap.h.

template<class Key, class T >
T & BALL::HashMap< Key, T >::operator[] ( const Key &  key  )  [inline]

Return a mutable reference to the element whose key is key. If an element with the key key does not exist, it is inserted.

Definition at line 272 of file hashMap.h.

template<class Key, class T >
const T & BALL::HashMap< Key, T >::operator[] ( const Key &  key  )  const [inline]

Return a constant reference to the element whose key is key.

Exceptions:
IllegalKey if the given key does not exist

Definition at line 237 of file hashMap.h.

template<class Key, class T>
Size BALL::HashMap< Key, T >::size (  )  const [inline]

Definition at line 229 of file hashMap.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Generated by  doxygen 1.6.3