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 () const
 

Detailed Description

Definition at line 163 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 174 of file encodable_value.h.

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

◆ EncodableValue() [3/4]

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

Definition at line 185 of file encodable_value.h.

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

◆ EncodableValue() [4/4]

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

Definition at line 196 of file encodable_value.h.

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

Member Function Documentation

◆ IsNull()

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

Definition at line 200 of file encodable_value.h.

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

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

◆ LongValue()

int64_t flutter::EncodableValue::LongValue ( ) const
inline

Definition at line 209 of file encodable_value.h.

Referenced by flutter::TEST().

209  {
210  if (std::holds_alternative<int32_t>(*this)) {
211  return std::get<int32_t>(*this);
212  }
213  return std::get<int64_t>(*this);
214  }

◆ operator=()

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

Definition at line 175 of file encodable_value.h.

175  {
176  *this = std::string(other);
177  return *this;
178  }

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