summaryrefslogtreecommitdiffhomepage
path: root/Source/Variant.cxx
blob: b96219903bb5611cb08606a023689d6988d126f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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