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 * | 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 static PeekOutType peek(std::nullptr_t) { return 0; } | 163 static PeekOutType peek(std::nullptr_t) { return 0; } |
164 }; | 164 }; |
165 | 165 |
166 template<typename P> struct HashTraits<RefPtr<P> > : SimpleClassHashTraits<R
efPtr<P> > { | 166 template<typename P> struct HashTraits<RefPtr<P> > : SimpleClassHashTraits<R
efPtr<P> > { |
167 typedef std::nullptr_t EmptyValueType; | 167 typedef std::nullptr_t EmptyValueType; |
168 static EmptyValueType emptyValue() { return nullptr; } | 168 static EmptyValueType emptyValue() { return nullptr; } |
169 | 169 |
170 static const bool hasIsEmptyValueFunction = true; | 170 static const bool hasIsEmptyValueFunction = true; |
171 static bool isEmptyValue(const RefPtr<P>& value) { return !value; } | 171 static bool isEmptyValue(const RefPtr<P>& value) { return !value; } |
172 | 172 |
173 typedef const RefPtr<P>& PeekInType; | 173 typedef RefPtrValuePeeker<P> PeekInType; |
174 typedef RefPtr<P>* IteratorGetType; | 174 typedef RefPtr<P>* IteratorGetType; |
175 typedef const RefPtr<P>* IteratorConstGetType; | 175 typedef const RefPtr<P>* IteratorConstGetType; |
176 typedef RefPtr<P>& IteratorReferenceType; | 176 typedef RefPtr<P>& IteratorReferenceType; |
177 typedef const RefPtr<P>& IteratorConstReferenceType; | 177 typedef const RefPtr<P>& IteratorConstReferenceType; |
178 static IteratorReferenceType getToReferenceConversion(IteratorGetType x)
{ return *x; } | 178 static IteratorReferenceType getToReferenceConversion(IteratorGetType x)
{ return *x; } |
179 static IteratorConstReferenceType getToReferenceConstConversion(Iterator
ConstGetType x) { return *x; } | 179 static IteratorConstReferenceType getToReferenceConstConversion(Iterator
ConstGetType x) { return *x; } |
180 | 180 |
181 typedef PassRefPtr<P> PassInType; | 181 typedef PassRefPtr<P> PassInType; |
182 static void store(PassRefPtr<P> value, RefPtr<P>& storage) { storage = v
alue; } | 182 static void store(PassRefPtr<P> value, RefPtr<P>& storage) { storage = v
alue; } |
183 | 183 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 }; | 308 }; |
309 | 309 |
310 } // namespace WTF | 310 } // namespace WTF |
311 | 311 |
312 using WTF::HashTraits; | 312 using WTF::HashTraits; |
313 using WTF::PairHashTraits; | 313 using WTF::PairHashTraits; |
314 using WTF::NullableHashTraits; | 314 using WTF::NullableHashTraits; |
315 using WTF::SimpleClassHashTraits; | 315 using WTF::SimpleClassHashTraits; |
316 | 316 |
317 #endif // WTF_HashTraits_h | 317 #endif // WTF_HashTraits_h |
OLD | NEW |