8 #ifndef INCLUDED_UHD_TYPES_DICT_HPP 9 #define INCLUDED_UHD_TYPES_DICT_HPP 21 template <
typename Key,
typename Val>
class dict 35 template <
typename InputIterator>
dict(InputIterator first, InputIterator last);
41 std::size_t
size(
void)
const;
48 std::vector<Key>
keys(
void)
const;
55 std::vector<Val>
vals(
void)
const;
62 bool has_key(
const Key& key)
const;
70 const Val&
get(
const Key& key,
const Val& other)
const;
77 const Val&
get(
const Key& key)
const;
84 void set(
const Key& key,
const Val& val);
123 Val
pop(
const Key& key);
144 operator std::map<Key, Val>()
const;
147 typedef std::pair<Key, Val> pair_t;
148 std::list<pair_t> _map;
const Val & operator[](const Key &key) const
Definition: dict.ipp:99
void update(const dict< Key, Val > &new_dict, bool fail_on_conflict=true)
Definition: dict.ipp:147
bool operator==(const dict< Key, Val > &other) const
Definition: dict.ipp:116
std::size_t size(void) const
Definition: dict.ipp:47
Val pop(const Key &key)
Definition: dict.ipp:134
dict(void)
Definition: dict.ipp:35
Definition: build_info.hpp:13
bool operator!=(const dict< Key, Val > &other) const
Definition: dict.ipp:129
std::vector< Val > vals(void) const
Definition: dict.ipp:61
bool has_key(const Key &key) const
Definition: dict.ipp:70
std::vector< Key > keys(void) const
Definition: dict.ipp:52