|
Flutter Windows Embedder
|
|
Go to the documentation of this file.
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
32 #endif // #ifndef FLUTTER_ENABLE_RTTI
36 static_assert(
sizeof(
double) == 8,
"EncodableValue requires a 64-bit double");
67 operator std::any&() {
return value_; }
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);
229 #endif // FLUTTER_SHELL_PLATFORM_COMMON_CLIENT_WRAPPER_INCLUDE_FLUTTER_ENCODABLE_VALUE_H_
friend bool operator<(const EncodableValue &lhs, const EncodableValue &rhs)
EncodableValue(const CustomEncodableValue &v)
CustomEncodableValue(const std::any &value)
internal::EncodableValueVariant super
int64_t LongValue() const
constexpr EncodableValue(T &&t) noexcept
bool operator<(const CustomEncodableValue &other) const
enum flutter::testing::@88::KeyboardChange::Type type
EncodableValue(const char *string)
~CustomEncodableValue()=default
std::vector< EncodableValue > EncodableList
std::map< EncodableValue, EncodableValue > EncodableMap
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
EncodableValue & operator=(const char *other)
bool operator==(const CustomEncodableValue &other) const