[email protected] | 4bc4f12 | 2011-03-08 02:07:29 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 4 | |
Brett Wilson | f976d3f | 2017-08-18 17:23:39 | [diff] [blame] | 5 | #ifndef BASE_CONTAINERS_ID_MAP_H_ |
| 6 | #define BASE_CONTAINERS_ID_MAP_H_ |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 7 | |
avi | 9b6f4293 | 2015-12-26 22:15:14 | [diff] [blame] | 8 | #include <stddef.h> |
jkarlin | 7bc034c | 2015-09-25 20:45:47 | [diff] [blame] | 9 | #include <stdint.h> |
brettw | 1ce49f6 | 2017-04-27 19:42:32 | [diff] [blame] | 10 | |
aelias | aed214d0 | 2016-09-24 01:26:42 | [diff] [blame] | 11 | #include <memory> |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 12 | #include <set> |
aelias | aed214d0 | 2016-09-24 01:26:42 | [diff] [blame] | 13 | #include <type_traits> |
brettw | 1ce49f6 | 2017-04-27 19:42:32 | [diff] [blame] | 14 | #include <unordered_map> |
aelias | aed214d0 | 2016-09-24 01:26:42 | [diff] [blame] | 15 | #include <utility> |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 16 | |
Hans Wennborg | 7b53371 | 2020-06-22 20:52:27 | [diff] [blame] | 17 | #include "base/check_op.h" |
brettw | 1ce49f6 | 2017-04-27 19:42:32 | [diff] [blame] | 18 | #include "base/containers/flat_set.h" |
Keishi Hattori | 0e45c02 | 2021-11-27 09:25:52 | [diff] [blame^] | 19 | #include "base/memory/raw_ptr.h" |
Hans Wennborg | 7b53371 | 2020-06-22 20:52:27 | [diff] [blame] | 20 | #include "base/notreached.h" |
jsbell | 41359ee | 2015-11-16 19:43:34 | [diff] [blame] | 21 | #include "base/sequence_checker.h" |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 22 | |
Brett Wilson | f976d3f | 2017-08-18 17:23:39 | [diff] [blame] | 23 | namespace base { |
| 24 | |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 25 | // This object maintains a list of IDs that can be quickly converted to |
| 26 | // pointers to objects. It is implemented as a hash table, optimized for |
| 27 | // relatively small data sets (in the common case, there will be exactly one |
| 28 | // item in the list). |
| 29 | // |
| 30 | // Items can be inserted into the container with arbitrary ID, but the caller |
| 31 | // must ensure they are unique. Inserting IDs and relying on automatically |
| 32 | // generated ones is not allowed because they can collide. |
rlanday | de24c6d | 2016-12-01 03:05:40 | [diff] [blame] | 33 | |
| 34 | // The map's value type (the V param) can be any dereferenceable type, such as a |
| 35 | // raw pointer or smart pointer |
| 36 | template <typename V, typename K = int32_t> |
| 37 | class IDMap final { |
[email protected] | b8b67081 | 2014-05-27 18:10:06 | [diff] [blame] | 38 | public: |
jkarlin | 7bc034c | 2015-09-25 20:45:47 | [diff] [blame] | 39 | using KeyType = K; |
[email protected] | b8b67081 | 2014-05-27 18:10:06 | [diff] [blame] | 40 | |
| 41 | private: |
rlanday | de24c6d | 2016-12-01 03:05:40 | [diff] [blame] | 42 | using T = typename std::remove_reference<decltype(*V())>::type; |
brettw | 1ce49f6 | 2017-04-27 19:42:32 | [diff] [blame] | 43 | |
| 44 | using HashTable = std::unordered_map<KeyType, V>; |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 45 | |
| 46 | public: |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 47 | IDMap() : iteration_depth_(0), next_id_(1), check_on_null_data_(false) { |
jsbell | 41359ee | 2015-11-16 19:43:34 | [diff] [blame] | 48 | // A number of consumers of IDMap create it on one thread but always |
| 49 | // access it from a different, but consistent, thread (or sequence) |
fdoray | e2b19a1 | 2016-07-29 02:30:16 | [diff] [blame] | 50 | // post-construction. The first call to CalledOnValidSequence() will re-bind |
| 51 | // it. |
tzik | fd754ee | 2018-03-28 15:49:28 | [diff] [blame] | 52 | DETACH_FROM_SEQUENCE(sequence_checker_); |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 53 | } |
| 54 | |
Lei Zhang | 6825df46 | 2020-06-23 16:17:43 | [diff] [blame] | 55 | IDMap(const IDMap&) = delete; |
| 56 | IDMap& operator=(const IDMap&) = delete; |
| 57 | |
[email protected] | 9e7e0e0 | 2010-01-25 23:25:16 | [diff] [blame] | 58 | ~IDMap() { |
jsbell | 41359ee | 2015-11-16 19:43:34 | [diff] [blame] | 59 | // Many IDMap's are static, and hence will be destroyed on the main |
| 60 | // thread. However, all the accesses may take place on another thread (or |
| 61 | // sequence), such as the IO thread. Detaching again to clean this up. |
tzik | fd754ee | 2018-03-28 15:49:28 | [diff] [blame] | 62 | DETACH_FROM_SEQUENCE(sequence_checker_); |
[email protected] | 9e7e0e0 | 2010-01-25 23:25:16 | [diff] [blame] | 63 | } |
| 64 | |
michaeln | bfea6ec | 2014-12-09 23:16:13 | [diff] [blame] | 65 | // Sets whether Add and Replace should DCHECK if passed in NULL data. |
| 66 | // Default is false. |
[email protected] | a6ed943 | 2009-07-01 22:35:26 | [diff] [blame] | 67 | void set_check_on_null_data(bool value) { check_on_null_data_ = value; } |
| 68 | |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 69 | // Adds a view with an automatically generated unique ID. See AddWithID. |
rlanday | 6eada032 | 2016-11-30 18:59:30 | [diff] [blame] | 70 | KeyType Add(V data) { return AddInternal(std::move(data)); } |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 71 | |
| 72 | // Adds a new data member with the specified ID. The ID must not be in |
| 73 | // the list. The caller either must generate all unique IDs itself and use |
| 74 | // this function, or allow this object to generate IDs and call Add. These |
aelias | aed214d0 | 2016-09-24 01:26:42 | [diff] [blame] | 75 | // two methods may not be mixed, or duplicate IDs may be generated. |
rlanday | 6eada032 | 2016-11-30 18:59:30 | [diff] [blame] | 76 | void AddWithID(V data, KeyType id) { AddWithIDInternal(std::move(data), id); } |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 77 | |
[email protected] | 9e7e0e0 | 2010-01-25 23:25:16 | [diff] [blame] | 78 | void Remove(KeyType id) { |
tzik | fd754ee | 2018-03-28 15:49:28 | [diff] [blame] | 79 | DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 80 | typename HashTable::iterator i = data_.find(id); |
tzik | d164667 | 2018-03-28 20:41:13 | [diff] [blame] | 81 | if (i == data_.end() || IsRemoved(id)) { |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 82 | NOTREACHED() << "Attempting to remove an item not in the list"; |
| 83 | return; |
| 84 | } |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 85 | |
[email protected] | 9e7e0e0 | 2010-01-25 23:25:16 | [diff] [blame] | 86 | if (iteration_depth_ == 0) { |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 87 | data_.erase(i); |
[email protected] | 9e7e0e0 | 2010-01-25 23:25:16 | [diff] [blame] | 88 | } else { |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 89 | removed_ids_.insert(id); |
[email protected] | 9e7e0e0 | 2010-01-25 23:25:16 | [diff] [blame] | 90 | } |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 91 | } |
| 92 | |
sungmann.cho | 82e601f9 | 2017-02-17 04:43:13 | [diff] [blame] | 93 | // Replaces the value for |id| with |new_data| and returns the existing value. |
| 94 | // Should only be called with an already added id. |
aelias | aed214d0 | 2016-09-24 01:26:42 | [diff] [blame] | 95 | V Replace(KeyType id, V new_data) { |
tzik | fd754ee | 2018-03-28 15:49:28 | [diff] [blame] | 96 | DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); |
michaeln | bfea6ec | 2014-12-09 23:16:13 | [diff] [blame] | 97 | DCHECK(!check_on_null_data_ || new_data); |
| 98 | typename HashTable::iterator i = data_.find(id); |
aelias | aed214d0 | 2016-09-24 01:26:42 | [diff] [blame] | 99 | DCHECK(i != data_.end()); |
tzik | d164667 | 2018-03-28 20:41:13 | [diff] [blame] | 100 | DCHECK(!IsRemoved(id)); |
michaeln | bfea6ec | 2014-12-09 23:16:13 | [diff] [blame] | 101 | |
tzik | d164667 | 2018-03-28 20:41:13 | [diff] [blame] | 102 | using std::swap; |
| 103 | swap(i->second, new_data); |
aelias | aed214d0 | 2016-09-24 01:26:42 | [diff] [blame] | 104 | return new_data; |
michaeln | bfea6ec | 2014-12-09 23:16:13 | [diff] [blame] | 105 | } |
| 106 | |
[email protected] | fea0b961 | 2012-10-29 21:36:22 | [diff] [blame] | 107 | void Clear() { |
tzik | fd754ee | 2018-03-28 15:49:28 | [diff] [blame] | 108 | DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); |
[email protected] | fea0b961 | 2012-10-29 21:36:22 | [diff] [blame] | 109 | if (iteration_depth_ == 0) { |
aelias | aed214d0 | 2016-09-24 01:26:42 | [diff] [blame] | 110 | data_.clear(); |
[email protected] | fea0b961 | 2012-10-29 21:36:22 | [diff] [blame] | 111 | } else { |
tzik | c5837e2 | 2018-03-29 05:31:15 | [diff] [blame] | 112 | removed_ids_.reserve(data_.size()); |
| 113 | removed_ids_.insert(KeyIterator(data_.begin()), KeyIterator(data_.end())); |
[email protected] | fea0b961 | 2012-10-29 21:36:22 | [diff] [blame] | 114 | } |
| 115 | } |
| 116 | |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 117 | bool IsEmpty() const { |
tzik | fd754ee | 2018-03-28 15:49:28 | [diff] [blame] | 118 | DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); |
[email protected] | 2de069e | 2010-02-16 09:15:38 | [diff] [blame] | 119 | return size() == 0u; |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 120 | } |
| 121 | |
[email protected] | 9e7e0e0 | 2010-01-25 23:25:16 | [diff] [blame] | 122 | T* Lookup(KeyType id) const { |
tzik | fd754ee | 2018-03-28 15:49:28 | [diff] [blame] | 123 | DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 124 | typename HashTable::const_iterator i = data_.find(id); |
tzik | d164667 | 2018-03-28 20:41:13 | [diff] [blame] | 125 | if (i == data_.end() || !i->second || IsRemoved(id)) |
aelias | aed214d0 | 2016-09-24 01:26:42 | [diff] [blame] | 126 | return nullptr; |
| 127 | return &*i->second; |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 128 | } |
| 129 | |
| 130 | size_t size() const { |
tzik | fd754ee | 2018-03-28 15:49:28 | [diff] [blame] | 131 | DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); |
[email protected] | 2de069e | 2010-02-16 09:15:38 | [diff] [blame] | 132 | return data_.size() - removed_ids_.size(); |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 133 | } |
| 134 | |
[email protected] | 0c8b894 | 2012-10-27 01:03:01 | [diff] [blame] | 135 | #if defined(UNIT_TEST) |
| 136 | int iteration_depth() const { |
| 137 | return iteration_depth_; |
| 138 | } |
| 139 | #endif // defined(UNIT_TEST) |
| 140 | |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 141 | // It is safe to remove elements from the map during iteration. All iterators |
| 142 | // will remain valid. |
| 143 | template<class ReturnType> |
| 144 | class Iterator { |
| 145 | public: |
rlanday | de24c6d | 2016-12-01 03:05:40 | [diff] [blame] | 146 | Iterator(IDMap<V, K>* map) : map_(map), iter_(map_->data_.begin()) { |
[email protected] | 0c8b894 | 2012-10-27 01:03:01 | [diff] [blame] | 147 | Init(); |
| 148 | } |
| 149 | |
| 150 | Iterator(const Iterator& iter) |
| 151 | : map_(iter.map_), |
| 152 | iter_(iter.iter_) { |
| 153 | Init(); |
| 154 | } |
| 155 | |
| 156 | const Iterator& operator=(const Iterator& iter) { |
| 157 | map_ = iter.map; |
| 158 | iter_ = iter.iter; |
| 159 | Init(); |
| 160 | return *this; |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 161 | } |
| 162 | |
| 163 | ~Iterator() { |
tzik | fd754ee | 2018-03-28 15:49:28 | [diff] [blame] | 164 | DCHECK_CALLED_ON_VALID_SEQUENCE(map_->sequence_checker_); |
[email protected] | 0c8b894 | 2012-10-27 01:03:01 | [diff] [blame] | 165 | |
| 166 | // We're going to decrement iteration depth. Make sure it's greater than |
| 167 | // zero so that it doesn't become negative. |
| 168 | DCHECK_LT(0, map_->iteration_depth_); |
| 169 | |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 170 | if (--map_->iteration_depth_ == 0) |
| 171 | map_->Compact(); |
| 172 | } |
| 173 | |
| 174 | bool IsAtEnd() const { |
tzik | fd754ee | 2018-03-28 15:49:28 | [diff] [blame] | 175 | DCHECK_CALLED_ON_VALID_SEQUENCE(map_->sequence_checker_); |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 176 | return iter_ == map_->data_.end(); |
| 177 | } |
| 178 | |
[email protected] | 9e7e0e0 | 2010-01-25 23:25:16 | [diff] [blame] | 179 | KeyType GetCurrentKey() const { |
tzik | fd754ee | 2018-03-28 15:49:28 | [diff] [blame] | 180 | DCHECK_CALLED_ON_VALID_SEQUENCE(map_->sequence_checker_); |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 181 | return iter_->first; |
| 182 | } |
| 183 | |
| 184 | ReturnType* GetCurrentValue() const { |
tzik | fd754ee | 2018-03-28 15:49:28 | [diff] [blame] | 185 | DCHECK_CALLED_ON_VALID_SEQUENCE(map_->sequence_checker_); |
tzik | d164667 | 2018-03-28 20:41:13 | [diff] [blame] | 186 | if (!iter_->second || map_->IsRemoved(iter_->first)) |
| 187 | return nullptr; |
aelias | aed214d0 | 2016-09-24 01:26:42 | [diff] [blame] | 188 | return &*iter_->second; |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 189 | } |
| 190 | |
| 191 | void Advance() { |
tzik | fd754ee | 2018-03-28 15:49:28 | [diff] [blame] | 192 | DCHECK_CALLED_ON_VALID_SEQUENCE(map_->sequence_checker_); |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 193 | ++iter_; |
| 194 | SkipRemovedEntries(); |
| 195 | } |
| 196 | |
| 197 | private: |
[email protected] | 0c8b894 | 2012-10-27 01:03:01 | [diff] [blame] | 198 | void Init() { |
tzik | fd754ee | 2018-03-28 15:49:28 | [diff] [blame] | 199 | DCHECK_CALLED_ON_VALID_SEQUENCE(map_->sequence_checker_); |
[email protected] | 0c8b894 | 2012-10-27 01:03:01 | [diff] [blame] | 200 | ++map_->iteration_depth_; |
| 201 | SkipRemovedEntries(); |
| 202 | } |
| 203 | |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 204 | void SkipRemovedEntries() { |
tzik | d164667 | 2018-03-28 20:41:13 | [diff] [blame] | 205 | while (iter_ != map_->data_.end() && map_->IsRemoved(iter_->first)) |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 206 | ++iter_; |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 207 | } |
| 208 | |
Keishi Hattori | 0e45c02 | 2021-11-27 09:25:52 | [diff] [blame^] | 209 | raw_ptr<IDMap<V, K>> map_; |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 210 | typename HashTable::const_iterator iter_; |
| 211 | }; |
| 212 | |
| 213 | typedef Iterator<T> iterator; |
| 214 | typedef Iterator<const T> const_iterator; |
| 215 | |
| 216 | private: |
tzik | c5837e2 | 2018-03-29 05:31:15 | [diff] [blame] | 217 | // Transforms a map iterator to an iterator on the keys of the map. |
| 218 | // Used by Clear() to populate |removed_ids_| in bulk. |
| 219 | struct KeyIterator : std::iterator<std::forward_iterator_tag, KeyType> { |
| 220 | using inner_iterator = typename HashTable::iterator; |
| 221 | inner_iterator iter_; |
| 222 | |
| 223 | KeyIterator(inner_iterator iter) : iter_(iter) {} |
| 224 | KeyType operator*() const { return iter_->first; } |
| 225 | KeyIterator& operator++() { |
| 226 | ++iter_; |
| 227 | return *this; |
| 228 | } |
| 229 | KeyIterator operator++(int) { return KeyIterator(iter_++); } |
| 230 | bool operator==(const KeyIterator& other) const { |
| 231 | return iter_ == other.iter_; |
| 232 | } |
| 233 | bool operator!=(const KeyIterator& other) const { |
| 234 | return iter_ != other.iter_; |
| 235 | } |
| 236 | }; |
| 237 | |
aelias | aed214d0 | 2016-09-24 01:26:42 | [diff] [blame] | 238 | KeyType AddInternal(V data) { |
tzik | fd754ee | 2018-03-28 15:49:28 | [diff] [blame] | 239 | DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); |
aelias | aed214d0 | 2016-09-24 01:26:42 | [diff] [blame] | 240 | DCHECK(!check_on_null_data_ || data); |
| 241 | KeyType this_id = next_id_; |
| 242 | DCHECK(data_.find(this_id) == data_.end()) << "Inserting duplicate item"; |
| 243 | data_[this_id] = std::move(data); |
| 244 | next_id_++; |
| 245 | return this_id; |
| 246 | } |
[email protected] | 9e7e0e0 | 2010-01-25 23:25:16 | [diff] [blame] | 247 | |
aelias | aed214d0 | 2016-09-24 01:26:42 | [diff] [blame] | 248 | void AddWithIDInternal(V data, KeyType id) { |
tzik | fd754ee | 2018-03-28 15:49:28 | [diff] [blame] | 249 | DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); |
aelias | aed214d0 | 2016-09-24 01:26:42 | [diff] [blame] | 250 | DCHECK(!check_on_null_data_ || data); |
tzik | d164667 | 2018-03-28 20:41:13 | [diff] [blame] | 251 | if (IsRemoved(id)) { |
| 252 | removed_ids_.erase(id); |
| 253 | } else { |
| 254 | DCHECK(data_.find(id) == data_.end()) << "Inserting duplicate item"; |
| 255 | } |
aelias | aed214d0 | 2016-09-24 01:26:42 | [diff] [blame] | 256 | data_[id] = std::move(data); |
| 257 | } |
[email protected] | 9e7e0e0 | 2010-01-25 23:25:16 | [diff] [blame] | 258 | |
tzik | d164667 | 2018-03-28 20:41:13 | [diff] [blame] | 259 | bool IsRemoved(KeyType key) const { |
| 260 | return removed_ids_.find(key) != removed_ids_.end(); |
| 261 | } |
| 262 | |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 263 | void Compact() { |
| 264 | DCHECK_EQ(0, iteration_depth_); |
jkarlin | 7bc034c | 2015-09-25 20:45:47 | [diff] [blame] | 265 | for (const auto& i : removed_ids_) |
tzik | d164667 | 2018-03-28 20:41:13 | [diff] [blame] | 266 | data_.erase(i); |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 267 | removed_ids_.clear(); |
| 268 | } |
| 269 | |
| 270 | // Keep track of how many iterators are currently iterating on us to safely |
| 271 | // handle removing items during iteration. |
| 272 | int iteration_depth_; |
| 273 | |
| 274 | // Keep set of IDs that should be removed after the outermost iteration has |
| 275 | // finished. This way we manage to not invalidate the iterator when an element |
| 276 | // is removed. |
brettw | 1ce49f6 | 2017-04-27 19:42:32 | [diff] [blame] | 277 | base::flat_set<KeyType> removed_ids_; |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 278 | |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 279 | // The next ID that we will return from Add() |
[email protected] | 9e7e0e0 | 2010-01-25 23:25:16 | [diff] [blame] | 280 | KeyType next_id_; |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 281 | |
| 282 | HashTable data_; |
[email protected] | a6ed943 | 2009-07-01 22:35:26 | [diff] [blame] | 283 | |
[email protected] | a6ed943 | 2009-07-01 22:35:26 | [diff] [blame] | 284 | // See description above setter. |
| 285 | bool check_on_null_data_; |
[email protected] | 9de09f8 | 2009-08-17 20:13:53 | [diff] [blame] | 286 | |
tzik | fd754ee | 2018-03-28 15:49:28 | [diff] [blame] | 287 | SEQUENCE_CHECKER(sequence_checker_); |
initial.commit | d7cae12 | 2008-07-26 21:49:38 | [diff] [blame] | 288 | }; |
| 289 | |
Brett Wilson | f976d3f | 2017-08-18 17:23:39 | [diff] [blame] | 290 | } // namespace base |
| 291 | |
| 292 | #endif // BASE_CONTAINERS_ID_MAP_H_ |