| Flutter macOS Embedder |

Public Member Functions | Protected Member Functions | List of all members
flutter::MethodResult< T > Class Template Referenceabstract

`#include <method_result.h>`

Inheritance diagram for flutter::MethodResult< T >:

## Public Member Functions
| MethodResult ()=default
virtual | ~MethodResult ()=default
| MethodResult (MethodResult const &)=delete
MethodResult & | operator= (MethodResult const &)=delete
void | Success (const T &result)
void | Success ()
void | Error (const std::string &error_code, const std::string &error_message, const T &error_details)
void | Error (const std::string &error_code, const std::string &error_message="")
void | NotImplemented ()

## Protected Member Functions
virtual void | SuccessInternal (const T *result)=0
virtual void | ErrorInternal (const std::string &error_code, const std::string &error_message, const T *error_details)=0
virtual void | NotImplementedInternal ()=0

## Detailed Description

### template<typename T = EncodableValue>
class flutter::MethodResult< T >

Definition at line 17 of file method_result.h.

## Constructor & Destructor Documentation

## ◆ MethodResult() [1/2]

template<typename T = EncodableValue>

flutter::MethodResult< T >::MethodResult | ( |  | ) |
| default

## ◆ ~MethodResult()

template<typename T = EncodableValue>

virtual flutter::MethodResult< T >::~MethodResult | ( |  | ) |
| virtual default

## ◆ MethodResult() [2/2]

template<typename T = EncodableValue>

flutter::MethodResult< T >::MethodResult | ( | MethodResult< T > const & |  | ) |
| delete

## Member Function Documentation

## ◆ Error() [1/2]

template<typename T = EncodableValue>

void flutter::MethodResult< T >::Error | ( | const std::string & | error_code,
|  | const std::string & | error_message,
|  | const T & | error_details
| ) |  |
| inline

Definition at line 41 of file method_result.h.

43 {
44 ErrorInternal(error_code, error_message, &error_details);
45 }

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

## ◆ Error() [2/2]

template<typename T = EncodableValue>

void flutter::MethodResult< T >::Error | ( | const std::string & | error_code,
|  | const std::string & | error_message = `""`
| ) |  |
| inline

Definition at line 52 of file method_result.h.

53 {
54 ErrorInternal(error_code, error_message, nullptr);
55 }

## ◆ ErrorInternal()

template<typename T = EncodableValue>

virtual void flutter::MethodResult< T >::ErrorInternal | ( | const std::string & | error_code,
|  | const std::string & | error_message,
|  | const T * | error_details
| ) |  |
| protected pure virtual

Implemented in flutter::EngineMethodResult< T >.

Referenced by flutter::MethodResult< EncodableValue >::Error().

## ◆ NotImplemented()

template<typename T = EncodableValue>

void flutter::MethodResult< T >::NotImplemented | ( |  | ) |
| inline

Definition at line 59 of file method_result.h.

59 { NotImplementedInternal(); }

Referenced by flutter::TEST().

## ◆ NotImplementedInternal()

template<typename T = EncodableValue>

virtual void flutter::MethodResult< T >::NotImplementedInternal | ( |  | ) |
| protected pure virtual

Implemented in flutter::EngineMethodResult< T >, and flutter::MethodResultFunctions< T >.

Referenced by flutter::MethodResult< EncodableValue >::NotImplemented().

## ◆ operator=()

template<typename T = EncodableValue>

MethodResult& flutter::MethodResult< T >::operator= | ( | MethodResult< T > const & |  | ) |
| delete

## ◆ Success() [1/2]

template<typename T = EncodableValue>

void flutter::MethodResult< T >::Success | ( |  | ) |
| inline

Definition at line 33 of file method_result.h.

33 { SuccessInternal(nullptr); }

## ◆ Success() [2/2]

template<typename T = EncodableValue>

void flutter::MethodResult< T >::Success | ( | const T & | result | ) |
| inline

Definition at line 29 of file method_result.h.

29 { SuccessInternal(&result); }

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

## ◆ SuccessInternal()

template<typename T = EncodableValue>

virtual void flutter::MethodResult< T >::SuccessInternal | ( | const T * | result | ) |
| protected pure virtual

Implemented in flutter::EngineMethodResult< T >.

Referenced by flutter::MethodResult< EncodableValue >::Success().

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

- shell/platform/common/client_wrapper/include/flutter/method_result.h

flutter::MethodResult::NotImplementedInternal
virtual void NotImplementedInternal()=0
flutter::MethodResult::SuccessInternal
virtual void SuccessInternal(const T *result)=0
flutter::MethodResult::ErrorInternal
virtual void ErrorInternal(const std::string &error_code, const std::string &error_message, const T *error_details)=0