class WireFormatLite
Defined at line 67 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
This class is for internal use by the protocol buffer library and by
protocol-compiler-generated message classes. It must not be called
directly by clients.
This class contains helpers for implementing the binary protocol buffer
wire format without the need for reflection. Use WireFormat when using
reflection.
This class is really a namespace that contains only static methods.
Public Members
static const int kTagTypeBits
static const uint32_t kTagTypeMask
static const int kMessageSetItemNumber
static const int kMessageSetTypeIdNumber
static const int kMessageSetMessageNumber
static const int kMessageSetItemStartTag
static const int kMessageSetItemEndTag
static const int kMessageSetTypeIdTag
static const int kMessageSetMessageTag
static const size_t kMessageSetItemTagsSize
static const size_t kFixed32Size
static const size_t kFixed64Size
static const size_t kSFixed32Size
static const size_t kSFixed64Size
static const size_t kFloatSize
static const size_t kDoubleSize
static const size_t kBoolSize
Public Methods
bool ReadBytes (io::CodedInputStream * input, std::string * value)
Analogous to ReadString().
bool ReadBytes (io::CodedInputStream * input, std::string ** p)
uint8_t * InternalWriteGroup (int field_number, const MessageLite & value, uint8_t * target, io::EpsCopyOutputStream * stream)
Whether to serialize deterministically (e.g., map keys are
sorted) is a property of a CodedOutputStream, and in the process
of serialization, the "ToArray" variants may be invoked. But they don't
have a CodedOutputStream available, so they get an additional parameter
telling them whether to serialize deterministically.
uint8_t * InternalWriteMessage (int field_number, const MessageLite & value, int cached_size, uint8_t * target, io::EpsCopyOutputStream * stream)
size_t Int32Size (const RepeatedField<int32_t> & value)
size_t Int64Size (const RepeatedField<int64_t> & value)
size_t EnumSize (const RepeatedField<int> & value)
size_t Int32SizeWithPackedTagSize (const RepeatedField<int32_t> & value, size_t tag_size, const internal::CachedSize & cached_size)
size_t Int64SizeWithPackedTagSize (const RepeatedField<int64_t> & value, size_t tag_size, const internal::CachedSize & cached_size)
size_t EnumSizeWithPackedTagSize (const RepeatedField<int> & value, size_t tag_size, const internal::CachedSize & cached_size)
void WireFormatLite ()
Defined at line 69 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
WireFormatLite::WireType WireTypeForFieldType (WireFormatLite::FieldType type)
Given a FieldDescriptor::Type return its WireType
Defined at line 140 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <typename MessageType>
bool ReadMessageNoVirtual (io::CodedInputStream * input, MessageType * value)
Defined at line 332 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <int field_number>
uint8_t * WriteInt32ToArrayWithField (::google::protobuf::io::EpsCopyOutputStream * stream, int32_t value, uint8_t * target)
Write fields, including tags.
Defined at line 529 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <int field_number>
uint8_t * WriteInt64ToArrayWithField (::google::protobuf::io::EpsCopyOutputStream * stream, int64_t value, uint8_t * target)
Defined at line 537 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <int field_number>
uint8_t * WriteEnumToArrayWithField (::google::protobuf::io::EpsCopyOutputStream * stream, int value, uint8_t * target)
Defined at line 545 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteGroupToArray (int field_number, const MessageLite & value, uint8_t * target)
For backward-compatibility, the last four methods also have versions
that are non-deterministic always.
Defined at line 656 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteMessageToArray (int field_number, const MessageLite & value, uint8_t * target)
Defined at line 666 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
CppType FieldTypeToCppType (FieldType type)
Helper method to get the CppType for a particular Type.
Defined at line 822 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint32_t MakeTag (int field_number, WireType type)
Helper functions for encoding and decoding tags. (Inlined below and in
_inl.h)
This is different from MakeTag(field->number(), field->type()) in the
case of packed repeated fields.
Defined at line 827 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
WireType GetTagWireType (uint32_t tag)
Defined at line 832 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
int GetTagFieldNumber (uint32_t tag)
Defined at line 836 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t TagSize (int field_number, WireFormatLite::FieldType type)
Compute the byte size of a tag. For groups, this includes both the start
and end tags.
Defined at line 840 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint32_t EncodeFloat (float value)
Helper functions for converting between floats/doubles and IEEE-754
uint32s/uint64s so that they can be written. (Assumes your platform
uses IEEE-754 floats.)
Defined at line 852 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
float DecodeFloat (uint32_t value)
Defined at line 856 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint64_t EncodeDouble (double value)
Defined at line 860 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
double DecodeDouble (uint64_t value)
Defined at line 864 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint32_t ZigZagEncode32 (int32_t n)
Helper functions for mapping signed integers to unsigned integers in
such a way that numbers with small magnitudes will encode to smaller
varints. If you simply static_cast a negative number to an unsigned
number and varint-encode it, it will always take 10 bytes, defeating
the purpose of varint. So, for the "sint32" and "sint64" field types,
we ZigZag-encode the values.
Defined at line 892 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
int32_t ZigZagDecode32 (uint32_t n)
Defined at line 898 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint64_t ZigZagEncode64 (int64_t n)
Defined at line 903 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
int64_t ZigZagDecode64 (uint64_t n)
Defined at line 909 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
bool ReadPackedEnumNoInline (io::CodedInputStream * input, bool (*)(int) is_valid, RepeatedField<int> * values)
Read a packed enum field. If the is_valid function is not nullptr, values
for which is_valid(value) returns false are silently dropped.
bool ReadPackedEnumPreserveUnknowns (io::CodedInputStream * input, int field_number, bool (*)(int) is_valid, io::CodedOutputStream * unknown_fields_stream, RepeatedField<int> * values)
Read a packed enum field. If the is_valid function is not nullptr, values
for which is_valid(value) returns false are appended to
unknown_fields_stream.
bool ReadString (io::CodedInputStream * input, std::string * value)
Read a string. ReadString(..., std::string* value) requires an
existing std::string.
Defined at line 917 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
bool ReadString (io::CodedInputStream * input, std::string ** p)
ReadString(..., std::string** p) is internal-only, and should only be
called from generated code. It starts by setting *p to "new std::string" if
*p ==
&GetEmptyStringAlreadyInited
(). It then invokes
ReadString(io::CodedInputStream* input, *p). This is useful for reducing
code size.
Defined at line 922 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPrimitive<int, google::protobuf::internal::WireFormatLite::TYPE_INT32> (io::CodedInputStream * input, int32_t * value)
Implementation details of ReadPrimitive.
Defined at line 941 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPrimitive<long, google::protobuf::internal::WireFormatLite::TYPE_INT64> (io::CodedInputStream * input, int64_t * value)
Defined at line 949 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPrimitive<unsigned int, google::protobuf::internal::WireFormatLite::TYPE_UINT32> (io::CodedInputStream * input, uint32_t * value)
Defined at line 957 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPrimitive<unsigned long, google::protobuf::internal::WireFormatLite::TYPE_UINT64> (io::CodedInputStream * input, uint64_t * value)
Defined at line 963 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPrimitive<int, google::protobuf::internal::WireFormatLite::TYPE_SINT32> (io::CodedInputStream * input, int32_t * value)
Defined at line 969 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPrimitive<long, google::protobuf::internal::WireFormatLite::TYPE_SINT64> (io::CodedInputStream * input, int64_t * value)
Defined at line 977 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPrimitive<unsigned int, google::protobuf::internal::WireFormatLite::TYPE_FIXED32> (io::CodedInputStream * input, uint32_t * value)
Defined at line 985 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPrimitive<unsigned long, google::protobuf::internal::WireFormatLite::TYPE_FIXED64> (io::CodedInputStream * input, uint64_t * value)
Defined at line 991 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPrimitive<int, google::protobuf::internal::WireFormatLite::TYPE_SFIXED32> (io::CodedInputStream * input, int32_t * value)
Defined at line 997 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPrimitive<long, google::protobuf::internal::WireFormatLite::TYPE_SFIXED64> (io::CodedInputStream * input, int64_t * value)
Defined at line 1006 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPrimitive<float, google::protobuf::internal::WireFormatLite::TYPE_FLOAT> (io::CodedInputStream * input, float * value)
Defined at line 1015 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPrimitive<double, google::protobuf::internal::WireFormatLite::TYPE_DOUBLE> (io::CodedInputStream * input, double * value)
Defined at line 1023 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPrimitive<bool, google::protobuf::internal::WireFormatLite::TYPE_BOOL> (io::CodedInputStream * input, bool * value)
Defined at line 1031 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPrimitive<int, google::protobuf::internal::WireFormatLite::TYPE_ENUM> (io::CodedInputStream * input, int * value)
Defined at line 1039 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
const uint8_t * ReadPrimitiveFromArray<unsigned int, google::protobuf::internal::WireFormatLite::TYPE_FIXED32> (const uint8_t * buffer, uint32_t * value)
Defined at line 1048 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
const uint8_t * ReadPrimitiveFromArray<unsigned long, google::protobuf::internal::WireFormatLite::TYPE_FIXED64> (const uint8_t * buffer, uint64_t * value)
Defined at line 1054 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
const uint8_t * ReadPrimitiveFromArray<int, google::protobuf::internal::WireFormatLite::TYPE_SFIXED32> (const uint8_t * buffer, int32_t * value)
Defined at line 1060 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
const uint8_t * ReadPrimitiveFromArray<long, google::protobuf::internal::WireFormatLite::TYPE_SFIXED64> (const uint8_t * buffer, int64_t * value)
Defined at line 1069 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
const uint8_t * ReadPrimitiveFromArray<float, google::protobuf::internal::WireFormatLite::TYPE_FLOAT> (const uint8_t * buffer, float * value)
Defined at line 1078 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
const uint8_t * ReadPrimitiveFromArray<double, google::protobuf::internal::WireFormatLite::TYPE_DOUBLE> (const uint8_t * buffer, double * value)
Defined at line 1087 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <typename CType, enum FieldType DeclaredType>
bool ReadRepeatedPrimitive (int tag_size, uint32_t tag, io::CodedInputStream * input, RepeatedField<CType> * value)
Reads repeated primitive values, with optimizations for repeats.
tag_size and tag should both be compile-time constants provided by the
protocol compiler.
Defined at line 1098 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadRepeatedPrimitive<unsigned int, google::protobuf::internal::WireFormatLite::TYPE_FIXED32> (int tag_size, uint32_t tag, io::CodedInputStream * input, RepeatedField<uint32_t> * values)
Defined at line 1171 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadRepeatedPrimitive<unsigned long, google::protobuf::internal::WireFormatLite::TYPE_FIXED64> (int tag_size, uint32_t tag, io::CodedInputStream * input, RepeatedField<uint64_t> * values)
Defined at line 1172 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadRepeatedPrimitive<int, google::protobuf::internal::WireFormatLite::TYPE_SFIXED32> (int tag_size, uint32_t tag, io::CodedInputStream * input, RepeatedField<int32_t> * values)
Defined at line 1173 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadRepeatedPrimitive<long, google::protobuf::internal::WireFormatLite::TYPE_SFIXED64> (int tag_size, uint32_t tag, io::CodedInputStream * input, RepeatedField<int64_t> * values)
Defined at line 1174 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadRepeatedPrimitive<float, google::protobuf::internal::WireFormatLite::TYPE_FLOAT> (int tag_size, uint32_t tag, io::CodedInputStream * input, RepeatedField<float> * values)
Defined at line 1175 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadRepeatedPrimitive<double, google::protobuf::internal::WireFormatLite::TYPE_DOUBLE> (int tag_size, uint32_t tag, io::CodedInputStream * input, RepeatedField<double> * values)
Defined at line 1176 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <typename CType, enum FieldType DeclaredType>
bool ReadRepeatedPrimitiveNoInline (int tag_size, uint32_t tag, io::CodedInputStream * input, RepeatedField<CType> * value)
Identical to ReadRepeatedPrimitive, except will not inline the
implementation.
Defined at line 1181 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <typename CType, enum FieldType DeclaredType>
bool ReadPackedPrimitive (io::CodedInputStream * input, RepeatedField<CType> * value)
Reads a primitive packed field.
This is only implemented for packable types.
Defined at line 1189 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPackedPrimitive<unsigned int, google::protobuf::internal::WireFormatLite::TYPE_FIXED32> (io::CodedInputStream * input, RepeatedField<uint32_t> * values)
Defined at line 1275 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPackedPrimitive<unsigned long, google::protobuf::internal::WireFormatLite::TYPE_FIXED64> (io::CodedInputStream * input, RepeatedField<uint64_t> * values)
Defined at line 1276 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPackedPrimitive<int, google::protobuf::internal::WireFormatLite::TYPE_SFIXED32> (io::CodedInputStream * input, RepeatedField<int32_t> * values)
Defined at line 1277 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPackedPrimitive<long, google::protobuf::internal::WireFormatLite::TYPE_SFIXED64> (io::CodedInputStream * input, RepeatedField<int64_t> * values)
Defined at line 1278 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPackedPrimitive<float, google::protobuf::internal::WireFormatLite::TYPE_FLOAT> (io::CodedInputStream * input, RepeatedField<float> * values)
Defined at line 1279 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <>
bool ReadPackedPrimitive<double, google::protobuf::internal::WireFormatLite::TYPE_DOUBLE> (io::CodedInputStream * input, RepeatedField<double> * values)
Defined at line 1280 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
bool SkipField (io::CodedInputStream * input, uint32_t tag)
Skips a field value with the given tag. The input should start
positioned immediately after the tag. Skipped values are simply
discarded, not recorded anywhere. See WireFormat::SkipField() for a
version that records to an UnknownFieldSet.
bool SkipField (io::CodedInputStream * input, uint32_t tag, io::CodedOutputStream * output)
Skips a field value with the given tag. The input should start
positioned immediately after the tag. Skipped values are recorded to a
CodedOutputStream.
bool SkipMessage (io::CodedInputStream * input)
Reads and ignores a message from the input. Skipped values are simply
discarded, not recorded anywhere. See WireFormat::SkipMessage() for a
version that records to an UnknownFieldSet.
bool SkipMessage (io::CodedInputStream * input, io::CodedOutputStream * output)
Reads and ignores a message from the input. Skipped values are recorded
to a CodedOutputStream.
template <typename CType, enum FieldType DeclaredType>
bool ReadPrimitive (io::CodedInputStream * input, CType * value)
For primitive fields, we just use a templatized routine parameterized by
the represented type and the FieldType. These are specialized with the
appropriate definition for each declared type.
template <typename CType, enum FieldType DeclaredType>
const uint8_t * ReadPrimitiveFromArray (const uint8_t * buffer, CType * value)
Reads a primitive value directly from the provided buffer. It returns a
pointer past the segment of data that was read.
This is only implemented for the types with fixed wire size, e.g.
float, double, and the (s)fixed* types.
template <typename CType, enum FieldType DeclaredType>
bool ReadPackedPrimitiveNoInline (io::CodedInputStream * input, RepeatedField<CType> * value)
Identical to ReadPackedPrimitive, except will not inline the
implementation.
Defined at line 1285 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
bool ReadBytes (io::CodedInputStream * input, absl::Cord * value)
Defined at line 1290 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
bool ReadBytes (io::CodedInputStream * input, absl::Cord ** p)
Defined at line 1296 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
bool VerifyUtf8String (const char * data, int size, Operation op, absl::string_view field_name)
Returns true if the data is valid UTF-8.
template <typename MessageType>
bool ReadGroup (int field_number, io::CodedInputStream * input, MessageType * value)
Defined at line 1303 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <typename MessageType>
bool ReadMessage (io::CodedInputStream * input, MessageType * value)
Defined at line 1316 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
void WriteTag (int field_number, WireType type, io::CodedOutputStream * output)
===================================================================
Defined at line 1330 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
void WriteInt32NoTag (int32_t value, io::CodedOutputStream * output)
Write fields, without tags.
Defined at line 1335 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
void WriteInt64NoTag (int64_t value, io::CodedOutputStream * output)
Defined at line 1339 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
void WriteUInt32NoTag (uint32_t value, io::CodedOutputStream * output)
Defined at line 1343 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
void WriteUInt64NoTag (uint64_t value, io::CodedOutputStream * output)
Defined at line 1347 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
void WriteSInt32NoTag (int32_t value, io::CodedOutputStream * output)
Defined at line 1351 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
void WriteSInt64NoTag (int64_t value, io::CodedOutputStream * output)
Defined at line 1355 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
void WriteFixed32NoTag (uint32_t value, io::CodedOutputStream * output)
Defined at line 1359 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
void WriteFixed64NoTag (uint64_t value, io::CodedOutputStream * output)
Defined at line 1363 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
void WriteSFixed32NoTag (int32_t value, io::CodedOutputStream * output)
Defined at line 1367 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
void WriteSFixed64NoTag (int64_t value, io::CodedOutputStream * output)
Defined at line 1371 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
void WriteFloatNoTag (float value, io::CodedOutputStream * output)
Defined at line 1375 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
void WriteDoubleNoTag (double value, io::CodedOutputStream * output)
Defined at line 1379 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
void WriteBoolNoTag (bool value, io::CodedOutputStream * output)
Defined at line 1383 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
void WriteEnumNoTag (int value, io::CodedOutputStream * output)
Defined at line 1387 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
void WriteFloatArray (const float * a, int n, io::CodedOutputStream * output)
Write array of primitive fields, without tags
void WriteDoubleArray (const double * a, int n, io::CodedOutputStream * output)
void WriteFixed32Array (const uint32_t * a, int n, io::CodedOutputStream * output)
void WriteFixed64Array (const uint64_t * a, int n, io::CodedOutputStream * output)
void WriteSFixed32Array (const int32_t * a, int n, io::CodedOutputStream * output)
void WriteSFixed64Array (const int64_t * a, int n, io::CodedOutputStream * output)
void WriteBoolArray (const bool * a, int n, io::CodedOutputStream * output)
void WriteInt32 (int field_number, int32_t value, io::CodedOutputStream * output)
Write fields, including tags.
void WriteInt64 (int field_number, int64_t value, io::CodedOutputStream * output)
void WriteUInt32 (int field_number, uint32_t value, io::CodedOutputStream * output)
void WriteUInt64 (int field_number, uint64_t value, io::CodedOutputStream * output)
void WriteSInt32 (int field_number, int32_t value, io::CodedOutputStream * output)
void WriteSInt64 (int field_number, int64_t value, io::CodedOutputStream * output)
void WriteFixed32 (int field_number, uint32_t value, io::CodedOutputStream * output)
void WriteFixed64 (int field_number, uint64_t value, io::CodedOutputStream * output)
void WriteSFixed32 (int field_number, int32_t value, io::CodedOutputStream * output)
void WriteSFixed64 (int field_number, int64_t value, io::CodedOutputStream * output)
void WriteFloat (int field_number, float value, io::CodedOutputStream * output)
void WriteDouble (int field_number, double value, io::CodedOutputStream * output)
void WriteBool (int field_number, bool value, io::CodedOutputStream * output)
void WriteEnum (int field_number, int value, io::CodedOutputStream * output)
void WriteString (int field_number, const std::string & value, io::CodedOutputStream * output)
void WriteBytes (int field_number, const std::string & value, io::CodedOutputStream * output)
void WriteStringMaybeAliased (int field_number, const std::string & value, io::CodedOutputStream * output)
void WriteBytesMaybeAliased (int field_number, const std::string & value, io::CodedOutputStream * output)
void WriteGroup (int field_number, const MessageLite & value, io::CodedOutputStream * output)
void WriteMessage (int field_number, const MessageLite & value, io::CodedOutputStream * output)
void WriteGroupMaybeToArray (int field_number, const MessageLite & value, io::CodedOutputStream * output)
Like above, but these will check if the output stream has enough
space to write directly to a flat array.
void WriteMessageMaybeToArray (int field_number, const MessageLite & value, io::CodedOutputStream * output)
template <typename MessageType>
void WriteGroupNoVirtual (int field_number, const MessageType & value, io::CodedOutputStream * output)
Like above, but de-virtualize the call to SerializeWithCachedSizes(). The
pointer must point at an instance of MessageType, *not* a subclass (or
the subclass must not override SerializeWithCachedSizes()).
Defined at line 1395 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <typename MessageType>
void WriteMessageNoVirtual (int field_number, const MessageType & value, io::CodedOutputStream * output)
Defined at line 1403 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteTagToArray (int field_number, WireType type, uint8_t * target)
===================================================================
Defined at line 1414 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteInt32NoTagToArray (int32_t value, uint8_t * target)
Write fields, without tags.
Defined at line 1420 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteInt64NoTagToArray (int64_t value, uint8_t * target)
Defined at line 1424 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteUInt32NoTagToArray (uint32_t value, uint8_t * target)
Defined at line 1429 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteUInt64NoTagToArray (uint64_t value, uint8_t * target)
Defined at line 1433 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteSInt32NoTagToArray (int32_t value, uint8_t * target)
Defined at line 1437 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteSInt64NoTagToArray (int64_t value, uint8_t * target)
Defined at line 1442 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteFixed32NoTagToArray (uint32_t value, uint8_t * target)
Defined at line 1447 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteFixed64NoTagToArray (uint64_t value, uint8_t * target)
Defined at line 1451 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteSFixed32NoTagToArray (int32_t value, uint8_t * target)
Defined at line 1455 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteSFixed64NoTagToArray (int64_t value, uint8_t * target)
Defined at line 1460 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteFloatNoTagToArray (float value, uint8_t * target)
Defined at line 1465 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteDoubleNoTagToArray (double value, uint8_t * target)
Defined at line 1470 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteBoolNoTagToArray (bool value, uint8_t * target)
Defined at line 1475 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteEnumNoTagToArray (int value, uint8_t * target)
Defined at line 1479 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <typename T>
uint8_t * WritePrimitiveNoTagToArray (const RepeatedField<T> & value, uint8_t *(*)(T, uint8_t *) Writer, uint8_t * target)
Write fields, without tags. These require that value.size() > 0.
Defined at line 1485 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <typename T>
uint8_t * WriteFixedNoTagToArray (const RepeatedField<T> & value, uint8_t *(*)(T, uint8_t *) Writer, uint8_t * target)
Defined at line 1501 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteInt32NoTagToArray (const RepeatedField<int32_t> & value, uint8_t * target)
Defined at line 1519 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteInt64NoTagToArray (const RepeatedField<int64_t> & value, uint8_t * target)
Defined at line 1523 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteUInt32NoTagToArray (const RepeatedField<uint32_t> & value, uint8_t * target)
Defined at line 1527 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteUInt64NoTagToArray (const RepeatedField<uint64_t> & value, uint8_t * target)
Defined at line 1531 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteSInt32NoTagToArray (const RepeatedField<int32_t> & value, uint8_t * target)
Defined at line 1535 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteSInt64NoTagToArray (const RepeatedField<int64_t> & value, uint8_t * target)
Defined at line 1539 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteFixed32NoTagToArray (const RepeatedField<uint32_t> & value, uint8_t * target)
Defined at line 1543 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteFixed64NoTagToArray (const RepeatedField<uint64_t> & value, uint8_t * target)
Defined at line 1547 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteSFixed32NoTagToArray (const RepeatedField<int32_t> & value, uint8_t * target)
Defined at line 1551 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteSFixed64NoTagToArray (const RepeatedField<int64_t> & value, uint8_t * target)
Defined at line 1555 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteFloatNoTagToArray (const RepeatedField<float> & value, uint8_t * target)
Defined at line 1559 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteDoubleNoTagToArray (const RepeatedField<double> & value, uint8_t * target)
Defined at line 1563 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteBoolNoTagToArray (const RepeatedField<bool> & value, uint8_t * target)
Defined at line 1567 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteEnumNoTagToArray (const RepeatedField<int> & value, uint8_t * target)
Defined at line 1571 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteInt32ToArray (int field_number, int32_t value, uint8_t * target)
Defined at line 1576 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteInt64ToArray (int field_number, int64_t value, uint8_t * target)
Defined at line 1582 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteUInt32ToArray (int field_number, uint32_t value, uint8_t * target)
Defined at line 1588 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteUInt64ToArray (int field_number, uint64_t value, uint8_t * target)
Defined at line 1594 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteSInt32ToArray (int field_number, int32_t value, uint8_t * target)
Defined at line 1600 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteSInt64ToArray (int field_number, int64_t value, uint8_t * target)
Defined at line 1606 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteFixed32ToArray (int field_number, uint32_t value, uint8_t * target)
Defined at line 1612 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteFixed64ToArray (int field_number, uint64_t value, uint8_t * target)
Defined at line 1618 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteSFixed32ToArray (int field_number, int32_t value, uint8_t * target)
Defined at line 1624 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteSFixed64ToArray (int field_number, int64_t value, uint8_t * target)
Defined at line 1630 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteFloatToArray (int field_number, float value, uint8_t * target)
Defined at line 1636 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteDoubleToArray (int field_number, double value, uint8_t * target)
Defined at line 1641 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteBoolToArray (int field_number, bool value, uint8_t * target)
Defined at line 1647 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteEnumToArray (int field_number, int value, uint8_t * target)
Defined at line 1652 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <typename T>
uint8_t * WritePrimitiveToArray (int field_number, const RepeatedField<T> & value, uint8_t *(*)(int, T, uint8_t *) Writer, uint8_t * target)
Defined at line 1659 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteInt32ToArray (int field_number, const RepeatedField<int32_t> & value, uint8_t * target)
Defined at line 1676 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteInt64ToArray (int field_number, const RepeatedField<int64_t> & value, uint8_t * target)
Defined at line 1680 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteUInt32ToArray (int field_number, const RepeatedField<uint32_t> & value, uint8_t * target)
Defined at line 1684 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteUInt64ToArray (int field_number, const RepeatedField<uint64_t> & value, uint8_t * target)
Defined at line 1688 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteSInt32ToArray (int field_number, const RepeatedField<int32_t> & value, uint8_t * target)
Defined at line 1692 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteSInt64ToArray (int field_number, const RepeatedField<int64_t> & value, uint8_t * target)
Defined at line 1696 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteFixed32ToArray (int field_number, const RepeatedField<uint32_t> & value, uint8_t * target)
Defined at line 1700 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteFixed64ToArray (int field_number, const RepeatedField<uint64_t> & value, uint8_t * target)
Defined at line 1705 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteSFixed32ToArray (int field_number, const RepeatedField<int32_t> & value, uint8_t * target)
Defined at line 1710 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteSFixed64ToArray (int field_number, const RepeatedField<int64_t> & value, uint8_t * target)
Defined at line 1715 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteFloatToArray (int field_number, const RepeatedField<float> & value, uint8_t * target)
Defined at line 1720 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteDoubleToArray (int field_number, const RepeatedField<double> & value, uint8_t * target)
Defined at line 1724 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteBoolToArray (int field_number, const RepeatedField<bool> & value, uint8_t * target)
Defined at line 1728 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteEnumToArray (int field_number, const RepeatedField<int> & value, uint8_t * target)
Defined at line 1732 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteStringToArray (int field_number, const std::string & value, uint8_t * target)
Defined at line 1736 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
uint8_t * WriteBytesToArray (int field_number, const std::string & value, uint8_t * target)
Defined at line 1746 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <typename MessageType>
uint8_t * InternalWriteGroupNoVirtualToArray (int field_number, const MessageType & value, uint8_t * target)
Like above, but de-virtualize the call to SerializeWithCachedSizes().
Defined at line 1757 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <typename MessageType>
uint8_t * InternalWriteMessageNoVirtualToArray (int field_number, const MessageType & value, uint8_t * target)
Defined at line 1766 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t Int32Size (int32_t value)
===================================================================
Defined at line 1781 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t Int64Size (int64_t value)
Defined at line 1784 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t UInt32Size (uint32_t value)
Defined at line 1787 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t UInt64Size (uint64_t value)
Defined at line 1790 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t SInt32Size (int32_t value)
Defined at line 1793 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t SInt64Size (int64_t value)
Defined at line 1796 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t EnumSize (int value)
Defined at line 1799 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t Int32SizePlusOne (int32_t value)
Defined at line 1802 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t Int64SizePlusOne (int64_t value)
Defined at line 1805 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t UInt32SizePlusOne (uint32_t value)
Defined at line 1809 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t UInt64SizePlusOne (uint64_t value)
Defined at line 1812 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t SInt32SizePlusOne (int32_t value)
Defined at line 1815 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t SInt64SizePlusOne (int64_t value)
Defined at line 1818 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t EnumSizePlusOne (int value)
Defined at line 1821 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t UInt32Size (const RepeatedField<uint32_t> & value)
size_t UInt64Size (const RepeatedField<uint64_t> & value)
size_t SInt32Size (const RepeatedField<int32_t> & value)
size_t SInt64Size (const RepeatedField<int64_t> & value)
size_t UInt32SizeWithPackedTagSize (const RepeatedField<uint32_t> & value, size_t tag_size, const internal::CachedSize & cached_size)
size_t UInt64SizeWithPackedTagSize (const RepeatedField<uint64_t> & value, size_t tag_size, const internal::CachedSize & cached_size)
size_t SInt32SizeWithPackedTagSize (const RepeatedField<int32_t> & value, size_t tag_size, const internal::CachedSize & cached_size)
size_t SInt64SizeWithPackedTagSize (const RepeatedField<int64_t> & value, size_t tag_size, const internal::CachedSize & cached_size)
size_t StringSize (const std::string & value)
Defined at line 1825 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t StringSize (const absl::Cord & value)
Defined at line 1836 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t BytesSize (const std::string & value)
Defined at line 1828 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t BytesSize (const absl::Cord & value)
Defined at line 1832 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t StringSize (absl::string_view value)
Defined at line 1840 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t BytesSize (absl::string_view value)
Defined at line 1846 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <typename MessageType>
size_t GroupSize (const MessageType & value)
Defined at line 1851 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <typename MessageType>
size_t MessageSize (const MessageType & value)
Defined at line 1855 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <typename MessageType>
size_t GroupSizeNoVirtual (const MessageType & value)
Like above, but de-virtualize the call to ByteSize(). The
pointer must point at an instance of MessageType, *not* a subclass (or
the subclass must not override ByteSize()).
Defined at line 1862 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
template <typename MessageType>
size_t MessageSizeNoVirtual (const MessageType & value)
Defined at line 1867 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
size_t LengthDelimitedSize (size_t length)
Given the length of data, calculate the byte size of the data on the
wire if we encode the data as a length delimited field.
Defined at line 1873 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
Enumerations
enum WireType
| Name | Value |
|---|---|
| WIRETYPE_VARINT | 0 |
| WIRETYPE_FIXED64 | 1 |
| WIRETYPE_LENGTH_DELIMITED | 2 |
| WIRETYPE_START_GROUP | 3 |
| WIRETYPE_END_GROUP | 4 |
| WIRETYPE_FIXED32 | 5 |
The wire format is composed of a sequence of tag/value pairs, each
of which contains the value of one field (or one element of a repeated
field). Each tag is encoded as a varint. The lower bits of the tag
identify its wire type, which specifies the format of the data to follow.
The rest of the bits contain the field number. Each type of field (as
declared by FieldDescriptor::Type, in descriptor.h) maps to one of
these wire types. Immediately following each tag is the field's value,
encoded in the format specified by the wire type. Because the tag
identifies the encoding of this data, it is possible to skip
unrecognized fields for forwards compatibility.
Defined at line 85 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
enum FieldType
| Name | Value |
|---|---|
| TYPE_DOUBLE | 1 |
| TYPE_FLOAT | 2 |
| TYPE_INT64 | 3 |
| TYPE_UINT64 | 4 |
| TYPE_INT32 | 5 |
| TYPE_FIXED64 | 6 |
| TYPE_FIXED32 | 7 |
| TYPE_BOOL | 8 |
| TYPE_STRING | 9 |
| TYPE_GROUP | 10 |
| TYPE_MESSAGE | 11 |
| TYPE_BYTES | 12 |
| TYPE_UINT32 | 13 |
| TYPE_ENUM | 14 |
| TYPE_SFIXED32 | 15 |
| TYPE_SFIXED64 | 16 |
| TYPE_SINT32 | 17 |
| TYPE_SINT64 | 18 |
| MAX_FIELD_TYPE | 18 |
Lite alternative to FieldDescriptor::Type. Must be kept in sync.
Defined at line 99 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
enum CppType
| Name | Value |
|---|---|
| CPPTYPE_INT32 | 1 |
| CPPTYPE_INT64 | 2 |
| CPPTYPE_UINT32 | 3 |
| CPPTYPE_UINT64 | 4 |
| CPPTYPE_DOUBLE | 5 |
| CPPTYPE_FLOAT | 6 |
| CPPTYPE_BOOL | 7 |
| CPPTYPE_ENUM | 8 |
| CPPTYPE_STRING | 9 |
| CPPTYPE_MESSAGE | 10 |
| MAX_CPPTYPE | 10 |
Lite alternative to FieldDescriptor::CppType. Must be kept in sync.
Defined at line 122 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h
enum Operation
| Name | Value |
|---|---|
| PARSE | 0 |
| SERIALIZE | 1 |
Defined at line 314 of file ../../third_party/protobuf/src/google/protobuf/wire_format_lite.h