MySQL 9.1.0
Source Code Documentation
|
This class is to provide functionality to encode/decode the primitive types into/out of defined stream, without boundary check. More...
#include <primitive_type_codec.h>
Public Member Functions | |
size_t | write_bytes (unsigned char *stream, const uint8_t &data) |
size_t | write_bytes (unsigned char *stream, const uint16_t &data) |
size_t | write_bytes (unsigned char *stream, const uint32_t &data) |
size_t | write_bytes (unsigned char *stream, const uint32_t &data) |
size_t | write_bytes (unsigned char *stream, const uint64_t &data) |
size_t | write_bytes (unsigned char *stream, const uint64_t &data) |
size_t | write_bytes (unsigned char *stream, const uint64_t &data) |
size_t | write_bytes (unsigned char *stream, const uint64_t &data) |
size_t | write_bytes (unsigned char *stream, const float &data) |
size_t | write_bytes (unsigned char *stream, const double &data) |
size_t | write_bytes (unsigned char *stream, const float &data) |
size_t | write_bytes (unsigned char *stream, const double &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, uint8_t &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, uint16_t &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, uint32_t &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, uint32_t &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, uint64_t &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, uint64_t &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, uint64_t &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, uint64_t &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, float &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, double &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, float &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, double &data) |
size_t | write_bytes (unsigned char *stream, const int8_t &data) |
size_t | write_bytes (unsigned char *stream, const uint8_t &data) |
size_t | write_bytes (unsigned char *stream, const int16_t &data) |
size_t | write_bytes (unsigned char *stream, const uint16_t &data) |
size_t | write_bytes (unsigned char *stream, const int32_t &data) |
size_t | write_bytes (unsigned char *stream, const uint32_t &data) |
size_t | write_bytes (unsigned char *stream, const int64_t &data) |
size_t | write_bytes (unsigned char *stream, const uint64_t &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, int8_t &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, uint8_t &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, int16_t &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, uint16_t &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, int32_t &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, uint32_t &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, int64_t &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, uint64_t &data) |
size_t | write_bytes (unsigned char *stream, const std::string &data) |
size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, std::string &data) |
Static Public Member Functions | |
template<Field_size field_size> | |
static size_t | write_bytes (unsigned char *stream, const Type &data) |
Writes field_size bytes stored in data into stream. More... | |
template<Field_size field_size> | |
static size_t | read_bytes (const unsigned char *stream, std::size_t stream_bytes, Type &data) |
Reads field_size bytes stored in the stream into data. More... | |
template<Field_size field_size> | |
static size_t | count_write_bytes (const Type &data) |
Returns number of bytes required to hold information Returns field_size or size of bytes required to write variable length data. More... | |
This class is to provide functionality to encode/decode the primitive types into/out of defined stream, without boundary check.
Type | Type of the field being read / written |
|
inlinestatic |
Returns number of bytes required to hold information Returns field_size or size of bytes required to write variable length data.
field_size | Number of bytes stored in the stream |
[in] | data | Count bytes for this variable |
size_t mysql::serialization::Primitive_type_codec< double >::read_bytes< 8 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
double & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< double >::read_bytes< 0 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
double & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< float >::read_bytes< 4 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
float & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< float >::read_bytes< 0 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
float & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< int16_t >::read_bytes< 0 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
int16_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< int32_t >::read_bytes< 0 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
int32_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< int64_t >::read_bytes< 0 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
int64_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< int8_t >::read_bytes< 0 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
int8_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< std::string >::read_bytes | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
std::string & | data | ||
) |
|
static |
Reads field_size bytes stored in the stream into data.
field_size | Number of bytes stored in the stream |
[in] | stream | Input stream |
[in] | stream_bytes | Number of bytes in the stream |
[in,out] | data | Output value |
size_t mysql::serialization::Primitive_type_codec< uint16_t >::read_bytes< 2 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
uint16_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint16_t >::read_bytes< 0 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
uint16_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint32_t >::read_bytes< 3 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
uint32_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint32_t >::read_bytes< 4 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
uint32_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint32_t >::read_bytes< 0 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
uint32_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint64_t >::read_bytes< 5 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
uint64_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint64_t >::read_bytes< 6 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
uint64_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint64_t >::read_bytes< 7 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
uint64_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint64_t >::read_bytes< 8 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
uint64_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint64_t >::read_bytes< 0 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
uint64_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint8_t >::read_bytes< 1 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
uint8_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint8_t >::read_bytes< 0 > | ( | const unsigned char * | stream, |
std::size_t | stream_bytes, | ||
uint8_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< double >::write_bytes< 8 > | ( | unsigned char * | stream, |
const double & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< double >::write_bytes< 0 > | ( | unsigned char * | stream, |
const double & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< float >::write_bytes< 4 > | ( | unsigned char * | stream, |
const float & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< float >::write_bytes< 0 > | ( | unsigned char * | stream, |
const float & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< int16_t >::write_bytes< 0 > | ( | unsigned char * | stream, |
const int16_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< int32_t >::write_bytes< 0 > | ( | unsigned char * | stream, |
const int32_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< int64_t >::write_bytes< 0 > | ( | unsigned char * | stream, |
const int64_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< int8_t >::write_bytes< 0 > | ( | unsigned char * | stream, |
const int8_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< std::string >::write_bytes | ( | unsigned char * | stream, |
const std::string & | data | ||
) |
|
static |
Writes field_size bytes stored in data into stream.
field_size | Number of bytes stored into the stream |
[in,out] | stream | Output stream |
[in] | data | Value to write |
size_t mysql::serialization::Primitive_type_codec< uint16_t >::write_bytes< 2 > | ( | unsigned char * | stream, |
const uint16_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint16_t >::write_bytes< 0 > | ( | unsigned char * | stream, |
const uint16_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint32_t >::write_bytes< 3 > | ( | unsigned char * | stream, |
const uint32_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint32_t >::write_bytes< 4 > | ( | unsigned char * | stream, |
const uint32_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint32_t >::write_bytes< 0 > | ( | unsigned char * | stream, |
const uint32_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint64_t >::write_bytes< 5 > | ( | unsigned char * | stream, |
const uint64_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint64_t >::write_bytes< 6 > | ( | unsigned char * | stream, |
const uint64_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint64_t >::write_bytes< 7 > | ( | unsigned char * | stream, |
const uint64_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint64_t >::write_bytes< 8 > | ( | unsigned char * | stream, |
const uint64_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint64_t >::write_bytes< 0 > | ( | unsigned char * | stream, |
const uint64_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint8_t >::write_bytes< 1 > | ( | unsigned char * | stream, |
const uint8_t & | data | ||
) |
size_t mysql::serialization::Primitive_type_codec< uint8_t >::write_bytes< 0 > | ( | unsigned char * | stream, |
const uint8_t & | data | ||
) |