Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::KeyDataPacket Class Reference

#include <key_data_packet.h>

Public Member Functions

 KeyDataPacket (const KeyData &event, const char *character)
 
 ~KeyDataPacket ()
 
 KeyDataPacket (KeyDataPacket const &)=delete
 
KeyDataPacketoperator= (KeyDataPacket const &)=delete
 
const std::vector< uint8_t > & data () const
 

Detailed Description

Definition at line 20 of file key_data_packet.h.

Constructor & Destructor Documentation

◆ KeyDataPacket() [1/2]

flutter::KeyDataPacket::KeyDataPacket ( const KeyData event,
const char *  character 
)

Definition at line 14 of file key_data_packet.cc.

14 {
15 size_t char_size = character == nullptr ? 0 : strlen(character);
16 uint64_t char_size_64 = char_size;
17 data_.resize(sizeof(char_size_64) + sizeof(KeyData) + char_size);
18 memcpy(CharacterSizeStart(), &char_size_64, sizeof(char_size_64));
19 memcpy(KeyDataStart(), &event, sizeof(KeyData));
20 if (character != nullptr) {
21 memcpy(CharacterStart(), character, char_size);
22 }
23}
FlKeyEvent * event

◆ ~KeyDataPacket()

flutter::KeyDataPacket::~KeyDataPacket ( )
default

◆ KeyDataPacket() [2/2]

flutter::KeyDataPacket::KeyDataPacket ( KeyDataPacket const &  )
delete

Member Function Documentation

◆ data()

const std::vector< uint8_t > & flutter::KeyDataPacket::data ( ) const
inline

Definition at line 32 of file key_data_packet.h.

32{ return data_; }

◆ operator=()

KeyDataPacket & flutter::KeyDataPacket::operator= ( KeyDataPacket const &  )
delete

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