mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
AK: Add HashMap, HashTable and Traits to Forward.h
This commit is contained in:
parent
e28809a996
commit
e61cdf5c39
Notes:
sideshowbarker
2024-07-19 09:17:23 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/e61cdf5c39e
4 changed files with 24 additions and 4 deletions
20
AK/Forward.h
20
AK/Forward.h
|
@ -29,8 +29,8 @@
|
|||
namespace AK {
|
||||
|
||||
class Bitmap;
|
||||
class ByteBuffer;
|
||||
class BufferStream;
|
||||
class ByteBuffer;
|
||||
class DebugLogStream;
|
||||
class IPv4Address;
|
||||
class JsonArray;
|
||||
|
@ -45,6 +45,9 @@ class StringView;
|
|||
class URL;
|
||||
class Utf8View;
|
||||
|
||||
template<typename T>
|
||||
class Atomic;
|
||||
|
||||
template<typename T>
|
||||
class SinglyLinkedList;
|
||||
|
||||
|
@ -57,6 +60,15 @@ class InlineLinkedList;
|
|||
template<typename T, int capacity>
|
||||
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>
|
||||
class Badge;
|
||||
|
||||
|
@ -92,6 +104,7 @@ class Vector;
|
|||
|
||||
}
|
||||
|
||||
using AK::Atomic;
|
||||
using AK::Badge;
|
||||
using AK::Bitmap;
|
||||
using AK::BufferStream;
|
||||
|
@ -101,8 +114,10 @@ using AK::DebugLogStream;
|
|||
using AK::DoublyLinkedList;
|
||||
using AK::FixedArray;
|
||||
using AK::Function;
|
||||
using AK::InlineLinkedList;
|
||||
using AK::HashMap;
|
||||
using AK::HashTable;
|
||||
using AK::IPv4Address;
|
||||
using AK::InlineLinkedList;
|
||||
using AK::JsonArray;
|
||||
using AK::JsonObject;
|
||||
using AK::JsonValue;
|
||||
|
@ -118,6 +133,7 @@ using AK::String;
|
|||
using AK::StringBuilder;
|
||||
using AK::StringImpl;
|
||||
using AK::StringView;
|
||||
using AK::Traits;
|
||||
using AK::URL;
|
||||
using AK::Utf8View;
|
||||
using AK::Vector;
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
namespace AK {
|
||||
|
||||
template<typename K, typename V, typename KeyTraits = Traits<K>>
|
||||
template<typename K, typename V, typename KeyTraits>
|
||||
class HashMap {
|
||||
private:
|
||||
struct Entry {
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
namespace AK {
|
||||
|
||||
template<typename T, typename = Traits<T>>
|
||||
template<typename T, typename>
|
||||
class HashTable;
|
||||
|
||||
template<typename HashTableType, typename ElementType, typename BucketIteratorType>
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Forward.h>
|
||||
#include <AK/HashFunctions.h>
|
||||
|
||||
namespace AK {
|
||||
|
@ -82,3 +83,6 @@ struct Traits<T*> : public GenericTraits<T*> {
|
|||
};
|
||||
|
||||
}
|
||||
|
||||
using AK::GenericTraits;
|
||||
using AK::Traits;
|
||||
|
|
Loading…
Reference in a new issue