summaryrefslogtreecommitdiffhomepage
path: root/Private/Source/Variant.cxx
blob: 42f59d2f3496db9755dd38cd44191b855e627b89 (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
/*
 *	========================================================
 *
 *	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 ("Memory:{Undefined}");
  }
}

}  // namespace HCore