protobuf/src/google/protobuf/message_lite.h
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 // Authors: wink@google.com (Wink Saville),
32 // kenton@google.com (Kenton Varda)
33 // Based on original Protocol Buffers design by
34 // Sanjay Ghemawat, Jeff Dean, and others.
35 //
36 // Defines MessageLite, the abstract interface implemented by all (lite
37 // and non-lite) protocol message objects.
38 
39 #ifndef GOOGLE_PROTOBUF_MESSAGE_LITE_H__
40 #define GOOGLE_PROTOBUF_MESSAGE_LITE_H__
41 
42 #include <climits>
43 #include <string>
44 
45 #include <google/protobuf/stubs/common.h>
46 #include <google/protobuf/stubs/logging.h>
47 #include <google/protobuf/io/coded_stream.h>
48 #include <google/protobuf/arena.h>
50 #include <google/protobuf/metadata_lite.h>
51 #include <google/protobuf/stubs/once.h>
52 #include <google/protobuf/port.h>
53 #include <google/protobuf/stubs/strutil.h>
54 
55 
56 // clang-format off
57 #include <google/protobuf/port_def.inc>
58 // clang-format on
59 
60 #ifdef SWIG
61 #error "You cannot SWIG proto headers"
62 #endif
63 
64 namespace google {
65 namespace protobuf {
66 
67 template <typename T>
68 class RepeatedPtrField;
69 
70 class FastReflectionMessageMutator;
71 class FastReflectionStringSetter;
72 class Reflection;
73 
74 namespace io {
75 
76 class CodedInputStream;
77 class CodedOutputStream;
80 
81 } // namespace io
82 namespace internal {
83 
84 class SwapFieldHelper;
85 
86 // Tag type used to invoke the constinit constructor overload of some classes.
87 // Such constructors are internal implementation details of the library.
89  explicit ConstantInitialized() = default;
90 };
91 
92 // See parse_context.h for explanation
93 class ParseContext;
94 
95 class ExtensionSet;
96 class LazyField;
98 class TcParser;
99 class WireFormatLite;
100 class WeakFieldMap;
101 
102 template <typename Type>
103 class GenericTypeHandler; // defined in repeated_field.h
104 
105 // We compute sizes as size_t but cache them as int. This function converts a
106 // computed size to a cached size. Since we don't proceed with serialization
107 // if the total size was > INT_MAX, it is not important what this function
108 // returns for inputs > INT_MAX. However this case should not error or
109 // GOOGLE_CHECK-fail, because the full size_t resolution is still returned from
110 // ByteSizeLong() and checked against INT_MAX; we can catch the overflow
111 // there.
112 inline int ToCachedSize(size_t size) { return static_cast<int>(size); }
113 
114 // We mainly calculate sizes in terms of size_t, but some functions that
115 // compute sizes return "int". These int sizes are expected to always be
116 // positive. This function is more efficient than casting an int to size_t
117 // directly on 64-bit platforms because it avoids making the compiler emit a
118 // sign extending instruction, which we don't want and don't want to pay for.
119 inline size_t FromIntSize(int size) {
120  // Convert to unsigned before widening so sign extension is not necessary.
121  return static_cast<unsigned int>(size);
122 }
123 
124 // For cases where a legacy function returns an integer size. We GOOGLE_DCHECK()
125 // that the conversion will fit within an integer; if this is false then we
126 // are losing information.
127 inline int ToIntSize(size_t size) {
128  GOOGLE_DCHECK_LE(size, static_cast<size_t>(INT_MAX));
129  return static_cast<int>(size);
130 }
131 
132 // Default empty string object. Don't use this directly. Instead, call
133 // GetEmptyString() to get the reference.
134 PROTOBUF_EXPORT extern ExplicitlyConstructed<std::string>
136 
137 
138 PROTOBUF_EXPORT constexpr const std::string& GetEmptyStringAlreadyInited() {
140 }
141 
142 PROTOBUF_EXPORT size_t StringSpaceUsedExcludingSelfLong(const std::string& str);
143 
144 } // namespace internal
145 
146 // Interface to light weight protocol messages.
147 //
148 // This interface is implemented by all protocol message objects. Non-lite
149 // messages additionally implement the Message interface, which is a
150 // subclass of MessageLite. Use MessageLite instead when you only need
151 // the subset of features which it supports -- namely, nothing that uses
152 // descriptors or reflection. You can instruct the protocol compiler
153 // to generate classes which implement only MessageLite, not the full
154 // Message interface, by adding the following line to the .proto file:
155 //
156 // option optimize_for = LITE_RUNTIME;
157 //
158 // This is particularly useful on resource-constrained systems where
159 // the full protocol buffers runtime library is too big.
160 //
161 // Note that on non-constrained systems (e.g. servers) when you need
162 // to link in lots of protocol definitions, a better way to reduce
163 // total code footprint is to use optimize_for = CODE_SIZE. This
164 // will make the generated code smaller while still supporting all the
165 // same features (at the expense of speed). optimize_for = LITE_RUNTIME
166 // is best when you only have a small number of message types linked
167 // into your binary, in which case the size of the protocol buffers
168 // runtime itself is the biggest problem.
169 //
170 // Users must not derive from this class. Only the protocol compiler and
171 // the internal library are allowed to create subclasses.
172 class PROTOBUF_EXPORT MessageLite {
173  public:
174  constexpr MessageLite() {}
175  virtual ~MessageLite() = default;
176 
177  // Basic Operations ------------------------------------------------
178 
179  // Get the name of this message type, e.g. "foo.bar.BazProto".
180  virtual std::string GetTypeName() const = 0;
181 
182  // Construct a new instance of the same type. Ownership is passed to the
183  // caller.
184  MessageLite* New() const { return New(nullptr); }
185 
186  // Construct a new instance on the arena. Ownership is passed to the caller
187  // if arena is a nullptr.
188  virtual MessageLite* New(Arena* arena) const = 0;
189 
190  // Same as GetOwningArena.
191  Arena* GetArena() const { return GetOwningArena(); }
192 
193  // Clear all fields of the message and set them to their default values.
194  // Clear() avoids freeing memory, assuming that any memory allocated
195  // to hold parts of the message will be needed again to hold the next
196  // message. If you actually want to free the memory used by a Message,
197  // you must delete it.
198  virtual void Clear() = 0;
199 
200  // Quickly check if all required fields have values set.
201  virtual bool IsInitialized() const = 0;
202 
203  // This is not implemented for Lite messages -- it just returns "(cannot
204  // determine missing fields for lite message)". However, it is implemented
205  // for full messages. See message.h.
206  virtual std::string InitializationErrorString() const;
207 
208  // If |other| is the exact same class as this, calls MergeFrom(). Otherwise,
209  // results are undefined (probably crash).
210  virtual void CheckTypeAndMergeFrom(const MessageLite& other) = 0;
211 
212  // These methods return a human-readable summary of the message. Note that
213  // since the MessageLite interface does not support reflection, there is very
214  // little information that these methods can provide. They are shadowed by
215  // methods of the same name on the Message interface which provide much more
216  // information. The methods here are intended primarily to facilitate code
217  // reuse for logic that needs to interoperate with both full and lite protos.
218  //
219  // The format of the returned string is subject to change, so please do not
220  // assume it will remain stable over time.
221  std::string DebugString() const;
223  // MessageLite::DebugString is already Utf8 Safe. This is to add compatibility
224  // with Message.
226 
227  // Parsing ---------------------------------------------------------
228  // Methods for parsing in protocol buffer format. Most of these are
229  // just simple wrappers around MergeFromCodedStream(). Clear() will be
230  // called before merging the input.
231 
232  // Fill the message with a protocol buffer parsed from the given input
233  // stream. Returns false on a read error or if the input is in the wrong
234  // format. A successful return does not indicate the entire input is
235  // consumed, ensure you call ConsumedEntireMessage() to check that if
236  // applicable.
237  PROTOBUF_ATTRIBUTE_REINITIALIZES bool ParseFromCodedStream(
239  // Like ParseFromCodedStream(), but accepts messages that are missing
240  // required fields.
241  PROTOBUF_ATTRIBUTE_REINITIALIZES bool ParsePartialFromCodedStream(
243  // Read a protocol buffer from the given zero-copy input stream. If
244  // successful, the entire input will be consumed.
245  PROTOBUF_ATTRIBUTE_REINITIALIZES bool ParseFromZeroCopyStream(
247  // Like ParseFromZeroCopyStream(), but accepts messages that are missing
248  // required fields.
249  PROTOBUF_ATTRIBUTE_REINITIALIZES bool ParsePartialFromZeroCopyStream(
251  // Parse a protocol buffer from a file descriptor. If successful, the entire
252  // input will be consumed.
253  PROTOBUF_ATTRIBUTE_REINITIALIZES bool ParseFromFileDescriptor(
254  int file_descriptor);
255  // Like ParseFromFileDescriptor(), but accepts messages that are missing
256  // required fields.
257  PROTOBUF_ATTRIBUTE_REINITIALIZES bool ParsePartialFromFileDescriptor(
258  int file_descriptor);
259  // Parse a protocol buffer from a C++ istream. If successful, the entire
260  // input will be consumed.
261  PROTOBUF_ATTRIBUTE_REINITIALIZES bool ParseFromIstream(std::istream* input);
262  // Like ParseFromIstream(), but accepts messages that are missing
263  // required fields.
264  PROTOBUF_ATTRIBUTE_REINITIALIZES bool ParsePartialFromIstream(
265  std::istream* input);
266  // Read a protocol buffer from the given zero-copy input stream, expecting
267  // the message to be exactly "size" bytes long. If successful, exactly
268  // this many bytes will have been consumed from the input.
269  bool MergePartialFromBoundedZeroCopyStream(io::ZeroCopyInputStream* input,
270  int size);
271  // Like ParseFromBoundedZeroCopyStream(), but accepts messages that are
272  // missing required fields.
273  bool MergeFromBoundedZeroCopyStream(io::ZeroCopyInputStream* input, int size);
274  PROTOBUF_ATTRIBUTE_REINITIALIZES bool ParseFromBoundedZeroCopyStream(
276  // Like ParseFromBoundedZeroCopyStream(), but accepts messages that are
277  // missing required fields.
278  PROTOBUF_ATTRIBUTE_REINITIALIZES bool ParsePartialFromBoundedZeroCopyStream(
280  // Parses a protocol buffer contained in a string. Returns true on success.
281  // This function takes a string in the (non-human-readable) binary wire
282  // format, matching the encoding output by MessageLite::SerializeToString().
283  // If you'd like to convert a human-readable string into a protocol buffer
284  // object, see google::protobuf::TextFormat::ParseFromString().
285  PROTOBUF_ATTRIBUTE_REINITIALIZES bool ParseFromString(ConstStringParam data);
286  // Like ParseFromString(), but accepts messages that are missing
287  // required fields.
288  PROTOBUF_ATTRIBUTE_REINITIALIZES bool ParsePartialFromString(
290  // Parse a protocol buffer contained in an array of bytes.
291  PROTOBUF_ATTRIBUTE_REINITIALIZES bool ParseFromArray(const void* data,
292  int size);
293  // Like ParseFromArray(), but accepts messages that are missing
294  // required fields.
295  PROTOBUF_ATTRIBUTE_REINITIALIZES bool ParsePartialFromArray(const void* data,
296  int size);
297 
298 
299  // Reads a protocol buffer from the stream and merges it into this
300  // Message. Singular fields read from the what is
301  // already in the Message and repeated fields are appended to those
302  // already present.
303  //
304  // It is the responsibility of the caller to call input->LastTagWas()
305  // (for groups) or input->ConsumedEntireMessage() (for non-groups) after
306  // this returns to verify that the message's end was delimited correctly.
307  //
308  // ParseFromCodedStream() is implemented as Clear() followed by
309  // MergeFromCodedStream().
310  bool MergeFromCodedStream(io::CodedInputStream* input);
311 
312  // Like MergeFromCodedStream(), but succeeds even if required fields are
313  // missing in the input.
314  //
315  // MergeFromCodedStream() is just implemented as MergePartialFromCodedStream()
316  // followed by IsInitialized().
318 
319  // Merge a protocol buffer contained in a string.
321 
322 
323  // Serialization ---------------------------------------------------
324  // Methods for serializing in protocol buffer format. Most of these
325  // are just simple wrappers around ByteSize() and SerializeWithCachedSizes().
326 
327  // Write a protocol buffer of this message to the given output. Returns
328  // false on a write error. If the message is missing required fields,
329  // this may GOOGLE_CHECK-fail.
330  bool SerializeToCodedStream(io::CodedOutputStream* output) const;
331  // Like SerializeToCodedStream(), but allows missing required fields.
332  bool SerializePartialToCodedStream(io::CodedOutputStream* output) const;
333  // Write the message to the given zero-copy output stream. All required
334  // fields must be set.
335  bool SerializeToZeroCopyStream(io::ZeroCopyOutputStream* output) const;
336  // Like SerializeToZeroCopyStream(), but allows missing required fields.
337  bool SerializePartialToZeroCopyStream(io::ZeroCopyOutputStream* output) const;
338  // Serialize the message and store it in the given string. All required
339  // fields must be set.
340  bool SerializeToString(std::string* output) const;
341  // Like SerializeToString(), but allows missing required fields.
343  // Serialize the message and store it in the given byte array. All required
344  // fields must be set.
345  bool SerializeToArray(void* data, int size) const;
346  // Like SerializeToArray(), but allows missing required fields.
347  bool SerializePartialToArray(void* data, int size) const;
348 
349  // Make a string encoding the message. Is equivalent to calling
350  // SerializeToString() on a string and using that. Returns the empty
351  // string if SerializeToString() would have returned an error.
352  // Note: If you intend to generate many such strings, you may
353  // reduce heap fragmentation by instead re-using the same string
354  // object with calls to SerializeToString().
355  std::string SerializeAsString() const;
356  // Like SerializeAsString(), but allows missing required fields.
357  std::string SerializePartialAsString() const;
358 
359  // Serialize the message and write it to the given file descriptor. All
360  // required fields must be set.
361  bool SerializeToFileDescriptor(int file_descriptor) const;
362  // Like SerializeToFileDescriptor(), but allows missing required fields.
363  bool SerializePartialToFileDescriptor(int file_descriptor) const;
364  // Serialize the message and write it to the given C++ ostream. All
365  // required fields must be set.
366  bool SerializeToOstream(std::ostream* output) const;
367  // Like SerializeToOstream(), but allows missing required fields.
368  bool SerializePartialToOstream(std::ostream* output) const;
369 
370  // Like SerializeToString(), but appends to the data to the string's
371  // existing contents. All required fields must be set.
372  bool AppendToString(std::string* output) const;
373  // Like AppendToString(), but allows missing required fields.
374  bool AppendPartialToString(std::string* output) const;
375 
376 
377  // Computes the serialized size of the message. This recursively calls
378  // ByteSizeLong() on all embedded messages.
379  //
380  // ByteSizeLong() is generally linear in the number of fields defined for the
381  // proto.
382  virtual size_t ByteSizeLong() const = 0;
383 
384  // Legacy ByteSize() API.
385  PROTOBUF_DEPRECATED_MSG("Please use ByteSizeLong() instead")
386  int ByteSize() const { return internal::ToIntSize(ByteSizeLong()); }
387 
388  // Serializes the message without recomputing the size. The message must not
389  // have changed since the last call to ByteSize(), and the value returned by
390  // ByteSize must be non-negative. Otherwise the results are undefined.
392  output->SetCur(_InternalSerialize(output->Cur(), output->EpsCopy()));
393  }
394 
395  // Functions below here are not part of the public interface. It isn't
396  // enforced, but they should be treated as private, and will be private
397  // at some future time. Unfortunately the implementation of the "friend"
398  // keyword in GCC is broken at the moment, but we expect it will be fixed.
399 
400  // Like SerializeWithCachedSizes, but writes directly to *target, returning
401  // a pointer to the byte immediately after the last byte written. "target"
402  // must point at a byte array of at least ByteSize() bytes. Whether to use
403  // deterministic serialization, e.g., maps in sorted order, is determined by
404  // CodedOutputStream::IsDefaultSerializationDeterministic().
405  uint8_t* SerializeWithCachedSizesToArray(uint8_t* target) const;
406 
407  // Returns the result of the last call to ByteSize(). An embedded message's
408  // size is needed both to serialize it (because embedded messages are
409  // length-delimited) and to compute the outer message's size. Caching
410  // the size avoids computing it multiple times.
411  //
412  // ByteSize() does not automatically use the cached size when available
413  // because this would require invalidating it every time the message was
414  // modified, which would be too hard and expensive. (E.g. if a deeply-nested
415  // sub-message is changed, all of its parents' cached sizes would need to be
416  // invalidated, which is too much work for an otherwise inlined setter
417  // method.)
418  virtual int GetCachedSize() const = 0;
419 
420  virtual const char* _InternalParse(const char* /*ptr*/,
421  internal::ParseContext* /*ctx*/) {
422  return nullptr;
423  }
424 
425  protected:
426  template <typename T>
428  return Arena::CreateMaybeMessage<T>(arena);
429  }
430 
431  inline explicit MessageLite(Arena* arena, bool is_message_owned = false)
432  : _internal_metadata_(arena, is_message_owned) {}
433 
434  // Returns the arena, if any, that directly owns this message and its internal
435  // memory (Arena::Own is different in that the arena doesn't directly own the
436  // internal memory). This method is used in proto's implementation for
437  // swapping, moving and setting allocated, for deciding whether the ownership
438  // of this message or its internal memory could be changed.
439  Arena* GetOwningArena() const { return _internal_metadata_.owning_arena(); }
440 
441  // Returns the arena, used for allocating internal objects(e.g., child
442  // messages, etc), or owning incoming objects (e.g., set allocated).
443  Arena* GetArenaForAllocation() const { return _internal_metadata_.arena(); }
444 
446 
447  public:
448  enum ParseFlags {
449  kMerge = 0,
450  kParse = 1,
451  kMergePartial = 2,
452  kParsePartial = 3,
453  kMergeWithAliasing = 4,
454  kParseWithAliasing = 5,
455  kMergePartialWithAliasing = 6,
456  kParsePartialWithAliasing = 7
457  };
458 
459  template <ParseFlags flags, typename T>
460  bool ParseFrom(const T& input);
461 
462  // Fast path when conditions match (ie. non-deterministic)
463  // uint8_t* _InternalSerialize(uint8_t* ptr) const;
464  virtual uint8_t* _InternalSerialize(
466 
467  // Identical to IsInitialized() except that it logs an error message.
468  bool IsInitializedWithErrors() const {
469  if (IsInitialized()) return true;
470  LogInitializationErrorMessage();
471  return false;
472  }
473 
474  private:
475  // TODO(gerbens) make this a pure abstract function
476  virtual const void* InternalGetTable() const { return nullptr; }
477 
478  friend class FastReflectionMessageMutator;
479  friend class FastReflectionStringSetter;
480  friend class Message;
481  friend class Reflection;
483  friend class internal::LazyField;
485  friend class internal::TcParser;
486  friend class internal::WeakFieldMap;
487  friend class internal::WireFormatLite;
488 
489  template <typename Type>
490  friend class Arena::InternalHelper;
491  template <typename Type>
493 
494  void LogInitializationErrorMessage() const;
495 
497 
499 };
500 
501 namespace internal {
502 
503 template <bool alias>
505  MessageLite::ParseFlags parse_flags);
506 extern template bool MergeFromImpl<false>(StringPiece input,
507  MessageLite* msg,
508  MessageLite::ParseFlags parse_flags);
509 extern template bool MergeFromImpl<true>(StringPiece input,
510  MessageLite* msg,
511  MessageLite::ParseFlags parse_flags);
512 
513 template <bool alias>
515  MessageLite::ParseFlags parse_flags);
517  MessageLite* msg,
518  MessageLite::ParseFlags parse_flags);
520  MessageLite* msg,
521  MessageLite::ParseFlags parse_flags);
522 
523 struct BoundedZCIS {
525  int limit;
526 };
527 
528 template <bool alias>
529 bool MergeFromImpl(BoundedZCIS input, MessageLite* msg,
530  MessageLite::ParseFlags parse_flags);
531 extern template bool MergeFromImpl<false>(BoundedZCIS input, MessageLite* msg,
532  MessageLite::ParseFlags parse_flags);
533 extern template bool MergeFromImpl<true>(BoundedZCIS input, MessageLite* msg,
534  MessageLite::ParseFlags parse_flags);
535 
536 template <typename T>
537 struct SourceWrapper;
538 
539 template <bool alias, typename T>
541  MessageLite::ParseFlags parse_flags) {
542  return input.template MergeInto<alias>(msg, parse_flags);
543 }
544 
545 } // namespace internal
546 
547 template <MessageLite::ParseFlags flags, typename T>
548 bool MessageLite::ParseFrom(const T& input) {
549  if (flags & kParse) Clear();
550  constexpr bool alias = (flags & kMergeWithAliasing) != 0;
551  return internal::MergeFromImpl<alias>(input, this, flags);
552 }
553 
554 // ===================================================================
555 // Shutdown support.
556 
557 
558 // Shut down the entire protocol buffers library, deleting all static-duration
559 // objects allocated by the library or by generated .pb.cc files.
560 //
561 // There are two reasons you might want to call this:
562 // * You use a draconian definition of "memory leak" in which you expect
563 // every single malloc() to have a corresponding free(), even for objects
564 // which live until program exit.
565 // * You are writing a dynamically-loaded library which needs to clean up
566 // after itself when the library is unloaded.
567 //
568 // It is safe to call this multiple times. However, it is not safe to use
569 // any other part of the protocol buffers library after
570 // ShutdownProtobufLibrary() has been called. Furthermore this call is not
571 // thread safe, user needs to synchronize multiple calls.
572 PROTOBUF_EXPORT void ShutdownProtobufLibrary();
573 
574 namespace internal {
575 
576 // Register a function to be called when ShutdownProtocolBuffers() is called.
577 PROTOBUF_EXPORT void OnShutdown(void (*func)());
578 // Run an arbitrary function on an arg
579 PROTOBUF_EXPORT void OnShutdownRun(void (*f)(const void*), const void* arg);
580 
581 template <typename T>
582 T* OnShutdownDelete(T* p) {
583  OnShutdownRun([](const void* pp) { delete static_cast<const T*>(pp); }, p);
584  return p;
585 }
586 
587 } // namespace internal
588 } // namespace protobuf
589 } // namespace google
590 
591 #include <google/protobuf/port_undef.inc>
592 
593 #endif // GOOGLE_PROTOBUF_MESSAGE_LITE_H__
xds_interop_client.str
str
Definition: xds_interop_client.py:487
google::protobuf.internal::MergeFromImpl
bool MergeFromImpl(const SourceWrapper< T > &input, MessageLite *msg, MessageLite::ParseFlags parse_flags)
Definition: protobuf/src/google/protobuf/message_lite.h:540
google::protobuf::MessageLite::ParseFlags
ParseFlags
Definition: bloaty/third_party/protobuf/src/google/protobuf/message_lite.h:449
ptr
char * ptr
Definition: abseil-cpp/absl/base/internal/low_level_alloc_test.cc:45
google::protobuf.internal::ExtensionSet
Definition: bloaty/third_party/protobuf/src/google/protobuf/extension_set.h:175
GOOGLE_DISALLOW_EVIL_CONSTRUCTORS
#define GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(TypeName)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/macros.h:40
google::protobuf::MessageLite::MessageLite
MessageLite(Arena *arena, bool is_message_owned=false)
Definition: protobuf/src/google/protobuf/message_lite.h:431
grpc::protobuf::io::ZeroCopyInputStream
GRPC_CUSTOM_ZEROCOPYINPUTSTREAM ZeroCopyInputStream
Definition: include/grpcpp/impl/codegen/config_protobuf.h:101
google::protobuf::MessageLite::Clear
virtual void Clear()=0
google::protobuf.internal::ConstantInitialized
Definition: protobuf/src/google/protobuf/message_lite.h:88
Arena
Definition: arena.c:39
DebugString
std::string DebugString(const google::protobuf::Message &message)
Definition: bloaty/tests/test.h:60
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
google::protobuf::MessageLite::kParse
@ kParse
Definition: bloaty/third_party/protobuf/src/google/protobuf/message_lite.h:451
google::protobuf.internal::ParseContext
Definition: bloaty/third_party/protobuf/src/google/protobuf/parse_context.h:336
New
T * New(Args &&... args)
Definition: third_party/boringssl-with-bazel/src/ssl/internal.h:195
google::protobuf
Definition: bloaty/third_party/protobuf/benchmarks/util/data_proto2_to_proto3_util.h:12
google::protobuf.internal::MergeFromImpl< false >
template bool MergeFromImpl< false >(StringPiece input, MessageLite *msg, MessageLite::ParseFlags parse_flags)
grpc::protobuf::io::ZeroCopyOutputStream
GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM ZeroCopyOutputStream
Definition: include/grpcpp/impl/codegen/config_protobuf.h:100
google::protobuf.internal::FromIntSize
size_t FromIntSize(int size)
Definition: bloaty/third_party/protobuf/src/google/protobuf/message_lite.h:97
testing::internal::GetTypeName
std::string GetTypeName()
Definition: bloaty/third_party/googletest/googletest/include/gtest/internal/gtest-type-util.h:80
xds_manager.p
p
Definition: xds_manager.py:60
google::protobuf::MessageLite
Definition: bloaty/third_party/protobuf/src/google/protobuf/message_lite.h:184
google::protobuf::Reflection
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.h:397
google::protobuf::MessageLite::ParseFrom
bool ParseFrom(const T &input)
Definition: bloaty/third_party/protobuf/src/google/protobuf/message_lite.h:526
uint8_t
unsigned char uint8_t
Definition: stdint-msvc2008.h:78
T
#define T(upbtypeconst, upbtype, ctype, default_value)
google::protobuf::MessageLite::InternalGetTable
virtual const void * InternalGetTable() const
Definition: protobuf/src/google/protobuf/message_lite.h:476
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
google::protobuf::MessageLite::_InternalParse
virtual const char * _InternalParse(const char *, internal::ParseContext *)
Definition: protobuf/src/google/protobuf/message_lite.h:420
google::protobuf.internal::OnShutdown
void OnShutdown(void(*func)())
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/common.cc:344
google::protobuf.internal::ExplicitlyConstructed::get
constexpr const T & get() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/message_lite.h:135
google::protobuf::MessageLite::CreateMaybeMessage
static T * CreateMaybeMessage(Arena *arena)
Definition: protobuf/src/google/protobuf/message_lite.h:427
google::protobuf::MessageLite::New
MessageLite * New() const
Definition: protobuf/src/google/protobuf/message_lite.h:184
google::protobuf::MessageLite::kMergeWithAliasing
@ kMergeWithAliasing
Definition: bloaty/third_party/protobuf/src/google/protobuf/message_lite.h:454
google::protobuf::io::EpsCopyOutputStream
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/coded_stream.h:651
google::protobuf::MessageLite::SerializeWithCachedSizes
void SerializeWithCachedSizes(io::CodedOutputStream *output) const
Definition: protobuf/src/google/protobuf/message_lite.h:391
google::protobuf.internal::OnShutdownRun
void OnShutdownRun(void(*f)(const void *), const void *arg)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/common.cc:348
google::protobuf::ConstStringParam
const std::string & ConstStringParam
Definition: third_party/protobuf/src/google/protobuf/stubs/port.h:129
xds_interop_client.int
int
Definition: xds_interop_client.py:113
google::protobuf.internal::MergePartialFromCodedStream
bool MergePartialFromCodedStream(MessageLite *msg, const ParseTable &table, io::CodedInputStream *input)
Definition: bloaty/third_party/protobuf/src/google/protobuf/generated_message_table_driven.cc:96
gmock_output_test.output
output
Definition: bloaty/third_party/googletest/googlemock/test/gmock_output_test.py:175
google::protobuf.internal::GetEmptyStringAlreadyInited
const PROTOBUF_EXPORT std::string & GetEmptyStringAlreadyInited()
Definition: bloaty/third_party/protobuf/src/google/protobuf/message_lite.h:153
google::protobuf.internal::ToIntSize
int ToIntSize(size_t size)
Definition: bloaty/third_party/protobuf/src/google/protobuf/message_lite.h:105
grpc::protobuf::MessageLite
GRPC_CUSTOM_MESSAGELITE MessageLite
Definition: include/grpcpp/impl/codegen/config_protobuf.h:79
google::protobuf.internal::SourceWrapper
Definition: bloaty/third_party/protobuf/src/google/protobuf/message_lite.h:516
google::protobuf.internal::SwapFieldHelper
Definition: protobuf/src/google/protobuf/generated_message_reflection.cc:462
google::protobuf.internal.python_message._InternalSerialize
_InternalSerialize
Definition: bloaty/third_party/protobuf/python/google/protobuf/internal/python_message.py:1112
google::protobuf::StringPiece
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/stringpiece.h:180
google::protobuf.internal::StringSpaceUsedExcludingSelfLong
size_t StringSpaceUsedExcludingSelfLong(const std::string &str)
Definition: bloaty/third_party/protobuf/src/google/protobuf/generated_message_util.cc:85
grpc::protobuf::io::CodedInputStream
GRPC_CUSTOM_CODEDINPUTSTREAM CodedInputStream
Definition: include/grpcpp/impl/codegen/config_protobuf.h:102
google::protobuf.internal::InternalMetadata
Definition: protobuf/src/google/protobuf/metadata_lite.h:62
arg
Definition: cmdline.cc:40
io
google::protobuf.internal::TcParser
Definition: generated_message_tctable_impl.h:110
data
char data[kBufferLength]
Definition: abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1006
grpc::protobuf::io::CodedOutputStream
GRPC_CUSTOM_CODEDOUTPUTSTREAM CodedOutputStream
Definition: src/compiler/config.h:55
google::protobuf.internal.python_message.ByteSize
ByteSize
Definition: bloaty/third_party/protobuf/python/google/protobuf/internal/python_message.py:1067
google::protobuf::MessageLite::GetOwningArena
Arena * GetOwningArena() const
Definition: protobuf/src/google/protobuf/message_lite.h:439
google::protobuf::MessageLite::ShortDebugString
std::string ShortDebugString() const
Definition: protobuf/src/google/protobuf/message_lite.h:222
msg
std::string msg
Definition: client_interceptors_end2end_test.cc:372
google::protobuf::io::CodedOutputStream
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/coded_stream.h:1044
google::protobuf::io::ZeroCopyInputStream
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/zero_copy_stream.h:126
pp
const uint8_t ** pp
Definition: ssl_x509.cc:1020
google::protobuf.internal::MergeFromImpl< true >
template bool MergeFromImpl< true >(StringPiece input, MessageLite *msg, MessageLite::ParseFlags parse_flags)
google::protobuf.internal.python_message.MergeFromString
MergeFromString
Definition: bloaty/third_party/protobuf/python/google/protobuf/internal/python_message.py:1137
google::protobuf::Message
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.h:205
func
const EVP_CIPHER *(* func)(void)
Definition: cipher_extra.c:73
google::protobuf::MessageLite::GetArenaForAllocation
Arena * GetArenaForAllocation() const
Definition: protobuf/src/google/protobuf/message_lite.h:443
absl::flags_internal
Definition: abseil-cpp/absl/flags/commandlineflag.h:40
google::protobuf.internal.python_message.Clear
Clear
Definition: bloaty/third_party/protobuf/python/google/protobuf/internal/python_message.py:1430
google::protobuf.internal::ToCachedSize
int ToCachedSize(size_t size)
Definition: bloaty/third_party/protobuf/src/google/protobuf/message_lite.h:90
google::protobuf.internal::ConstantInitialized::ConstantInitialized
ConstantInitialized()=default
google::protobuf::python::cmessage::ParseFromString
static PyObject * ParseFromString(CMessage *self, PyObject *arg)
Definition: bloaty/third_party/protobuf/python/google/protobuf/pyext/message.cc:1975
google::protobuf.internal::fixed_address_empty_string
ExplicitlyConstructed< std::string > fixed_address_empty_string
Definition: bloaty/third_party/protobuf/src/google/protobuf/generated_message_util.cc:71
google::protobuf::MessageLite::GetArena
Arena * GetArena() const
Definition: protobuf/src/google/protobuf/message_lite.h:191
google::protobuf::MessageLite::Utf8DebugString
std::string Utf8DebugString() const
Definition: protobuf/src/google/protobuf/message_lite.h:225
google::protobuf::io::ZeroCopyOutputStream
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/zero_copy_stream.h:183
google::protobuf::io::CodedInputStream
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/coded_stream.h:180
google::protobuf::MessageLite::_internal_metadata_
internal::InternalMetadata _internal_metadata_
Definition: protobuf/src/google/protobuf/message_lite.h:445
google::protobuf.internal::RepeatedPtrFieldBase
Definition: bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h:451
google::protobuf.internal.python_message.IsInitialized
IsInitialized
Definition: bloaty/third_party/protobuf/python/google/protobuf/internal/python_message.py:1245
input
std::string input
Definition: bloaty/third_party/protobuf/src/google/protobuf/io/tokenizer_unittest.cc:197
google::protobuf.internal.python_message.SerializePartialToString
SerializePartialToString
Definition: bloaty/third_party/protobuf/python/google/protobuf/internal/python_message.py:1090
internal
Definition: benchmark/test/output_test_helper.cc:20
google::protobuf::MessageLite::MessageLite
constexpr MessageLite()
Definition: protobuf/src/google/protobuf/message_lite.h:174
google::protobuf::MessageLite::IsInitializedWithErrors
bool IsInitializedWithErrors() const
Definition: protobuf/src/google/protobuf/message_lite.h:468
google::protobuf.internal.python_message.SerializeToString
SerializeToString
Definition: bloaty/third_party/protobuf/python/google/protobuf/internal/python_message.py:1080
google::protobuf.internal::GenericTypeHandler
Definition: third_party/bloaty/third_party/protobuf/src/google/protobuf/arena.h:93
size
voidpf void uLong size
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
google::protobuf.internal::MergeFromImpl
bool MergeFromImpl(StringPiece input, MessageLite *msg, MessageLite::ParseFlags parse_flags)
Definition: protobuf/src/google/protobuf/message_lite.cc:140
explicitly_constructed.h
google::protobuf.internal::WireFormatLite
Definition: bloaty/third_party/protobuf/src/google/protobuf/wire_format_lite.h:84
google::protobuf::ShutdownProtobufLibrary
void ShutdownProtobufLibrary()
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/common.cc:356
GOOGLE_DCHECK_LE
#define GOOGLE_DCHECK_LE
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/logging.h:199
setup.target
target
Definition: third_party/bloaty/third_party/protobuf/python/setup.py:179
google
Definition: bloaty/third_party/protobuf/benchmarks/util/data_proto2_to_proto3_util.h:11
Arena::arena
upb_arena * arena
Definition: arena.c:41
stream
voidpf stream
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136


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