Flutter Engine
tonic::DartConverterInteger< T > Struct Template Reference

#include <dart_converter.h>

Static Public Member Functions

static Dart_Handle ToDart (T val)
 
static void SetReturnValue (Dart_NativeArguments args, T val)
 
static T FromDart (Dart_Handle handle)
 
static T FromArguments (Dart_NativeArguments args, int index, Dart_Handle &exception)
 

Detailed Description

template<typename T>
struct tonic::DartConverterInteger< T >

Definition at line 69 of file dart_converter.h.

Member Function Documentation

◆ FromArguments()

template<typename T>
static T tonic::DartConverterInteger< T >::FromArguments ( Dart_NativeArguments  args,
int  index,
Dart_Handle &  exception 
)
inlinestatic

Definition at line 82 of file dart_converter.h.

84  {
85  int64_t result = 0;
86  Dart_GetNativeIntegerArgument(args, index, &result);
87  return static_cast<T>(result);
88  }
G_BEGIN_DECLS FlValue * args

◆ FromDart()

template<typename T>
static T tonic::DartConverterInteger< T >::FromDart ( Dart_Handle  handle)
inlinestatic

Definition at line 76 of file dart_converter.h.

76  {
77  int64_t result = 0;
78  Dart_IntegerToInt64(handle, &result);
79  return static_cast<T>(result);
80  }

◆ SetReturnValue()

template<typename T>
static void tonic::DartConverterInteger< T >::SetReturnValue ( Dart_NativeArguments  args,
val 
)
inlinestatic

Definition at line 72 of file dart_converter.h.

72  {
73  Dart_SetIntegerReturnValue(args, val);
74  }
G_BEGIN_DECLS FlValue * args

◆ ToDart()

template<typename T>
static Dart_Handle tonic::DartConverterInteger< T >::ToDart ( val)
inlinestatic

Definition at line 70 of file dart_converter.h.

70 { return Dart_NewInteger(val); }

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