HashMap class based on the STL map (containing serveral convenience functions). More...
#include <BALL/DATATYPE/hashMap.h>
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 | |
T & | operator[] (const Key &key) |
Return a mutable reference to the element whose key is | |
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 |
HashMap class based on the STL map (containing serveral convenience functions).
typedef BALL_MAP_NAME BALL::HashMap< Key, T >::Base |
typedef Base::const_iterator BALL::HashMap< Key, T >::ConstIterator |
Reimplemented in BALL::StringHashMap< Value >, BALL::StringHashMap< list< Position > >, BALL::StringHashMap< NameMap >, BALL::StringHashMap< JCAMPValue >, BALL::StringHashMap< Position >, BALL::StringHashMap< Atom::Type >, BALL::StringHashMap< Ring >, BALL::StringHashMap< CreateMethod >, BALL::StringHashMap< Index >, BALL::StringHashMap< List< String >::Iterator >, BALL::StringHashMap< float >, BALL::StringHashMap< double(*)(double)>, BALL::StringHashMap< RuleList >, BALL::StringHashMap< Vector3 >, BALL::StringHashMap< SectionIterator >, BALL::StringHashMap< double * >, BALL::StringHashMap< Elements_ >, BALL::StringHashMap< vector< Position > >, BALL::StringHashMap< vector< Data > >, BALL::StringHashMap< CreationMethod >, BALL::StringHashMap< EmbeddableVector >, BALL::StringHashMap< StringHashMap< StringHashMap< std::multimap< float, AtomNames_ > > > >, BALL::StringHashMap< String >, BALL::StringHashMap< GAFFCESParser * >, BALL::StringHashMap< block >, and BALL::StringHashMap< ColorRGBA >.
typedef Base::iterator BALL::HashMap< Key, T >::Iterator |
Reimplemented in BALL::StringHashMap< Value >, BALL::StringHashMap< list< Position > >, BALL::StringHashMap< NameMap >, BALL::StringHashMap< JCAMPValue >, BALL::StringHashMap< Position >, BALL::StringHashMap< Atom::Type >, BALL::StringHashMap< Ring >, BALL::StringHashMap< CreateMethod >, BALL::StringHashMap< Index >, BALL::StringHashMap< List< String >::Iterator >, BALL::StringHashMap< float >, BALL::StringHashMap< double(*)(double)>, BALL::StringHashMap< RuleList >, BALL::StringHashMap< Vector3 >, BALL::StringHashMap< SectionIterator >, BALL::StringHashMap< double * >, BALL::StringHashMap< Elements_ >, BALL::StringHashMap< vector< Position > >, BALL::StringHashMap< vector< Data > >, BALL::StringHashMap< CreationMethod >, BALL::StringHashMap< EmbeddableVector >, BALL::StringHashMap< StringHashMap< StringHashMap< std::multimap< float, AtomNames_ > > > >, BALL::StringHashMap< String >, BALL::StringHashMap< GAFFCESParser * >, BALL::StringHashMap< block >, and BALL::StringHashMap< ColorRGBA >.
typedef Key BALL::HashMap< Key, T >::KeyType |
typedef Base::value_type* BALL::HashMap< Key, T >::PointerType |
typedef Base::value_type BALL::HashMap< Key, T >::ValueType |
Reimplemented in BALL::StringHashMap< Value >, BALL::StringHashMap< list< Position > >, BALL::StringHashMap< NameMap >, BALL::StringHashMap< JCAMPValue >, BALL::StringHashMap< Position >, BALL::StringHashMap< Atom::Type >, BALL::StringHashMap< Ring >, BALL::StringHashMap< CreateMethod >, BALL::StringHashMap< Index >, BALL::StringHashMap< List< String >::Iterator >, BALL::StringHashMap< float >, BALL::StringHashMap< double(*)(double)>, BALL::StringHashMap< RuleList >, BALL::StringHashMap< Vector3 >, BALL::StringHashMap< SectionIterator >, BALL::StringHashMap< double * >, BALL::StringHashMap< Elements_ >, BALL::StringHashMap< vector< Position > >, BALL::StringHashMap< vector< Data > >, BALL::StringHashMap< CreationMethod >, BALL::StringHashMap< EmbeddableVector >, BALL::StringHashMap< StringHashMap< StringHashMap< std::multimap< float, AtomNames_ > > > >, BALL::StringHashMap< String >, BALL::StringHashMap< GAFFCESParser * >, BALL::StringHashMap< block >, and BALL::StringHashMap< ColorRGBA >.
bool BALL::HashMap< Key, T >::has | ( | const Key & | key | ) | const [inline] |
Test whether the map contains the given key.
Reimplemented in BALL::StringHashMap< Value >, BALL::StringHashMap< list< Position > >, BALL::StringHashMap< NameMap >, BALL::StringHashMap< JCAMPValue >, BALL::StringHashMap< Position >, BALL::StringHashMap< Atom::Type >, BALL::StringHashMap< Ring >, BALL::StringHashMap< CreateMethod >, BALL::StringHashMap< Index >, BALL::StringHashMap< List< String >::Iterator >, BALL::StringHashMap< float >, BALL::StringHashMap< double(*)(double)>, BALL::StringHashMap< RuleList >, BALL::StringHashMap< Vector3 >, BALL::StringHashMap< SectionIterator >, BALL::StringHashMap< double * >, BALL::StringHashMap< Elements_ >, BALL::StringHashMap< vector< Position > >, BALL::StringHashMap< vector< Data > >, BALL::StringHashMap< CreationMethod >, BALL::StringHashMap< EmbeddableVector >, BALL::StringHashMap< StringHashMap< StringHashMap< std::multimap< float, AtomNames_ > > > >, BALL::StringHashMap< String >, BALL::StringHashMap< GAFFCESParser * >, BALL::StringHashMap< block >, and BALL::StringHashMap< ColorRGBA >.
Referenced by BALL::TMolecularGraph< Node, Edge >::deleteEdge(), BALL::TMolecularGraph< Node, Edge >::deleteNode(), BALL::TMolecularGraph< Node, Edge >::has(), BALL::TMolecularGraph< Node, Edge >::newEdge(), BALL::TMolecularGraph< Node, Edge >::newNode(), and BALL::HashMap< Key, T >::operator==().
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.
References BALL::HashMap< Key, T >::has(), and BALL::HashMap< Key, T >::size().
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.
const T & BALL::HashMap< Key, T >::operator[] | ( | const Key & | key | ) | const [inline] |
Return a constant reference to the element whose key is key
.
IllegalKey | if the given key does not exist |
Size BALL::HashMap< Key, T >::size | ( | ) | const [inline] |