diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-06 09:14:11 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-06 09:14:11 +0100 |
| commit | 5339d016c07bf717ee388f4feb73544087324af0 (patch) | |
| tree | 94be6f67ed626091f24aee24ec3b3be03d01e4e7 /Source/Variant.cxx | |
git: port from mercurial repo.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Source/Variant.cxx')
| -rw-r--r-- | Source/Variant.cxx | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Source/Variant.cxx b/Source/Variant.cxx new file mode 100644 index 00000000..b9621990 --- /dev/null +++ b/Source/Variant.cxx @@ -0,0 +1,32 @@ +/* + * ======================================================== + * + * hCore + * Copyright Mahrouss Logic, all rights reserved. + * + * ======================================================== + */ + +#include <NewKit/Variant.hpp> + +namespace hCore +{ + const Char* Variant::ToString() + { + if (m_Ptr == nullptr) + { + return ("Memory:{Nullptr}"); + } + + switch (m_Kind) + { + case VariantKind::kString: + return ("Class:{String}"); + case VariantKind::kPointer: + return ("Memory:{Pointer}"); + default: + return ("Class:{Undefined}"); + } + } + +} // namespace hCore |
