summaryrefslogtreecommitdiffhomepage
path: root/src/kernel/NeKit/Vet.h
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-29 21:38:33 -0500
committerAmlal El Mahrouss <amlal@nekernel.org>2025-11-29 21:38:33 -0500
commitb456c928fecf78157270b052e441a427f06afdda (patch)
tree2dbea485a392789fc67aa590f8a7afb9f263be3c /src/kernel/NeKit/Vet.h
parentbb303088aa2ed0693e19e93158155dd85783ce76 (diff)
feat: kernel: Introduce Vet.h, better Ref.h, and more improved containers for better kernel code.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src/kernel/NeKit/Vet.h')
-rw-r--r--src/kernel/NeKit/Vet.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/kernel/NeKit/Vet.h b/src/kernel/NeKit/Vet.h
new file mode 100644
index 00000000..d4c1060f
--- /dev/null
+++ b/src/kernel/NeKit/Vet.h
@@ -0,0 +1,34 @@
+
+/* ========================================
+
+ Copyright (C) 2024-2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
+
+======================================== */
+
+#pragma once
+
+#include <CompilerKit/CompilerKit.h>
+#include <NeKit/Config.h>
+
+#define NE_VETTABLE : public IVet
+
+namespace Kernel {
+struct IVet {
+ IVet() = default;
+ virtual ~IVet() = default;
+
+ NE_COPY_DEFAULT(IVet)
+
+ operator bool() = delete;
+};
+
+template <typename T>
+struct Vettable final {
+ static constexpr bool kValue = false;
+};
+
+template <>
+struct Vettable<IVet> final {
+ static constexpr bool kValue = true;
+};
+} // namespace Kernel \ No newline at end of file