8 #ifndef INCLUDED_UHD_TYPES_DICT_HPP 9 #define INCLUDED_UHD_TYPES_DICT_HPP 20 template <
typename Key,
typename Val>
class dict{
33 template <
typename InputIterator>
34 dict(InputIterator first, InputIterator last);
40 std::size_t
size(
void)
const;
47 std::vector<Key>
keys(
void)
const;
54 std::vector<Val>
vals(
void)
const;
61 bool has_key(
const Key &key)
const;
69 const Val &
get(
const Key &key,
const Val &other)
const;
76 const Val &
get(
const Key &key)
const;
83 void set(
const Key &key,
const Val &val);
122 Val
pop(
const Key &key);
142 typedef std::pair<Key, Val> pair_t;
143 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:14
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