Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Classes | Public Member Functions | 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 >:

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

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
 

Additional Inherited Members

- Private Attributes inherited from map< K, T >
keys
 STL member. More...
 
elements
 STL member. More...
 

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

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

Member Function Documentation

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

Test whether the map contains the given key.

Referenced by MzMLHandler< MapType >::writeHeader_(), and MzDataHandler< MapType >::writeTo().

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
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.


OpenMS / TOPP release 2.0.0 Documentation generated on Wed Mar 30 2016 16:18:45 using doxygen 1.8.5