summaryrefslogtreecommitdiffhomepage
path: root/public/frameworks/CoreFoundation.fwrk
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2026-01-25 03:07:52 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2026-01-25 03:07:52 +0100
commit0e05e9fd34bd036e9043f20939c53edf967465ce (patch)
tree36e3e6b84534a82c53605a19134e9ab772c11c65 /public/frameworks/CoreFoundation.fwrk
parent480ccd897d21823af6128f0e3d8d8cdbf653dd0f (diff)
feat: CF: Add alias for CFDictionary (CFDict).v0.1.3
fix: kernel: CodeMgr improvements and fixes. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'public/frameworks/CoreFoundation.fwrk')
-rw-r--r--public/frameworks/CoreFoundation.fwrk/headers/Dictionary.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/public/frameworks/CoreFoundation.fwrk/headers/Dictionary.h b/public/frameworks/CoreFoundation.fwrk/headers/Dictionary.h
index b178d96b..4811e335 100644
--- a/public/frameworks/CoreFoundation.fwrk/headers/Dictionary.h
+++ b/public/frameworks/CoreFoundation.fwrk/headers/Dictionary.h
@@ -1,4 +1,4 @@
-// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org)
+// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org)
// Licensed under the Apache License, Version 2.0 (see LICENSE file)
// Official repository: https://github.com/nekernel-org/nekernel
@@ -8,6 +8,8 @@
#include <libSystem/SystemKit/System.h>
namespace CF {
+
+/// @brief The following class makes a dictionary of values, based on their keys.
template <class Key, class Value>
class CFDictionary final {
public:
@@ -21,10 +23,8 @@ class CFDictionary final {
Bool Empty() { return this->fCount > 0; }
- Bool Find(Key& key) {
- NE_UNUSED(key);
- return false;
- }
+ Bool Find(Key& key);
+ Bool Find(const Key& key);
operator bool() { return !this->Empty(); }
@@ -36,6 +36,10 @@ template <typename KeyType, typename ValueType>
inline auto make_dict() {
return CFDictionary<KeyType, ValueType>{};
}
+
+template <typename K, V>
+using CFDict = CFDictionary<K, V>;
+
} // namespace CF
#endif