Flutter Linux Embedder
flutter::MessageCodec< T > Class Template Referenceabstract

#include <message_codec.h>

Public Member Functions

 MessageCodec ()=default
 
virtual ~MessageCodec ()=default
 
 MessageCodec (MessageCodec< T > const &)=delete
 
MessageCodecoperator= (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 ( )
virtualdefault

◆ 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  }

◆ 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

◆ DecodeMessageInternal()

template<typename T >
virtual std::unique_ptr<T> flutter::MessageCodec< T >::DecodeMessageInternal ( const uint8_t *  binary_message,
const size_t  message_size 
) const
protectedpure virtual

◆ EncodeMessage()

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

◆ EncodeMessageInternal()

template<typename T >
virtual std::unique_ptr<std::vector<uint8_t> > flutter::MessageCodec< T >::EncodeMessageInternal ( const T &  message) const
protectedpure virtual

◆ operator=()

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

The documentation for this class was generated from the following file:
flutter::MessageCodec::EncodeMessageInternal
virtual std::unique_ptr< std::vector< uint8_t > > EncodeMessageInternal(const T &message) const =0
flutter::MessageCodec::DecodeMessageInternal
virtual std::unique_ptr< T > DecodeMessageInternal(const uint8_t *binary_message, const size_t message_size) const =0