41 void add(
const Key &key,
const Value &value)
45 void add(
const Key &key, Value &&value)
47 this->
add_as(key, std::move(value));
49 void add(
Key &&key,
const Value &value)
51 this->
add_as(std::move(key), value);
55 this->
add_as(std::move(key), std::move(value));
57 template<
typename ForwardKey,
typename ForwardValue>
58 void add_as(ForwardKey &&key, ForwardValue &&value)
60 Vector<Value> &vector = map_.lookup_or_add_default_as(std::forward<ForwardKey>(key));
61 vector.
append(std::forward<ForwardValue>(value));
83 Vector<Value> &vector = map_.lookup_or_add_default_as(std::forward<ForwardKey>(key));
97 if (vector !=
nullptr) {
98 return vector->as_span();
113 if (vector !=
nullptr) {
114 return vector->as_mutable_span();
133 return map_.is_empty();
165 return map_.values();
173 return map_.values();
183 map_.clear_and_shrink();
MapType::KeyIterator keys() const
void add(const Key &key, Value &&value)
Span< bNodeLink * > lookup_as(const ForwardKey &key) const
void add(Key &&key, const Value &value)
friend bool operator==(const MultiValueMap &a, const MultiValueMap &b)=default
Span< Value > lookup(const Key &key) const
void add(Key &&key, Value &&value)
void add_non_duplicates(const Key &key, const Value &value)
void add_multiple(const Key &key, Span< Value > values)
MutableSpan< Value > lookup_as(const ForwardKey &key)
MutableSpan< Value > lookup(const Key &key)
void add_multiple(Key &&key, Span< Value > values)
MapType::ItemIterator items() const
MapType::MutableValueIterator values()
void add_multiple_as(ForwardKey &&key, Span< bNodeLink * > values)
MapType::MutableItemIterator items()
void add_as(ForwardKey &&key, ForwardValue &&value)
void add(const Key &key, const Value &value)
MapType::ValueIterator values() const
void append(const T &value)
void extend(Span< T > array)
void append_non_duplicates(const T &value)