Flutter Engine
flutter::EncodableValue Class Reference

#include <encodable_value.h>

Inheritance diagram for flutter::EncodableValue:

Public Types

using super = internal::EncodableValueVariant
 

Public Member Functions

 EncodableValue ()=default
 
 EncodableValue (const char *string)
 
EncodableValueoperator= (const char *other)
 
 EncodableValue (const CustomEncodableValue &v)
 
template<class T >
constexpr EncodableValue (T &&t) noexcept
 
bool IsNull () const
 
int64_t LongValue ()
 

Detailed Description

Definition at line 147 of file encodable_value.h.

Member Typedef Documentation

◆ super

Constructor & Destructor Documentation

◆ EncodableValue() [1/4]

flutter::EncodableValue::EncodableValue ( )
explicitdefault

◆ EncodableValue() [2/4]

flutter::EncodableValue::EncodableValue ( const char *  string)
inlineexplicit

Definition at line 158 of file encodable_value.h.

158 : super(std::string(string)) {}
internal::EncodableValueVariant super

◆ EncodableValue() [3/4]

flutter::EncodableValue::EncodableValue ( const CustomEncodableValue v)
inline

Definition at line 169 of file encodable_value.h.

169 : super(v) {}
internal::EncodableValueVariant super

◆ EncodableValue() [4/4]

template<class T >
constexpr flutter::EncodableValue::EncodableValue ( T &&  t)
inlineexplicitnoexcept

Definition at line 180 of file encodable_value.h.

180 : super(t) {}
internal::EncodableValueVariant super

Member Function Documentation

◆ IsNull()

bool flutter::EncodableValue::IsNull ( ) const
inline

Definition at line 184 of file encodable_value.h.

Referenced by flutter::StandardMethodCodec::DecodeAndProcessResponseEnvelopeInternal(), and flutter::TEST().

184 { return std::holds_alternative<std::monostate>(*this); }

◆ LongValue()

int64_t flutter::EncodableValue::LongValue ( )
inline

Definition at line 192 of file encodable_value.h.

Referenced by flutter::TEST().

192  {
193  if (std::holds_alternative<int32_t>(*this)) {
194  return std::get<int32_t>(*this);
195  }
196  return std::get<int64_t>(*this);
197  }

◆ operator=()

EncodableValue& flutter::EncodableValue::operator= ( const char *  other)
inline

Definition at line 159 of file encodable_value.h.

159  {
160  *this = std::string(other);
161  return *this;
162  }

The documentation for this class was generated from the following file: