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

#include <dart_args.h>

Public Types

using FfiReturn = typename DartConverter< Return >::FfiType
 

Static Public Member Functions

static FfiReturn Call (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 Return, typename... Args, Return(*)(Args...) function>
struct tonic::FfiDispatcher< void, Return(*)(Args...), function >

Definition at line 306 of file dart_args.h.

Member Typedef Documentation

◆ FfiReturn

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

Definition at line 307 of file dart_args.h.

Member Function Documentation

◆ AllowedAsLeafCall()

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

Definition at line 320 of file dart_args.h.

320 {
321 if constexpr (sizeof...(Args) > 0) {
322 return AllowedInLeafCall<Return>() && AllowedInLeafCall<Args...>();
323 }
324 return AllowedInLeafCall<Return>();
325 }
bool AllowedInLeafCall()
Definition dart_args.h:295

◆ Call()

template<typename Return , typename... Args, Return(*)(Args...) function>
static FfiReturn tonic::FfiDispatcher< void, Return(*)(Args...), function >::Call ( typename DartConverter< typename std::remove_const< typename std::remove_reference< Args >::type >::type >::FfiType...  args)
inlinestatic

Definition at line 311 of file dart_args.h.

313 {
314 // Call C++ function, forwarding converted native arguments.
315 return DartConverter<Return>::ToFfi(function(
316 DartConverter<typename std::remove_const<typename std::remove_reference<
317 Args>::type>::type>::FromFfi(args)...));
318 }
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
Dart_NativeFunction function
Definition fuchsia.cc:51

◆ GetReturnDartRepresentation()

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

Definition at line 331 of file dart_args.h.

◆ GetReturnFfiRepresentation()

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

Definition at line 327 of file dart_args.h.

◆ WriteDartArguments()

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

Definition at line 341 of file dart_args.h.

341 {
342 if constexpr (sizeof...(Args) > 0) {
344 }
345 }
void WriteDartArguments(std::ostringstream *stream)
Definition dart_args.h:283

◆ WriteFfiArguments()

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

Definition at line 335 of file dart_args.h.

335 {
336 if constexpr (sizeof...(Args) > 0) {
338 }
339 }
void WriteFfiArguments(std::ostringstream *stream)
Definition dart_args.h:270

Member Data Documentation

◆ n_args

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

Definition at line 308 of file dart_args.h.


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