1 | // Copyright (C) 2018 The Qt Company Ltd. |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | #ifndef HASHMAP_H |
4 | #define HASHMAP_H |
5 | |
6 | #include <QtCore/qhash.h> |
7 | |
8 | namespace WTF { |
9 | |
10 | template<typename Key, typename Value> |
11 | class HashMap final : public QHash<Key, Value> |
12 | { |
13 | public: |
14 | void add(const Key &k, const Value &v) { QHash<Key, Value>::insert(k, v); } |
15 | Value get(const Key &k) { return QHash<Key, Value>::value(k); } |
16 | }; |
17 | |
18 | } |
19 | |
20 | using WTF::HashMap; |
21 | |
22 | #endif |
23 |