Flutter Engine
tonic::DartConverter< const char * > Struct Template Reference

#include <dart_converter.h>

Static Public Member Functions

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

Detailed Description

template<>
struct tonic::DartConverter< const char * >

Definition at line 259 of file dart_converter.h.

Member Function Documentation

◆ FromArguments()

static const char* tonic::DartConverter< const char * >::FromArguments ( Dart_NativeArguments  args,
int  index,
Dart_Handle &  exception 
)
inlinestatic

Definition at line 274 of file dart_converter.h.

276  {
277  return FromDart(Dart_GetNativeArgument(args, index));
278  }

◆ FromDart()

static const char* tonic::DartConverter< const char * >::FromDart ( Dart_Handle  handle)
inlinestatic

Definition at line 268 of file dart_converter.h.

268  {
269  const char* result = nullptr;
270  Dart_StringToCString(handle, &result);
271  return result;
272  }

◆ SetReturnValue()

static void tonic::DartConverter< const char * >::SetReturnValue ( Dart_NativeArguments  args,
const char *  val 
)
inlinestatic

Definition at line 264 of file dart_converter.h.

References tonic::ToDart().

264  {
265  Dart_SetReturnValue(args, ToDart(val));
266  }
Dart_Handle ToDart(const T &object)

◆ ToDart()

static Dart_Handle tonic::DartConverter< const char * >::ToDart ( const char *  val)
inlinestatic

Definition at line 260 of file dart_converter.h.

260  {
261  return Dart_NewStringFromCString(val);
262  }

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