#include <finalizable_data.h>
Definition at line 21 of file finalizable_data.h.
◆ MessageFinalizableData()
dart::MessageFinalizableData::MessageFinalizableData |
( |
| ) |
|
|
inline |
Definition at line 23 of file finalizable_data.h.
24 : records_(0), get_position_(0), take_position_(0), external_size_(0) {}
◆ ~MessageFinalizableData()
dart::MessageFinalizableData::~MessageFinalizableData |
( |
| ) |
|
|
inline |
Definition at line 26 of file finalizable_data.h.
26 {
27 for (intptr_t
i = take_position_;
i < records_.length();
i++) {
28 records_[
i].callback(
nullptr, records_[
i].peer);
29 }
30 }
◆ DropFinalizers()
void dart::MessageFinalizableData::DropFinalizers |
( |
| ) |
|
|
inline |
Definition at line 71 of file finalizable_data.h.
71 {
72 records_.Clear();
73 get_position_ = 0;
74 take_position_ = 0;
75 external_size_ = 0;
76 }
◆ external_size()
intptr_t dart::MessageFinalizableData::external_size |
( |
| ) |
const |
|
inline |
◆ Get()
Definition at line 51 of file finalizable_data.h.
51 {
52 ASSERT(get_position_ < records_.length());
53 return records_[get_position_++];
54 }
◆ Put()
If [successful_write_callback] is provided, it's invoked when message was serialized successfully. [callback] is invoked when serialization failed.
Definition at line 35 of file finalizable_data.h.
39 {
40 FinalizableData finalizable_data;
41 finalizable_data.data =
data;
42 finalizable_data.peer = peer;
43 finalizable_data.callback =
callback;
44 finalizable_data.successful_write_callback = successful_write_callback;
45 records_.Add(finalizable_data);
47 }
intptr_t external_size() const
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
static int8_t data[kExtLength]
◆ SerializationSucceeded()
void dart::MessageFinalizableData::SerializationSucceeded |
( |
| ) |
|
|
inline |
Definition at line 63 of file finalizable_data.h.
63 {
64 for (intptr_t
i = 0;
i < records_.length();
i++) {
65 if (records_[
i].successful_write_callback !=
nullptr) {
66 records_[
i].successful_write_callback(
nullptr, records_[
i].peer);
67 }
68 }
69 }
◆ Take()
Definition at line 58 of file finalizable_data.h.
58 {
59 ASSERT(take_position_ < records_.length());
60 return records_[take_position_++];
61 }
The documentation for this class was generated from the following file: