OpenMS  2.8.0
Classes | List of all members
Map< Key, T > Class Template Reference

Map class based on the STL map (containing several convenience functions) More...

#include <OpenMS/DATASTRUCTURES/Map.h>

Inheritance diagram for Map< Key, T >:
[legend]
Collaboration diagram for Map< Key, T >:
[legend]

Classes

class  IllegalKey
 Map illegal key exception. More...
 

Public Types

OpenMS style typedefs
typedef std::map< Key, T > Base
 
typedef Base::value_type ValueType
 
typedef Key KeyType
 
typedef Base::value_type * PointerType
 
typedef Base::iterator Iterator
 
typedef Base::const_iterator ConstIterator
 
typedef Base::reverse_iterator ReverseIterator
 
typedef Base::const_reverse_iterator ConstReverseIterator
 

Public Member Functions

Export methods from private base std::vector<Acquisition>
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 equals (const Map< Key, T > &other) const
 

Detailed Description

template<class Key, class T>
class OpenMS::Map< Key, T >

Map class based on the STL map (containing several convenience functions)

Member Typedef Documentation

◆ Base

typedef std::map<Key, T> Base

◆ ConstIterator

typedef Base::const_iterator ConstIterator

◆ ConstReverseIterator

typedef Base::const_reverse_iterator ConstReverseIterator

◆ Iterator

typedef Base::iterator Iterator

◆ KeyType

typedef Key KeyType

◆ PointerType

typedef Base::value_type* PointerType

◆ ReverseIterator

typedef Base::reverse_iterator ReverseIterator

◆ ValueType

typedef Base::value_type ValueType

Member Function Documentation

◆ equals()

bool equals ( const Map< Key, T > &  other) const
inline

◆ has()

bool has ( const Key &  key) const
inline

Test whether the map contains the given key.

◆ operator[]() [1/2]

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.

◆ operator[]() [2/2]

const 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