7 #ifndef INCLUDED_UHD_TYPES_DICT_HPP 8 #define INCLUDED_UHD_TYPES_DICT_HPP 19 template <
typename Key,
typename Val>
class dict{
32 template <
typename InputIterator>
33 dict(InputIterator first, InputIterator last);
39 std::size_t
size(
void)
const;
46 std::vector<Key>
keys(
void)
const;
53 std::vector<Val>
vals(
void)
const;
60 bool has_key(
const Key &key)
const;
68 const Val &
get(
const Key &key,
const Val &other)
const;
75 const Val &
get(
const Key &key)
const;
82 void set(
const Key &key,
const Val &val);
107 Val
pop(
const Key &key);
127 typedef std::pair<Key, Val> pair_t;
128 std::list<pair_t> _map;
const Val & operator[](const Key &key) const
Definition: dict.ipp:98
void update(const dict< Key, Val > &new_dict, bool fail_on_conflict=true)
Definition: dict.ipp:128
std::size_t size(void) const
Definition: dict.ipp:46
Val pop(const Key &key)
Definition: dict.ipp:115
dict(void)
Definition: dict.ipp:34
Definition: build_info.hpp:14
std::vector< Val > vals(void) const
Definition: dict.ipp:60
bool has_key(const Key &key) const
Definition: dict.ipp:69
std::vector< Key > keys(void) const
Definition: dict.ipp:51