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

#include <dart_args.h>

Static Public Member Functions

static void 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... Args, void(C::*)(Args...) method>
struct tonic::FfiDispatcher< C, void(C::*)(Args...), method >

Definition at line 499 of file dart_args.h.

Member Function Documentation

◆ AllowedAsLeafCall()

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

Definition at line 513 of file dart_args.h.

513 {
514 if constexpr (sizeof...(Args) > 0) {
515 return AllowedInLeafCall<Args...>();
516 }
517 return true;
518 }
bool AllowedInLeafCall()
Definition dart_args.h:295

◆ Call()

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

Definition at line 503 of file dart_args.h.

506 {
507 // Call C++ method on receiver, forwarding converted native arguments.
508 (static_cast<C*>(receiver)->*method)(
509 DartConverter<typename std::remove_const<typename std::remove_reference<
510 Args>::type>::type>::FromFfi(args)...);
511 }
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args

◆ GetReturnDartRepresentation()

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

Definition at line 524 of file dart_args.h.

◆ GetReturnFfiRepresentation()

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

Definition at line 520 of file dart_args.h.

◆ WriteDartArguments()

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

Definition at line 536 of file dart_args.h.

536 {
537 *stream << tonic::DartConverter<C*>::GetDartRepresentation();
538 if constexpr (sizeof...(Args) > 0) {
539 *stream << ", ";
541 }
542 }
void WriteDartArguments(std::ostringstream *stream)
Definition dart_args.h:283

◆ WriteFfiArguments()

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

Definition at line 528 of file dart_args.h.

528 {
529 *stream << tonic::DartConverter<C*>::GetFfiRepresentation();
530 if constexpr (sizeof...(Args) > 0) {
531 *stream << ", ";
533 }
534 }
void WriteFfiArguments(std::ostringstream *stream)
Definition dart_args.h:270

Member Data Documentation

◆ n_args

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

Definition at line 500 of file dart_args.h.


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