13template <Dart_TypedData_Type kTypeName,
typename ElemType>
15 : data_(nullptr), num_elements_(0), dart_handle_(nullptr) {}
17template <Dart_TypedData_Type kTypeName,
typename ElemType>
19 : data_(nullptr), num_elements_(0), dart_handle_(list) {
27 if (
type != kTypeName)
31template <Dart_TypedData_Type kTypeName,
typename ElemType>
35 num_elements_(other.num_elements_),
36 dart_handle_(other.dart_handle_) {
37 other.data_ =
nullptr;
38 other.num_elements_ = 0;
39 other.dart_handle_ =
nullptr;
42template <Dart_TypedData_Type kTypeName,
typename ElemType>
47template <Dart_TypedData_Type kTypeName,
typename ElemType>
53 dart_handle_ =
nullptr;
57template <Dart_TypedData_Type kTypeName,
typename ElemType>
68template <Dart_TypedData_Type kTypeName,
typename ElemType>
77template <Dart_TypedData_Type kTypeName,
typename ElemType>
81 const intptr_t buffer_length =
static_cast<intptr_t
>(
length);
87 intptr_t data_length = 0;
92 std::memmove(
data,
buffer, data_length *
sizeof(ElemType));
98#define TONIC_TYPED_DATA_DEFINE(name, type) \
99 template class TypedList<Dart_TypedData_k##name, type>; \
100 template struct DartConverter<name##List>;
104#undef TONIC_TYPED_DATA_DEFINE
Dart_Handle dart_handle() const
struct _Dart_Handle * Dart_Handle
DART_EXPORT Dart_Handle Dart_TypedDataReleaseData(Dart_Handle object)
DART_EXPORT Dart_Handle Dart_GetNativeArgument(Dart_NativeArguments args, int index)
DART_EXPORT Dart_Handle Dart_TypedDataAcquireData(Dart_Handle object, Dart_TypedData_Type *type, void **data, intptr_t *len)
DART_EXPORT Dart_Handle Dart_ThrowException(Dart_Handle exception)
struct _Dart_NativeArguments * Dart_NativeArguments
DART_EXPORT Dart_Handle Dart_NewTypedData(Dart_TypedData_Type type, intptr_t length)
DART_EXPORT void Dart_SetReturnValue(Dart_NativeArguments args, Dart_Handle retval)
DART_EXPORT bool Dart_IsNull(Dart_Handle object)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Dart_Handle ToDart(const T &object)
bool CheckAndHandleError(Dart_Handle handle)
std::shared_ptr< const fml::Mapping > data
#define TONIC_CHECK(condition)
#define TONIC_TYPED_DATA_DEFINE(name, type)
#define TONIC_TYPED_DATA_FOREACH(F)