-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtree.pb.cc
More file actions
462 lines (433 loc) · 16.9 KB
/
tree.pb.cc
File metadata and controls
462 lines (433 loc) · 16.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
// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: tree.proto
// Protobuf C++ Version: 7.34.0
#include "tree.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/internal_visibility.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 PB_Bench {
inline constexpr Node::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
::_pbi::ConstantInitialized) noexcept
: _cached_size_{0},
#ifdef PROTOBUF_INTERNAL_REMOVE_ARENA_PTRS_REPEATED_PTR_FIELD
children_{visibility, ::_pbi::InternalMetadataOffset::Build<
::PB_Bench::Node,
PROTOBUF_FIELD_OFFSET(::PB_Bench::Node, _impl_.children_)>()
}
#else // !PROTOBUF_INTERNAL_REMOVE_ARENA_PTRS_REPEATED_PTR_FIELD
children_ {}
#endif
,
id_{0} {}
template <typename>
constexpr Node::Node(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(Node_class_data_.base()),
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(),
#endif // PROTOBUF_CUSTOM_VTABLE
_impl_(internal_visibility(), ::_pbi::ConstantInitialized()) {
}
struct NodeDefaultTypeInternal {
constexpr NodeDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~NodeDefaultTypeInternal() {}
union {
Node _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NodeDefaultTypeInternal _Node_default_instance_;
} // namespace PB_Bench
static constexpr const ::_pb::EnumDescriptor* PROTOBUF_NONNULL* PROTOBUF_NULLABLE
file_level_enum_descriptors_tree_2eproto = nullptr;
static constexpr const ::_pb::ServiceDescriptor* PROTOBUF_NONNULL* PROTOBUF_NULLABLE
file_level_service_descriptors_tree_2eproto = nullptr;
const ::uint32_t
TableStruct_tree_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
protodesc_cold) = {
0x081, // bitmap
PROTOBUF_FIELD_OFFSET(::PB_Bench::Node, _impl_._has_bits_),
5, // hasbit index offset
PROTOBUF_FIELD_OFFSET(::PB_Bench::Node, _impl_.id_),
PROTOBUF_FIELD_OFFSET(::PB_Bench::Node, _impl_.children_),
1,
0,
};
static const ::_pbi::MigrationSchema
schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
{0, sizeof(::PB_Bench::Node)},
};
static const ::_pb::Message* PROTOBUF_NONNULL const file_default_instances[] = {
&::PB_Bench::_Node_default_instance_._instance,
};
const char descriptor_table_protodef_tree_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
protodesc_cold) = {
"\n\ntree.proto\022\010PB_Bench\"4\n\004Node\022\n\n\002id\030\001 \001"
"(\005\022 \n\010children\030\002 \003(\0132\016.PB_Bench.Nodeb\006pr"
"oto3"
};
static ::absl::once_flag descriptor_table_tree_2eproto_once;
PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_tree_2eproto = {
false,
false,
84,
descriptor_table_protodef_tree_2eproto,
"tree.proto",
&descriptor_table_tree_2eproto_once,
nullptr,
0,
1,
schemas,
file_default_instances,
TableStruct_tree_2eproto::offsets,
file_level_enum_descriptors_tree_2eproto,
file_level_service_descriptors_tree_2eproto,
};
namespace PB_Bench {
// ===================================================================
class Node::_Internal {
public:
using HasBits =
decltype(::std::declval<Node>()._impl_._has_bits_);
static constexpr ::int32_t kHasBitsOffset =
8 * PROTOBUF_FIELD_OFFSET(Node, _impl_._has_bits_);
};
Node::Node(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(arena, Node_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:PB_Bench.Node)
}
PROTOBUF_NDEBUG_INLINE Node::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
[[maybe_unused]] const ::PB_Bench::Node& from_msg)
: _has_bits_{from._has_bits_},
_cached_size_{0},
#ifdef PROTOBUF_INTERNAL_REMOVE_ARENA_PTRS_REPEATED_PTR_FIELD
children_{visibility, ::_pbi::InternalMetadataOffset::Build<
::PB_Bench::Node,
PROTOBUF_FIELD_OFFSET(::PB_Bench::Node, _impl_.children_)>()
, from.children_}
#else
children_ { visibility, arena, from.children_ }
#endif
{}
Node::Node(
::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
const Node& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::Message(arena, Node_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::Message(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
Node* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
_impl_.id_ = from._impl_.id_;
// @@protoc_insertion_point(copy_constructor:PB_Bench.Node)
}
PROTOBUF_NDEBUG_INLINE Node::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
: _cached_size_{0},
#ifdef PROTOBUF_INTERNAL_REMOVE_ARENA_PTRS_REPEATED_PTR_FIELD
children_{visibility, ::_pbi::InternalMetadataOffset::Build<
::PB_Bench::Node,
PROTOBUF_FIELD_OFFSET(::PB_Bench::Node, _impl_.children_)>()
}
#else
children_ { visibility, arena }
#endif
{}
inline void Node::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
_impl_.id_ = {};
}
Node::~Node() {
// @@protoc_insertion_point(destructor:PB_Bench.Node)
SharedDtor(*this);
}
inline void Node::SharedDtor(MessageLite& self) {
Node& this_ = static_cast<Node&>(self);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
ABSL_DCHECK(this_.GetArena() == nullptr);
this_._impl_.~Impl_();
}
inline void* PROTOBUF_NONNULL Node::PlacementNew_(
const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
return ::new (mem) Node(arena);
}
#ifdef PROTOBUF_INTERNAL_REMOVE_ARENA_PTRS_REPEATED_PTR_FIELD
constexpr auto Node::InternalNewImpl_() {
return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Node),
alignof(Node));
}
#else // !PROTOBUF_INTERNAL_REMOVE_ARENA_PTRS_REPEATED_PTR_FIELD
constexpr auto Node::InternalNewImpl_() {
constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
PROTOBUF_FIELD_OFFSET(Node, _impl_.children_) +
decltype(Node::_impl_.children_)::
InternalGetArenaOffset(
::google::protobuf::Message::internal_visibility()),
});
if (arena_bits.has_value()) {
return ::google::protobuf::internal::MessageCreator::ZeroInit(
sizeof(Node), alignof(Node), *arena_bits);
} else {
return ::google::protobuf::internal::MessageCreator(&Node::PlacementNew_,
sizeof(Node),
alignof(Node));
}
}
#endif
constexpr auto Node::InternalGenerateClassData_() {
return ::google::protobuf::internal::ClassDataFull{
::google::protobuf::internal::ClassData{
&_Node_default_instance_._instance,
&_table_.header,
nullptr, // IsInitialized
&Node::MergeImpl,
::google::protobuf::Message::GetNewImpl<Node>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&Node::SharedDtor,
::google::protobuf::Message::GetClearImpl<Node>(), &Node::ByteSizeLong,
&Node::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET(Node, _impl_._cached_size_),
false,
},
&Node::kDescriptorMethods,
&descriptor_table_tree_2eproto,
nullptr, // tracker
};
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
::google::protobuf::internal::ClassDataFull Node_class_data_ =
Node::InternalGenerateClassData_();
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
Node::GetClassData() const {
::google::protobuf::internal::PrefetchToLocalCache(&Node_class_data_);
::google::protobuf::internal::PrefetchToLocalCache(Node_class_data_.tc_table);
return Node_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 1, 0, 2>
Node::_table_ = {
{
PROTOBUF_FIELD_OFFSET(Node, _impl_._has_bits_),
0, // no _extensions_
2, 8, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967292, // skipmap
offsetof(decltype(_table_), field_entries),
2, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
Node_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallback, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::PB_Bench::Node>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
// repeated .PB_Bench.Node children = 2;
{::_pbi::TcParser::FastMtR1,
{18, 0, 0,
PROTOBUF_FIELD_OFFSET(Node, _impl_.children_)}},
// int32 id = 1;
{::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Node, _impl_.id_), 1>(),
{8, 1, 0,
PROTOBUF_FIELD_OFFSET(Node, _impl_.id_)}},
}}, {{
65535, 65535
}}, {{
// int32 id = 1;
{PROTOBUF_FIELD_OFFSET(Node, _impl_.id_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
// repeated .PB_Bench.Node children = 2;
{PROTOBUF_FIELD_OFFSET(Node, _impl_.children_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
}},
{{
{::_pbi::TcParser::GetTable<::PB_Bench::Node>()},
}},
{{
}},
};
PROTOBUF_NOINLINE void Node::Clear() {
// @@protoc_insertion_point(message_clear_start:PB_Bench.Node)
::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 (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
_impl_.children_.Clear();
}
_impl_.id_ = 0;
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL Node::_InternalSerialize(
const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
const Node& this_ = static_cast<const Node&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL Node::_InternalSerialize(
::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
const Node& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
// @@protoc_insertion_point(serialize_to_array_start:PB_Bench.Node)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
cached_has_bits = this_._impl_._has_bits_[0];
// int32 id = 1;
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
if (this_._internal_id() != 0) {
target =
::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<1>(
stream, this_._internal_id(), target);
}
}
// repeated .PB_Bench.Node children = 2;
if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
for (unsigned i = 0, n = static_cast<unsigned>(
this_._internal_children_size());
i < n; i++) {
const auto& repfield = this_._internal_children().Get(i);
target =
::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
2, repfield, repfield.GetCachedSize(),
target, stream);
}
}
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:PB_Bench.Node)
return target;
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t Node::ByteSizeLong(const MessageLite& base) {
const Node& this_ = static_cast<const Node&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::size_t Node::ByteSizeLong() const {
const Node& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
// @@protoc_insertion_point(message_byte_size_start:PB_Bench.Node)
::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, 0x00000003U)) {
// repeated .PB_Bench.Node children = 2;
if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
total_size += 1UL * this_._internal_children_size();
for (const auto& msg : this_._internal_children()) {
total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
}
}
// int32 id = 1;
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
if (this_._internal_id() != 0) {
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
this_._internal_id());
}
}
}
return this_.MaybeComputeUnknownFieldsSize(total_size,
&this_._impl_._cached_size_);
}
void Node::MergeImpl(::google::protobuf::MessageLite& to_msg,
const ::google::protobuf::MessageLite& from_msg) {
auto* const _this =
static_cast<Node*>(&to_msg);
auto& from = static_cast<const Node&>(from_msg);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
from.CheckHasBitConsistency();
}
::google::protobuf::Arena* arena = _this->GetArena();
// @@protoc_insertion_point(class_specific_merge_from_start:PB_Bench.Node)
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, 0x00000003U)) {
if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
_this->_internal_mutable_children()->InternalMergeFromWithArena(
::google::protobuf::MessageLite::internal_visibility(), arena,
from._internal_children());
}
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
if (from._internal_id() != 0) {
_this->_impl_.id_ = from._impl_.id_;
}
}
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
_this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
from._internal_metadata_);
}
void Node::CopyFrom(const Node& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:PB_Bench.Node)
if (&from == this) return;
Clear();
MergeFrom(from);
}
void Node::InternalSwap(Node* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
using ::std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
_impl_.children_.InternalSwap(&other->_impl_.children_);
swap(_impl_.id_, other->_impl_.id_);
}
::google::protobuf::Metadata Node::GetMetadata() const {
return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
}
// @@protoc_insertion_point(namespace_scope)
} // namespace PB_Bench
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_tree_2eproto),
::std::false_type{});
#include "google/protobuf/port_undef.inc"