Lines Matching refs:Collection
45 template <class Collection>
46 const typename Collection::value_type::second_type&
47 FindWithDefault(const Collection& collection,
48 const typename Collection::value_type::first_type& key,
49 const typename Collection::value_type::second_type& value) {
50 typename Collection::const_iterator it = collection.find(key);
60 template <class Collection>
61 const typename Collection::value_type::second_type*
62 FindOrNull(const Collection& collection,
63 const typename Collection::value_type::first_type& key) {
64 typename Collection::const_iterator it = collection.find(key);
76 template <class Collection>
77 const typename Collection::value_type::second_type
78 FindPtrOrNull(const Collection& collection,
79 const typename Collection::value_type::first_type& key) {
80 typename Collection::const_iterator it = collection.find(key);
91 template <class Collection, class Key, class Value>
92 bool InsertOrUpdate(Collection * const collection,
94 pair<typename Collection::iterator, bool> ret =
95 collection->insert(typename Collection::value_type(key, value));
108 template <class Collection, class Key, class Value>
109 bool InsertIfNotPresent(Collection * const collection,
111 pair<typename Collection::iterator, bool> ret =
112 collection->insert(typename Collection::value_type(key, value));