protobuf/src/google/protobuf/message.cc
Go to the documentation of this file.
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc. All rights reserved.
3 // https://developers.google.com/protocol-buffers/
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following disclaimer
13 // in the documentation and/or other materials provided with the
14 // distribution.
15 // * Neither the name of Google Inc. nor the names of its
16 // contributors may be used to endorse or promote products derived from
17 // this software without specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 // Author: kenton@google.com (Kenton Varda)
32 // Based on original Protocol Buffers design by
33 // Sanjay Ghemawat, Jeff Dean, and others.
34 
35 #include <google/protobuf/message.h>
36 
37 #include <iostream>
38 #include <stack>
39 #include <unordered_map>
40 
41 #include <google/protobuf/stubs/casts.h>
42 #include <google/protobuf/stubs/logging.h>
43 #include <google/protobuf/stubs/common.h>
44 #include <google/protobuf/descriptor.pb.h>
45 #include <google/protobuf/parse_context.h>
46 #include <google/protobuf/reflection_internal.h>
47 #include <google/protobuf/io/coded_stream.h>
48 #include <google/protobuf/io/zero_copy_stream_impl.h>
49 #include <google/protobuf/descriptor.h>
50 #include <google/protobuf/generated_message_reflection.h>
51 #include <google/protobuf/generated_message_util.h>
52 #include <google/protobuf/map_field.h>
53 #include <google/protobuf/map_field_inl.h>
54 #include <google/protobuf/reflection_ops.h>
55 #include <google/protobuf/unknown_field_set.h>
56 #include <google/protobuf/wire_format.h>
57 #include <google/protobuf/wire_format_lite.h>
58 #include <google/protobuf/stubs/strutil.h>
59 #include <google/protobuf/stubs/map_util.h>
60 #include <google/protobuf/stubs/stl_util.h>
61 #include <google/protobuf/stubs/hash.h>
62 
63 #include <google/protobuf/port_def.inc>
64 
65 namespace google {
66 namespace protobuf {
67 
68 namespace internal {
69 
70 // TODO(gerbens) make this factorized better. This should not have to hop
71 // to reflection. Currently uses GeneratedMessageReflection and thus is
72 // defined in generated_message_reflection.cc
73 void RegisterFileLevelMetadata(const DescriptorTable* descriptor_table);
74 
75 } // namespace internal
76 
77 using internal::ReflectionOps;
78 using internal::WireFormat;
79 using internal::WireFormatLite;
80 
81 void Message::MergeFrom(const Message& from) {
82  auto* class_to = GetClassData();
83  auto* class_from = from.GetClassData();
84  auto* merge_to_from = class_to ? class_to->merge_to_from : nullptr;
85  if (class_to == nullptr || class_to != class_from) {
86  merge_to_from = [](Message* to, const Message& from) {
88  };
89  }
90  merge_to_from(this, from);
91 }
92 
94  MergeFrom(*down_cast<const Message*>(&other));
95 }
96 
97 void Message::CopyFrom(const Message& from) {
98  if (&from == this) return;
99 
100  auto* class_to = GetClassData();
101  auto* class_from = from.GetClassData();
102  auto* copy_to_from = class_to ? class_to->copy_to_from : nullptr;
103 
104  if (class_to == nullptr || class_to != class_from) {
106  GOOGLE_CHECK_EQ(from.GetDescriptor(), descriptor)
107  << ": Tried to copy from a message with a different type. "
108  "to: "
109  << descriptor->full_name()
110  << ", "
111  "from: "
112  << from.GetDescriptor()->full_name();
113  copy_to_from = [](Message* to, const Message& from) {
115  };
116  }
117  copy_to_from(this, from);
118 }
119 
121 #ifndef NDEBUG
122  size_t from_size = from.ByteSizeLong();
123 #endif
124  to->Clear();
125 #ifndef NDEBUG
126  GOOGLE_CHECK_EQ(from_size, from.ByteSizeLong())
127  << "Source of CopyFrom changed when clearing target. Either "
128  "source is a nested message in target (not allowed), or "
129  "another thread is modifying the source.";
130 #endif
131  to->GetClassData()->merge_to_from(to, from);
132 }
133 
135  return GetDescriptor()->full_name();
136 }
137 
138 void Message::Clear() { ReflectionOps::Clear(this); }
139 
140 bool Message::IsInitialized() const {
141  return ReflectionOps::IsInitialized(*this);
142 }
143 
144 void Message::FindInitializationErrors(std::vector<std::string>* errors) const {
146 }
147 
149  std::vector<std::string> errors;
151  return Join(errors, ", ");
152 }
153 
154 void Message::CheckInitialized() const {
155  GOOGLE_CHECK(IsInitialized()) << "Message of type \"" << GetDescriptor()->full_name()
156  << "\" is missing required fields: "
158 }
159 
162 }
163 
164 const char* Message::_InternalParse(const char* ptr,
165  internal::ParseContext* ctx) {
166  return WireFormat::_InternalParse(this, ptr, ctx);
167 }
168 
172 }
173 
174 size_t Message::ByteSizeLong() const {
175  size_t size = WireFormat::ByteSize(*this);
177  return size;
178 }
179 
180 void Message::SetCachedSize(int /* size */) const {
181  GOOGLE_LOG(FATAL) << "Message class \"" << GetDescriptor()->full_name()
182  << "\" implements neither SetCachedSize() nor ByteSize(). "
183  "Must implement one or the other.";
184 }
185 
187  size_t total_size, internal::CachedSize* cached_size) const {
191  cached_size->Set(internal::ToCachedSize(total_size));
192  return total_size;
193 }
194 
196  size_t total_size, internal::CachedSize* cached_size) const {
197  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
198  return ComputeUnknownFieldsSize(total_size, cached_size);
199  }
200  cached_size->Set(internal::ToCachedSize(total_size));
201  return total_size;
202 }
203 
204 size_t Message::SpaceUsedLong() const {
205  return GetReflection()->SpaceUsedLong(*this);
206 }
207 
209  return salt;
210 }
211 
212 // =============================================================================
213 // MessageFactory
214 
216 
217 namespace {
218 
219 
220 #define HASH_MAP std::unordered_map
221 #define STR_HASH_FXN hash<::google::protobuf::StringPiece>
222 
223 
224 class GeneratedMessageFactory final : public MessageFactory {
225  public:
226  static GeneratedMessageFactory* singleton();
227 
228  void RegisterFile(const google::protobuf::internal::DescriptorTable* table);
229  void RegisterType(const Descriptor* descriptor, const Message* prototype);
230 
231  // implements MessageFactory ---------------------------------------
232  const Message* GetPrototype(const Descriptor* type) override;
233 
234  private:
235  // Only written at static init time, so does not require locking.
237  STR_HASH_FXN>
239 
240  internal::WrappedMutex mutex_;
241  // Initialized lazily, so requires locking.
242  std::unordered_map<const Descriptor*, const Message*> type_map_;
243 };
244 
245 GeneratedMessageFactory* GeneratedMessageFactory::singleton() {
246  static auto instance =
247  internal::OnShutdownDelete(new GeneratedMessageFactory);
248  return instance;
249 }
250 
251 void GeneratedMessageFactory::RegisterFile(
253  if (!InsertIfNotPresent(&file_map_, table->filename, table)) {
254  GOOGLE_LOG(FATAL) << "File is already registered: " << table->filename;
255  }
256 }
257 
258 void GeneratedMessageFactory::RegisterType(const Descriptor* descriptor,
259  const Message* prototype) {
261  << "Tried to register a non-generated type with the generated "
262  "type registry.";
263 
264  // This should only be called as a result of calling a file registration
265  // function during GetPrototype(), in which case we already have locked
266  // the mutex.
267  mutex_.AssertHeld();
268  if (!InsertIfNotPresent(&type_map_, descriptor, prototype)) {
269  GOOGLE_LOG(DFATAL) << "Type is already registered: " << descriptor->full_name();
270  }
271 }
272 
273 
274 const Message* GeneratedMessageFactory::GetPrototype(const Descriptor* type) {
275  {
276  ReaderMutexLock lock(&mutex_);
278  if (result != nullptr) return result;
279  }
280 
281  // If the type is not in the generated pool, then we can't possibly handle
282  // it.
283  if (type->file()->pool() != DescriptorPool::generated_pool()) return nullptr;
284 
285  // Apparently the file hasn't been registered yet. Let's do that now.
286  const internal::DescriptorTable* registration_data =
287  FindPtrOrNull(file_map_, type->file()->name().c_str());
288  if (registration_data == nullptr) {
289  GOOGLE_LOG(DFATAL) << "File appears to be in generated pool but wasn't "
290  "registered: "
291  << type->file()->name();
292  return nullptr;
293  }
294 
295  WriterMutexLock lock(&mutex_);
296 
297  // Check if another thread preempted us.
299  if (result == nullptr) {
300  // Nope. OK, register everything.
301  internal::RegisterFileLevelMetadata(registration_data);
302  // Should be here now.
304  }
305 
306  if (result == nullptr) {
307  GOOGLE_LOG(DFATAL) << "Type appears to be in generated pool but wasn't "
308  << "registered: " << type->full_name();
309  }
310 
311  return result;
312 }
313 
314 } // namespace
315 
316 MessageFactory* MessageFactory::generated_factory() {
317  return GeneratedMessageFactory::singleton();
318 }
319 
322  GeneratedMessageFactory::singleton()->RegisterFile(table);
323 }
324 
326  const Descriptor* descriptor, const Message* prototype) {
327  GeneratedMessageFactory::singleton()->RegisterType(descriptor, prototype);
328 }
329 
330 
331 namespace {
332 template <typename T>
333 T* GetSingleton() {
334  static T singleton;
335  return &singleton;
336 }
337 } // namespace
338 
339 const internal::RepeatedFieldAccessor* Reflection::RepeatedFieldAccessor(
340  const FieldDescriptor* field) const {
341  GOOGLE_CHECK(field->is_repeated());
342  switch (field->cpp_type()) {
343 #define HANDLE_PRIMITIVE_TYPE(TYPE, type) \
344  case FieldDescriptor::CPPTYPE_##TYPE: \
345  return GetSingleton<internal::RepeatedFieldPrimitiveAccessor<type> >();
350  HANDLE_PRIMITIVE_TYPE(FLOAT, float)
351  HANDLE_PRIMITIVE_TYPE(DOUBLE, double)
354 #undef HANDLE_PRIMITIVE_TYPE
356  switch (field->options().ctype()) {
357  default:
359  return GetSingleton<internal::RepeatedPtrFieldStringAccessor>();
360  }
361  break;
363  if (field->is_map()) {
364  return GetSingleton<internal::MapFieldAccessor>();
365  } else {
366  return GetSingleton<internal::RepeatedPtrFieldMessageAccessor>();
367  }
368  }
369  GOOGLE_LOG(FATAL) << "Should not reach here.";
370  return nullptr;
371 }
372 
373 namespace internal {
374 template <>
375 #if defined(_MSC_VER) && (_MSC_VER >= 1800)
376 // Note: force noinline to workaround MSVC compiler bug with /Zc:inline, issue
377 // #240
378 PROTOBUF_NOINLINE
379 #endif
380  Message*
382  Arena* arena) {
383  return prototype->New(arena);
384 }
385 template <>
386 #if defined(_MSC_VER) && (_MSC_VER >= 1800)
387 // Note: force noinline to workaround MSVC compiler bug with /Zc:inline, issue
388 // #240
389 PROTOBUF_NOINLINE
390 #endif
391  Arena*
393  return value->GetOwningArena();
394 }
395 } // namespace internal
396 
397 } // namespace protobuf
398 } // namespace google
399 
400 #include <google/protobuf/port_undef.inc>
google::protobuf::Descriptor::full_name
const std::string & full_name() const
google::protobuf::Message::InitializationErrorString
std::string InitializationErrorString() const override
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:123
type_map_
std::unordered_map< const Descriptor *, const Message * > type_map_
Definition: protobuf/src/google/protobuf/message.cc:242
ptr
char * ptr
Definition: abseil-cpp/absl/base/internal/low_level_alloc_test.cc:45
_gevent_test_main.result
result
Definition: _gevent_test_main.py:96
google::protobuf.internal::WireFormat::_InternalParse
static const char * _InternalParse(Message *msg, const char *ptr, internal::ParseContext *ctx)
Definition: protobuf/src/google/protobuf/wire_format.cc:788
WriterMutexLock
#define WriterMutexLock(x)
Definition: bloaty/third_party/re2/util/mutex.h:127
google::protobuf::value
const Descriptor::ReservedRange value
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1954
google::protobuf::MessageFactory::InternalRegisterGeneratedFile
static void InternalRegisterGeneratedFile(const google::protobuf::internal::DescriptorTable *table)
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:649
ctx
Definition: benchmark-async.c:30
google::protobuf::FieldDescriptor::CPPTYPE_STRING
@ CPPTYPE_STRING
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:562
google::protobuf.internal::RegisterFileLevelMetadata
void RegisterFileLevelMetadata(const DescriptorTable *table)
Definition: bloaty/third_party/protobuf/src/google/protobuf/generated_message_reflection.cc:2418
google::protobuf::FindPtrOrNull
Collection::value_type::second_type FindPtrOrNull(const Collection &collection, const typename Collection::value_type::first_type &key)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/map_util.h:166
google::protobuf::Message::GetReflection
const Reflection * GetReflection() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.h:332
Arena
Definition: arena.c:39
HANDLE_PRIMITIVE_TYPE
#define HANDLE_PRIMITIVE_TYPE(TYPE, type)
google::protobuf.internal::WireFormat::ByteSize
static size_t ByteSize(const Message &message)
Definition: bloaty/third_party/protobuf/src/google/protobuf/wire_format.cc:1069
GOOGLE_CHECK_EQ
#define GOOGLE_CHECK_EQ(A, B)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/logging.h:156
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
file_map_
HASH_MAP< StringPiece, const google::protobuf::internal::DescriptorTable *, STR_HASH_FXN > file_map_
Definition: protobuf/src/google/protobuf/message.cc:238
google::protobuf::Message::GetTypeName
std::string GetTypeName() const override
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:109
google::protobuf::MessageFactory::generated_factory
static MessageFactory * generated_factory()
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:645
google::protobuf::Message::CopyWithSizeCheck
static void CopyWithSizeCheck(Message *to, const Message &from)
Definition: protobuf/src/google/protobuf/message.cc:120
google::protobuf
Definition: bloaty/third_party/protobuf/benchmarks/util/data_proto2_to_proto3_util.h:12
google::protobuf::Message::CheckTypeAndMergeFrom
void CheckTypeAndMergeFrom(const MessageLite &other) override
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:93
instance
RefCountedPtr< grpc_tls_certificate_provider > instance
Definition: xds_server_config_fetcher.cc:224
google::protobuf::Message::SpaceUsedLong
virtual size_t SpaceUsedLong() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:542
google::protobuf::Message::ComputeUnknownFieldsSize
size_t ComputeUnknownFieldsSize(size_t total_size, internal::CachedSize *cached_size) const
Definition: protobuf/src/google/protobuf/message.cc:186
google::protobuf::Message::IsInitialized
bool IsInitialized() const override
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:115
to
size_t to
Definition: abseil-cpp/absl/container/internal/layout_test.cc:1385
uint8_t
unsigned char uint8_t
Definition: stdint-msvc2008.h:78
google::protobuf::MessageFactory::~MessageFactory
virtual ~MessageFactory()
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:549
google::protobuf::Reflection::SpaceUsedLong
size_t SpaceUsedLong(const Message &message) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/generated_message_reflection.cc:241
T
#define T(upbtypeconst, upbtype, ctype, default_value)
BOOL
int BOOL
Definition: undname.c:46
Descriptor
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h:121
google::protobuf.internal::OnShutdownDelete
T * OnShutdownDelete(T *p)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/common.h:185
arena
grpc_core::ScopedArenaPtr arena
Definition: binder_transport_test.cc:237
uint32_t
unsigned int uint32_t
Definition: stdint-msvc2008.h:80
google::protobuf.internal::WireFormat::ComputeUnknownFieldsSize
static size_t ComputeUnknownFieldsSize(const UnknownFieldSet &unknown_fields)
Definition: bloaty/third_party/protobuf/src/google/protobuf/wire_format.cc:266
google::protobuf.internal::ReflectionOps::FindInitializationErrors
static void FindInitializationErrors(const Message &message, const std::string &prefix, std::vector< std::string > *errors)
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection_ops.cc:302
mutex_
internal::WrappedMutex mutex_
Definition: protobuf/src/google/protobuf/message.cc:240
from
size_t from
Definition: abseil-cpp/absl/container/internal/layout_test.cc:1384
google::protobuf::MessageFactory::InternalRegisterGeneratedMessage
static void InternalRegisterGeneratedMessage(const Descriptor *descriptor, const Message *prototype)
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:654
google::protobuf.internal::ReflectionOps::Merge
static void Merge(const Message &from, Message *to)
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection_ops.cc:71
FieldDescriptor
Definition: bloaty/third_party/protobuf/ruby/ext/google/protobuf_c/protobuf.h:133
google::protobuf::io::EpsCopyOutputStream
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/coded_stream.h:651
google::protobuf::Message::SetCachedSize
virtual void SetCachedSize(int size) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:536
google::protobuf::UnknownFieldSet::default_instance
static const UnknownFieldSet * default_instance()
Definition: bloaty/third_party/protobuf/src/google/protobuf/unknown_field_set.cc:53
errors
const char * errors
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/tokenizer_unittest.cc:841
int64_t
signed __int64 int64_t
Definition: stdint-msvc2008.h:89
google::protobuf::Reflection::RepeatedFieldAccessor
const internal::RepeatedFieldAccessor * RepeatedFieldAccessor(const FieldDescriptor *field) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:668
google::protobuf::Message::CheckInitialized
void CheckInitialized() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:129
grpc::protobuf::MessageLite
GRPC_CUSTOM_MESSAGELITE MessageLite
Definition: include/grpcpp/impl/codegen/config_protobuf.h:79
google::protobuf.internal::ReflectionOps::DiscardUnknownFields
static void DiscardUnknownFields(Message *message)
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection_ops.cc:242
uint64_t
unsigned __int64 uint64_t
Definition: stdint-msvc2008.h:90
google::protobuf.internal::WireFormat::_InternalSerialize
static uint8_t * _InternalSerialize(const Message &message, uint8_t *target, io::EpsCopyOutputStream *stream)
Definition: protobuf/src/google/protobuf/wire_format.cc:1043
google::protobuf.internal::DescriptorTable
Definition: bloaty/third_party/protobuf/src/google/protobuf/generated_message_reflection.h:265
FieldOptions::STRING
static constexpr CType STRING
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.pb.h:4721
google::protobuf::Message::MaybeComputeUnknownFieldsSize
size_t MaybeComputeUnknownFieldsSize(size_t total_size, internal::CachedSize *cached_size) const
Definition: protobuf/src/google/protobuf/message.cc:195
google::protobuf::Message::DiscardUnknownFields
virtual void DiscardUnknownFields()
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:135
google::protobuf::Message::ByteSizeLong
size_t ByteSizeLong() const override
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:530
STR_HASH_FXN
#define STR_HASH_FXN
Definition: protobuf/src/google/protobuf/message.cc:221
FATAL
#define FATAL(msg)
Definition: task.h:88
google::protobuf::Message::CopyFrom
virtual void CopyFrom(const Message &from)
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:97
google::protobuf.internal::InternalMetadata::have_unknown_fields
PROTOBUF_NDEBUG_INLINE bool have_unknown_fields() const
Definition: protobuf/src/google/protobuf/metadata_lite.h:98
google::protobuf::Message
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.h:205
field
const FieldDescriptor * field
Definition: bloaty/third_party/protobuf/src/google/protobuf/compiler/parser_unittest.cc:2692
google::protobuf::Message::GetDescriptor
const Descriptor * GetDescriptor() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.h:323
ReaderMutexLock
#define ReaderMutexLock(x)
Definition: bloaty/third_party/re2/util/mutex.h:126
google::protobuf.internal::ToCachedSize
int ToCachedSize(size_t size)
Definition: bloaty/third_party/protobuf/src/google/protobuf/message_lite.h:90
google::protobuf.internal::GenericTypeHandler::NewFromPrototype
static GenericType * NewFromPrototype(const GenericType *prototype, Arena *arena=NULL)
Definition: bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h:707
google::protobuf.internal::CachedSize
Definition: bloaty/third_party/protobuf/src/google/protobuf/generated_message_util.h:170
google::protobuf::UnknownFieldSet
Definition: bloaty/third_party/protobuf/src/google/protobuf/unknown_field_set.h:81
google::protobuf::DescriptorPool::generated_pool
static const DescriptorPool * generated_pool()
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.cc:1326
google::protobuf::Message::Clear
void Clear() override
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:113
google::protobuf::MessageLite::_internal_metadata_
internal::InternalMetadata _internal_metadata_
Definition: protobuf/src/google/protobuf/message_lite.h:445
GOOGLE_CHECK
#define GOOGLE_CHECK(EXPRESSION)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/logging.h:153
google::protobuf.internal::CachedSize::Set
void Set(int size)
Definition: bloaty/third_party/protobuf/src/google/protobuf/generated_message_util.h:173
google::protobuf::Message::GetInvariantPerBuild
static uint64_t GetInvariantPerBuild(uint64_t salt)
Definition: protobuf/src/google/protobuf/message.cc:208
GOOGLE_DCHECK_EQ
#define GOOGLE_DCHECK_EQ
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/logging.h:196
google::protobuf::Message::New
Message * New() const override=0
google::protobuf.internal::GenericTypeHandler::GetOwningArena
static Arena * GetOwningArena(GenericType *value)
Definition: repeated_ptr_field.h:425
google::protobuf.internal::ReflectionOps::Copy
static void Copy(const Message &from, Message *to)
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection_ops.cc:65
google::protobuf::Message::GetClassData
virtual const ClassData * GetClassData() const
Definition: protobuf/src/google/protobuf/message.h:377
internal
Definition: benchmark/test/output_test_helper.cc:20
table
uint8_t table[256]
Definition: hpack_parser.cc:456
google::protobuf::FieldDescriptor::CPPTYPE_MESSAGE
@ CPPTYPE_MESSAGE
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:563
google::protobuf::Join
void Join(Iterator start, Iterator end, const char *delim, string *result)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/strutil.h:769
asyncio_get_stats.type
type
Definition: asyncio_get_stats.py:37
google::protobuf.internal::ReflectionOps::IsInitialized
static bool IsInitialized(const Message &message)
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection_ops.cc:176
size
voidpf void uLong size
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
HASH_MAP
#define HASH_MAP
Definition: protobuf/src/google/protobuf/message.cc:220
int32_t
signed int int32_t
Definition: stdint-msvc2008.h:77
GOOGLE_LOG
#define GOOGLE_LOG(LEVEL)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/logging.h:146
google::protobuf::Message::FindInitializationErrors
void FindInitializationErrors(std::vector< std::string > *errors) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:119
descriptor
static const char descriptor[1336]
Definition: certs.upbdefs.c:16
google::protobuf.internal::InternalMetadata::unknown_fields
const PROTOBUF_NDEBUG_INLINE T & unknown_fields(const T &(*default_instance)()) const
Definition: protobuf/src/google/protobuf/metadata_lite.h:107
setup.target
target
Definition: third_party/bloaty/third_party/protobuf/python/setup.py:179
google::protobuf::InsertIfNotPresent
bool InsertIfNotPresent(Collection *const collection, const typename Collection::value_type &vt)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/map_util.h:321
google
Definition: bloaty/third_party/protobuf/benchmarks/util/data_proto2_to_proto3_util.h:11
google::protobuf::Message::_InternalParse
const char * _InternalParse(const char *ptr, internal::ParseContext *ctx) override
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:378
Message
Definition: protobuf/php/ext/google/protobuf/message.c:53
google::protobuf.internal::ReflectionOps::Clear
static void Clear(Message *message)
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection_ops.cc:164
google::protobuf::Message::_InternalSerialize
uint8_t * _InternalSerialize(uint8_t *target, io::EpsCopyOutputStream *stream) const override
Definition: protobuf/src/google/protobuf/message.cc:169
google::protobuf::Message::MergeFrom
virtual void MergeFrom(const Message &from)
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.cc:81
stream
voidpf stream
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136


grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:25