Lines Matching defs:ValueUnion
89 struct ValueUnion { struct
90 union DataT {
96 using DataPtr = std::unique_ptr<DataT, decltype(&std::free)>;
99 size_t Size;
100 DataPtr Buff;
103 ValueUnion() : Size(0), Buff(nullptr, &std::free) {} in ValueUnion() function
105 explicit ValueUnion(size_t BuffSize) in ValueUnion() argument
111 explicit operator bool() const { return bool(Buff); } in operator bool()
113 char* data() const { return Buff->bytes; } in data()
115 std::string GetAsString() const { return std::string(data()); } in GetAsString()
117 int64_t GetAsInteger() const { in GetAsInteger()
125 uint64_t GetAsUnsigned() const { in GetAsUnsigned()
134 std::array<T, N> GetAsArray() { in GetAsArray()