#include <dart_byte_data.h>
Definition at line 15 of file dart_byte_data.h.
◆ DartByteData() [1/3]
Definition at line 57 of file dart_byte_data.cc.
58 : data_(nullptr), length_in_bytes_(0), dart_handle_(list) {
60 return;
61
67}
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)
@ Dart_TypedData_kByteData
DART_EXPORT bool Dart_IsNull(Dart_Handle object)
Dart_Handle ToDart(const T &object)
bool CheckAndHandleError(Dart_Handle handle)
◆ DartByteData() [2/3]
Definition at line 69 of file dart_byte_data.cc.
70 : data_(other.data_),
71 length_in_bytes_(other.length_in_bytes_),
72 dart_handle_(other.dart_handle_) {
73 other.data_ = nullptr;
74 other.dart_handle_ = nullptr;
75}
◆ DartByteData() [3/3]
tonic::DartByteData::DartByteData |
( |
| ) |
|
Definition at line 39 of file dart_byte_data.cc.
40 : data_(nullptr), length_in_bytes_(0), dart_handle_(nullptr) {}
◆ ~DartByteData()
tonic::DartByteData::~DartByteData |
( |
| ) |
|
◆ Copy()
std::vector< char > tonic::DartByteData::Copy |
( |
| ) |
const |
Definition at line 81 of file dart_byte_data.cc.
81 {
82 const char* ptr = static_cast<const char*>(data_);
83 return std::vector<char>(ptr, ptr + length_in_bytes_);
84}
◆ Create()
Dart_Handle tonic::DartByteData::Create |
( |
const void * |
data, |
|
|
size_t |
length |
|
) |
| |
|
static |
Definition at line 25 of file dart_byte_data.cc.
25 {
28
29 return handle;
30 } else {
36 }
37}
static const size_t kExternalSizeThreshold
const void * data() const
DART_EXPORT Dart_Handle Dart_NewExternalTypedDataWithFinalizer(Dart_TypedData_Type type, void *data, intptr_t length, void *peer, intptr_t external_allocation_size, Dart_HandleFinalizer callback)
void * malloc(size_t size)
DART_EXPORT void FreeFinalizer(void *, void *value)
◆ dart_handle()
◆ data() [1/2]
void * tonic::DartByteData::data |
( |
| ) |
|
|
inline |
◆ data() [2/2]
const void * tonic::DartByteData::data |
( |
| ) |
const |
|
inline |
◆ length_in_bytes()
size_t tonic::DartByteData::length_in_bytes |
( |
| ) |
const |
|
inline |
◆ operator bool()
tonic::DartByteData::operator bool |
( |
| ) |
const |
|
inlineexplicit |
◆ Release()
void tonic::DartByteData::Release |
( |
| ) |
const |
Definition at line 86 of file dart_byte_data.cc.
86 {
87 if (data_) {
89 data_ = nullptr;
90 }
91}
DART_EXPORT Dart_Handle Dart_TypedDataReleaseData(Dart_Handle object)
◆ kExternalSizeThreshold
const size_t tonic::DartByteData::kExternalSizeThreshold = 1000 |
|
static |
The documentation for this class was generated from the following files: