Lines Matching defs:ValueUnion
91 struct ValueUnion { struct
92 union DataT {
98 using DataPtr = std::unique_ptr<DataT, decltype(&std::free)>;
101 size_t Size;
102 DataPtr Buff;
105 ValueUnion() : Size(0), Buff(nullptr, &std::free) {} in ValueUnion() function
107 explicit ValueUnion(size_t BuffSize) in ValueUnion() function
113 explicit operator bool() const { return bool(Buff); } in operator bool()
115 char* data() const { return Buff->bytes; } in data()
117 std::string GetAsString() const { return std::string(data()); } in GetAsString()
119 int64_t GetAsInteger() const { in GetAsInteger()
127 uint64_t GetAsUnsigned() const { in GetAsUnsigned()
136 std::array<T, N> GetAsArray() { in GetAsArray()