5#ifndef FLUTTER_SHELL_PLATFORM_COMMON_CLIENT_WRAPPER_INCLUDE_FLUTTER_ENCODABLE_VALUE_H_
6#define FLUTTER_SHELL_PLATFORM_COMMON_CLIENT_WRAPPER_INCLUDE_FLUTTER_ENCODABLE_VALUE_H_
18#ifndef FLUTTER_ENABLE_RTTI
21#define FLUTTER_ENABLE_RTTI 1
23#elif defined(__clang__)
24#if __has_feature(cxx_rtti)
25#define FLUTTER_ENABLE_RTTI 1
27#elif defined(__GNUC__)
29#define FLUTTER_ENABLE_RTTI 1
36static_assert(
sizeof(double) == 8,
"EncodableValue requires a 64-bit double");
69 operator const std::any&()
const {
return value_; }
71#if defined(FLUTTER_ENABLE_RTTI) && FLUTTER_ENABLE_RTTI
73 const std::type_info&
type() const noexcept {
return value_.type(); }
84 return this == &other;
109 std::vector<uint8_t>,
110 std::vector<int32_t>,
111 std::vector<int64_t>,
170 using super::operator=;
178 *
this = std::string(other);
203 bool IsNull()
const {
return std::holds_alternative<std::monostate>(*
this); }
213 if (std::holds_alternative<int32_t>(*
this)) {
214 return std::get<int32_t>(*
this);
216 return std::get<int64_t>(*
this);
223 return static_cast<const super&
>(lhs) <
static_cast<const super&
>(rhs);
CustomEncodableValue(const std::any &value)
~CustomEncodableValue()=default
bool operator==(const CustomEncodableValue &other) const
bool operator<(const CustomEncodableValue &other) const
EncodableValue(const char *string)
EncodableValue & operator=(const char *other)
internal::EncodableValueVariant super
EncodableValue(const CustomEncodableValue &v)
int64_t LongValue() const
friend bool operator<(const EncodableValue &lhs, const EncodableValue &rhs)
constexpr EncodableValue(T &&t) noexcept
std::variant< std::monostate, bool, int32_t, int64_t, double, std::string, std::vector< uint8_t >, std::vector< int32_t >, std::vector< int64_t >, std::vector< double >, EncodableList, EncodableMap, CustomEncodableValue, std::vector< float > > EncodableValueVariant
std::vector< EncodableValue > EncodableList
std::map< EncodableValue, EncodableValue > EncodableMap
SIT bool any(const Vec< 1, T > &x)