Lines Matching defs:ValueUnion
86 struct ValueUnion { struct
87 union DataT {
93 using DataPtr = std::unique_ptr<DataT, decltype(&std::free)>;
96 size_t Size;
97 DataPtr Buff;
100 ValueUnion() : Size(0), Buff(nullptr, &std::free) {} in ValueUnion() function
102 explicit ValueUnion(size_t BuffSize) in ValueUnion() argument
108 explicit operator bool() const { return bool(Buff); } in operator bool()
110 char* data() const { return Buff->bytes; } in data()
112 std::string GetAsString() const { return std::string(data()); } in GetAsString()
114 int64_t GetAsInteger() const { in GetAsInteger()
122 uint64_t GetAsUnsigned() const { in GetAsUnsigned()
131 std::array<T, N> GetAsArray() { in GetAsArray()