Lines Matching defs:ValueUnion
84 struct ValueUnion { struct
85 union DataT {
91 using DataPtr = std::unique_ptr<DataT, decltype(&std::free)>;
94 size_t Size;
95 DataPtr Buff;
98 ValueUnion() : Size(0), Buff(nullptr, &std::free) {} in ValueUnion() argument
100 explicit ValueUnion(size_t BuffSize) in ValueUnion() argument
106 explicit operator bool() const { return bool(Buff); } in operator bool()
108 char* data() const { return Buff->bytes; } in data()
110 std::string GetAsString() const { return std::string(data()); } in GetAsString()
112 int64_t GetAsInteger() const { in GetAsInteger()
120 uint64_t GetAsUnsigned() const { in GetAsUnsigned()
129 std::array<T, N> GetAsArray() { in GetAsArray()