| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 87 |
| 88 class HashMapKeysProxy; | 88 class HashMapKeysProxy; |
| 89 class HashMapValuesProxy; | 89 class HashMapValuesProxy; |
| 90 | 90 |
| 91 public: | 91 public: |
| 92 typedef HashTableIteratorAdapter<HashTableType, ValueType> iterator; | 92 typedef HashTableIteratorAdapter<HashTableType, ValueType> iterator; |
| 93 typedef HashTableConstIteratorAdapter<HashTableType, ValueType> const_it
erator; | 93 typedef HashTableConstIteratorAdapter<HashTableType, ValueType> const_it
erator; |
| 94 typedef typename HashTableType::AddResult AddResult; | 94 typedef typename HashTableType::AddResult AddResult; |
| 95 | 95 |
| 96 public: | 96 public: |
| 97 void swap(HashMap& other) | 97 void swap(HashMap& ref) |
| 98 { | 98 { |
| 99 m_impl.swap(other.m_impl); | 99 m_impl.swap(ref.m_impl); |
| 100 } |
| 101 |
| 102 void swap(typename Allocator::template OtherType<HashMap>::Type other) |
| 103 { |
| 104 HashMap& ref = Allocator::getOther(other); |
| 105 m_impl.swap(ref.m_impl); |
| 100 } | 106 } |
| 101 | 107 |
| 102 unsigned size() const; | 108 unsigned size() const; |
| 103 unsigned capacity() const; | 109 unsigned capacity() const; |
| 104 bool isEmpty() const; | 110 bool isEmpty() const; |
| 105 | 111 |
| 106 // iterators iterate over pairs of keys and values | 112 // iterators iterate over pairs of keys and values |
| 107 iterator begin(); | 113 iterator begin(); |
| 108 iterator end(); | 114 iterator end(); |
| 109 const_iterator begin() const; | 115 const_iterator begin() const; |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 vector[i] = *it; | 522 vector[i] = *it; |
| 517 } | 523 } |
| 518 | 524 |
| 519 } // namespace WTF | 525 } // namespace WTF |
| 520 | 526 |
| 521 using WTF::HashMap; | 527 using WTF::HashMap; |
| 522 | 528 |
| 523 #include "wtf/RefPtrHashMap.h" | 529 #include "wtf/RefPtrHashMap.h" |
| 524 | 530 |
| 525 #endif /* WTF_HashMap_h */ | 531 #endif /* WTF_HashMap_h */ |
| OLD | NEW |