AK: Add HashMap, HashTable and Traits to Forward.h

This commit is contained in:
Andreas Kling 2020-02-16 02:01:18 +01:00
parent e28809a996
commit e61cdf5c39
Notes: sideshowbarker 2024-07-19 09:17:23 +09:00
4 changed files with 24 additions and 4 deletions

View file

@ -29,8 +29,8 @@
namespace AK { namespace AK {
class Bitmap; class Bitmap;
class ByteBuffer;
class BufferStream; class BufferStream;
class ByteBuffer;
class DebugLogStream; class DebugLogStream;
class IPv4Address; class IPv4Address;
class JsonArray; class JsonArray;
@ -45,6 +45,9 @@ class StringView;
class URL; class URL;
class Utf8View; class Utf8View;
template<typename T>
class Atomic;
template<typename T> template<typename T>
class SinglyLinkedList; class SinglyLinkedList;
@ -57,6 +60,15 @@ class InlineLinkedList;
template<typename T, int capacity> template<typename T, int capacity>
class CircularQueue; class CircularQueue;
template<typename T>
struct Traits;
template<typename T, typename = Traits<T>>
class HashTable;
template<typename K, typename V, typename = Traits<K>>
class HashMap;
template<typename T> template<typename T>
class Badge; class Badge;
@ -92,6 +104,7 @@ class Vector;
} }
using AK::Atomic;
using AK::Badge; using AK::Badge;
using AK::Bitmap; using AK::Bitmap;
using AK::BufferStream; using AK::BufferStream;
@ -101,8 +114,10 @@ using AK::DebugLogStream;
using AK::DoublyLinkedList; using AK::DoublyLinkedList;
using AK::FixedArray; using AK::FixedArray;
using AK::Function; using AK::Function;
using AK::InlineLinkedList; using AK::HashMap;
using AK::HashTable;
using AK::IPv4Address; using AK::IPv4Address;
using AK::InlineLinkedList;
using AK::JsonArray; using AK::JsonArray;
using AK::JsonObject; using AK::JsonObject;
using AK::JsonValue; using AK::JsonValue;
@ -118,6 +133,7 @@ using AK::String;
using AK::StringBuilder; using AK::StringBuilder;
using AK::StringImpl; using AK::StringImpl;
using AK::StringView; using AK::StringView;
using AK::Traits;
using AK::URL; using AK::URL;
using AK::Utf8View; using AK::Utf8View;
using AK::Vector; using AK::Vector;

View file

@ -33,7 +33,7 @@
namespace AK { namespace AK {
template<typename K, typename V, typename KeyTraits = Traits<K>> template<typename K, typename V, typename KeyTraits>
class HashMap { class HashMap {
private: private:
struct Entry { struct Entry {

View file

@ -34,7 +34,7 @@
namespace AK { namespace AK {
template<typename T, typename = Traits<T>> template<typename T, typename>
class HashTable; class HashTable;
template<typename HashTableType, typename ElementType, typename BucketIteratorType> template<typename HashTableType, typename ElementType, typename BucketIteratorType>

View file

@ -26,6 +26,7 @@
#pragma once #pragma once
#include <AK/Forward.h>
#include <AK/HashFunctions.h> #include <AK/HashFunctions.h>
namespace AK { namespace AK {
@ -82,3 +83,6 @@ struct Traits<T*> : public GenericTraits<T*> {
}; };
} }
using AK::GenericTraits;
using AK::Traits;