26 #ifndef MULTIMAPWDEF_H
27 #define MULTIMAPWDEF_H
35 template <
class Key,
class T,
class Compare>
40 if (find(k) == this->end()) {
43 return (*(find(k))).second;
47 if (this->find(k) == this->end()) {
50 return (*(this->find(k))).second;
52 bool has(
const Key& k,
const T &val)
const {
53 typename std::multimap<Key, T, Compare>::const_iterator start = this->lower_bound(k);
54 typename std::multimap<Key, T, Compare>::const_iterator end = this->upper_bound(k);
55 for (; start!=end; start++) {
56 if (start->second == val)
std::pair< const Key, T > value_type
#define SWORD_NAMESPACE_START
T & getWithDefault(const Key &k, const T &defaultValue)
T & operator[](const Key &k)
bool has(const Key &k, const T &val) const
#define SWORD_NAMESPACE_END