BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Member Functions | List of all members
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 >:
BALL::StringHashMap< BALL::Atom::Type > BALL::StringHashMap< BALL::GAFFCESParser * > BALL::StringHashMap< BALL::GAMESSDatFile::block > BALL::StringHashMap< BALL::HybridisationProcessor::Elements_ > BALL::StringHashMap< BALL::JohnsonBoveyShiftProcessor::Ring > BALL::StringHashMap< BALL::String > BALL::StringHashMap< BALL::StringHashMap< BALL::StringHashMap< std::multimap< float, BALL::HybridisationProcessor::AtomNames_ > > > > BALL::StringHashMap< BALL::TVector3 > BALL::StringHashMap< BALL::VIEW::ColorRGBA > BALL::StringHashMap< BALL_INDEX_TYPE > BALL::StringHashMap< BALL_SIZE_TYPE > BALL::StringHashMap< boost::shared_ptr< BALL::BondOrderAssignmentStrategy > > BALL::StringHashMap< CreateMethod > BALL::StringHashMap< CreationMethod > BALL::StringHashMap< double * > BALL::StringHashMap< double(*)(double)> BALL::StringHashMap< EmbeddableVector > BALL::StringHashMap< float > BALL::StringHashMap< JCAMPValue > BALL::StringHashMap< list< BALL_SIZE_TYPE > > BALL::StringHashMap< RuleList > BALL::StringHashMap< SectionIterator > BALL::StringHashMap< std::list< BALL::String >::iterator > BALL::StringHashMap< String > BALL::StringHashMap< StringHashMap< String > > BALL::StringHashMap< vector< BALL::ResidueTorsions::Data > > BALL::StringHashMap< vector< BALL_SIZE_TYPE > >

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. More...
 
const T & operator[] (const Key &key) const
 Return a constant reference to the element whose key is key. More...
 
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. More...
 
bool operator== (const HashMap< Key, T > &rhs) const
 Equality operator. Check whether two two hashmaps contain the same elements. O(n) runtime. More...
 
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

Definition at line 207 of file hashMap.h.

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

Definition at line 206 of file hashMap.h.

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

Definition at line 203 of file hashMap.h.

Member Function Documentation

template<class Key, class T>
bool BALL::HashMap< Key, T >::has ( const Key &  key) const
inline

Test whether the map contains the given key.

Definition at line 211 of file hashMap.h.

template<class Key, class T>
bool BALL::HashMap< Key, T >::operator== ( const HashMap< Key, T > &  rhs) const

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 >
const T & BALL::HashMap< Key, T >::operator[] ( const Key &  key) const

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

Exceptions
IllegalKeyif the given key does not exist

Definition at line 237 of file hashMap.h.

template<class Key, class T >
T & BALL::HashMap< 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.

Definition at line 272 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.