38 #include <OpenMS/config.h> 49 template <
class Key,
class T>
51 private std::map<Key, T>
67 IllegalKey(
const char* file,
int line,
const char*
function) :
76 typedef std::map<Key, T>
Base;
100 using typename Base::iterator;
101 using typename Base::const_iterator;
103 using typename Base::mapped_type;
104 using typename Base::value_type;
108 inline bool has(
const Key& key)
const 138 template <
class Key,
class T>
142 if (it == Base::end())
144 throw IllegalKey(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION);
152 template <
class Key,
class T>
156 if (it == Base::end())
158 it = this->insert(
ValueType(key, T())).first;
Base::value_type * PointerType
Definition: Map.h:79
Base::iterator Iterator
Definition: Map.h:80
Base::const_reverse_iterator ConstReverseIterator
Definition: Map.h:83
bool operator==(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:806
Base::reverse_iterator ReverseIterator
Definition: Map.h:82
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
Map illegal key exception.
Definition: Map.h:63
bool find(TFinder &finder, const Pattern< TNeedle, FuzzyAC > &me, PatternAuxData< TNeedle > &dh)
Definition: AhoCorasickAmbiguous.h:884
Key KeyType
Definition: Map.h:78
bool has(const Key &key) const
Test whether the map contains the given key.
Definition: Map.h:108
Exception base class.
Definition: Exception.h:89
Base::const_iterator ConstIterator
Definition: Map.h:81
std::map< Key, T > Base
Definition: Map.h:76
IllegalKey(const char *file, int line, const char *function)
Definition: Map.h:67
BaseException() noexcept
Default constructor.
bool equals(const Map< Key, T > &other) const
Definition: Map.h:124
const T & operator[](const Key &key) const
Return a constant reference to the element whose key is key.
Definition: Map.h:139
Map class based on the STL map (containing several convenience functions)
Definition: Map.h:50
Base::value_type ValueType
Definition: Map.h:77