diff options
Diffstat (limited to 'Kernel/Source/Variant.cxx')
| -rw-r--r-- | Kernel/Source/Variant.cxx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Kernel/Source/Variant.cxx b/Kernel/Source/Variant.cxx new file mode 100644 index 00000000..afe66624 --- /dev/null +++ b/Kernel/Source/Variant.cxx @@ -0,0 +1,29 @@ +/* ------------------------------------------- + + Copyright SoftwareLabs + +------------------------------------------- */ + +#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 |
