Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
tonic::FfiDispatcher< C, Return(C::*)(Args...) const, method > Struct Template Reference

#include <dart_args.h>

Public Types

using FfiReturn = typename DartConverter< Return >::FfiType
 

Static Public Member Functions

static FfiReturn Call (DartWrappable *receiver, typename DartConverter< typename std::remove_const< typename std::remove_reference< Args >::type >::type >::FfiType... args)
 
static bool AllowedAsLeafCall ()
 
static const char * GetReturnFfiRepresentation ()
 
static const char * GetReturnDartRepresentation ()
 
static void WriteFfiArguments (std::ostringstream *stream)
 
static void WriteDartArguments (std::ostringstream *stream)
 

Static Public Attributes

static const size_t n_args = sizeof...(Args)
 

Detailed Description

template<typename C, typename Return, typename... Args, Return(C::*)(Args...) const method>
struct tonic::FfiDispatcher< C, Return(C::*)(Args...) const, method >

Definition at line 405 of file dart_args.h.

Member Typedef Documentation

◆ FfiReturn

template<typename C , typename Return , typename... Args, Return(C::*)(Args...) const method>
using tonic::FfiDispatcher< C, Return(C::*)(Args...) const, method >::FfiReturn = typename DartConverter<Return>::FfiType

Definition at line 406 of file dart_args.h.

Member Function Documentation

◆ AllowedAsLeafCall()

template<typename C , typename Return , typename... Args, Return(C::*)(Args...) const method>
static bool tonic::FfiDispatcher< C, Return(C::*)(Args...) const, method >::AllowedAsLeafCall ( )
inlinestatic

Definition at line 420 of file dart_args.h.

420 {
421 if constexpr (sizeof...(Args) > 0) {
422 return AllowedInLeafCall<Return>() && AllowedInLeafCall<Args...>();
423 }
424 return AllowedInLeafCall<Return>();
425 }
bool AllowedInLeafCall()
Definition dart_args.h:295

◆ Call()

template<typename C , typename Return , typename... Args, Return(C::*)(Args...) const method>
static FfiReturn tonic::FfiDispatcher< C, Return(C::*)(Args...) const, method >::Call ( DartWrappable receiver,
typename DartConverter< typename std::remove_const< typename std::remove_reference< Args >::type >::type >::FfiType...  args 
)
inlinestatic

Definition at line 410 of file dart_args.h.

413 {
414 // Call C++ method on receiver, forwarding converted native arguments.
415 return DartConverter<Return>::ToFfi((static_cast<C*>(receiver)->*method)(
416 DartConverter<typename std::remove_const<typename std::remove_reference<
417 Args>::type>::type>::FromFfi(args)...));
418 }
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args

◆ GetReturnDartRepresentation()

template<typename C , typename Return , typename... Args, Return(C::*)(Args...) const method>
static const char * tonic::FfiDispatcher< C, Return(C::*)(Args...) const, method >::GetReturnDartRepresentation ( )
inlinestatic

Definition at line 431 of file dart_args.h.

◆ GetReturnFfiRepresentation()

template<typename C , typename Return , typename... Args, Return(C::*)(Args...) const method>
static const char * tonic::FfiDispatcher< C, Return(C::*)(Args...) const, method >::GetReturnFfiRepresentation ( )
inlinestatic

Definition at line 427 of file dart_args.h.

◆ WriteDartArguments()

template<typename C , typename Return , typename... Args, Return(C::*)(Args...) const method>
static void tonic::FfiDispatcher< C, Return(C::*)(Args...) const, method >::WriteDartArguments ( std::ostringstream *  stream)
inlinestatic

Definition at line 443 of file dart_args.h.

443 {
444 *stream << tonic::DartConverter<C*>::GetDartRepresentation();
445 if constexpr (sizeof...(Args) > 0) {
446 *stream << ", ";
448 }
449 }
void WriteDartArguments(std::ostringstream *stream)
Definition dart_args.h:283

◆ WriteFfiArguments()

template<typename C , typename Return , typename... Args, Return(C::*)(Args...) const method>
static void tonic::FfiDispatcher< C, Return(C::*)(Args...) const, method >::WriteFfiArguments ( std::ostringstream *  stream)
inlinestatic

Definition at line 435 of file dart_args.h.

435 {
436 *stream << tonic::DartConverter<C*>::GetFfiRepresentation();
437 if constexpr (sizeof...(Args) > 0) {
438 *stream << ", ";
440 }
441 }
void WriteFfiArguments(std::ostringstream *stream)
Definition dart_args.h:270

Member Data Documentation

◆ n_args

template<typename C , typename Return , typename... Args, Return(C::*)(Args...) const method>
const size_t tonic::FfiDispatcher< C, Return(C::*)(Args...) const, method >::n_args = sizeof...(Args)
static

Definition at line 407 of file dart_args.h.


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