From f3d931aa7cfaf96baef8383b59a8938779541ee7 Mon Sep 17 00:00:00 2001 From: Amlal EL Mahrouss Date: Thu, 15 Aug 2024 18:35:34 +0200 Subject: [IMP] Moved source code into dev/ folder. Signed-off-by: Amlal EL Mahrouss --- dev/Kernel/Sources/Variant.cxx | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 dev/Kernel/Sources/Variant.cxx (limited to 'dev/Kernel/Sources/Variant.cxx') diff --git a/dev/Kernel/Sources/Variant.cxx b/dev/Kernel/Sources/Variant.cxx new file mode 100644 index 00000000..97775900 --- /dev/null +++ b/dev/Kernel/Sources/Variant.cxx @@ -0,0 +1,28 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#include + +namespace Kernel +{ + const Char* Variant::ToString() + { + switch (fKind) + { + case VariantKind::kJson: + return ("Class:{Json}"); + case VariantKind::kString: + return ("Class:{String}"); + case VariantKind::kBlob: + return ("Class:{Blob}"); + default: + return ("Class:{Null}"); + } + } + + /// @brief Leak variant's instance. + VoidPtr Variant::Leak() { return fPtr; } +} // namespace Kernel -- cgit v1.2.3