2020-02-14 20:41:10 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 08:24:48 +00:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-02-14 20:41:10 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2020-02-20 12:18:42 +00:00
|
|
|
#include <AK/Types.h>
|
|
|
|
|
2020-02-14 20:41:10 +00:00
|
|
|
namespace AK {
|
|
|
|
|
2021-05-14 18:53:04 +00:00
|
|
|
namespace Detail {
|
|
|
|
template<size_t inline_capacity>
|
2020-02-16 01:01:18 +00:00
|
|
|
class ByteBuffer;
|
2021-05-14 18:53:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class Bitmap;
|
|
|
|
using ByteBuffer = AK::Detail::ByteBuffer<32>;
|
2021-11-15 23:41:28 +00:00
|
|
|
class Error;
|
2021-08-18 11:22:38 +00:00
|
|
|
class GenericLexer;
|
2020-02-14 20:41:10 +00:00
|
|
|
class IPv4Address;
|
|
|
|
class JsonArray;
|
|
|
|
class JsonObject;
|
|
|
|
class JsonValue;
|
2020-11-08 12:48:16 +00:00
|
|
|
class StackInfo;
|
2020-02-14 20:41:10 +00:00
|
|
|
class String;
|
|
|
|
class StringBuilder;
|
|
|
|
class StringImpl;
|
|
|
|
class StringView;
|
2021-02-13 10:33:28 +00:00
|
|
|
class Time;
|
2020-02-14 20:41:10 +00:00
|
|
|
class URL;
|
2020-03-22 09:12:55 +00:00
|
|
|
class FlyString;
|
2021-07-19 13:02:13 +00:00
|
|
|
class Utf16View;
|
2020-05-17 18:01:45 +00:00
|
|
|
class Utf32View;
|
2022-02-23 20:05:27 +00:00
|
|
|
class Utf8CodePointIterator;
|
2020-02-14 22:28:34 +00:00
|
|
|
class Utf8View;
|
2020-08-05 10:14:44 +00:00
|
|
|
class InputStream;
|
|
|
|
class InputMemoryStream;
|
2020-08-18 16:04:17 +00:00
|
|
|
class DuplexMemoryStream;
|
2020-08-25 12:57:02 +00:00
|
|
|
class OutputStream;
|
2020-08-25 13:19:55 +00:00
|
|
|
class InputBitStream;
|
2021-03-01 15:43:54 +00:00
|
|
|
class OutputBitStream;
|
2020-09-15 10:08:00 +00:00
|
|
|
class OutputMemoryStream;
|
2020-08-25 12:57:02 +00:00
|
|
|
|
|
|
|
template<size_t Capacity>
|
|
|
|
class CircularDuplexStream;
|
2020-02-14 20:41:10 +00:00
|
|
|
|
2020-07-25 14:00:26 +00:00
|
|
|
template<typename T>
|
|
|
|
class Span;
|
|
|
|
|
2020-09-06 19:13:34 +00:00
|
|
|
template<typename T, size_t Size>
|
2020-09-11 22:43:11 +00:00
|
|
|
struct Array;
|
2020-09-06 19:14:08 +00:00
|
|
|
|
|
|
|
template<typename Container, typename ValueType>
|
|
|
|
class SimpleIterator;
|
|
|
|
|
2022-08-19 18:53:40 +00:00
|
|
|
using ReadonlyBytes = Span<u8 const>;
|
2020-07-25 14:00:26 +00:00
|
|
|
using Bytes = Span<u8>;
|
|
|
|
|
2021-01-03 23:43:10 +00:00
|
|
|
template<typename T, AK::MemoryOrder DefaultMemoryOrder>
|
2020-02-16 01:01:18 +00:00
|
|
|
class Atomic;
|
|
|
|
|
2020-02-14 20:41:10 +00:00
|
|
|
template<typename T>
|
|
|
|
class SinglyLinkedList;
|
|
|
|
|
|
|
|
template<typename T>
|
|
|
|
class DoublyLinkedList;
|
|
|
|
|
2020-02-20 12:18:42 +00:00
|
|
|
template<typename T, size_t capacity>
|
2020-02-14 20:41:10 +00:00
|
|
|
class CircularQueue;
|
|
|
|
|
2020-02-16 01:01:18 +00:00
|
|
|
template<typename T>
|
|
|
|
struct Traits;
|
|
|
|
|
2021-06-13 14:26:08 +00:00
|
|
|
template<typename T, typename TraitsForT = Traits<T>, bool IsOrdered = false>
|
2020-02-16 01:01:18 +00:00
|
|
|
class HashTable;
|
|
|
|
|
2021-06-13 14:26:08 +00:00
|
|
|
template<typename T, typename TraitsForT = Traits<T>>
|
|
|
|
using OrderedHashTable = HashTable<T, TraitsForT, true>;
|
|
|
|
|
|
|
|
template<typename K, typename V, typename KeyTraits = Traits<K>, bool IsOrdered = false>
|
2020-02-16 01:01:18 +00:00
|
|
|
class HashMap;
|
|
|
|
|
2021-06-28 09:02:18 +00:00
|
|
|
template<typename K, typename V, typename KeyTraits = Traits<K>>
|
2021-06-13 14:26:08 +00:00
|
|
|
using OrderedHashMap = HashMap<K, V, KeyTraits, true>;
|
|
|
|
|
2020-02-14 20:41:10 +00:00
|
|
|
template<typename T>
|
|
|
|
class Badge;
|
|
|
|
|
2021-07-11 15:16:13 +00:00
|
|
|
template<typename T>
|
|
|
|
class FixedArray;
|
|
|
|
|
2021-12-28 01:18:53 +00:00
|
|
|
template<size_t precision, typename Underlying = i32>
|
|
|
|
class FixedPoint;
|
|
|
|
|
2020-02-14 20:41:10 +00:00
|
|
|
template<typename>
|
|
|
|
class Function;
|
|
|
|
|
|
|
|
template<typename Out, typename... In>
|
|
|
|
class Function<Out(In...)>;
|
|
|
|
|
|
|
|
template<typename T>
|
|
|
|
class NonnullRefPtr;
|
|
|
|
|
|
|
|
template<typename T>
|
|
|
|
class NonnullOwnPtr;
|
|
|
|
|
2021-02-20 16:39:58 +00:00
|
|
|
template<typename T, size_t inline_capacity = 0>
|
2022-08-19 18:53:40 +00:00
|
|
|
class NonnullOwnPtrVector;
|
2020-12-01 23:19:30 +00:00
|
|
|
|
2021-02-20 16:39:58 +00:00
|
|
|
template<typename T, size_t inline_capacity = 0>
|
2022-08-19 18:53:40 +00:00
|
|
|
class NonnullRefPtrVector;
|
2020-12-01 23:19:30 +00:00
|
|
|
|
2020-02-14 21:29:06 +00:00
|
|
|
template<typename T>
|
|
|
|
class Optional;
|
|
|
|
|
2022-05-07 10:50:54 +00:00
|
|
|
#ifdef KERNEL
|
2020-02-14 20:41:10 +00:00
|
|
|
template<typename T>
|
2022-08-19 18:53:40 +00:00
|
|
|
class NonnullLockRefPtr;
|
|
|
|
|
|
|
|
template<typename T, size_t inline_capacity = 0>
|
|
|
|
class NonnullLockRefPtrVector;
|
2020-09-23 16:17:43 +00:00
|
|
|
|
2022-05-07 10:50:54 +00:00
|
|
|
template<typename T>
|
2022-08-19 18:53:40 +00:00
|
|
|
struct LockRefPtrTraits;
|
|
|
|
|
|
|
|
template<typename T, typename PtrTraits = LockRefPtrTraits<T>>
|
|
|
|
class LockRefPtr;
|
2022-05-07 10:50:54 +00:00
|
|
|
#endif
|
2020-02-14 20:41:10 +00:00
|
|
|
|
2022-08-19 18:53:40 +00:00
|
|
|
template<typename T>
|
|
|
|
class RefPtr;
|
|
|
|
|
2020-02-14 20:41:10 +00:00
|
|
|
template<typename T>
|
|
|
|
class OwnPtr;
|
|
|
|
|
|
|
|
template<typename T>
|
|
|
|
class WeakPtr;
|
|
|
|
|
2020-02-25 13:49:47 +00:00
|
|
|
template<typename T, size_t inline_capacity = 0>
|
2021-06-08 13:24:06 +00:00
|
|
|
requires(!IsRvalueReference<T>) class Vector;
|
2020-02-14 20:41:10 +00:00
|
|
|
|
2021-11-15 23:41:28 +00:00
|
|
|
template<typename T, typename ErrorType = Error>
|
|
|
|
class [[nodiscard]] ErrorOr;
|
|
|
|
|
2020-02-14 20:41:10 +00:00
|
|
|
}
|
|
|
|
|
2020-09-06 19:14:08 +00:00
|
|
|
using AK::Array;
|
2020-02-16 01:01:18 +00:00
|
|
|
using AK::Atomic;
|
2020-02-14 20:41:10 +00:00
|
|
|
using AK::Badge;
|
|
|
|
using AK::Bitmap;
|
|
|
|
using AK::ByteBuffer;
|
2020-07-25 14:00:26 +00:00
|
|
|
using AK::Bytes;
|
2020-08-25 12:57:02 +00:00
|
|
|
using AK::CircularDuplexStream;
|
2020-02-14 20:41:10 +00:00
|
|
|
using AK::CircularQueue;
|
|
|
|
using AK::DoublyLinkedList;
|
2020-08-18 16:04:17 +00:00
|
|
|
using AK::DuplexMemoryStream;
|
2021-11-15 23:41:28 +00:00
|
|
|
using AK::Error;
|
|
|
|
using AK::ErrorOr;
|
2021-07-11 15:16:13 +00:00
|
|
|
using AK::FixedArray;
|
2021-12-28 01:18:53 +00:00
|
|
|
using AK::FixedPoint;
|
2020-05-17 18:01:45 +00:00
|
|
|
using AK::FlyString;
|
2020-02-14 20:41:10 +00:00
|
|
|
using AK::Function;
|
2021-08-18 11:22:38 +00:00
|
|
|
using AK::GenericLexer;
|
2020-02-16 01:01:18 +00:00
|
|
|
using AK::HashMap;
|
|
|
|
using AK::HashTable;
|
2020-08-25 13:19:55 +00:00
|
|
|
using AK::InputBitStream;
|
2020-08-05 10:14:44 +00:00
|
|
|
using AK::InputMemoryStream;
|
|
|
|
using AK::InputStream;
|
2020-02-20 12:18:42 +00:00
|
|
|
using AK::IPv4Address;
|
2020-02-14 20:41:10 +00:00
|
|
|
using AK::JsonArray;
|
|
|
|
using AK::JsonObject;
|
|
|
|
using AK::JsonValue;
|
|
|
|
using AK::NonnullOwnPtr;
|
2020-12-01 23:19:30 +00:00
|
|
|
using AK::NonnullOwnPtrVector;
|
2020-02-14 20:41:10 +00:00
|
|
|
using AK::NonnullRefPtr;
|
2020-12-01 23:19:30 +00:00
|
|
|
using AK::NonnullRefPtrVector;
|
2020-02-14 21:29:06 +00:00
|
|
|
using AK::Optional;
|
2021-03-01 15:43:54 +00:00
|
|
|
using AK::OutputBitStream;
|
2020-09-15 10:08:00 +00:00
|
|
|
using AK::OutputMemoryStream;
|
2020-08-25 12:57:02 +00:00
|
|
|
using AK::OutputStream;
|
2020-02-14 20:41:10 +00:00
|
|
|
using AK::OwnPtr;
|
2020-07-25 14:00:26 +00:00
|
|
|
using AK::ReadonlyBytes;
|
2020-02-14 20:41:10 +00:00
|
|
|
using AK::RefPtr;
|
|
|
|
using AK::SinglyLinkedList;
|
2020-07-25 14:00:26 +00:00
|
|
|
using AK::Span;
|
2020-11-08 12:48:16 +00:00
|
|
|
using AK::StackInfo;
|
2020-02-14 20:41:10 +00:00
|
|
|
using AK::String;
|
|
|
|
using AK::StringBuilder;
|
|
|
|
using AK::StringImpl;
|
|
|
|
using AK::StringView;
|
2021-02-13 10:33:28 +00:00
|
|
|
using AK::Time;
|
2020-02-16 01:01:18 +00:00
|
|
|
using AK::Traits;
|
2020-02-14 20:41:10 +00:00
|
|
|
using AK::URL;
|
2021-07-19 13:02:13 +00:00
|
|
|
using AK::Utf16View;
|
2020-05-17 18:01:45 +00:00
|
|
|
using AK::Utf32View;
|
2022-02-23 20:05:27 +00:00
|
|
|
using AK::Utf8CodePointIterator;
|
2020-02-14 22:28:34 +00:00
|
|
|
using AK::Utf8View;
|
2020-02-14 20:41:10 +00:00
|
|
|
using AK::Vector;
|
2022-08-19 18:53:40 +00:00
|
|
|
|
|
|
|
#ifdef KERNEL
|
|
|
|
using AK::LockRefPtr;
|
|
|
|
using AK::LockRefPtrTraits;
|
|
|
|
using AK::NonnullLockRefPtr;
|
|
|
|
using AK::NonnullLockRefPtrVector;
|
|
|
|
#endif
|