#include <typed_data_utils.h>
Definition at line 14 of file typed_data_utils.h.
◆ TypedDataScope()
dart::bin::TypedDataScope::TypedDataScope |
( |
Dart_Handle |
data | ) |
|
|
explicit |
Definition at line 11 of file typed_data_utils.cc.
11 : data_handle_(
data) {
16 }
17}
struct _Dart_Handle * Dart_Handle
DART_EXPORT void Dart_PropagateError(Dart_Handle handle)
DART_EXPORT Dart_Handle Dart_TypedDataAcquireData(Dart_Handle object, Dart_TypedData_Type *type, void **data, intptr_t *len)
DART_EXPORT bool Dart_IsError(Dart_Handle handle)
◆ ~TypedDataScope()
dart::bin::TypedDataScope::~TypedDataScope |
( |
| ) |
|
|
inline |
◆ data()
void * dart::bin::TypedDataScope::data |
( |
| ) |
const |
|
inline |
◆ GetCString()
const char * dart::bin::TypedDataScope::GetCString |
( |
| ) |
const |
|
inline |
Definition at line 21 of file typed_data_utils.h.
21 {
22 return reinterpret_cast<const char*>(data_);
23 }
◆ GetScopedCString()
const char * dart::bin::TypedDataScope::GetScopedCString |
( |
| ) |
const |
Definition at line 58 of file typed_data_utils.cc.
58 {
62 return buf;
63}
const char * GetCString() const
intptr_t size_in_bytes() const
DART_EXPORT uint8_t * Dart_ScopeAllocate(intptr_t size)
◆ length()
intptr_t dart::bin::TypedDataScope::length |
( |
| ) |
const |
|
inline |
◆ Release()
void dart::bin::TypedDataScope::Release |
( |
| ) |
|
Definition at line 19 of file typed_data_utils.cc.
19 {
20 if (data_handle_ == nullptr) {
21 return;
22 }
26 }
27 data_handle_ = nullptr;
28 data_ = nullptr;
29 length_ = 0;
31}
@ Dart_TypedData_kInvalid
DART_EXPORT Dart_Handle Dart_TypedDataReleaseData(Dart_Handle object)
◆ size_in_bytes()
intptr_t dart::bin::TypedDataScope::size_in_bytes |
( |
| ) |
const |
Definition at line 33 of file typed_data_utils.cc.
33 {
34 switch (type_) {
39 return length_;
42 return length_ * 2;
46 return length_ * 4;
50 return length_ * 8;
52 return length_ * 16;
53 default:
55 }
56}
@ Dart_TypedData_kFloat32x4
@ Dart_TypedData_kFloat32
@ Dart_TypedData_kFloat64
@ Dart_TypedData_kUint8Clamped
@ Dart_TypedData_kByteData
◆ type()
The documentation for this class was generated from the following files: