24 output(std::ostream &out)
const {
27 out <<
"button " << _button <<
" down";
31 out <<
"button " << _button <<
" resume down";
35 out <<
"button " << _button <<
" up";
39 out <<
"button " << _button <<
" repeat";
43 out <<
"keystroke " << _keycode;
49 TextEncoder::get_default_encoding());
57 out <<
"raw button " << _button <<
" down";
61 out <<
"raw button " << _button <<
" up";
95 TextEncoder::get_default_encoding()));
127 TextEncoder::get_default_encoding());
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
uint8_t get_uint8()
Extracts an unsigned 8-bit integer.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
std::string get_string()
Extracts a variable-length string.
void add_uint16(uint16_t value)
Adds an unsigned 16-bit integer to the datagram.
void add_string(const std::string &str)
Adds a variable-length string to the datagram.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
std::string encode_wtext(const std::wstring &wtext) const
Encodes a wide-text string into a single-char string, according to the current encoding.
uint16_t get_uint16()
Extracts an unsigned 16-bit integer.
void add_uint8(uint8_t value)
Adds an unsigned 8-bit integer to the datagram.
A class to retrieve the individual data elements previously stored in a Datagram.
std::wstring decode_text(const std::string &text) const
Returns the given wstring decoded to a single-byte string, via the current encoding system.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...