Classes | Namespaces | Macros | Functions | Variables
protobuf/src/google/protobuf/generated_message_util.cc File Reference
#include <google/protobuf/generated_message_util.h>
#include <atomic>
#include <limits>
#include <vector>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
#include <google/protobuf/arenastring.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/generated_message_table_driven.h>
#include <google/protobuf/message_lite.h>
#include <google/protobuf/metadata_lite.h>
#include <google/protobuf/repeated_field.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/port_def.inc>
#include <google/protobuf/port_undef.inc>
Include dependency graph for protobuf/src/google/protobuf/generated_message_util.cc:

Go to the source code of this file.

Classes

class  google::protobuf.internal::AccessorHelper
 
struct  google::protobuf.internal::ArrayOutput
 
struct  google::protobuf.internal::OneOfFieldHelper< type >
 
struct  google::protobuf.internal::OneOfFieldHelper< FieldMetadata::kInlinedType >
 
struct  google::protobuf.internal::OutputHelper< O, type >
 
struct  google::protobuf.internal::OutputHelper< ArrayOutput, type >
 
struct  google::protobuf.internal::OutputHelper< io::CodedOutputStream, type >
 
struct  google::protobuf.internal::PackedFieldHelper< type >
 
struct  google::protobuf.internal::PackedFieldHelper< FieldMetadata::kInlinedType >
 
struct  google::protobuf.internal::PackedFieldHelper< WireFormatLite::TYPE_BYTES >
 
struct  google::protobuf.internal::PackedFieldHelper< WireFormatLite::TYPE_GROUP >
 
struct  google::protobuf.internal::PackedFieldHelper< WireFormatLite::TYPE_MESSAGE >
 
struct  google::protobuf.internal::PackedFieldHelper< WireFormatLite::TYPE_STRING >
 
struct  google::protobuf.internal::PrimitiveTypeHelper< type >
 
struct  google::protobuf.internal::PrimitiveTypeHelper< FieldMetadata::kInlinedType >
 
struct  google::protobuf.internal::PrimitiveTypeHelper< WireFormatLite::TYPE_BOOL >
 
struct  google::protobuf.internal::PrimitiveTypeHelper< WireFormatLite::TYPE_BYTES >
 
struct  google::protobuf.internal::PrimitiveTypeHelper< WireFormatLite::TYPE_DOUBLE >
 
struct  google::protobuf.internal::PrimitiveTypeHelper< WireFormatLite::TYPE_ENUM >
 
struct  google::protobuf.internal::PrimitiveTypeHelper< WireFormatLite::TYPE_FIXED32 >
 
struct  google::protobuf.internal::PrimitiveTypeHelper< WireFormatLite::TYPE_FIXED64 >
 
struct  google::protobuf.internal::PrimitiveTypeHelper< WireFormatLite::TYPE_FLOAT >
 
struct  google::protobuf.internal::PrimitiveTypeHelper< WireFormatLite::TYPE_INT32 >
 
struct  google::protobuf.internal::PrimitiveTypeHelper< WireFormatLite::TYPE_INT64 >
 
struct  google::protobuf.internal::PrimitiveTypeHelper< WireFormatLite::TYPE_SFIXED32 >
 
struct  google::protobuf.internal::PrimitiveTypeHelper< WireFormatLite::TYPE_SFIXED64 >
 
struct  google::protobuf.internal::PrimitiveTypeHelper< WireFormatLite::TYPE_SINT32 >
 
struct  google::protobuf.internal::PrimitiveTypeHelper< WireFormatLite::TYPE_SINT64 >
 
struct  google::protobuf.internal::PrimitiveTypeHelper< WireFormatLite::TYPE_STRING >
 
struct  google::protobuf.internal::PrimitiveTypeHelper< WireFormatLite::TYPE_UINT32 >
 
struct  google::protobuf.internal::PrimitiveTypeHelper< WireFormatLite::TYPE_UINT64 >
 
struct  google::protobuf.internal::RepeatedFieldHelper< type >
 
struct  google::protobuf.internal::RepeatedFieldHelper< FieldMetadata::kInlinedType >
 
struct  google::protobuf.internal::RepeatedFieldHelper< WireFormatLite::TYPE_BYTES >
 
struct  google::protobuf.internal::RepeatedFieldHelper< WireFormatLite::TYPE_GROUP >
 
struct  google::protobuf.internal::RepeatedFieldHelper< WireFormatLite::TYPE_MESSAGE >
 
struct  google::protobuf.internal::RepeatedFieldHelper< WireFormatLite::TYPE_STRING >
 
struct  google::protobuf.internal::SingularFieldHelper< type >
 
struct  google::protobuf.internal::SingularFieldHelper< FieldMetadata::kInlinedType >
 
struct  google::protobuf.internal::SingularFieldHelper< WireFormatLite::TYPE_BYTES >
 
struct  google::protobuf.internal::SingularFieldHelper< WireFormatLite::TYPE_GROUP >
 
struct  google::protobuf.internal::SingularFieldHelper< WireFormatLite::TYPE_MESSAGE >
 
struct  google::protobuf.internal::SingularFieldHelper< WireFormatLite::TYPE_STRING >
 

Namespaces

 google
 
 google::protobuf
 
 google.protobuf.internal
 

Macros

#define SERIALIZE_TABLE_OP(type, type_class)   ((type - 1) + static_cast<int>(type_class) * FieldMetadata::kNumTypes)
 
#define SERIALIZERS_FOR_TYPE(type)
 

Functions

void google.protobuf.internal::DestroyMessage (const void *message)
 
void google.protobuf.internal::DestroyString (const void *s)
 
MessageLite * google.protobuf.internal::DuplicateIfNonNullInternal (MessageLite *message)
 
void google.protobuf.internal::ExtensionSerializer (const MessageLite *extendee, const uint8_t *ptr, uint32_t offset, uint32_t tag, uint32_t has_offset, io::CodedOutputStream *output)
 
void google.protobuf.internal::GenericSwap (MessageLite *m1, MessageLite *m2)
 
template<typename T >
const Tgoogle.protobuf.internal::Get (const void *ptr)
 
MessageLite * google.protobuf.internal::GetOwnedMessageInternal (Arena *message_arena, MessageLite *submessage, Arena *submessage_arena)
 
static bool google.protobuf.internal::InitProtobufDefaultsImpl ()
 
void google.protobuf.internal::InitProtobufDefaultsSlow ()
 
template<int type>
bool google.protobuf.internal::IsNull (const void *ptr)
 
template<>
bool google.protobuf.internal::IsNull< FieldMetadata::kInlinedType > (const void *ptr)
 
template<>
bool google.protobuf.internal::IsNull< WireFormatLite::TYPE_BYTES > (const void *ptr)
 
template<>
bool google.protobuf.internal::IsNull< WireFormatLite::TYPE_GROUP > (const void *ptr)
 
template<>
bool google.protobuf.internal::IsNull< WireFormatLite::TYPE_MESSAGE > (const void *ptr)
 
template<>
bool google.protobuf.internal::IsNull< WireFormatLite::TYPE_STRING > (const void *ptr)
 
template<typename O >
void google.protobuf.internal::SerializeGroupTo (const MessageLite *msg, const void *table_ptr, O *output)
 
PROTOBUF_EXPORT void google.protobuf.internal::SerializeInternal (const uint8 *base, const FieldMetadata *table, int32 num_fields, io::CodedOutputStream *output)
 
uint8 * google.protobuf.internal::SerializeInternalToArray (const uint8 *base, const FieldMetadata *table, int32 num_fields, bool is_deterministic, uint8 *buffer)
 
void google.protobuf.internal::SerializeMessageDispatch (const MessageLite &msg, const FieldMetadata *field_table, int num_fields, int32 cached_size, ArrayOutput *output)
 
void google.protobuf.internal::SerializeMessageDispatch (const MessageLite &msg, const FieldMetadata *field_table, int num_fields, int32 cached_size, io::CodedOutputStream *output)
 
void google.protobuf.internal::SerializeMessageNoTable (const MessageLite *msg, ArrayOutput *output)
 
void google.protobuf.internal::SerializeMessageNoTable (const MessageLite *msg, io::CodedOutputStream *output)
 
template<typename O >
void google.protobuf.internal::SerializeMessageTo (const MessageLite *msg, const void *table_ptr, O *output)
 
void google.protobuf.internal::SerializeNotImplemented (int field)
 
template<int type, typename O >
void google.protobuf.internal::SerializeTo (const void *ptr, O *output)
 
size_t google.protobuf.internal::StringSpaceUsedExcludingSelfLong (const std::string &str)
 
void google.protobuf.internal::UnknownFieldSerializerLite (const uint8 *ptr, uint32 offset, uint32 tag, uint32 has_offset, io::CodedOutputStream *output)
 
template<typename O >
void google.protobuf.internal::WriteLengthTo (uint32 length, O *output)
 
template<typename O >
void google.protobuf.internal::WriteTagTo (uint32 tag, O *output)
 

Variables

static PROTOBUF_ATTRIBUTE_INIT_PRIORITY std::true_type google.protobuf.internal::init_empty_string
 
PROTOBUF_CONSTINIT std::atomic< boolgoogle.protobuf.internal::init_protobuf_defaults_state {false}
 

Macro Definition Documentation

◆ SERIALIZE_TABLE_OP

#define SERIALIZE_TABLE_OP (   type,
  type_class 
)    ((type - 1) + static_cast<int>(type_class) * FieldMetadata::kNumTypes)

◆ SERIALIZERS_FOR_TYPE

#define SERIALIZERS_FOR_TYPE (   type)
Value:
case SERIALIZE_TABLE_OP(type, FieldMetadata::kPresence): \
if (!IsPresent(base, field_metadata.has_offset)) continue; \
SingularFieldHelper<type>::Serialize(ptr, field_metadata, output); \
break; \
if (IsNull<type>(ptr)) continue; \
SingularFieldHelper<type>::Serialize(ptr, field_metadata, output); \
break; \
case SERIALIZE_TABLE_OP(type, FieldMetadata::kRepeated): \
RepeatedFieldHelper<type>::Serialize(ptr, field_metadata, output); \
break; \
case SERIALIZE_TABLE_OP(type, FieldMetadata::kPacked): \
PackedFieldHelper<type>::Serialize(ptr, field_metadata, output); \
break; \
case SERIALIZE_TABLE_OP(type, FieldMetadata::kOneOf): \
if (!IsOneofPresent(base, field_metadata.has_offset, field_metadata.tag)) \
continue; \
OneOfFieldHelper<type>::Serialize(ptr, field_metadata, output); \
break

Definition at line 609 of file protobuf/src/google/protobuf/generated_message_util.cc.

ptr
char * ptr
Definition: abseil-cpp/absl/base/internal/low_level_alloc_test.cc:45
testing::internal::IsNull
AssertionResult IsNull(const char *str)
Definition: bloaty/third_party/googletest/googletest/test/gtest-unittest-api_test.cc:139
google::protobuf.internal::IsPresent
bool IsPresent(const void *base, uint32 hasbit)
Definition: bloaty/third_party/protobuf/src/google/protobuf/generated_message_util.h:121
google::protobuf.internal::IsOneofPresent
bool IsOneofPresent(const void *base, uint32 offset, uint32 tag)
Definition: bloaty/third_party/protobuf/src/google/protobuf/generated_message_util.h:126
SERIALIZE_TABLE_OP
#define SERIALIZE_TABLE_OP(type, type_class)
Definition: protobuf/src/google/protobuf/generated_message_util.cc:569
tag
static void * tag(intptr_t t)
Definition: bad_client.cc:318
gmock_output_test.output
output
Definition: bloaty/third_party/googletest/googlemock/test/gmock_output_test.py:175
gen_synthetic_protos.base
base
Definition: gen_synthetic_protos.py:31
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
if
if(p->owned &&p->wrapped !=NULL)
Definition: call.c:42
kNoPresence
@ kNoPresence
Definition: mini_table.c:349


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:13