| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2008 David Levin <levin@chromium.org> | 3 * Copyright (C) 2008 David Levin <levin@chromium.org> |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 // allowed unless you supply custom key traits. | 346 // allowed unless you supply custom key traits. |
| 347 template <typename Key, typename Value, typename Extractor, typename HashFunctio
ns, typename Traits, typename KeyTraits, typename Allocator> | 347 template <typename Key, typename Value, typename Extractor, typename HashFunctio
ns, typename Traits, typename KeyTraits, typename Allocator> |
| 348 class HashTable final : public ConditionalDestructor<HashTable<Key, Value, Extra
ctor, HashFunctions, Traits, KeyTraits, Allocator>, Allocator::isGarbageCollecte
d> { | 348 class HashTable final : public ConditionalDestructor<HashTable<Key, Value, Extra
ctor, HashFunctions, Traits, KeyTraits, Allocator>, Allocator::isGarbageCollecte
d> { |
| 349 DISALLOW_NEW(); | 349 DISALLOW_NEW(); |
| 350 public: | 350 public: |
| 351 typedef HashTableIterator<Key, Value, Extractor, HashFunctions, Traits, KeyT
raits, Allocator> iterator; | 351 typedef HashTableIterator<Key, Value, Extractor, HashFunctions, Traits, KeyT
raits, Allocator> iterator; |
| 352 typedef HashTableConstIterator<Key, Value, Extractor, HashFunctions, Traits,
KeyTraits, Allocator> const_iterator; | 352 typedef HashTableConstIterator<Key, Value, Extractor, HashFunctions, Traits,
KeyTraits, Allocator> const_iterator; |
| 353 typedef Traits ValueTraits; | 353 typedef Traits ValueTraits; |
| 354 typedef Key KeyType; | 354 typedef Key KeyType; |
| 355 typedef typename KeyTraits::PeekInType KeyPeekInType; | 355 typedef typename KeyTraits::PeekInType KeyPeekInType; |
| 356 typedef typename KeyTraits::PassInType KeyPassInType; | |
| 357 typedef Value ValueType; | 356 typedef Value ValueType; |
| 358 typedef Extractor ExtractorType; | 357 typedef Extractor ExtractorType; |
| 359 typedef KeyTraits KeyTraitsType; | 358 typedef KeyTraits KeyTraitsType; |
| 360 typedef typename Traits::PassInType ValuePassInType; | |
| 361 typedef IdentityHashTranslator<HashFunctions> IdentityTranslatorType; | 359 typedef IdentityHashTranslator<HashFunctions> IdentityTranslatorType; |
| 362 typedef HashTableAddResult<HashTable, ValueType> AddResult; | 360 typedef HashTableAddResult<HashTable, ValueType> AddResult; |
| 363 | 361 |
| 364 #if DUMP_HASHTABLE_STATS_PER_TABLE | 362 #if DUMP_HASHTABLE_STATS_PER_TABLE |
| 365 struct Stats { | 363 struct Stats { |
| 366 DISALLOW_NEW(Stats); | 364 DISALLOW_NEW(Stats); |
| 367 Stats() | 365 Stats() |
| 368 : numAccesses(0) | 366 : numAccesses(0) |
| 369 , numRehashes(0) | 367 , numRehashes(0) |
| 370 , numRemoves(0) | 368 , numRemoves(0) |
| (...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1522 CollectionIterator end(toBeRemoved.end()); | 1520 CollectionIterator end(toBeRemoved.end()); |
| 1523 for (CollectionIterator it(toBeRemoved.begin()); it != end; ++it) | 1521 for (CollectionIterator it(toBeRemoved.begin()); it != end; ++it) |
| 1524 collection.remove(*it); | 1522 collection.remove(*it); |
| 1525 } | 1523 } |
| 1526 | 1524 |
| 1527 } // namespace WTF | 1525 } // namespace WTF |
| 1528 | 1526 |
| 1529 #include "wtf/HashIterators.h" | 1527 #include "wtf/HashIterators.h" |
| 1530 | 1528 |
| 1531 #endif // WTF_HashTable_h | 1529 #endif // WTF_HashTable_h |
| OLD | NEW |