Coverage Report

Created: 2025-06-13 06:23

/src/brpc/build/test/repeated.pb.cc
Line
Count
Source (jump to first uncovered line)
1
// Generated by the protocol buffer compiler.  DO NOT EDIT!
2
// source: repeated.proto
3
4
#include "repeated.pb.h"
5
6
#include <algorithm>
7
8
#include <google/protobuf/stubs/common.h>
9
#include <google/protobuf/stubs/port.h>
10
#include <google/protobuf/io/coded_stream.h>
11
#include <google/protobuf/wire_format_lite_inl.h>
12
#include <google/protobuf/descriptor.h>
13
#include <google/protobuf/generated_message_reflection.h>
14
#include <google/protobuf/reflection_ops.h>
15
#include <google/protobuf/wire_format.h>
16
// This is a temporary google only hack
17
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
18
#include "third_party/protobuf/version.h"
19
#endif
20
// @@protoc_insertion_point(includes)
21
22
namespace protobuf_repeated_2eproto {
23
extern PROTOBUF_INTERNAL_EXPORT_protobuf_repeated_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Dummy;
24
}  // namespace protobuf_repeated_2eproto
25
class DummyDefaultTypeInternal {
26
 public:
27
  ::google::protobuf::internal::ExplicitlyConstructed<Dummy>
28
      _instance;
29
} _Dummy_default_instance_;
30
class RepeatedMessageDefaultTypeInternal {
31
 public:
32
  ::google::protobuf::internal::ExplicitlyConstructed<RepeatedMessage>
33
      _instance;
34
} _RepeatedMessage_default_instance_;
35
namespace protobuf_repeated_2eproto {
36
2
static void InitDefaultsDummy() {
37
2
  GOOGLE_PROTOBUF_VERIFY_VERSION;
38
39
2
  {
40
2
    void* ptr = &::_Dummy_default_instance_;
41
2
    new (ptr) ::Dummy();
42
2
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
43
2
  }
44
2
  ::Dummy::InitAsDefaultInstance();
45
2
}
46
47
::google::protobuf::internal::SCCInfo<0> scc_info_Dummy =
48
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsDummy}, {}};
49
50
2
static void InitDefaultsRepeatedMessage() {
51
2
  GOOGLE_PROTOBUF_VERIFY_VERSION;
52
53
2
  {
54
2
    void* ptr = &::_RepeatedMessage_default_instance_;
55
2
    new (ptr) ::RepeatedMessage();
56
2
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
57
2
  }
58
2
  ::RepeatedMessage::InitAsDefaultInstance();
59
2
}
60
61
::google::protobuf::internal::SCCInfo<1> scc_info_RepeatedMessage =
62
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsRepeatedMessage}, {
63
      &protobuf_repeated_2eproto::scc_info_Dummy.base,}};
64
65
2
void InitDefaults() {
66
2
  ::google::protobuf::internal::InitSCC(&scc_info_Dummy.base);
67
2
  ::google::protobuf::internal::InitSCC(&scc_info_RepeatedMessage.base);
68
2
}
69
70
::google::protobuf::Metadata file_level_metadata[2];
71
72
const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
73
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Dummy, _has_bits_),
74
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::Dummy, _internal_metadata_),
75
  ~0u,  // no _extensions_
76
  ~0u,  // no _oneof_case_
77
  ~0u,  // no _weak_field_map_
78
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::RepeatedMessage, _has_bits_),
79
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::RepeatedMessage, _internal_metadata_),
80
  ~0u,  // no _extensions_
81
  ~0u,  // no _oneof_case_
82
  ~0u,  // no _weak_field_map_
83
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::RepeatedMessage, ints_),
84
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::RepeatedMessage, strings_),
85
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::RepeatedMessage, msgs_),
86
  ~0u,
87
  ~0u,
88
  ~0u,
89
};
90
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
91
  { 0, 5, sizeof(::Dummy)},
92
  { 5, 13, sizeof(::RepeatedMessage)},
93
};
94
95
static ::google::protobuf::Message const * const file_default_instances[] = {
96
  reinterpret_cast<const ::google::protobuf::Message*>(&::_Dummy_default_instance_),
97
  reinterpret_cast<const ::google::protobuf::Message*>(&::_RepeatedMessage_default_instance_),
98
};
99
100
0
void protobuf_AssignDescriptors() {
101
0
  AddDescriptors();
102
0
  AssignDescriptors(
103
0
      "repeated.proto", schemas, file_default_instances, TableStruct::offsets,
104
0
      file_level_metadata, NULL, NULL);
105
0
}
106
107
0
void protobuf_AssignDescriptorsOnce() {
108
0
  static ::google::protobuf::internal::once_flag once;
109
0
  ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
110
0
}
111
112
void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
113
0
void protobuf_RegisterTypes(const ::std::string&) {
114
0
  protobuf_AssignDescriptorsOnce();
115
0
  ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 2);
116
0
}
117
118
2
void AddDescriptorsImpl() {
119
2
  InitDefaults();
120
2
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
121
2
      "\n\016repeated.proto\"\007\n\005Dummy\"F\n\017RepeatedMes"
122
2
      "sage\022\014\n\004ints\030\001 \003(\005\022\017\n\007strings\030\002 \003(\t\022\024\n\004m"
123
2
      "sgs\030\003 \003(\0132\006.Dummy"
124
2
  };
125
2
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
126
2
      descriptor, 97);
127
2
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
128
2
    "repeated.proto", &protobuf_RegisterTypes);
129
2
}
130
131
2
void AddDescriptors() {
132
2
  static ::google::protobuf::internal::once_flag once;
133
2
  ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
134
2
}
135
// Force AddDescriptors() to be called at dynamic initialization time.
136
struct StaticDescriptorInitializer {
137
2
  StaticDescriptorInitializer() {
138
2
    AddDescriptors();
139
2
  }
140
} static_descriptor_initializer;
141
}  // namespace protobuf_repeated_2eproto
142
143
// ===================================================================
144
145
2
void Dummy::InitAsDefaultInstance() {
146
2
}
147
#if !defined(_MSC_VER) || _MSC_VER >= 1900
148
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
149
150
Dummy::Dummy()
151
2
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
152
2
  ::google::protobuf::internal::InitSCC(
153
2
      &protobuf_repeated_2eproto::scc_info_Dummy.base);
154
2
  SharedCtor();
155
  // @@protoc_insertion_point(constructor:Dummy)
156
2
}
157
Dummy::Dummy(const Dummy& from)
158
0
  : ::google::protobuf::Message(),
159
0
      _internal_metadata_(NULL),
160
0
      _has_bits_(from._has_bits_) {
161
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
162
  // @@protoc_insertion_point(copy_constructor:Dummy)
163
0
}
164
165
2
void Dummy::SharedCtor() {
166
2
}
167
168
0
Dummy::~Dummy() {
169
  // @@protoc_insertion_point(destructor:Dummy)
170
0
  SharedDtor();
171
0
}
172
173
0
void Dummy::SharedDtor() {
174
0
}
175
176
0
void Dummy::SetCachedSize(int size) const {
177
0
  _cached_size_.Set(size);
178
0
}
179
0
const ::google::protobuf::Descriptor* Dummy::descriptor() {
180
0
  ::protobuf_repeated_2eproto::protobuf_AssignDescriptorsOnce();
181
0
  return ::protobuf_repeated_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
182
0
}
183
184
0
const Dummy& Dummy::default_instance() {
185
0
  ::google::protobuf::internal::InitSCC(&protobuf_repeated_2eproto::scc_info_Dummy.base);
186
0
  return *internal_default_instance();
187
0
}
188
189
190
0
void Dummy::Clear() {
191
// @@protoc_insertion_point(message_clear_start:Dummy)
192
0
  ::google::protobuf::uint32 cached_has_bits = 0;
193
  // Prevent compiler warnings about cached_has_bits being unused
194
0
  (void) cached_has_bits;
195
196
0
  _has_bits_.Clear();
197
0
  _internal_metadata_.Clear();
198
0
}
199
200
bool Dummy::MergePartialFromCodedStream(
201
0
    ::google::protobuf::io::CodedInputStream* input) {
202
0
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
203
0
  ::google::protobuf::uint32 tag;
204
  // @@protoc_insertion_point(parse_start:Dummy)
205
0
  for (;;) {
206
0
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
207
0
    tag = p.first;
208
0
    if (!p.second) goto handle_unusual;
209
0
  handle_unusual:
210
0
    if (tag == 0) {
211
0
      goto success;
212
0
    }
213
0
    DO_(::google::protobuf::internal::WireFormat::SkipField(
214
0
          input, tag, _internal_metadata_.mutable_unknown_fields()));
215
0
  }
216
0
success:
217
  // @@protoc_insertion_point(parse_success:Dummy)
218
0
  return true;
219
0
failure:
220
  // @@protoc_insertion_point(parse_failure:Dummy)
221
0
  return false;
222
0
#undef DO_
223
0
}
224
225
void Dummy::SerializeWithCachedSizes(
226
0
    ::google::protobuf::io::CodedOutputStream* output) const {
227
  // @@protoc_insertion_point(serialize_start:Dummy)
228
0
  ::google::protobuf::uint32 cached_has_bits = 0;
229
0
  (void) cached_has_bits;
230
231
0
  if (_internal_metadata_.have_unknown_fields()) {
232
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
233
0
        _internal_metadata_.unknown_fields(), output);
234
0
  }
235
  // @@protoc_insertion_point(serialize_end:Dummy)
236
0
}
237
238
::google::protobuf::uint8* Dummy::InternalSerializeWithCachedSizesToArray(
239
0
    bool deterministic, ::google::protobuf::uint8* target) const {
240
0
  (void)deterministic; // Unused
241
  // @@protoc_insertion_point(serialize_to_array_start:Dummy)
242
0
  ::google::protobuf::uint32 cached_has_bits = 0;
243
0
  (void) cached_has_bits;
244
245
0
  if (_internal_metadata_.have_unknown_fields()) {
246
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
247
0
        _internal_metadata_.unknown_fields(), target);
248
0
  }
249
  // @@protoc_insertion_point(serialize_to_array_end:Dummy)
250
0
  return target;
251
0
}
252
253
0
size_t Dummy::ByteSizeLong() const {
254
// @@protoc_insertion_point(message_byte_size_start:Dummy)
255
0
  size_t total_size = 0;
256
257
0
  if (_internal_metadata_.have_unknown_fields()) {
258
0
    total_size +=
259
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
260
0
        _internal_metadata_.unknown_fields());
261
0
  }
262
0
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
263
0
  SetCachedSize(cached_size);
264
0
  return total_size;
265
0
}
266
267
0
void Dummy::MergeFrom(const ::google::protobuf::Message& from) {
268
// @@protoc_insertion_point(generalized_merge_from_start:Dummy)
269
0
  GOOGLE_DCHECK_NE(&from, this);
270
0
  const Dummy* source =
271
0
      ::google::protobuf::internal::DynamicCastToGenerated<const Dummy>(
272
0
          &from);
273
0
  if (source == NULL) {
274
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:Dummy)
275
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
276
0
  } else {
277
  // @@protoc_insertion_point(generalized_merge_from_cast_success:Dummy)
278
0
    MergeFrom(*source);
279
0
  }
280
0
}
281
282
0
void Dummy::MergeFrom(const Dummy& from) {
283
// @@protoc_insertion_point(class_specific_merge_from_start:Dummy)
284
0
  GOOGLE_DCHECK_NE(&from, this);
285
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
286
0
  ::google::protobuf::uint32 cached_has_bits = 0;
287
0
  (void) cached_has_bits;
288
289
0
}
290
291
0
void Dummy::CopyFrom(const ::google::protobuf::Message& from) {
292
// @@protoc_insertion_point(generalized_copy_from_start:Dummy)
293
0
  if (&from == this) return;
294
0
  Clear();
295
0
  MergeFrom(from);
296
0
}
297
298
0
void Dummy::CopyFrom(const Dummy& from) {
299
// @@protoc_insertion_point(class_specific_copy_from_start:Dummy)
300
0
  if (&from == this) return;
301
0
  Clear();
302
0
  MergeFrom(from);
303
0
}
304
305
0
bool Dummy::IsInitialized() const {
306
0
  return true;
307
0
}
308
309
0
void Dummy::Swap(Dummy* other) {
310
0
  if (other == this) return;
311
0
  InternalSwap(other);
312
0
}
313
0
void Dummy::InternalSwap(Dummy* other) {
314
0
  using std::swap;
315
0
  swap(_has_bits_[0], other->_has_bits_[0]);
316
0
  _internal_metadata_.Swap(&other->_internal_metadata_);
317
0
}
318
319
0
::google::protobuf::Metadata Dummy::GetMetadata() const {
320
0
  protobuf_repeated_2eproto::protobuf_AssignDescriptorsOnce();
321
0
  return ::protobuf_repeated_2eproto::file_level_metadata[kIndexInFileMessages];
322
0
}
323
324
325
// ===================================================================
326
327
2
void RepeatedMessage::InitAsDefaultInstance() {
328
2
}
329
#if !defined(_MSC_VER) || _MSC_VER >= 1900
330
const int RepeatedMessage::kIntsFieldNumber;
331
const int RepeatedMessage::kStringsFieldNumber;
332
const int RepeatedMessage::kMsgsFieldNumber;
333
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
334
335
RepeatedMessage::RepeatedMessage()
336
2
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
337
2
  ::google::protobuf::internal::InitSCC(
338
2
      &protobuf_repeated_2eproto::scc_info_RepeatedMessage.base);
339
2
  SharedCtor();
340
  // @@protoc_insertion_point(constructor:RepeatedMessage)
341
2
}
342
RepeatedMessage::RepeatedMessage(const RepeatedMessage& from)
343
0
  : ::google::protobuf::Message(),
344
0
      _internal_metadata_(NULL),
345
0
      _has_bits_(from._has_bits_),
346
0
      ints_(from.ints_),
347
0
      strings_(from.strings_),
348
0
      msgs_(from.msgs_) {
349
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
350
  // @@protoc_insertion_point(copy_constructor:RepeatedMessage)
351
0
}
352
353
2
void RepeatedMessage::SharedCtor() {
354
2
}
355
356
0
RepeatedMessage::~RepeatedMessage() {
357
  // @@protoc_insertion_point(destructor:RepeatedMessage)
358
0
  SharedDtor();
359
0
}
360
361
0
void RepeatedMessage::SharedDtor() {
362
0
}
363
364
0
void RepeatedMessage::SetCachedSize(int size) const {
365
0
  _cached_size_.Set(size);
366
0
}
367
0
const ::google::protobuf::Descriptor* RepeatedMessage::descriptor() {
368
0
  ::protobuf_repeated_2eproto::protobuf_AssignDescriptorsOnce();
369
0
  return ::protobuf_repeated_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
370
0
}
371
372
0
const RepeatedMessage& RepeatedMessage::default_instance() {
373
0
  ::google::protobuf::internal::InitSCC(&protobuf_repeated_2eproto::scc_info_RepeatedMessage.base);
374
0
  return *internal_default_instance();
375
0
}
376
377
378
0
void RepeatedMessage::Clear() {
379
// @@protoc_insertion_point(message_clear_start:RepeatedMessage)
380
0
  ::google::protobuf::uint32 cached_has_bits = 0;
381
  // Prevent compiler warnings about cached_has_bits being unused
382
0
  (void) cached_has_bits;
383
384
0
  ints_.Clear();
385
0
  strings_.Clear();
386
0
  msgs_.Clear();
387
0
  _has_bits_.Clear();
388
0
  _internal_metadata_.Clear();
389
0
}
390
391
bool RepeatedMessage::MergePartialFromCodedStream(
392
0
    ::google::protobuf::io::CodedInputStream* input) {
393
0
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
394
0
  ::google::protobuf::uint32 tag;
395
  // @@protoc_insertion_point(parse_start:RepeatedMessage)
396
0
  for (;;) {
397
0
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
398
0
    tag = p.first;
399
0
    if (!p.second) goto handle_unusual;
400
0
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
401
      // repeated int32 ints = 1;
402
0
      case 1: {
403
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
404
0
            static_cast< ::google::protobuf::uint8>(8u /* 8 & 0xFF */)) {
405
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive<
406
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
407
0
                 1, 8u, input, this->mutable_ints())));
408
0
        } else if (
409
0
            static_cast< ::google::protobuf::uint8>(tag) ==
410
0
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
411
0
          DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline<
412
0
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
413
0
                 input, this->mutable_ints())));
414
0
        } else {
415
0
          goto handle_unusual;
416
0
        }
417
0
        break;
418
0
      }
419
420
      // repeated string strings = 2;
421
0
      case 2: {
422
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
423
0
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
424
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
425
0
                input, this->add_strings()));
426
0
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
427
0
            this->strings(this->strings_size() - 1).data(),
428
0
            static_cast<int>(this->strings(this->strings_size() - 1).length()),
429
0
            ::google::protobuf::internal::WireFormat::PARSE,
430
0
            "RepeatedMessage.strings");
431
0
        } else {
432
0
          goto handle_unusual;
433
0
        }
434
0
        break;
435
0
      }
436
437
      // repeated .Dummy msgs = 3;
438
0
      case 3: {
439
0
        if (static_cast< ::google::protobuf::uint8>(tag) ==
440
0
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
441
0
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
442
0
                input, add_msgs()));
443
0
        } else {
444
0
          goto handle_unusual;
445
0
        }
446
0
        break;
447
0
      }
448
449
0
      default: {
450
0
      handle_unusual:
451
0
        if (tag == 0) {
452
0
          goto success;
453
0
        }
454
0
        DO_(::google::protobuf::internal::WireFormat::SkipField(
455
0
              input, tag, _internal_metadata_.mutable_unknown_fields()));
456
0
        break;
457
0
      }
458
0
    }
459
0
  }
460
0
success:
461
  // @@protoc_insertion_point(parse_success:RepeatedMessage)
462
0
  return true;
463
0
failure:
464
  // @@protoc_insertion_point(parse_failure:RepeatedMessage)
465
0
  return false;
466
0
#undef DO_
467
0
}
468
469
void RepeatedMessage::SerializeWithCachedSizes(
470
0
    ::google::protobuf::io::CodedOutputStream* output) const {
471
  // @@protoc_insertion_point(serialize_start:RepeatedMessage)
472
0
  ::google::protobuf::uint32 cached_has_bits = 0;
473
0
  (void) cached_has_bits;
474
475
  // repeated int32 ints = 1;
476
0
  for (int i = 0, n = this->ints_size(); i < n; i++) {
477
0
    ::google::protobuf::internal::WireFormatLite::WriteInt32(
478
0
      1, this->ints(i), output);
479
0
  }
480
481
  // repeated string strings = 2;
482
0
  for (int i = 0, n = this->strings_size(); i < n; i++) {
483
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
484
0
      this->strings(i).data(), static_cast<int>(this->strings(i).length()),
485
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
486
0
      "RepeatedMessage.strings");
487
0
    ::google::protobuf::internal::WireFormatLite::WriteString(
488
0
      2, this->strings(i), output);
489
0
  }
490
491
  // repeated .Dummy msgs = 3;
492
0
  for (unsigned int i = 0,
493
0
      n = static_cast<unsigned int>(this->msgs_size()); i < n; i++) {
494
0
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
495
0
      3,
496
0
      this->msgs(static_cast<int>(i)),
497
0
      output);
498
0
  }
499
500
0
  if (_internal_metadata_.have_unknown_fields()) {
501
0
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
502
0
        _internal_metadata_.unknown_fields(), output);
503
0
  }
504
  // @@protoc_insertion_point(serialize_end:RepeatedMessage)
505
0
}
506
507
::google::protobuf::uint8* RepeatedMessage::InternalSerializeWithCachedSizesToArray(
508
0
    bool deterministic, ::google::protobuf::uint8* target) const {
509
0
  (void)deterministic; // Unused
510
  // @@protoc_insertion_point(serialize_to_array_start:RepeatedMessage)
511
0
  ::google::protobuf::uint32 cached_has_bits = 0;
512
0
  (void) cached_has_bits;
513
514
  // repeated int32 ints = 1;
515
0
  target = ::google::protobuf::internal::WireFormatLite::
516
0
    WriteInt32ToArray(1, this->ints_, target);
517
518
  // repeated string strings = 2;
519
0
  for (int i = 0, n = this->strings_size(); i < n; i++) {
520
0
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
521
0
      this->strings(i).data(), static_cast<int>(this->strings(i).length()),
522
0
      ::google::protobuf::internal::WireFormat::SERIALIZE,
523
0
      "RepeatedMessage.strings");
524
0
    target = ::google::protobuf::internal::WireFormatLite::
525
0
      WriteStringToArray(2, this->strings(i), target);
526
0
  }
527
528
  // repeated .Dummy msgs = 3;
529
0
  for (unsigned int i = 0,
530
0
      n = static_cast<unsigned int>(this->msgs_size()); i < n; i++) {
531
0
    target = ::google::protobuf::internal::WireFormatLite::
532
0
      InternalWriteMessageToArray(
533
0
        3, this->msgs(static_cast<int>(i)), deterministic, target);
534
0
  }
535
536
0
  if (_internal_metadata_.have_unknown_fields()) {
537
0
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
538
0
        _internal_metadata_.unknown_fields(), target);
539
0
  }
540
  // @@protoc_insertion_point(serialize_to_array_end:RepeatedMessage)
541
0
  return target;
542
0
}
543
544
0
size_t RepeatedMessage::ByteSizeLong() const {
545
// @@protoc_insertion_point(message_byte_size_start:RepeatedMessage)
546
0
  size_t total_size = 0;
547
548
0
  if (_internal_metadata_.have_unknown_fields()) {
549
0
    total_size +=
550
0
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
551
0
        _internal_metadata_.unknown_fields());
552
0
  }
553
  // repeated int32 ints = 1;
554
0
  {
555
0
    size_t data_size = ::google::protobuf::internal::WireFormatLite::
556
0
      Int32Size(this->ints_);
557
0
    total_size += 1 *
558
0
                  ::google::protobuf::internal::FromIntSize(this->ints_size());
559
0
    total_size += data_size;
560
0
  }
561
562
  // repeated string strings = 2;
563
0
  total_size += 1 *
564
0
      ::google::protobuf::internal::FromIntSize(this->strings_size());
565
0
  for (int i = 0, n = this->strings_size(); i < n; i++) {
566
0
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
567
0
      this->strings(i));
568
0
  }
569
570
  // repeated .Dummy msgs = 3;
571
0
  {
572
0
    unsigned int count = static_cast<unsigned int>(this->msgs_size());
573
0
    total_size += 1UL * count;
574
0
    for (unsigned int i = 0; i < count; i++) {
575
0
      total_size +=
576
0
        ::google::protobuf::internal::WireFormatLite::MessageSize(
577
0
          this->msgs(static_cast<int>(i)));
578
0
    }
579
0
  }
580
581
0
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
582
0
  SetCachedSize(cached_size);
583
0
  return total_size;
584
0
}
585
586
0
void RepeatedMessage::MergeFrom(const ::google::protobuf::Message& from) {
587
// @@protoc_insertion_point(generalized_merge_from_start:RepeatedMessage)
588
0
  GOOGLE_DCHECK_NE(&from, this);
589
0
  const RepeatedMessage* source =
590
0
      ::google::protobuf::internal::DynamicCastToGenerated<const RepeatedMessage>(
591
0
          &from);
592
0
  if (source == NULL) {
593
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:RepeatedMessage)
594
0
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
595
0
  } else {
596
  // @@protoc_insertion_point(generalized_merge_from_cast_success:RepeatedMessage)
597
0
    MergeFrom(*source);
598
0
  }
599
0
}
600
601
0
void RepeatedMessage::MergeFrom(const RepeatedMessage& from) {
602
// @@protoc_insertion_point(class_specific_merge_from_start:RepeatedMessage)
603
0
  GOOGLE_DCHECK_NE(&from, this);
604
0
  _internal_metadata_.MergeFrom(from._internal_metadata_);
605
0
  ::google::protobuf::uint32 cached_has_bits = 0;
606
0
  (void) cached_has_bits;
607
608
0
  ints_.MergeFrom(from.ints_);
609
0
  strings_.MergeFrom(from.strings_);
610
0
  msgs_.MergeFrom(from.msgs_);
611
0
}
612
613
0
void RepeatedMessage::CopyFrom(const ::google::protobuf::Message& from) {
614
// @@protoc_insertion_point(generalized_copy_from_start:RepeatedMessage)
615
0
  if (&from == this) return;
616
0
  Clear();
617
0
  MergeFrom(from);
618
0
}
619
620
0
void RepeatedMessage::CopyFrom(const RepeatedMessage& from) {
621
// @@protoc_insertion_point(class_specific_copy_from_start:RepeatedMessage)
622
0
  if (&from == this) return;
623
0
  Clear();
624
0
  MergeFrom(from);
625
0
}
626
627
0
bool RepeatedMessage::IsInitialized() const {
628
0
  return true;
629
0
}
630
631
0
void RepeatedMessage::Swap(RepeatedMessage* other) {
632
0
  if (other == this) return;
633
0
  InternalSwap(other);
634
0
}
635
0
void RepeatedMessage::InternalSwap(RepeatedMessage* other) {
636
0
  using std::swap;
637
0
  ints_.InternalSwap(&other->ints_);
638
0
  strings_.InternalSwap(CastToBase(&other->strings_));
639
0
  CastToBase(&msgs_)->InternalSwap(CastToBase(&other->msgs_));
640
0
  swap(_has_bits_[0], other->_has_bits_[0]);
641
0
  _internal_metadata_.Swap(&other->_internal_metadata_);
642
0
}
643
644
0
::google::protobuf::Metadata RepeatedMessage::GetMetadata() const {
645
0
  protobuf_repeated_2eproto::protobuf_AssignDescriptorsOnce();
646
0
  return ::protobuf_repeated_2eproto::file_level_metadata[kIndexInFileMessages];
647
0
}
648
649
650
// @@protoc_insertion_point(namespace_scope)
651
namespace google {
652
namespace protobuf {
653
0
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::Dummy* Arena::CreateMaybeMessage< ::Dummy >(Arena* arena) {
654
0
  return Arena::CreateInternal< ::Dummy >(arena);
655
0
}
656
0
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::RepeatedMessage* Arena::CreateMaybeMessage< ::RepeatedMessage >(Arena* arena) {
657
0
  return Arena::CreateInternal< ::RepeatedMessage >(arena);
658
0
}
659
}  // namespace protobuf
660
}  // namespace google
661
662
// @@protoc_insertion_point(global_scope)