-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfilter.pb.cc
More file actions
710 lines (674 loc) · 28.9 KB
/
Copy pathfilter.pb.cc
File metadata and controls
710 lines (674 loc) · 28.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
//go:build deps_only && cgo
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: github.com/aperturerobotics/util/filter/filter.proto
// Protobuf C++ Version: 6.33.4
#include "filter.pb.h"
#include <algorithm>
#include <type_traits>
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/generated_message_tctable_impl.h"
#include "google/protobuf/extension_set.h"
#include "google/protobuf/generated_message_util.h"
#include "google/protobuf/wire_format_lite.h"
#include "google/protobuf/descriptor.h"
#include "google/protobuf/generated_message_reflection.h"
#include "google/protobuf/reflection_ops.h"
#include "google/protobuf/wire_format.h"
// @@protoc_insertion_point(includes)
// Must be included last.
#include "google/protobuf/port_def.inc"
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::google::protobuf;
namespace _pbi = ::google::protobuf::internal;
namespace _fl = ::google::protobuf::internal::field_layout;
namespace filter {
inline constexpr StringFilter::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: _cached_size_{0},
values_{},
value_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
re_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
has_prefix_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
has_suffix_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
contains_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
empty_{false},
not_empty_{false} {}
template <typename>
PROTOBUF_CONSTEXPR StringFilter::StringFilter(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(StringFilter_class_data_.base()),
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(),
#endif // PROTOBUF_CUSTOM_VTABLE
_impl_(::_pbi::ConstantInitialized()) {
}
struct StringFilterDefaultTypeInternal {
PROTOBUF_CONSTEXPR StringFilterDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~StringFilterDefaultTypeInternal() {}
union {
StringFilter _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StringFilterDefaultTypeInternal _StringFilter_default_instance_;
} // namespace filter
static constexpr const ::_pb::EnumDescriptor* PROTOBUF_NONNULL* PROTOBUF_NULLABLE
file_level_enum_descriptors_github_2ecom_2faperturerobotics_2futil_2ffilter_2ffilter_2eproto = nullptr;
static constexpr const ::_pb::ServiceDescriptor* PROTOBUF_NONNULL* PROTOBUF_NULLABLE
file_level_service_descriptors_github_2ecom_2faperturerobotics_2futil_2ffilter_2ffilter_2eproto = nullptr;
const ::uint32_t
TableStruct_github_2ecom_2faperturerobotics_2futil_2ffilter_2ffilter_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
protodesc_cold) = {
0x081, // bitmap
PROTOBUF_FIELD_OFFSET(::filter::StringFilter, _impl_._has_bits_),
11, // hasbit index offset
PROTOBUF_FIELD_OFFSET(::filter::StringFilter, _impl_.empty_),
PROTOBUF_FIELD_OFFSET(::filter::StringFilter, _impl_.not_empty_),
PROTOBUF_FIELD_OFFSET(::filter::StringFilter, _impl_.value_),
PROTOBUF_FIELD_OFFSET(::filter::StringFilter, _impl_.values_),
PROTOBUF_FIELD_OFFSET(::filter::StringFilter, _impl_.re_),
PROTOBUF_FIELD_OFFSET(::filter::StringFilter, _impl_.has_prefix_),
PROTOBUF_FIELD_OFFSET(::filter::StringFilter, _impl_.has_suffix_),
PROTOBUF_FIELD_OFFSET(::filter::StringFilter, _impl_.contains_),
6,
7,
1,
0,
2,
3,
4,
5,
};
static const ::_pbi::MigrationSchema
schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
{0, sizeof(::filter::StringFilter)},
};
static const ::_pb::Message* PROTOBUF_NONNULL const file_default_instances[] = {
&::filter::_StringFilter_default_instance_._instance,
};
const char descriptor_table_protodef_github_2ecom_2faperturerobotics_2futil_2ffilter_2ffilter_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
protodesc_cold) = {
"\n4github.com/aperturerobotics/util/filte"
"r/filter.proto\022\006filter\"\225\001\n\014StringFilter\022"
"\r\n\005empty\030\001 \001(\010\022\021\n\tnot_empty\030\002 \001(\010\022\r\n\005val"
"ue\030\003 \001(\t\022\016\n\006values\030\004 \003(\t\022\n\n\002re\030\005 \001(\t\022\022\n\n"
"has_prefix\030\006 \001(\t\022\022\n\nhas_suffix\030\007 \001(\t\022\020\n\010"
"contains\030\010 \001(\tb\006proto3"
};
static ::absl::once_flag descriptor_table_github_2ecom_2faperturerobotics_2futil_2ffilter_2ffilter_2eproto_once;
PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_github_2ecom_2faperturerobotics_2futil_2ffilter_2ffilter_2eproto = {
false,
false,
222,
descriptor_table_protodef_github_2ecom_2faperturerobotics_2futil_2ffilter_2ffilter_2eproto,
"github.com/aperturerobotics/util/filter/filter.proto",
&descriptor_table_github_2ecom_2faperturerobotics_2futil_2ffilter_2ffilter_2eproto_once,
nullptr,
0,
1,
schemas,
file_default_instances,
TableStruct_github_2ecom_2faperturerobotics_2futil_2ffilter_2ffilter_2eproto::offsets,
file_level_enum_descriptors_github_2ecom_2faperturerobotics_2futil_2ffilter_2ffilter_2eproto,
file_level_service_descriptors_github_2ecom_2faperturerobotics_2futil_2ffilter_2ffilter_2eproto,
};
namespace filter {
// ===================================================================
class StringFilter::_Internal {
public:
using HasBits =
decltype(::std::declval<StringFilter>()._impl_._has_bits_);
static constexpr ::int32_t kHasBitsOffset =
8 * PROTOBUF_FIELD_OFFSET(StringFilter, _impl_._has_bits_);
};
StringFilter::StringFilter(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(arena, StringFilter_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:filter.StringFilter)
}
PROTOBUF_NDEBUG_INLINE StringFilter::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
[[maybe_unused]] const ::filter::StringFilter& from_msg)
: _has_bits_{from._has_bits_},
_cached_size_{0},
values_{visibility, arena, from.values_},
value_(arena, from.value_),
re_(arena, from.re_),
has_prefix_(arena, from.has_prefix_),
has_suffix_(arena, from.has_suffix_),
contains_(arena, from.contains_) {}
StringFilter::StringFilter(
::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
const StringFilter& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(arena, StringFilter_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
StringFilter* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
::memcpy(reinterpret_cast<char*>(&_impl_) +
offsetof(Impl_, empty_),
reinterpret_cast<const char*>(&from._impl_) +
offsetof(Impl_, empty_),
offsetof(Impl_, not_empty_) -
offsetof(Impl_, empty_) +
sizeof(Impl_::not_empty_));
// @@protoc_insertion_point(copy_constructor:filter.StringFilter)
}
PROTOBUF_NDEBUG_INLINE StringFilter::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
: _cached_size_{0},
values_{visibility, arena},
value_(arena),
re_(arena),
has_prefix_(arena),
has_suffix_(arena),
contains_(arena) {}
inline void StringFilter::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
::memset(reinterpret_cast<char*>(&_impl_) +
offsetof(Impl_, empty_),
0,
offsetof(Impl_, not_empty_) -
offsetof(Impl_, empty_) +
sizeof(Impl_::not_empty_));
}
StringFilter::~StringFilter() {
// @@protoc_insertion_point(destructor:filter.StringFilter)
SharedDtor(*this);
}
inline void StringFilter::SharedDtor(MessageLite& self) {
StringFilter& this_ = static_cast<StringFilter&>(self);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
ABSL_DCHECK(this_.GetArena() == nullptr);
this_._impl_.value_.Destroy();
this_._impl_.re_.Destroy();
this_._impl_.has_prefix_.Destroy();
this_._impl_.has_suffix_.Destroy();
this_._impl_.contains_.Destroy();
this_._impl_.~Impl_();
}
inline void* PROTOBUF_NONNULL StringFilter::PlacementNew_(
const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
return ::new (mem) StringFilter(arena);
}
constexpr auto StringFilter::InternalNewImpl_() {
constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
PROTOBUF_FIELD_OFFSET(StringFilter, _impl_.values_) +
decltype(StringFilter::_impl_.values_)::
InternalGetArenaOffset(
::google::protobuf::Message::internal_visibility()),
});
if (arena_bits.has_value()) {
return ::google::protobuf::internal::MessageCreator::CopyInit(
sizeof(StringFilter), alignof(StringFilter), *arena_bits);
} else {
return ::google::protobuf::internal::MessageCreator(&StringFilter::PlacementNew_,
sizeof(StringFilter),
alignof(StringFilter));
}
}
constexpr auto StringFilter::InternalGenerateClassData_() {
return ::google::protobuf::internal::ClassDataFull{
::google::protobuf::internal::ClassData{
&_StringFilter_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
nullptr, // IsInitialized
&StringFilter::MergeImpl,
::google::protobuf::Message::GetNewImpl<StringFilter>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&StringFilter::SharedDtor,
::google::protobuf::Message::GetClearImpl<StringFilter>(), &StringFilter::ByteSizeLong,
&StringFilter::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET(StringFilter, _impl_._cached_size_),
false,
},
&StringFilter::kDescriptorMethods,
&descriptor_table_github_2ecom_2faperturerobotics_2futil_2ffilter_2ffilter_2eproto,
nullptr, // tracker
};
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
::google::protobuf::internal::ClassDataFull StringFilter_class_data_ =
StringFilter::InternalGenerateClassData_();
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
StringFilter::GetClassData() const {
::google::protobuf::internal::PrefetchToLocalCache(&StringFilter_class_data_);
::google::protobuf::internal::PrefetchToLocalCache(StringFilter_class_data_.tc_table);
return StringFilter_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<3, 8, 0, 77, 2>
StringFilter::_table_ = {
{
PROTOBUF_FIELD_OFFSET(StringFilter, _impl_._has_bits_),
0, // no _extensions_
8, 56, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967040, // skipmap
offsetof(decltype(_table_), field_entries),
8, // num_field_entries
0, // num_aux_entries
offsetof(decltype(_table_), field_names), // no aux_entries
StringFilter_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::filter::StringFilter>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
// string contains = 8;
{::_pbi::TcParser::FastUS1,
{66, 5, 0,
PROTOBUF_FIELD_OFFSET(StringFilter, _impl_.contains_)}},
// bool empty = 1;
{::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(StringFilter, _impl_.empty_), 6>(),
{8, 6, 0,
PROTOBUF_FIELD_OFFSET(StringFilter, _impl_.empty_)}},
// bool not_empty = 2;
{::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(StringFilter, _impl_.not_empty_), 7>(),
{16, 7, 0,
PROTOBUF_FIELD_OFFSET(StringFilter, _impl_.not_empty_)}},
// string value = 3;
{::_pbi::TcParser::FastUS1,
{26, 1, 0,
PROTOBUF_FIELD_OFFSET(StringFilter, _impl_.value_)}},
// repeated string values = 4;
{::_pbi::TcParser::FastUR1,
{34, 0, 0,
PROTOBUF_FIELD_OFFSET(StringFilter, _impl_.values_)}},
// string re = 5;
{::_pbi::TcParser::FastUS1,
{42, 2, 0,
PROTOBUF_FIELD_OFFSET(StringFilter, _impl_.re_)}},
// string has_prefix = 6;
{::_pbi::TcParser::FastUS1,
{50, 3, 0,
PROTOBUF_FIELD_OFFSET(StringFilter, _impl_.has_prefix_)}},
// string has_suffix = 7;
{::_pbi::TcParser::FastUS1,
{58, 4, 0,
PROTOBUF_FIELD_OFFSET(StringFilter, _impl_.has_suffix_)}},
}}, {{
65535, 65535
}}, {{
// bool empty = 1;
{PROTOBUF_FIELD_OFFSET(StringFilter, _impl_.empty_), _Internal::kHasBitsOffset + 6, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
// bool not_empty = 2;
{PROTOBUF_FIELD_OFFSET(StringFilter, _impl_.not_empty_), _Internal::kHasBitsOffset + 7, 0, (0 | ::_fl::kFcOptional | ::_fl::kBool)},
// string value = 3;
{PROTOBUF_FIELD_OFFSET(StringFilter, _impl_.value_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
// repeated string values = 4;
{PROTOBUF_FIELD_OFFSET(StringFilter, _impl_.values_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)},
// string re = 5;
{PROTOBUF_FIELD_OFFSET(StringFilter, _impl_.re_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
// string has_prefix = 6;
{PROTOBUF_FIELD_OFFSET(StringFilter, _impl_.has_prefix_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
// string has_suffix = 7;
{PROTOBUF_FIELD_OFFSET(StringFilter, _impl_.has_suffix_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
// string contains = 8;
{PROTOBUF_FIELD_OFFSET(StringFilter, _impl_.contains_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)},
}},
// no aux_entries
{{
"\23\0\0\5\6\2\12\12\10\0\0\0\0\0\0\0"
"filter.StringFilter"
"value"
"values"
"re"
"has_prefix"
"has_suffix"
"contains"
}},
};
PROTOBUF_NOINLINE void StringFilter::Clear() {
// @@protoc_insertion_point(message_clear_start:filter.StringFilter)
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x0000003fU)) {
if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
_impl_.values_.Clear();
}
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
_impl_.value_.ClearNonDefaultToEmpty();
}
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
_impl_.re_.ClearNonDefaultToEmpty();
}
if (CheckHasBit(cached_has_bits, 0x00000008U)) {
_impl_.has_prefix_.ClearNonDefaultToEmpty();
}
if (CheckHasBit(cached_has_bits, 0x00000010U)) {
_impl_.has_suffix_.ClearNonDefaultToEmpty();
}
if (CheckHasBit(cached_has_bits, 0x00000020U)) {
_impl_.contains_.ClearNonDefaultToEmpty();
}
}
::memset(&_impl_.empty_, 0, static_cast<::size_t>(
reinterpret_cast<char*>(&_impl_.not_empty_) -
reinterpret_cast<char*>(&_impl_.empty_)) + sizeof(_impl_.not_empty_));
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL StringFilter::_InternalSerialize(
const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
const StringFilter& this_ = static_cast<const StringFilter&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL StringFilter::_InternalSerialize(
::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
const StringFilter& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
// @@protoc_insertion_point(serialize_to_array_start:filter.StringFilter)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
cached_has_bits = this_._impl_._has_bits_[0];
// bool empty = 1;
if (CheckHasBit(cached_has_bits, 0x00000040U)) {
if (this_._internal_empty() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteBoolToArray(
1, this_._internal_empty(), target);
}
}
// bool not_empty = 2;
if (CheckHasBit(cached_has_bits, 0x00000080U)) {
if (this_._internal_not_empty() != 0) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteBoolToArray(
2, this_._internal_not_empty(), target);
}
}
// string value = 3;
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
if (!this_._internal_value().empty()) {
const ::std::string& _s = this_._internal_value();
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "filter.StringFilter.value");
target = stream->WriteStringMaybeAliased(3, _s, target);
}
}
// repeated string values = 4;
if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
for (int i = 0, n = this_._internal_values_size(); i < n; ++i) {
const auto& s = this_._internal_values().Get(i);
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
s.data(), static_cast<int>(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "filter.StringFilter.values");
target = stream->WriteString(4, s, target);
}
}
// string re = 5;
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
if (!this_._internal_re().empty()) {
const ::std::string& _s = this_._internal_re();
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "filter.StringFilter.re");
target = stream->WriteStringMaybeAliased(5, _s, target);
}
}
// string has_prefix = 6;
if (CheckHasBit(cached_has_bits, 0x00000008U)) {
if (!this_._internal_has_prefix().empty()) {
const ::std::string& _s = this_._internal_has_prefix();
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "filter.StringFilter.has_prefix");
target = stream->WriteStringMaybeAliased(6, _s, target);
}
}
// string has_suffix = 7;
if (CheckHasBit(cached_has_bits, 0x00000010U)) {
if (!this_._internal_has_suffix().empty()) {
const ::std::string& _s = this_._internal_has_suffix();
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "filter.StringFilter.has_suffix");
target = stream->WriteStringMaybeAliased(7, _s, target);
}
}
// string contains = 8;
if (CheckHasBit(cached_has_bits, 0x00000020U)) {
if (!this_._internal_contains().empty()) {
const ::std::string& _s = this_._internal_contains();
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "filter.StringFilter.contains");
target = stream->WriteStringMaybeAliased(8, _s, target);
}
}
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
target =
::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
}
// @@protoc_insertion_point(serialize_to_array_end:filter.StringFilter)
return target;
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t StringFilter::ByteSizeLong(const MessageLite& base) {
const StringFilter& this_ = static_cast<const StringFilter&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::size_t StringFilter::ByteSizeLong() const {
const StringFilter& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
// @@protoc_insertion_point(message_byte_size_start:filter.StringFilter)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void)cached_has_bits;
::_pbi::Prefetch5LinesFrom7Lines(&this_);
cached_has_bits = this_._impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) {
// repeated string values = 4;
if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
total_size +=
1 * ::google::protobuf::internal::FromIntSize(this_._internal_values().size());
for (int i = 0, n = this_._internal_values().size(); i < n; ++i) {
total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
this_._internal_values().Get(i));
}
}
// string value = 3;
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
if (!this_._internal_value().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
this_._internal_value());
}
}
// string re = 5;
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
if (!this_._internal_re().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
this_._internal_re());
}
}
// string has_prefix = 6;
if (CheckHasBit(cached_has_bits, 0x00000008U)) {
if (!this_._internal_has_prefix().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
this_._internal_has_prefix());
}
}
// string has_suffix = 7;
if (CheckHasBit(cached_has_bits, 0x00000010U)) {
if (!this_._internal_has_suffix().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
this_._internal_has_suffix());
}
}
// string contains = 8;
if (CheckHasBit(cached_has_bits, 0x00000020U)) {
if (!this_._internal_contains().empty()) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
this_._internal_contains());
}
}
// bool empty = 1;
if (CheckHasBit(cached_has_bits, 0x00000040U)) {
if (this_._internal_empty() != 0) {
total_size += 2;
}
}
// bool not_empty = 2;
if (CheckHasBit(cached_has_bits, 0x00000080U)) {
if (this_._internal_not_empty() != 0) {
total_size += 2;
}
}
}
return this_.MaybeComputeUnknownFieldsSize(total_size,
&this_._impl_._cached_size_);
}
void StringFilter::MergeImpl(::google::protobuf::MessageLite& to_msg,
const ::google::protobuf::MessageLite& from_msg) {
auto* const _this =
static_cast<StringFilter*>(&to_msg);
auto& from = static_cast<const StringFilter&>(from_msg);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
from.CheckHasBitConsistency();
}
::google::protobuf::Arena* arena = _this->GetArena();
// @@protoc_insertion_point(class_specific_merge_from_start:filter.StringFilter)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
cached_has_bits = from._impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x000000ffU)) {
if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
_this->_internal_mutable_values()->InternalMergeFromWithArena(
::google::protobuf::MessageLite::internal_visibility(), arena,
from._internal_values());
}
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
if (!from._internal_value().empty()) {
_this->_internal_set_value(from._internal_value());
} else {
if (_this->_impl_.value_.IsDefault()) {
_this->_internal_set_value("");
}
}
}
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
if (!from._internal_re().empty()) {
_this->_internal_set_re(from._internal_re());
} else {
if (_this->_impl_.re_.IsDefault()) {
_this->_internal_set_re("");
}
}
}
if (CheckHasBit(cached_has_bits, 0x00000008U)) {
if (!from._internal_has_prefix().empty()) {
_this->_internal_set_has_prefix(from._internal_has_prefix());
} else {
if (_this->_impl_.has_prefix_.IsDefault()) {
_this->_internal_set_has_prefix("");
}
}
}
if (CheckHasBit(cached_has_bits, 0x00000010U)) {
if (!from._internal_has_suffix().empty()) {
_this->_internal_set_has_suffix(from._internal_has_suffix());
} else {
if (_this->_impl_.has_suffix_.IsDefault()) {
_this->_internal_set_has_suffix("");
}
}
}
if (CheckHasBit(cached_has_bits, 0x00000020U)) {
if (!from._internal_contains().empty()) {
_this->_internal_set_contains(from._internal_contains());
} else {
if (_this->_impl_.contains_.IsDefault()) {
_this->_internal_set_contains("");
}
}
}
if (CheckHasBit(cached_has_bits, 0x00000040U)) {
if (from._internal_empty() != 0) {
_this->_impl_.empty_ = from._impl_.empty_;
}
}
if (CheckHasBit(cached_has_bits, 0x00000080U)) {
if (from._internal_not_empty() != 0) {
_this->_impl_.not_empty_ = from._impl_.not_empty_;
}
}
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
from._internal_metadata_);
}
void StringFilter::CopyFrom(const StringFilter& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:filter.StringFilter)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void StringFilter::InternalSwap(StringFilter* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
using ::std::swap;
auto* arena = GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
_impl_.values_.InternalSwap(&other->_impl_.values_);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.value_, &other->_impl_.value_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.re_, &other->_impl_.re_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.has_prefix_, &other->_impl_.has_prefix_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.has_suffix_, &other->_impl_.has_suffix_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.contains_, &other->_impl_.contains_, arena);
::google::protobuf::internal::memswap<
PROTOBUF_FIELD_OFFSET(StringFilter, _impl_.not_empty_)
+ sizeof(StringFilter::_impl_.not_empty_)
- PROTOBUF_FIELD_OFFSET(StringFilter, _impl_.empty_)>(
reinterpret_cast<char*>(&_impl_.empty_),
reinterpret_cast<char*>(&other->_impl_.empty_));
}
::google::protobuf::Metadata StringFilter::GetMetadata() const {
return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
}
// @@protoc_insertion_point(namespace_scope)
} // namespace filter
namespace google {
namespace protobuf {
} // namespace protobuf
} // namespace google
// @@protoc_insertion_point(global_scope)
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type
_static_init2_ [[maybe_unused]] =
(::_pbi::AddDescriptors(&descriptor_table_github_2ecom_2faperturerobotics_2futil_2ffilter_2ffilter_2eproto),
::std::false_type{});
#include "google/protobuf/port_undef.inc"