#include <standard_message_codec.h>
Definition at line 18 of file standard_message_codec.h.
◆ ~StandardMessageCodec()
flutter::StandardMessageCodec::~StandardMessageCodec |
( |
| ) |
|
|
default |
◆ StandardMessageCodec()
◆ DecodeMessageInternal()
std::unique_ptr< EncodableValue > flutter::StandardMessageCodec::DecodeMessageInternal |
( |
const uint8_t * |
binary_message, |
|
|
const size_t |
message_size |
|
) |
| const |
|
overrideprotectedvirtual |
◆ EncodeMessageInternal()
std::unique_ptr< std::vector< uint8_t > > flutter::StandardMessageCodec::EncodeMessageInternal |
( |
const EncodableValue & |
message | ) |
const |
|
overrideprotectedvirtual |
Implements flutter::MessageCodec< EncodableValue >.
Definition at line 329 of file standard_codec.cc.
330 {
331 auto encoded = std::make_unique<std::vector<uint8_t>>();
332 ByteBufferStreamWriter
stream(encoded.get());
334 return encoded;
335}
virtual void WriteValue(const EncodableValue &value, ByteStreamWriter *stream) const
◆ GetInstance()
Definition at line 293 of file standard_codec.cc.
294 {
295 if (!serializer) {
297 }
298 static auto* sInstances =
new std::map<
const StandardCodecSerializer*,
299 std::unique_ptr<StandardMessageCodec>>;
300 auto it = sInstances->find(serializer);
301 if (it == sInstances->end()) {
302
303
304 auto emplace_result = sInstances->emplace(
305 serializer, std::unique_ptr<StandardMessageCodec>(
307 it = emplace_result.first;
308 }
309 return *(it->second);
310}
static const StandardCodecSerializer & GetInstance()
StandardMessageCodec(StandardMessageCodec const &)=delete
SI auto map(std::index_sequence< I... >, Fn &&fn, const Args &... args) -> skvx::Vec< sizeof...(I), decltype(fn(args[0]...))>
◆ operator=()
The documentation for this class was generated from the following files: