You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
3.7 KiB
106 lines
3.7 KiB
12 years ago
|
Index: trunk/Source/WTF/wtf/HashMap.h
|
||
|
===================================================================
|
||
|
--- trunk/Source/WTF/wtf/HashMap.h (revision 147344)
|
||
|
+++ trunk/Source/WTF/wtf/HashMap.h (revision 147345)
|
||
|
@@ -137,27 +137,33 @@
|
||
|
AddResult inlineAdd(const KeyType&, MappedPassInReferenceType);
|
||
|
|
||
|
- class HashMapKeysProxy : private HashMap {
|
||
|
+ HashTableType m_impl;
|
||
|
+ };
|
||
|
+
|
||
|
+ template<typename KeyArg, typename MappedArg, typename HashArg, typename KeyTraitsArg, typename MappedTraitsArg>
|
||
|
+ class HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg>::HashMapKeysProxy :
|
||
|
+ private HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg> {
|
||
|
public:
|
||
|
- typedef typename HashMap::iterator::Keys iterator;
|
||
|
- typedef typename HashMap::const_iterator::Keys const_iterator;
|
||
|
-
|
||
|
+ typedef HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg> HashMapType;
|
||
|
+ typedef typename HashMapType::iterator::Keys iterator;
|
||
|
+ typedef typename HashMapType::const_iterator::Keys const_iterator;
|
||
|
+
|
||
|
iterator begin()
|
||
|
{
|
||
|
- return HashMap::begin().keys();
|
||
|
- }
|
||
|
-
|
||
|
+ return HashMapType::begin().keys();
|
||
|
+ }
|
||
|
+
|
||
|
iterator end()
|
||
|
{
|
||
|
- return HashMap::end().keys();
|
||
|
+ return HashMapType::end().keys();
|
||
|
}
|
||
|
|
||
|
const_iterator begin() const
|
||
|
{
|
||
|
- return HashMap::begin().keys();
|
||
|
- }
|
||
|
-
|
||
|
+ return HashMapType::begin().keys();
|
||
|
+ }
|
||
|
+
|
||
|
const_iterator end() const
|
||
|
{
|
||
|
- return HashMap::end().keys();
|
||
|
+ return HashMapType::end().keys();
|
||
|
}
|
||
|
|
||
|
@@ -170,29 +176,32 @@
|
||
|
HashMapKeysProxy& operator=(const HashMapKeysProxy&);
|
||
|
~HashMapKeysProxy();
|
||
|
- };
|
||
|
-
|
||
|
- class HashMapValuesProxy : private HashMap {
|
||
|
+ };
|
||
|
+
|
||
|
+ template<typename KeyArg, typename MappedArg, typename HashArg, typename KeyTraitsArg, typename MappedTraitsArg>
|
||
|
+ class HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg>::HashMapValuesProxy :
|
||
|
+ private HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg> {
|
||
|
public:
|
||
|
- typedef typename HashMap::iterator::Values iterator;
|
||
|
- typedef typename HashMap::const_iterator::Values const_iterator;
|
||
|
-
|
||
|
+ typedef HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg> HashMapType;
|
||
|
+ typedef typename HashMapType::iterator::Values iterator;
|
||
|
+ typedef typename HashMapType::const_iterator::Values const_iterator;
|
||
|
+
|
||
|
iterator begin()
|
||
|
{
|
||
|
- return HashMap::begin().values();
|
||
|
- }
|
||
|
-
|
||
|
+ return HashMapType::begin().values();
|
||
|
+ }
|
||
|
+
|
||
|
iterator end()
|
||
|
{
|
||
|
- return HashMap::end().values();
|
||
|
+ return HashMapType::end().values();
|
||
|
}
|
||
|
|
||
|
const_iterator begin() const
|
||
|
{
|
||
|
- return HashMap::begin().values();
|
||
|
- }
|
||
|
-
|
||
|
+ return HashMapType::begin().values();
|
||
|
+ }
|
||
|
+
|
||
|
const_iterator end() const
|
||
|
{
|
||
|
- return HashMap::end().values();
|
||
|
+ return HashMapType::end().values();
|
||
|
}
|
||
|
|
||
|
@@ -205,7 +214,4 @@
|
||
|
HashMapValuesProxy& operator=(const HashMapValuesProxy&);
|
||
|
~HashMapValuesProxy();
|
||
|
- };
|
||
|
-
|
||
|
- HashTableType m_impl;
|
||
|
};
|
||
|
|