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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 template<typename HashTranslator, typename T> AddResult add(const T&); | 98 template<typename HashTranslator, typename T> AddResult add(const T&); |
99 | 99 |
100 void remove(ValuePeekInType); | 100 void remove(ValuePeekInType); |
101 void remove(iterator); | 101 void remove(iterator); |
102 void clear(); | 102 void clear(); |
103 template<typename Collection> | 103 template<typename Collection> |
104 void removeAll(const Collection& toBeRemoved) { WTF::removeAll(*this, to
BeRemoved); } | 104 void removeAll(const Collection& toBeRemoved) { WTF::removeAll(*this, to
BeRemoved); } |
105 | 105 |
106 static bool isValidValue(ValuePeekInType); | 106 static bool isValidValue(ValuePeekInType); |
107 | 107 |
108 void trace(typename Allocator::Visitor* visitor) | 108 void trace(typename Allocator::Visitor* visitor) { m_impl.trace(visitor)
; } |
109 { | |
110 m_impl.trace(visitor); | |
111 } | |
112 | 109 |
113 private: | 110 private: |
114 friend void deleteAllValues<>(const HashSet&); | 111 friend void deleteAllValues<>(const HashSet&); |
115 | 112 |
116 HashTableType m_impl; | 113 HashTableType m_impl; |
117 }; | 114 }; |
118 | 115 |
119 struct IdentityExtractor { | 116 struct IdentityExtractor { |
120 template<typename T> | 117 template<typename T> |
121 static const T& extract(const T& t) { return t; } | 118 static const T& extract(const T& t) { return t; } |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 iterator end = collection.end(); | 260 iterator end = collection.end(); |
264 for (unsigned i = 0; it != end; ++it, ++i) | 261 for (unsigned i = 0; it != end; ++it, ++i) |
265 vector[i] = *it; | 262 vector[i] = *it; |
266 } | 263 } |
267 | 264 |
268 } // namespace WTF | 265 } // namespace WTF |
269 | 266 |
270 using WTF::HashSet; | 267 using WTF::HashSet; |
271 | 268 |
272 #endif /* WTF_HashSet_h */ | 269 #endif /* WTF_HashSet_h */ |
OLD | NEW |