NeKernel dev
Loading...
Searching...
No Matches
Dictionary.h
Go to the documentation of this file.
1/* ========================================
2
3 Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
4
5======================================== */
6
7#pragma once
8
10
11namespace CF {
12template <typename Key, typename Value>
13class CFDictionary final {
14 public:
15 explicit CFDictionary() = default;
16 ~CFDictionary() = default;
17
19 CFDictionary(const CFDictionary&) = default;
20
21 Value& operator[](Key& at) { return this->Find(at); }
22
23 Bool Empty() { return this->fCount > 0; }
24
25 Bool Find(Key& key) {
26 NE_UNUSED(key);
27 return false;
28 }
29
30 operator bool() { return !this->Empty(); }
31
32 private:
33 SizeT fCount{0UL};
34};
35
36template <typename KeyType, typename ValueType>
37inline auto make_dict() {
39}
40} // namespace CF
#define NE_UNUSED(X)
Definition Dictionary.h:13
Bool Find(Key &key)
Definition Dictionary.h:25
CFDictionary()=default
~CFDictionary()=default
Value & operator[](Key &at)
Definition Dictionary.h:21
CFDictionary(const CFDictionary &)=default
Bool Empty()
Definition Dictionary.h:23
SizeT fCount
Definition Dictionary.h:33
CFDictionary & operator=(const CFDictionary &)=default
Definition Array.h:11
auto make_dict()
Definition Dictionary.h:37