|
| ProtoSize ()=default |
| ProtoSize class for Protocol Buffer serialization size calculation.
|
|
uint32_t | get_size () const |
|
void | add_int32 (uint32_t field_id_size, int32_t value) |
| Common parameters for all add_*_field methods.
|
|
void | add_int32_force (uint32_t field_id_size, int32_t value) |
| Calculates and adds the size of an int32 field to the total message size (force version)
|
|
void | add_uint32 (uint32_t field_id_size, uint32_t value) |
| Calculates and adds the size of a uint32 field to the total message size.
|
|
void | add_uint32_force (uint32_t field_id_size, uint32_t value) |
| Calculates and adds the size of a uint32 field to the total message size (force version)
|
|
void | add_bool (uint32_t field_id_size, bool value) |
| Calculates and adds the size of a boolean field to the total message size.
|
|
void | add_bool_force (uint32_t field_id_size, bool value) |
| Calculates and adds the size of a boolean field to the total message size (force version)
|
|
void | add_float (uint32_t field_id_size, float value) |
| Calculates and adds the size of a float field to the total message size.
|
|
void | add_fixed32 (uint32_t field_id_size, uint32_t value) |
| Calculates and adds the size of a fixed32 field to the total message size.
|
|
void | add_sfixed32 (uint32_t field_id_size, int32_t value) |
| Calculates and adds the size of a sfixed32 field to the total message size.
|
|
void | add_sint32 (uint32_t field_id_size, int32_t value) |
| Calculates and adds the size of a sint32 field to the total message size.
|
|
void | add_sint32_force (uint32_t field_id_size, int32_t value) |
| Calculates and adds the size of a sint32 field to the total message size (force version)
|
|
void | add_int64 (uint32_t field_id_size, int64_t value) |
| Calculates and adds the size of an int64 field to the total message size.
|
|
void | add_int64_force (uint32_t field_id_size, int64_t value) |
| Calculates and adds the size of an int64 field to the total message size (force version)
|
|
void | add_uint64 (uint32_t field_id_size, uint64_t value) |
| Calculates and adds the size of a uint64 field to the total message size.
|
|
void | add_uint64_force (uint32_t field_id_size, uint64_t value) |
| Calculates and adds the size of a uint64 field to the total message size (force version)
|
|
void | add_length (uint32_t field_id_size, size_t len) |
| Calculates and adds the size of a length-delimited field (string/bytes) to the total message size.
|
|
void | add_length_force (uint32_t field_id_size, size_t len) |
| Calculates and adds the size of a length-delimited field (string/bytes) to the total message size (repeated field version)
|
|
void | add_precalculated_size (uint32_t size) |
| Adds a pre-calculated size directly to the total.
|
|
void | add_message_field (uint32_t field_id_size, uint32_t nested_size) |
| Calculates and adds the size of a nested message field to the total message size.
|
|
void | add_message_field_force (uint32_t field_id_size, uint32_t nested_size) |
| Calculates and adds the size of a nested message field to the total message size (force version)
|
|
void | add_message_object (uint32_t field_id_size, const ProtoMessage &message) |
| Calculates and adds the size of a nested message field to the total message size.
|
|
void | add_message_object_force (uint32_t field_id_size, const ProtoMessage &message) |
| Calculates and adds the size of a nested message field to the total message size (force version)
|
|
template<typename MessageType > |
void | add_repeated_message (uint32_t field_id_size, const std::vector< MessageType > &messages) |
| Calculates and adds the sizes of all messages in a repeated field to the total message size.
|
|
|
static constexpr uint32_t | varint (uint32_t value) |
| Calculates the size in bytes needed to encode a uint32_t value as a varint.
|
|
static constexpr uint32_t | varint (uint64_t value) |
| Calculates the size in bytes needed to encode a uint64_t value as a varint.
|
|
static constexpr uint32_t | varint (int32_t value) |
| Calculates the size in bytes needed to encode an int32_t value as a varint.
|
|
static constexpr uint32_t | varint (int64_t value) |
| Calculates the size in bytes needed to encode an int64_t value as a varint.
|
|
static constexpr uint32_t | field (uint32_t field_id, uint32_t type) |
| Calculates the size in bytes needed to encode a field ID and wire type.
|
|
Definition at line 362 of file proto.h.