protobuf/src/google/protobuf/reflection_internal.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 #ifndef GOOGLE_PROTOBUF_REFLECTION_INTERNAL_H__
32 #define GOOGLE_PROTOBUF_REFLECTION_INTERNAL_H__
33 
34 #include <google/protobuf/map_field.h>
35 #include <google/protobuf/reflection.h>
36 #include <google/protobuf/repeated_field.h>
37 
38 namespace google {
39 namespace protobuf {
40 namespace internal {
41 // A base class for RepeatedFieldAccessor implementations that can support
42 // random-access efficiently. All iterator methods delegates the work to
43 // corresponding random-access methods.
44 class RandomAccessRepeatedFieldAccessor : public RepeatedFieldAccessor {
45  public:
46  Iterator* BeginIterator(const Field* /*data*/) const override {
47  return PositionToIterator(0);
48  }
49  Iterator* EndIterator(const Field* data) const override {
50  return PositionToIterator(this->Size(data));
51  }
52  Iterator* CopyIterator(const Field* /*data*/,
53  const Iterator* iterator) const override {
54  return const_cast<Iterator*>(iterator);
55  }
56  Iterator* AdvanceIterator(const Field* /*data*/,
57  Iterator* iterator) const override {
59  }
60  bool EqualsIterator(const Field* /*data*/, const Iterator* a,
61  const Iterator* b) const override {
62  return a == b;
63  }
64  void DeleteIterator(const Field* /*data*/,
65  Iterator* /*iterator*/) const override {}
67  Value* scratch_space) const override {
68  return Get(data, static_cast<int>(IteratorToPosition(iterator)),
69  scratch_space);
70  }
71 
72  protected:
74 
75  private:
77  return reinterpret_cast<intptr_t>(iterator);
78  }
80  return reinterpret_cast<Iterator*>(position);
81  }
82 };
83 
84 // Base class for RepeatedFieldAccessor implementations that manipulates
85 // RepeatedField<T>.
86 template <typename T>
87 class RepeatedFieldWrapper : public RandomAccessRepeatedFieldAccessor {
88  public:
90  bool IsEmpty(const Field* data) const override {
91  return GetRepeatedField(data)->empty();
92  }
93  int Size(const Field* data) const override {
94  return GetRepeatedField(data)->size();
95  }
96  const Value* Get(const Field* data, int index,
97  Value* scratch_space) const override {
98  return ConvertFromT(GetRepeatedField(data)->Get(index), scratch_space);
99  }
100  void Clear(Field* data) const override {
102  }
103  void Set(Field* data, int index, const Value* value) const override {
105  }
106  void Add(Field* data, const Value* value) const override {
108  }
109  void RemoveLast(Field* data) const override {
111  }
112  void SwapElements(Field* data, int index1, int index2) const override {
113  MutableRepeatedField(data)->SwapElements(index1, index2);
114  }
115 
116  protected:
117  ~RepeatedFieldWrapper() = default;
120  return reinterpret_cast<const RepeatedFieldType*>(data);
121  }
123  return reinterpret_cast<RepeatedFieldType*>(data);
124  }
125 
126  // Convert an object received by this accessor to an object to be stored in
127  // the underlying RepeatedField.
128  virtual T ConvertToT(const Value* value) const = 0;
129 
130  // Convert an object stored in RepeatedPtrField to an object that will be
131  // returned by this accessor. If the two objects have the same type (true for
132  // string fields with ctype=STRING), a pointer to the source object can be
133  // returned directly. Otherwise, data should be copied from value to
134  // scratch_space and scratch_space should be returned.
135  virtual const Value* ConvertFromT(const T& value,
136  Value* scratch_space) const = 0;
137 };
138 
139 // Base class for RepeatedFieldAccessor implementations that manipulates
140 // RepeatedPtrField<T>.
141 template <typename T>
142 class RepeatedPtrFieldWrapper : public RandomAccessRepeatedFieldAccessor {
143  public:
144  bool IsEmpty(const Field* data) const override {
145  return GetRepeatedField(data)->empty();
146  }
147  int Size(const Field* data) const override {
148  return GetRepeatedField(data)->size();
149  }
150  const Value* Get(const Field* data, int index,
151  Value* scratch_space) const override {
152  return ConvertFromT(GetRepeatedField(data)->Get(index), scratch_space);
153  }
154  void Clear(Field* data) const override {
156  }
157  void Set(Field* data, int index, const Value* value) const override {
159  }
160  void Add(Field* data, const Value* value) const override {
161  T* allocated = New(value);
162  ConvertToT(value, allocated);
164  }
165  void RemoveLast(Field* data) const override {
167  }
168  void SwapElements(Field* data, int index1, int index2) const override {
169  MutableRepeatedField(data)->SwapElements(index1, index2);
170  }
171 
172  protected:
173  ~RepeatedPtrFieldWrapper() = default;
176  return reinterpret_cast<const RepeatedFieldType*>(data);
177  }
179  return reinterpret_cast<RepeatedFieldType*>(data);
180  }
181 
182  // Create a new T instance. For repeated message fields, T can be specified
183  // as google::protobuf::Message so we can't use "new T()" directly. In that case, value
184  // should be a message of the same type (it's ensured by the caller) and a
185  // new message object will be created using it.
186  virtual T* New(const Value* value) const = 0;
187 
188  // Convert an object received by this accessor to an object that will be
189  // stored in the underlying RepeatedPtrField.
190  virtual void ConvertToT(const Value* value, T* result) const = 0;
191 
192  // Convert an object stored in RepeatedPtrField to an object that will be
193  // returned by this accessor. If the two objects have the same type (true for
194  // string fields with ctype=STRING), a pointer to the source object can be
195  // returned directly. Otherwise, data should be copied from value to
196  // scratch_space and scratch_space should be returned.
197  virtual const Value* ConvertFromT(const T& value,
198  Value* scratch_space) const = 0;
199 };
200 
201 // An implementation of RandomAccessRepeatedFieldAccessor that manipulates
202 // MapFieldBase.
203 class MapFieldAccessor final : public RandomAccessRepeatedFieldAccessor {
204  public:
206  virtual ~MapFieldAccessor() {}
207  bool IsEmpty(const Field* data) const override {
208  return GetRepeatedField(data)->empty();
209  }
210  int Size(const Field* data) const override {
211  return GetRepeatedField(data)->size();
212  }
213  const Value* Get(const Field* data, int index,
214  Value* scratch_space) const override {
215  return ConvertFromEntry(GetRepeatedField(data)->Get(index), scratch_space);
216  }
217  void Clear(Field* data) const override {
219  }
220  void Set(Field* data, int index, const Value* value) const override {
222  }
223  void Add(Field* data, const Value* value) const override {
224  Message* allocated = New(value);
225  ConvertToEntry(value, allocated);
227  }
228  void RemoveLast(Field* data) const override {
230  }
231  void SwapElements(Field* data, int index1, int index2) const override {
232  MutableRepeatedField(data)->SwapElements(index1, index2);
233  }
234  void Swap(Field* data, const internal::RepeatedFieldAccessor* other_mutator,
235  Field* other_data) const override {
236  GOOGLE_CHECK(this == other_mutator);
238  }
239 
240  protected:
243  return reinterpret_cast<const RepeatedFieldType*>(
244  (&reinterpret_cast<const MapFieldBase*>(data)->GetRepeatedField()));
245  }
247  return reinterpret_cast<RepeatedFieldType*>(
248  reinterpret_cast<MapFieldBase*>(data)->MutableRepeatedField());
249  }
250  virtual Message* New(const Value* value) const {
251  return static_cast<const Message*>(value)->New();
252  }
253  // Convert an object received by this accessor to an MapEntry message to be
254  // stored in the underlying MapFieldBase.
255  virtual void ConvertToEntry(const Value* value, Message* result) const {
256  result->CopyFrom(*static_cast<const Message*>(value));
257  }
258  // Convert a MapEntry message stored in the underlying MapFieldBase to an
259  // object that will be returned by this accessor.
260  virtual const Value* ConvertFromEntry(const Message& value,
261  Value* /*scratch_space*/) const {
262  return static_cast<const Value*>(&value);
263  }
264 };
265 
266 // Default implementations of RepeatedFieldAccessor for primitive types.
267 template <typename T>
268 class RepeatedFieldPrimitiveAccessor final : public RepeatedFieldWrapper<T> {
269  typedef void Field;
270  typedef void Value;
272 
273  public:
275  void Swap(Field* data, const internal::RepeatedFieldAccessor* other_mutator,
276  Field* other_data) const override {
277  // Currently RepeatedFieldPrimitiveAccessor is the only implementation of
278  // RepeatedFieldAccessor for primitive types. As we are using singletons
279  // for these accessors, here "other_mutator" must be "this".
280  GOOGLE_CHECK(this == other_mutator);
282  }
283 
284  protected:
285  T ConvertToT(const Value* value) const override {
286  return *static_cast<const T*>(value);
287  }
288  const Value* ConvertFromT(const T& value,
289  Value* /*scratch_space*/) const override {
290  return static_cast<const Value*>(&value);
291  }
292 };
293 
294 // Default implementation of RepeatedFieldAccessor for string fields with
295 // ctype=STRING.
296 class RepeatedPtrFieldStringAccessor final
297  : public RepeatedPtrFieldWrapper<std::string> {
298  typedef void Field;
299  typedef void Value;
301 
302  public:
304  void Swap(Field* data, const internal::RepeatedFieldAccessor* other_mutator,
305  Field* other_data) const override {
306  if (this == other_mutator) {
308  } else {
311  int other_size = other_mutator->Size(other_data);
312  for (int i = 0; i < other_size; ++i) {
313  Add<std::string>(data, other_mutator->Get<std::string>(other_data, i));
314  }
315  int size = Size(data);
316  other_mutator->Clear(other_data);
317  for (int i = 0; i < size; ++i) {
318  other_mutator->Add<std::string>(other_data, tmp.Get(i));
319  }
320  }
321  }
322 
323  protected:
324  std::string* New(const Value*) const override { return new std::string(); }
325  void ConvertToT(const Value* value, std::string* result) const override {
326  *result = *static_cast<const std::string*>(value);
327  }
329  Value* /*scratch_space*/) const override {
330  return static_cast<const Value*>(&value);
331  }
332 };
333 
334 
335 class RepeatedPtrFieldMessageAccessor final
336  : public RepeatedPtrFieldWrapper<Message> {
337  typedef void Field;
338  typedef void Value;
339 
340  public:
342  void Swap(Field* data, const internal::RepeatedFieldAccessor* other_mutator,
343  Field* other_data) const override {
344  GOOGLE_CHECK(this == other_mutator);
346  }
347 
348  protected:
349  Message* New(const Value* value) const override {
350  return static_cast<const Message*>(value)->New();
351  }
352  void ConvertToT(const Value* value, Message* result) const override {
353  result->CopyFrom(*static_cast<const Message*>(value));
354  }
356  Value* /*scratch_space*/) const override {
357  return static_cast<const Value*>(&value);
358  }
359 };
360 } // namespace internal
361 } // namespace protobuf
362 } // namespace google
363 
364 #endif // GOOGLE_PROTOBUF_REFLECTION_INTERNAL_H__
_gevent_test_main.result
result
Definition: _gevent_test_main.py:96
google::protobuf::RepeatedPtrField< T >
google::protobuf.internal::RepeatedPtrFieldStringAccessor::ConvertToT
void ConvertToT(const Value *value, std::string *result) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:325
google::protobuf.internal::MapFieldAccessor::RepeatedFieldType
RepeatedPtrField< Message > RepeatedFieldType
Definition: protobuf/src/google/protobuf/reflection_internal.h:241
google::protobuf::value
const Descriptor::ReservedRange value
Definition: bloaty/third_party/protobuf/src/google/protobuf/descriptor.h:1954
google::protobuf.internal::RepeatedPtrFieldWrapper::Add
void Add(Field *data, const Value *value) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:160
google::protobuf.internal::RandomAccessRepeatedFieldAccessor::GetIteratorValue
const Value * GetIteratorValue(const Field *data, const Iterator *iterator, Value *scratch_space) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:66
google::protobuf.internal::RandomAccessRepeatedFieldAccessor::EndIterator
Iterator * EndIterator(const Field *data) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:49
google::protobuf.internal::RepeatedFieldPrimitiveAccessor::RepeatedFieldPrimitiveAccessor
RepeatedFieldPrimitiveAccessor()
Definition: protobuf/src/google/protobuf/reflection_internal.h:274
google::protobuf.internal::RepeatedPtrFieldMessageAccessor::Swap
void Swap(Field *data, const internal::RepeatedFieldAccessor *other_mutator, Field *other_data) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:342
google::protobuf.internal::RepeatedPtrFieldStringAccessor::Value
void Value
Definition: protobuf/src/google/protobuf/reflection_internal.h:299
google::protobuf::RepeatedField::empty
bool empty() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h:1125
google::protobuf.internal::RandomAccessRepeatedFieldAccessor::BeginIterator
Iterator * BeginIterator(const Field *) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:46
position
intern position
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/array.c:487
google::protobuf.internal::RepeatedFieldWrapper::GetRepeatedField
static const RepeatedFieldType * GetRepeatedField(const Field *data)
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection_internal.h:118
google::protobuf.internal::MapFieldAccessor::~MapFieldAccessor
virtual ~MapFieldAccessor()
Definition: protobuf/src/google/protobuf/reflection_internal.h:206
google::protobuf.internal::RepeatedFieldWrapper::RepeatedFieldType
RepeatedField< T > RepeatedFieldType
Definition: protobuf/src/google/protobuf/reflection_internal.h:118
testing::internal::string
::std::string string
Definition: bloaty/third_party/protobuf/third_party/googletest/googletest/include/gtest/internal/gtest-port.h:881
google::protobuf.internal::RepeatedPtrFieldStringAccessor::RepeatedPtrFieldStringAccessor
RepeatedPtrFieldStringAccessor()
Definition: protobuf/src/google/protobuf/reflection_internal.h:303
google::protobuf.internal::MapFieldAccessor::Add
void Add(Field *data, const Value *value) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:223
google::protobuf.internal::RepeatedFieldWrapper::ConvertToT
virtual T ConvertToT(const Value *value) const =0
google::protobuf.internal::RepeatedFieldWrapper::MutableRepeatedField
static RepeatedFieldType * MutableRepeatedField(Field *data)
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection_internal.h:121
google::protobuf
Definition: bloaty/third_party/protobuf/benchmarks/util/data_proto2_to_proto3_util.h:12
google::protobuf.internal::MapFieldAccessor::SwapElements
void SwapElements(Field *data, int index1, int index2) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:231
google::protobuf.internal::MapFieldAccessor::IsEmpty
bool IsEmpty(const Field *data) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:207
a
int a
Definition: abseil-cpp/absl/container/internal/hash_policy_traits_test.cc:88
Value
Definition: bloaty/third_party/protobuf/src/google/protobuf/struct.pb.h:306
google::protobuf::RepeatedField< T >
iterator
const typedef MCPhysReg * iterator
Definition: MCRegisterInfo.h:27
google::protobuf.internal::RepeatedPtrFieldStringAccessor::Swap
void Swap(Field *data, const internal::RepeatedFieldAccessor *other_mutator, Field *other_data) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:304
google::protobuf::RepeatedField::Add
void Add(const Element &value)
Definition: bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h:1210
google::protobuf::RepeatedField::Clear
void Clear()
Definition: bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h:1273
google::protobuf.internal::MapFieldAccessor::New
virtual Message * New(const Value *value) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection_internal.h:249
T
#define T(upbtypeconst, upbtype, ctype, default_value)
google::protobuf.internal::RepeatedPtrFieldWrapper::IsEmpty
bool IsEmpty(const Field *data) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:144
google::protobuf.internal::MapFieldAccessor::Get
const Value * Get(const Field *data, int index, Value *scratch_space) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:213
google::protobuf::RepeatedPtrField::empty
bool empty() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h:1994
google::protobuf.internal::RepeatedFieldAccessor::Size
virtual int Size(const Field *data) const =0
google::protobuf.internal::MapFieldAccessor::MutableRepeatedField
static RepeatedFieldType * MutableRepeatedField(Field *data)
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection_internal.h:245
google::protobuf.internal::RepeatedPtrFieldWrapper::ConvertFromT
virtual const Value * ConvertFromT(const T &value, Value *scratch_space) const =0
google::protobuf.internal::MapFieldAccessor::ConvertFromEntry
virtual const Value * ConvertFromEntry(const Message &value, Value *) const
Definition: protobuf/src/google/protobuf/reflection_internal.h:260
google::protobuf.internal::RepeatedPtrFieldWrapper::Get
const Value * Get(const Field *data, int index, Value *scratch_space) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:150
google::protobuf.internal::RepeatedFieldWrapper::IsEmpty
bool IsEmpty(const Field *data) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:90
google::protobuf.internal::MapFieldAccessor::ConvertFromEntry
virtual const Value * ConvertFromEntry(const Message &value, Value *scratch_space) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection_internal.h:259
google::protobuf.internal::RandomAccessRepeatedFieldAccessor::~RandomAccessRepeatedFieldAccessor
~RandomAccessRepeatedFieldAccessor()=default
google::protobuf.internal::RepeatedFieldWrapper::RepeatedFieldWrapper
RepeatedFieldWrapper()
Definition: protobuf/src/google/protobuf/reflection_internal.h:89
google::protobuf.internal::RepeatedPtrFieldWrapper::GetRepeatedField
static const RepeatedFieldType * GetRepeatedField(const Field *data)
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection_internal.h:174
google::protobuf.internal::RepeatedFieldAccessor::Iterator
void Iterator
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection.h:306
google::protobuf.internal::RepeatedFieldWrapper::Clear
void Clear(Field *data) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:100
google::protobuf.internal::RepeatedPtrFieldStringAccessor::New
std::string * New(const Value *) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:324
google::protobuf.internal::RandomAccessRepeatedFieldAccessor::CopyIterator
Iterator * CopyIterator(const Field *, const Iterator *iterator) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:52
google::protobuf.internal::RepeatedPtrFieldWrapper::Clear
void Clear(Field *data) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:154
google::protobuf.internal::RepeatedPtrFieldMessageAccessor::Field
void Field
Definition: protobuf/src/google/protobuf/reflection_internal.h:337
google::protobuf.internal::RepeatedFieldWrapper::Size
int Size(const Field *data) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:93
google::protobuf.internal::RepeatedPtrFieldWrapper::Size
int Size(const Field *data) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:147
google::protobuf.internal::RepeatedFieldWrapper::Set
void Set(Field *data, int index, const Value *value) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:103
google::protobuf::RepeatedPtrField::RemoveLast
void RemoveLast()
Definition: bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h:2035
google::protobuf.internal::RepeatedPtrFieldMessageAccessor::ConvertToT
void ConvertToT(const Value *value, Message *result) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:352
google::protobuf.internal::RepeatedPtrFieldWrapper::ConvertToT
virtual void ConvertToT(const Value *value, T *result) const =0
google::protobuf.internal::RepeatedPtrFieldMessageAccessor::New
Message * New(const Value *value) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:349
google::protobuf.internal::MapFieldAccessor::Set
void Set(Field *data, int index, const Value *value) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:220
google::protobuf.internal::RepeatedFieldAccessor
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection.h:301
google::protobuf.internal::RepeatedFieldPrimitiveAccessor::Field
void Field
Definition: protobuf/src/google/protobuf/reflection_internal.h:269
intptr_t
_W64 signed int intptr_t
Definition: stdint-msvc2008.h:118
google::protobuf.internal::RepeatedFieldWrapper::~RepeatedFieldWrapper
~RepeatedFieldWrapper()=default
google::protobuf.internal::RepeatedFieldPrimitiveAccessor::ConvertFromT
const Value * ConvertFromT(const T &value, Value *) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:288
data
char data[kBufferLength]
Definition: abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1006
google::protobuf.internal::MapFieldAccessor::Clear
void Clear(Field *data) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:217
google::protobuf.internal::RandomAccessRepeatedFieldAccessor::DeleteIterator
void DeleteIterator(const Field *, Iterator *) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:64
google::protobuf.internal::RepeatedFieldWrapper::Get
const Value * Get(const Field *data, int index, Value *scratch_space) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:96
google::protobuf::RepeatedPtrField::Swap
void Swap(RepeatedPtrField *other)
Definition: bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h:2166
b
uint64_t b
Definition: abseil-cpp/absl/container/internal/layout_test.cc:53
google::protobuf.internal::MapFieldAccessor::Swap
void Swap(Field *data, const internal::RepeatedFieldAccessor *other_mutator, Field *other_data) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:234
google::protobuf::RepeatedField::RemoveLast
void RemoveLast()
Definition: bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h:1247
google::protobuf::RepeatedPtrField::SwapElements
void SwapElements(int index1, int index2)
Definition: bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h:2179
google::protobuf::RepeatedPtrField::size
int size() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h:1999
google::protobuf.internal::RandomAccessRepeatedFieldAccessor::PositionToIterator
static Iterator * PositionToIterator(intptr_t position)
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection_internal.h:78
google::protobuf::Message
Definition: bloaty/third_party/protobuf/src/google/protobuf/message.h:205
google::protobuf::RepeatedField::Set
void Set(int index, const Element &value)
Definition: bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h:1203
google::protobuf.internal::RepeatedFieldAccessor::Add
virtual void Add(Field *data, const Value *value) const =0
google::protobuf.internal::RepeatedPtrFieldWrapper::New
virtual T * New(const Value *value) const =0
google::protobuf.internal::MapFieldAccessor::MapFieldAccessor
MapFieldAccessor()
Definition: protobuf/src/google/protobuf/reflection_internal.h:205
google::protobuf.internal::MapFieldAccessor::RemoveLast
void RemoveLast(Field *data) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:228
google::protobuf.internal::RepeatedFieldWrapper::SwapElements
void SwapElements(Field *data, int index1, int index2) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:112
google::protobuf.internal::RepeatedPtrFieldStringAccessor::ConvertFromT
const Value * ConvertFromT(const std::string &value, Value *) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:328
index
int index
Definition: bloaty/third_party/protobuf/php/ext/google/protobuf/protobuf.h:1184
google::protobuf.internal::RepeatedFieldPrimitiveAccessor::Swap
void Swap(Field *data, const internal::RepeatedFieldAccessor *other_mutator, Field *other_data) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:275
google::protobuf::RepeatedField::size
int size() const
Definition: bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h:1130
google::protobuf::RepeatedPtrField::Clear
void Clear()
Definition: bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h:2125
GOOGLE_CHECK
#define GOOGLE_CHECK(EXPRESSION)
Definition: bloaty/third_party/protobuf/src/google/protobuf/stubs/logging.h:153
google::protobuf.internal::RepeatedFieldWrapper::ConvertFromT
virtual const Value * ConvertFromT(const T &value, Value *scratch_space) const =0
google::protobuf.internal::RepeatedPtrFieldMessageAccessor::ConvertFromT
const Value * ConvertFromT(const Message &value, Value *) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:355
google::protobuf.internal::RepeatedFieldAccessor::Clear
virtual void Clear(Field *data) const =0
google::protobuf.internal::RepeatedPtrFieldMessageAccessor::RepeatedPtrFieldMessageAccessor
RepeatedPtrFieldMessageAccessor()
Definition: protobuf/src/google/protobuf/reflection_internal.h:341
google::protobuf.internal::RepeatedFieldAccessor::Get
virtual const Value * Get(const Field *data, int index, Value *scratch_space) const =0
google::protobuf.internal::RepeatedPtrFieldWrapper::~RepeatedPtrFieldWrapper
~RepeatedPtrFieldWrapper()=default
google::protobuf.internal::RandomAccessRepeatedFieldAccessor::IteratorToPosition
static intptr_t IteratorToPosition(const Iterator *iterator)
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection_internal.h:75
google::protobuf.internal::RepeatedPtrFieldStringAccessor::Field
void Field
Definition: protobuf/src/google/protobuf/reflection_internal.h:298
google::protobuf.internal::RepeatedFieldWrapper
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection_internal.h:86
google::protobuf.internal::MapFieldAccessor::Size
int Size(const Field *data) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:210
google::protobuf::RepeatedField::Swap
void Swap(RepeatedField *other)
Definition: bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h:1332
internal
Definition: benchmark/test/output_test_helper.cc:20
google::protobuf.internal::MapFieldBase
Definition: bloaty/third_party/protobuf/src/google/protobuf/map_field.h:69
google::protobuf.internal::MapFieldAccessor::GetRepeatedField
static const RepeatedFieldType * GetRepeatedField(const Field *data)
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection_internal.h:241
google::protobuf.internal::RandomAccessRepeatedFieldAccessor::AdvanceIterator
Iterator * AdvanceIterator(const Field *, Iterator *iterator) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:56
Field
Definition: bloaty/third_party/protobuf/src/google/protobuf/type.pb.h:446
google::protobuf.internal::RepeatedFieldWrapper::Add
void Add(Field *data, const Value *value) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:106
autogen_x86imm.tmp
tmp
Definition: autogen_x86imm.py:12
size
voidpf void uLong size
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
google::protobuf.internal::RepeatedPtrFieldWrapper::RepeatedFieldType
RepeatedPtrField< T > RepeatedFieldType
Definition: protobuf/src/google/protobuf/reflection_internal.h:174
google::protobuf.internal::RepeatedPtrFieldWrapper::SwapElements
void SwapElements(Field *data, int index1, int index2) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:168
google::protobuf.internal::RepeatedPtrFieldWrapper::RemoveLast
void RemoveLast(Field *data) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:165
google::protobuf.internal::RepeatedPtrFieldMessageAccessor::Value
void Value
Definition: protobuf/src/google/protobuf/reflection_internal.h:338
google::protobuf.internal::MapFieldAccessor::ConvertToEntry
virtual void ConvertToEntry(const Value *value, Message *result) const
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection_internal.h:254
google::protobuf.internal::RepeatedFieldPrimitiveAccessor::ConvertToT
T ConvertToT(const Value *value) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:285
google::protobuf.internal::RepeatedPtrFieldWrapper::Set
void Set(Field *data, int index, const Value *value) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:157
google::protobuf.internal::RepeatedPtrFieldWrapper::MutableRepeatedField
static RepeatedFieldType * MutableRepeatedField(Field *data)
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection_internal.h:177
google::protobuf.internal::RepeatedFieldAccessor::Value
void Value
Definition: bloaty/third_party/protobuf/src/google/protobuf/reflection.h:305
google::protobuf::RepeatedPtrField::AddAllocated
void AddAllocated(Element *value)
Definition: bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h:2194
google
Definition: bloaty/third_party/protobuf/benchmarks/util/data_proto2_to_proto3_util.h:11
google::protobuf::RepeatedField::SwapElements
void SwapElements(int index1, int index2)
Definition: bloaty/third_party/protobuf/src/google/protobuf/repeated_field.h:1351
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
google::protobuf.internal::RandomAccessRepeatedFieldAccessor::EqualsIterator
bool EqualsIterator(const Field *, const Iterator *a, const Iterator *b) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:60
google::protobuf.internal::RepeatedFieldPrimitiveAccessor::Value
void Value
Definition: protobuf/src/google/protobuf/reflection_internal.h:270
google::protobuf.internal::RepeatedFieldWrapper::RemoveLast
void RemoveLast(Field *data) const override
Definition: protobuf/src/google/protobuf/reflection_internal.h:109


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