5#ifndef LIB_TONIC_TYPED_DATA_TYPED_LIST_H_
6#define LIB_TONIC_TYPED_DATA_TYPED_LIST_H_
8#include "third_party/dart/runtime/include/dart_api.h"
18template <Dart_TypedData_Type kTypeName,
typename ElemType>
26 ElemType&
at(intptr_t i) {
31 const ElemType&
at(intptr_t i)
const {
40 const ElemType*
data()
const {
return data_; }
48 intptr_t num_elements_;
52template <Dart_TypedData_Type kTypeName,
typename ElemType>
56 static constexpr const char* kFfiRepresentation =
"Handle";
57 static constexpr const char* kDartRepresentation =
"Object";
58 static constexpr bool kAllowedInLeafCall =
false;
77#define TONIC_TYPED_DATA_FOREACH(F) \
89#define TONIC_TYPED_DATA_DECLARE(name, type) \
90 using name##List = TypedList<Dart_TypedData_k##name, type>; \
91 extern template class TypedList<Dart_TypedData_k##name, type>; \
92 extern template struct DartConverter<name##List>;
96#undef TONIC_TYPED_DATA_DECLARE
const ElemType * data() const
Dart_Handle dart_handle() const
intptr_t num_elements() const
ElemType & at(intptr_t i)
const ElemType & operator[](intptr_t i) const
ElemType & operator[](intptr_t i)
const ElemType & at(intptr_t i) const
struct _Dart_Handle * Dart_Handle
struct _Dart_NativeArguments * Dart_NativeArguments
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
static const uint8_t buffer[]
Dart_Handle ToDart(const T &object)
static FfiType ToFfi(NativeType val)
static const char * GetDartRepresentation()
static NativeType FromFfi(FfiType val)
static bool AllowedInLeafCall()
static const char * GetFfiRepresentation()
#define TONIC_CHECK(condition)
#define TONIC_TYPED_DATA_DECLARE(name, type)
#define TONIC_TYPED_DATA_FOREACH(F)