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

Definition at line 353 of file dart_args.h.

Member Typedef Documentation

◆ FfiReturn

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

Definition at line 354 of file dart_args.h.

Member Function Documentation

◆ AllowedAsLeafCall()

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

Definition at line 368 of file dart_args.h.

368 {
369 if constexpr (sizeof...(Args) > 0) {
370 return AllowedInLeafCall<Return>() && AllowedInLeafCall<Args...>();
371 }
372 return AllowedInLeafCall<Return>();
373 }
bool AllowedInLeafCall()
Definition dart_args.h:295

◆ Call()

template<typename C , typename Return , typename... Args, Return(C::*)(Args...) method>
static FfiReturn tonic::FfiDispatcher< C, Return(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 358 of file dart_args.h.

361 {
362 // Call C++ method on receiver, forwarding converted native arguments.
363 return DartConverter<Return>::ToFfi((static_cast<C*>(receiver)->*method)(
364 DartConverter<typename std::remove_const<typename std::remove_reference<
365 Args>::type>::type>::FromFfi(args)...));
366 }
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args

◆ GetReturnDartRepresentation()

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

Definition at line 379 of file dart_args.h.

◆ GetReturnFfiRepresentation()

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

Definition at line 375 of file dart_args.h.

◆ WriteDartArguments()

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

Definition at line 391 of file dart_args.h.

391 {
392 *stream << tonic::DartConverter<C*>::GetDartRepresentation();
393 if constexpr (sizeof...(Args) > 0) {
394 *stream << ", ";
396 }
397 }
void WriteDartArguments(std::ostringstream *stream)
Definition dart_args.h:283

◆ WriteFfiArguments()

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

Definition at line 383 of file dart_args.h.

383 {
384 *stream << tonic::DartConverter<C*>::GetFfiRepresentation();
385 if constexpr (sizeof...(Args) > 0) {
386 *stream << ", ";
388 }
389 }
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...) method>
const size_t tonic::FfiDispatcher< C, Return(C::*)(Args...), method >::n_args = sizeof...(Args)
static

Definition at line 355 of file dart_args.h.


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