summaryrefslogtreecommitdiffhomepage
path: root/NewKernel/Source/Variant.cxx
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-08 12:32:41 +0200
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-05-08 12:32:41 +0200
commit09dd11ddf800898c00ecb04a65fb5cd10fb481fa (patch)
treeeda0b4e23d6a71da7de3a78f0bb76ec3201dd2f9 /NewKernel/Source/Variant.cxx
parentca83108fd138cc0398f900e6a6c0a53ad51aee31 (diff)
MHR-23: :boom: changes, reworked project tree.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'NewKernel/Source/Variant.cxx')
-rw-r--r--NewKernel/Source/Variant.cxx29
1 files changed, 29 insertions, 0 deletions
diff --git a/NewKernel/Source/Variant.cxx b/NewKernel/Source/Variant.cxx
new file mode 100644
index 00000000..2741db45
--- /dev/null
+++ b/NewKernel/Source/Variant.cxx
@@ -0,0 +1,29 @@
+/* -------------------------------------------
+
+ Copyright Mahrouss Logic
+
+------------------------------------------- */
+
+#include <NewKit/Variant.hpp>
+
+namespace NewOS
+{
+ const Char* Variant::ToString()
+ {
+ if (fPtr == nullptr)
+ {
+ return ("Memory:{Nullptr}");
+ }
+
+ switch (fKind)
+ {
+ case VariantKind::kString:
+ return ("Class:{String}");
+ case VariantKind::kPointer:
+ return ("Memory:{Pointer}");
+ default:
+ return ("Memory:{Undefined}");
+ }
+ }
+
+} // namespace NewOS