OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // in the table. HashTranslator must have the following function members
: | 147 // in the table. HashTranslator must have the following function members
: |
148 // static unsigned hash(const T&); | 148 // static unsigned hash(const T&); |
149 // static bool equal(const ValueType&, const T&); | 149 // static bool equal(const ValueType&, const T&); |
150 // static translate(ValueType&, const T&, unsigned hashCode); | 150 // static translate(ValueType&, const T&, unsigned hashCode); |
151 template<typename HashTranslator, typename T> AddResult add(const T&, Ma
ppedPassInType); | 151 template<typename HashTranslator, typename T> AddResult add(const T&, Ma
ppedPassInType); |
152 | 152 |
153 static bool isValidKey(KeyPeekInType); | 153 static bool isValidKey(KeyPeekInType); |
154 | 154 |
155 void trace(typename Allocator::Visitor* visitor) { m_impl.trace(visitor)
; } | 155 void trace(typename Allocator::Visitor* visitor) { m_impl.trace(visitor)
; } |
156 | 156 |
157 private: | |
158 AddResult inlineAdd(KeyPeekInType, MappedPassInReferenceType); | 157 AddResult inlineAdd(KeyPeekInType, MappedPassInReferenceType); |
159 | 158 |
160 HashTableType m_impl; | 159 HashTableType m_impl; |
161 }; | 160 }; |
162 | 161 |
163 template<typename KeyArg, typename MappedArg, typename HashArg, typename Key
TraitsArg, typename MappedTraitsArg, typename Allocator> | 162 template<typename KeyArg, typename MappedArg, typename HashArg, typename Key
TraitsArg, typename MappedTraitsArg, typename Allocator> |
164 class HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg, All
ocator>::HashMapKeysProxy : | 163 class HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg, All
ocator>::HashMapKeysProxy : |
165 private HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsAr
g, Allocator> { | 164 private HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsAr
g, Allocator> { |
166 public: | 165 public: |
167 typedef HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTrai
tsArg, Allocator> HashMapType; | 166 typedef HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTrai
tsArg, Allocator> HashMapType; |
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 struct NeedsTracing<HashMap<T, U, V, W, X> > { | 496 struct NeedsTracing<HashMap<T, U, V, W, X> > { |
498 static const bool value = false; | 497 static const bool value = false; |
499 }; | 498 }; |
500 #endif | 499 #endif |
501 | 500 |
502 } // namespace WTF | 501 } // namespace WTF |
503 | 502 |
504 using WTF::HashMap; | 503 using WTF::HashMap; |
505 | 504 |
506 #endif /* WTF_HashMap_h */ | 505 #endif /* WTF_HashMap_h */ |
OLD | NEW |