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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 void swap(typename Allocator::template OtherType<HashMap>::Type other) | 91 void swap(typename Allocator::template OtherType<HashMap>::Type other) |
92 { | 92 { |
93 HashMap& ref = Allocator::getOther(other); | 93 HashMap& ref = Allocator::getOther(other); |
94 m_impl.swap(ref.m_impl); | 94 m_impl.swap(ref.m_impl); |
95 } | 95 } |
96 | 96 |
97 unsigned size() const; | 97 unsigned size() const; |
98 unsigned capacity() const; | 98 unsigned capacity() const; |
99 bool isEmpty() const; | 99 bool isEmpty() const; |
100 | 100 |
| 101 void reserveCapacityForSize(unsigned size) |
| 102 { |
| 103 m_impl.reserveCapacityForSize(size); |
| 104 } |
| 105 |
101 // iterators iterate over pairs of keys and values | 106 // iterators iterate over pairs of keys and values |
102 iterator begin(); | 107 iterator begin(); |
103 iterator end(); | 108 iterator end(); |
104 const_iterator begin() const; | 109 const_iterator begin() const; |
105 const_iterator end() const; | 110 const_iterator end() const; |
106 | 111 |
107 HashMapKeysProxy& keys() { return static_cast<HashMapKeysProxy&>(*this);
} | 112 HashMapKeysProxy& keys() { return static_cast<HashMapKeysProxy&>(*this);
} |
108 const HashMapKeysProxy& keys() const { return static_cast<const HashMapK
eysProxy&>(*this); } | 113 const HashMapKeysProxy& keys() const { return static_cast<const HashMapK
eysProxy&>(*this); } |
109 | 114 |
110 HashMapValuesProxy& values() { return static_cast<HashMapValuesProxy&>(*
this); } | 115 HashMapValuesProxy& values() { return static_cast<HashMapValuesProxy&>(*
this); } |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 struct NeedsTracing<HashMap<T, U, V, W, X>> { | 503 struct NeedsTracing<HashMap<T, U, V, W, X>> { |
499 static const bool value = false; | 504 static const bool value = false; |
500 }; | 505 }; |
501 #endif | 506 #endif |
502 | 507 |
503 } // namespace WTF | 508 } // namespace WTF |
504 | 509 |
505 using WTF::HashMap; | 510 using WTF::HashMap; |
506 | 511 |
507 #endif /* WTF_HashMap_h */ | 512 #endif /* WTF_HashMap_h */ |
OLD | NEW |