Lines Matching defs:ValueUnion
78 struct ValueUnion { struct
79 union DataT {
85 using DataPtr = std::unique_ptr<DataT, decltype(&std::free)>;
88 size_t Size;
89 DataPtr Buff;
92 ValueUnion() : Size(0), Buff(nullptr, &std::free) {} in ValueUnion() function
94 explicit ValueUnion(size_t BuffSize) in ValueUnion() function
100 explicit operator bool() const { return bool(Buff); } in operator bool()
102 char* data() const { return Buff->bytes; } in data()
104 std::string GetAsString() const { return std::string(data()); } in GetAsString()
106 int64_t GetAsInteger() const { in GetAsInteger()
114 uint64_t GetAsUnsigned() const { in GetAsUnsigned()
123 std::array<T, N> GetAsArray() { in GetAsArray()