| Flutter Linux Embedder |

Public Member Functions | Protected Member Functions | List of all members
flutter::MessageCodec< T > Class Template Referenceabstract

`#include <message_codec.h>`

## Public Member Functions
| MessageCodec ()=default
virtual | ~MessageCodec ()=default
| MessageCodec (MessageCodec< T > const &)=delete
MessageCodec & | operator= (MessageCodec< T > const &)=delete
std::unique_ptr< T > | DecodeMessage (const uint8_t *binary_message, const size_t message_size) const
std::unique_ptr< T > | DecodeMessage (const std::vector< uint8_t > &binary_message) const
std::unique_ptr< std::vector< uint8_t > > | EncodeMessage (const T &message) const

## Protected Member Functions
virtual std::unique_ptr< T > | DecodeMessageInternal (const uint8_t *binary_message, const size_t message_size) const =0
virtual std::unique_ptr< std::vector< uint8_t > > | EncodeMessageInternal (const T &message) const =0

## Detailed Description

### template<typename T>
class flutter::MessageCodec< T >

Definition at line 17 of file message_codec.h.

## Constructor & Destructor Documentation

## ◆ MessageCodec() [1/2]

template<typename T >

flutter::MessageCodec< T >::MessageCodec | ( |  | ) |
| default

## ◆ ~MessageCodec()

template<typename T >

virtual flutter::MessageCodec< T >::~MessageCodec | ( |  | ) |
| virtual default

## ◆ MessageCodec() [2/2]

template<typename T >

flutter::MessageCodec< T >::MessageCodec | ( | MessageCodec< T > const & |  | ) |
| delete

## Member Function Documentation

## ◆ DecodeMessage() [1/2]

template<typename T >

std::unique_ptr<T> flutter::MessageCodec< T >::DecodeMessage | ( | const std::vector< uint8_t > & | binary_message | ) | const
| inline

Definition at line 36 of file message_codec.h.

37 {
38 size_t size = binary_message.size();
39 const uint8_t* data = size > 0 ? &binary_message[0] : nullptr;
40 return std::move(DecodeMessageInternal(data, size));
41 }
flutter::MessageCodec::DecodeMessageInternal
virtual std::unique_ptr< T > DecodeMessageInternal(const uint8_t *binary_message, const size_t message_size) const =0

References flutter::MessageCodec< T >::DecodeMessageInternal().

## ◆ DecodeMessage() [2/2]

template<typename T >

std::unique_ptr<T> flutter::MessageCodec< T >::DecodeMessage | ( | const uint8_t * | binary_message,
|  | const size_t | message_size
| ) |  | const
| inline

Definition at line 29 of file message_codec.h.

30 {
31 return std::move(DecodeMessageInternal(binary_message, message_size));
32 }

References flutter::MessageCodec< T >::DecodeMessageInternal().

Referenced by flutter::CheckEncodeDecode(), flutter::CheckEncodeDecodeWithEncodePrefix(), flutter::JsonMethodCodec::DecodeAndProcessResponseEnvelopeInternal(), flutter::JsonMethodCodec::DecodeMethodCallInternal(), and flutter::TEST().

## ◆ DecodeMessageInternal()

template<typename T >

virtual std::unique_ptr<T> flutter::MessageCodec< T >::DecodeMessageInternal | ( | const uint8_t * | binary_message,
|  | const size_t | message_size
| ) |  | const
| protected pure virtual

Implemented in flutter::JsonMessageCodec, and flutter::StandardMessageCodec.

Referenced by flutter::MessageCodec< T >::DecodeMessage().

## ◆ EncodeMessage()

template<typename T >

std::unique_ptr<std::vector<uint8_t> > flutter::MessageCodec< T >::EncodeMessage | ( | const T & | message | ) | const
| inline

Definition at line 45 of file message_codec.h.

45 {
46 return std::move(EncodeMessageInternal(message));
47 }
flutter::MessageCodec::EncodeMessageInternal
virtual std::unique_ptr< std::vector< uint8_t > > EncodeMessageInternal(const T &message) const =0

References flutter::MessageCodec< T >::EncodeMessageInternal().

Referenced by flutter::CheckEncodeDecode(), flutter::CheckEncodeDecodeWithEncodePrefix(), flutter::JsonMethodCodec::EncodeErrorEnvelopeInternal(), flutter::JsonMethodCodec::EncodeMethodCallInternal(), flutter::JsonMethodCodec::EncodeSuccessEnvelopeInternal(), and flutter::TEST().

## ◆ EncodeMessageInternal()

template<typename T >

virtual std::unique_ptr<std::vector<uint8_t> > flutter::MessageCodec< T >::EncodeMessageInternal | ( | const T & | message | ) | const
| protected pure virtual

Implemented in flutter::JsonMessageCodec, and flutter::StandardMessageCodec.

Referenced by flutter::MessageCodec< T >::EncodeMessage().

## ◆ operator=()

template<typename T >

MessageCodec& flutter::MessageCodec< T >::operator= | ( | MessageCodec< T > const & |  | ) |
| delete

The documentation for this class was generated from the following file:

- shell/platform/common/client_wrapper/include/flutter/message_codec.h