Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
flow_problem.pb.cc
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// NO CHECKED-IN PROTOBUF GENCODE
3// source: ortools/graph/flow_problem.proto
4// Protobuf C++ Version: 6.31.1
5
7
8#include <algorithm>
9#include <type_traits>
10#include "google/protobuf/io/coded_stream.h"
11#include "google/protobuf/generated_message_tctable_impl.h"
12#include "google/protobuf/extension_set.h"
13#include "google/protobuf/generated_message_util.h"
14#include "google/protobuf/wire_format_lite.h"
15#include "google/protobuf/descriptor.h"
16#include "google/protobuf/generated_message_reflection.h"
17#include "google/protobuf/reflection_ops.h"
18#include "google/protobuf/wire_format.h"
19// @@protoc_insertion_point(includes)
20
21// Must be included last.
22#include "google/protobuf/port_def.inc"
23PROTOBUF_PRAGMA_INIT_SEG
24namespace _pb = ::google::protobuf;
26namespace _fl = ::google::protobuf::internal::field_layout;
27namespace operations_research {
28
29inline constexpr FlowNodeProto::Impl_::Impl_(
30 ::_pbi::ConstantInitialized) noexcept
31 : _cached_size_{0},
32 id_{::int64_t{0}},
33 supply_{::int64_t{0}} {}
34
35template <typename>
36PROTOBUF_CONSTEXPR FlowNodeProto::FlowNodeProto(::_pbi::ConstantInitialized)
37#if defined(PROTOBUF_CUSTOM_VTABLE)
38 : ::google::protobuf::Message(FlowNodeProto_class_data_.base()),
39#else // PROTOBUF_CUSTOM_VTABLE
40 : ::google::protobuf::Message(),
41#endif // PROTOBUF_CUSTOM_VTABLE
42 _impl_(::_pbi::ConstantInitialized()) {
43}
45 PROTOBUF_CONSTEXPR FlowNodeProtoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
47 union {
49 };
50};
51
52PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL
54
55inline constexpr FlowArcProto::Impl_::Impl_(
56 ::_pbi::ConstantInitialized) noexcept
57 : _cached_size_{0},
58 tail_{::int64_t{0}},
59 head_{::int64_t{0}},
60 unit_cost_{::int64_t{0}},
61 capacity_{::int64_t{1}} {}
62
63template <typename>
64PROTOBUF_CONSTEXPR FlowArcProto::FlowArcProto(::_pbi::ConstantInitialized)
65#if defined(PROTOBUF_CUSTOM_VTABLE)
66 : ::google::protobuf::Message(FlowArcProto_class_data_.base()),
67#else // PROTOBUF_CUSTOM_VTABLE
68 : ::google::protobuf::Message(),
69#endif // PROTOBUF_CUSTOM_VTABLE
70 _impl_(::_pbi::ConstantInitialized()) {
71}
73 PROTOBUF_CONSTEXPR FlowArcProtoDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
75 union {
77 };
78};
79
80PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL
82
83inline constexpr FlowModelProto::Impl_::Impl_(
84 ::_pbi::ConstantInitialized) noexcept
85 : _cached_size_{0},
86 nodes_{},
87 arcs_{},
88 problem_type_{static_cast< ::operations_research::FlowModelProto_ProblemType >(0)} {}
89
90template <typename>
91PROTOBUF_CONSTEXPR FlowModelProto::FlowModelProto(::_pbi::ConstantInitialized)
92#if defined(PROTOBUF_CUSTOM_VTABLE)
93 : ::google::protobuf::Message(FlowModelProto_class_data_.base()),
94#else // PROTOBUF_CUSTOM_VTABLE
95 : ::google::protobuf::Message(),
96#endif // PROTOBUF_CUSTOM_VTABLE
97 _impl_(::_pbi::ConstantInitialized()) {
98}
106
107PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL
109} // namespace operations_research
110static const ::_pb::EnumDescriptor* PROTOBUF_NONNULL
112static constexpr const ::_pb::ServiceDescriptor *PROTOBUF_NONNULL *PROTOBUF_NULLABLE
114const ::uint32_t
116 protodesc_cold) = {
117 0x081, // bitmap
118 PROTOBUF_FIELD_OFFSET(::operations_research::FlowArcProto, _impl_._has_bits_),
119 7, // hasbit index offset
120 PROTOBUF_FIELD_OFFSET(::operations_research::FlowArcProto, _impl_.tail_),
121 PROTOBUF_FIELD_OFFSET(::operations_research::FlowArcProto, _impl_.head_),
122 PROTOBUF_FIELD_OFFSET(::operations_research::FlowArcProto, _impl_.capacity_),
123 PROTOBUF_FIELD_OFFSET(::operations_research::FlowArcProto, _impl_.unit_cost_),
124 0,
125 1,
126 3,
127 2,
128 0x081, // bitmap
129 PROTOBUF_FIELD_OFFSET(::operations_research::FlowNodeProto, _impl_._has_bits_),
130 5, // hasbit index offset
131 PROTOBUF_FIELD_OFFSET(::operations_research::FlowNodeProto, _impl_.id_),
132 PROTOBUF_FIELD_OFFSET(::operations_research::FlowNodeProto, _impl_.supply_),
133 0,
134 1,
135 0x081, // bitmap
136 PROTOBUF_FIELD_OFFSET(::operations_research::FlowModelProto, _impl_._has_bits_),
137 6, // hasbit index offset
138 PROTOBUF_FIELD_OFFSET(::operations_research::FlowModelProto, _impl_.nodes_),
139 PROTOBUF_FIELD_OFFSET(::operations_research::FlowModelProto, _impl_.arcs_),
140 PROTOBUF_FIELD_OFFSET(::operations_research::FlowModelProto, _impl_.problem_type_),
141 ~0u,
142 ~0u,
143 0,
144};
145
146static const ::_pbi::MigrationSchema
147 schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
151};
157const char descriptor_table_protodef_ortools_2fgraph_2fflow_5fproblem_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
158 protodesc_cold) = {
159 "\n ortools/graph/flow_problem.proto\022\023oper"
160 "ations_research\"U\n\014FlowArcProto\022\014\n\004tail\030"
161 "\001 \001(\003\022\014\n\004head\030\002 \001(\003\022\023\n\010capacity\030\003 \001(\003:\0011"
162 "\022\024\n\tunit_cost\030\004 \001(\003:\0010\".\n\rFlowNodeProto\022"
163 "\n\n\002id\030\001 \001(\003\022\021\n\006supply\030\002 \001(\003:\0010\"\206\002\n\016FlowM"
164 "odelProto\0221\n\005nodes\030\001 \003(\0132\".operations_re"
165 "search.FlowNodeProto\022/\n\004arcs\030\002 \003(\0132!.ope"
166 "rations_research.FlowArcProto\022E\n\014problem"
167 "_type\030\003 \001(\0162/.operations_research.FlowMo"
168 "delProto.ProblemType\"I\n\013ProblemType\022\031\n\025L"
169 "INEAR_SUM_ASSIGNMENT\020\000\022\014\n\010MAX_FLOW\020\001\022\021\n\r"
170 "MIN_COST_FLOW\020\002B3\n\030com.google.ortools.gr"
171 "aphP\001\252\002\024Google.OrTools.Graph"
172};
174PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ortools_2fgraph_2fflow_5fproblem_2eproto = {
175 false,
176 false,
177 508,
178 descriptor_table_protodef_ortools_2fgraph_2fflow_5fproblem_2eproto,
179 "ortools/graph/flow_problem.proto",
181 nullptr,
182 0,
183 3,
184 schemas,
189};
190namespace operations_research {
191const ::google::protobuf::EnumDescriptor* PROTOBUF_NONNULL FlowModelProto_ProblemType_descriptor() {
192 ::google::protobuf::internal::AssignDescriptors(&descriptor_table_ortools_2fgraph_2fflow_5fproblem_2eproto);
194}
195PROTOBUF_CONSTINIT const uint32_t FlowModelProto_ProblemType_internal_data_[] = {
196 196608u, 0u, };
197// ===================================================================
198
199class FlowArcProto::_Internal {
200 public:
201 using HasBits =
202 decltype(::std::declval<FlowArcProto>()._impl_._has_bits_);
203 static constexpr ::int32_t kHasBitsOffset =
204 8 * PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_._has_bits_);
205};
206
207FlowArcProto::FlowArcProto(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
208#if defined(PROTOBUF_CUSTOM_VTABLE)
209 : ::google::protobuf::Message(arena, FlowArcProto_class_data_.base()) {
210#else // PROTOBUF_CUSTOM_VTABLE
211 : ::google::protobuf::Message(arena) {
212#endif // PROTOBUF_CUSTOM_VTABLE
213 SharedCtor(arena);
214 // @@protoc_insertion_point(arena_constructor:operations_research.FlowArcProto)
215}
217 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const FlowArcProto& from)
218#if defined(PROTOBUF_CUSTOM_VTABLE)
219 : ::google::protobuf::Message(arena, FlowArcProto_class_data_.base()),
220#else // PROTOBUF_CUSTOM_VTABLE
221 : ::google::protobuf::Message(arena),
222#endif // PROTOBUF_CUSTOM_VTABLE
223 _impl_(from._impl_) {
224 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
225 from._internal_metadata_);
226}
227PROTOBUF_NDEBUG_INLINE FlowArcProto::Impl_::Impl_(
228 ::google::protobuf::internal::InternalVisibility visibility,
229 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
230 : _cached_size_{0},
231 capacity_{::int64_t{1}} {}
232
233inline void FlowArcProto::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
234 new (&_impl_) Impl_(internal_visibility(), arena);
235 ::memset(reinterpret_cast<char *>(&_impl_) +
236 offsetof(Impl_, tail_),
237 0,
238 offsetof(Impl_, unit_cost_) -
239 offsetof(Impl_, tail_) +
240 sizeof(Impl_::unit_cost_));
241}
243 // @@protoc_insertion_point(destructor:operations_research.FlowArcProto)
244 SharedDtor(*this);
245}
246inline void FlowArcProto::SharedDtor(MessageLite& self) {
247 FlowArcProto& this_ = static_cast<FlowArcProto&>(self);
248 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
249 ABSL_DCHECK(this_.GetArena() == nullptr);
250 this_._impl_.~Impl_();
251}
252
253inline void* PROTOBUF_NONNULL FlowArcProto::PlacementNew_(
254 const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
255 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
256 return ::new (mem) FlowArcProto(arena);
257}
258constexpr auto FlowArcProto::InternalNewImpl_() {
259 return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(FlowArcProto),
260 alignof(FlowArcProto));
261}
263 return ::google::protobuf::internal::ClassDataFull{
264 ::google::protobuf::internal::ClassData{
266 &_table_.header,
267 nullptr, // OnDemandRegisterArenaDtor
268 nullptr, // IsInitialized
269 &FlowArcProto::MergeImpl,
270 ::google::protobuf::Message::GetNewImpl<FlowArcProto>(),
271#if defined(PROTOBUF_CUSTOM_VTABLE)
272 &FlowArcProto::SharedDtor,
273 ::google::protobuf::Message::GetClearImpl<FlowArcProto>(), &FlowArcProto::ByteSizeLong,
275#endif // PROTOBUF_CUSTOM_VTABLE
276 PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_._cached_size_),
277 false,
278 },
279 &FlowArcProto::kDescriptorMethods,
281 nullptr, // tracker
282 };
283}
284
285PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
286 ::google::protobuf::internal::ClassDataFull FlowArcProto_class_data_ =
288
289PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
291 ::google::protobuf::internal::PrefetchToLocalCache(&FlowArcProto_class_data_);
292 ::google::protobuf::internal::PrefetchToLocalCache(FlowArcProto_class_data_.tc_table);
293 return FlowArcProto_class_data_.base();
294}
295PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
296const ::_pbi::TcParseTable<2, 4, 0, 0, 2>
297FlowArcProto::_table_ = {
298 {
299 PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_._has_bits_),
300 0, // no _extensions_
301 4, 24, // max_field_number, fast_idx_mask
302 offsetof(decltype(_table_), field_lookup_table),
303 4294967280, // skipmap
304 offsetof(decltype(_table_), field_entries),
305 4, // num_field_entries
306 0, // num_aux_entries
307 offsetof(decltype(_table_), field_names), // no aux_entries
309 nullptr, // post_loop_handler
310 ::_pbi::TcParser::GenericFallback, // fallback
311 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
312 ::_pbi::TcParser::GetTable<::operations_research::FlowArcProto>(), // to_prefetch
313 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
314 }, {{
315 // optional int64 unit_cost = 4 [default = 0];
316 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(FlowArcProto, _impl_.unit_cost_), 2>(),
317 {32, 2, 0, PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.unit_cost_)}},
318 // optional int64 tail = 1;
319 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(FlowArcProto, _impl_.tail_), 0>(),
320 {8, 0, 0, PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.tail_)}},
321 // optional int64 head = 2;
322 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(FlowArcProto, _impl_.head_), 1>(),
323 {16, 1, 0, PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.head_)}},
324 // optional int64 capacity = 3 [default = 1];
325 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(FlowArcProto, _impl_.capacity_), 3>(),
326 {24, 3, 0, PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.capacity_)}},
327 }}, {{
328 65535, 65535
329 }}, {{
330 // optional int64 tail = 1;
331 {PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.tail_), _Internal::kHasBitsOffset + 0, 0,
332 (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
333 // optional int64 head = 2;
334 {PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.head_), _Internal::kHasBitsOffset + 1, 0,
335 (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
336 // optional int64 capacity = 3 [default = 1];
337 {PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.capacity_), _Internal::kHasBitsOffset + 3, 0,
338 (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
339 // optional int64 unit_cost = 4 [default = 0];
340 {PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.unit_cost_), _Internal::kHasBitsOffset + 2, 0,
341 (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
342 }},
343 // no aux_entries
344 {{
345 }},
346};
347PROTOBUF_NOINLINE void FlowArcProto::Clear() {
348// @@protoc_insertion_point(message_clear_start:operations_research.FlowArcProto)
349 ::google::protobuf::internal::TSanWrite(&_impl_);
350 ::uint32_t cached_has_bits = 0;
351 // Prevent compiler warnings about cached_has_bits being unused
352 (void) cached_has_bits;
353
354 cached_has_bits = _impl_._has_bits_[0];
355 if ((cached_has_bits & 0x0000000fu) != 0) {
356 ::memset(&_impl_.tail_, 0, static_cast<::size_t>(
357 reinterpret_cast<char*>(&_impl_.unit_cost_) -
358 reinterpret_cast<char*>(&_impl_.tail_)) + sizeof(_impl_.unit_cost_));
359 _impl_.capacity_ = ::int64_t{1};
360 }
361 _impl_._has_bits_.Clear();
362 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
363}
364
365#if defined(PROTOBUF_CUSTOM_VTABLE)
366::uint8_t* PROTOBUF_NONNULL FlowArcProto::_InternalSerialize(
367 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
368 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
369 const FlowArcProto& this_ = static_cast<const FlowArcProto&>(base);
370#else // PROTOBUF_CUSTOM_VTABLE
371::uint8_t* PROTOBUF_NONNULL FlowArcProto::_InternalSerialize(
372 ::uint8_t* PROTOBUF_NONNULL target,
373 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
374 const FlowArcProto& this_ = *this;
375#endif // PROTOBUF_CUSTOM_VTABLE
376 // @@protoc_insertion_point(serialize_to_array_start:operations_research.FlowArcProto)
377 ::uint32_t cached_has_bits = 0;
378 (void)cached_has_bits;
379
380 cached_has_bits = this_._impl_._has_bits_[0];
381 // optional int64 tail = 1;
382 if ((cached_has_bits & 0x00000001u) != 0) {
383 target =
384 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<1>(
385 stream, this_._internal_tail(), target);
386 }
387
388 // optional int64 head = 2;
389 if ((cached_has_bits & 0x00000002u) != 0) {
390 target =
391 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<2>(
392 stream, this_._internal_head(), target);
393 }
394
395 // optional int64 capacity = 3 [default = 1];
396 if ((cached_has_bits & 0x00000008u) != 0) {
397 target =
398 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<3>(
399 stream, this_._internal_capacity(), target);
400 }
401
402 // optional int64 unit_cost = 4 [default = 0];
403 if ((cached_has_bits & 0x00000004u) != 0) {
404 target =
405 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<4>(
406 stream, this_._internal_unit_cost(), target);
407 }
408
409 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
410 target =
411 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
412 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
413 }
414 // @@protoc_insertion_point(serialize_to_array_end:operations_research.FlowArcProto)
415 return target;
416}
417
418#if defined(PROTOBUF_CUSTOM_VTABLE)
420 const FlowArcProto& this_ = static_cast<const FlowArcProto&>(base);
421#else // PROTOBUF_CUSTOM_VTABLE
422::size_t FlowArcProto::ByteSizeLong() const {
423 const FlowArcProto& this_ = *this;
424#endif // PROTOBUF_CUSTOM_VTABLE
425 // @@protoc_insertion_point(message_byte_size_start:operations_research.FlowArcProto)
426 ::size_t total_size = 0;
427
428 ::uint32_t cached_has_bits = 0;
429 // Prevent compiler warnings about cached_has_bits being unused
430 (void)cached_has_bits;
431
432 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
433 cached_has_bits = this_._impl_._has_bits_[0];
434 if ((cached_has_bits & 0x0000000fu) != 0) {
435 // optional int64 tail = 1;
436 if ((cached_has_bits & 0x00000001u) != 0) {
437 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
438 this_._internal_tail());
439 }
440 // optional int64 head = 2;
441 if ((cached_has_bits & 0x00000002u) != 0) {
442 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
443 this_._internal_head());
444 }
445 // optional int64 unit_cost = 4 [default = 0];
446 if ((cached_has_bits & 0x00000004u) != 0) {
447 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
448 this_._internal_unit_cost());
449 }
450 // optional int64 capacity = 3 [default = 1];
451 if ((cached_has_bits & 0x00000008u) != 0) {
452 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
453 this_._internal_capacity());
454 }
455 }
456 return this_.MaybeComputeUnknownFieldsSize(total_size,
457 &this_._impl_._cached_size_);
458}
459
460void FlowArcProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
461 auto* const _this = static_cast<FlowArcProto*>(&to_msg);
462 auto& from = static_cast<const FlowArcProto&>(from_msg);
463 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.FlowArcProto)
464 ABSL_DCHECK_NE(&from, _this);
465 ::uint32_t cached_has_bits = 0;
466 (void) cached_has_bits;
467
468 cached_has_bits = from._impl_._has_bits_[0];
469 if ((cached_has_bits & 0x0000000fu) != 0) {
470 if ((cached_has_bits & 0x00000001u) != 0) {
471 _this->_impl_.tail_ = from._impl_.tail_;
472 }
473 if ((cached_has_bits & 0x00000002u) != 0) {
474 _this->_impl_.head_ = from._impl_.head_;
475 }
476 if ((cached_has_bits & 0x00000004u) != 0) {
477 _this->_impl_.unit_cost_ = from._impl_.unit_cost_;
478 }
479 if ((cached_has_bits & 0x00000008u) != 0) {
480 _this->_impl_.capacity_ = from._impl_.capacity_;
481 }
482 }
483 _this->_impl_._has_bits_[0] |= cached_has_bits;
484 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
485}
486
487void FlowArcProto::CopyFrom(const FlowArcProto& from) {
488// @@protoc_insertion_point(class_specific_copy_from_start:operations_research.FlowArcProto)
489 if (&from == this) return;
490 Clear();
491 MergeFrom(from);
492}
493
494
495void FlowArcProto::InternalSwap(FlowArcProto* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
496 using ::std::swap;
497 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
498 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
499 ::google::protobuf::internal::memswap<
500 PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.capacity_)
501 + sizeof(FlowArcProto::_impl_.capacity_)
502 - PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.tail_)>(
503 reinterpret_cast<char*>(&_impl_.tail_),
504 reinterpret_cast<char*>(&other->_impl_.tail_));
505}
506
507::google::protobuf::Metadata FlowArcProto::GetMetadata() const {
508 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
509}
510// ===================================================================
511
513 public:
514 using HasBits =
515 decltype(::std::declval<FlowNodeProto>()._impl_._has_bits_);
516 static constexpr ::int32_t kHasBitsOffset =
517 8 * PROTOBUF_FIELD_OFFSET(FlowNodeProto, _impl_._has_bits_);
519
520FlowNodeProto::FlowNodeProto(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
521#if defined(PROTOBUF_CUSTOM_VTABLE)
522 : ::google::protobuf::Message(arena, FlowNodeProto_class_data_.base()) {
523#else // PROTOBUF_CUSTOM_VTABLE
524 : ::google::protobuf::Message(arena) {
525#endif // PROTOBUF_CUSTOM_VTABLE
526 SharedCtor(arena);
527 // @@protoc_insertion_point(arena_constructor:operations_research.FlowNodeProto)
528}
530 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const FlowNodeProto& from)
531#if defined(PROTOBUF_CUSTOM_VTABLE)
532 : ::google::protobuf::Message(arena, FlowNodeProto_class_data_.base()),
533#else // PROTOBUF_CUSTOM_VTABLE
534 : ::google::protobuf::Message(arena),
535#endif // PROTOBUF_CUSTOM_VTABLE
536 _impl_(from._impl_) {
537 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
538 from._internal_metadata_);
539}
540PROTOBUF_NDEBUG_INLINE FlowNodeProto::Impl_::Impl_(
541 ::google::protobuf::internal::InternalVisibility visibility,
542 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
543 : _cached_size_{0} {}
544
545inline void FlowNodeProto::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
546 new (&_impl_) Impl_(internal_visibility(), arena);
547 ::memset(reinterpret_cast<char *>(&_impl_) +
548 offsetof(Impl_, id_),
549 0,
550 offsetof(Impl_, supply_) -
551 offsetof(Impl_, id_) +
552 sizeof(Impl_::supply_));
553}
555 // @@protoc_insertion_point(destructor:operations_research.FlowNodeProto)
556 SharedDtor(*this);
557}
558inline void FlowNodeProto::SharedDtor(MessageLite& self) {
559 FlowNodeProto& this_ = static_cast<FlowNodeProto&>(self);
560 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
561 ABSL_DCHECK(this_.GetArena() == nullptr);
562 this_._impl_.~Impl_();
563}
564
565inline void* PROTOBUF_NONNULL FlowNodeProto::PlacementNew_(
566 const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
567 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
568 return ::new (mem) FlowNodeProto(arena);
569}
570constexpr auto FlowNodeProto::InternalNewImpl_() {
571 return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(FlowNodeProto),
572 alignof(FlowNodeProto));
573}
575 return ::google::protobuf::internal::ClassDataFull{
576 ::google::protobuf::internal::ClassData{
578 &_table_.header,
579 nullptr, // OnDemandRegisterArenaDtor
580 nullptr, // IsInitialized
581 &FlowNodeProto::MergeImpl,
582 ::google::protobuf::Message::GetNewImpl<FlowNodeProto>(),
583#if defined(PROTOBUF_CUSTOM_VTABLE)
584 &FlowNodeProto::SharedDtor,
585 ::google::protobuf::Message::GetClearImpl<FlowNodeProto>(), &FlowNodeProto::ByteSizeLong,
587#endif // PROTOBUF_CUSTOM_VTABLE
588 PROTOBUF_FIELD_OFFSET(FlowNodeProto, _impl_._cached_size_),
589 false,
590 },
591 &FlowNodeProto::kDescriptorMethods,
593 nullptr, // tracker
594 };
595}
596
597PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
598 ::google::protobuf::internal::ClassDataFull FlowNodeProto_class_data_ =
601PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
603 ::google::protobuf::internal::PrefetchToLocalCache(&FlowNodeProto_class_data_);
604 ::google::protobuf::internal::PrefetchToLocalCache(FlowNodeProto_class_data_.tc_table);
605 return FlowNodeProto_class_data_.base();
606}
607PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
608const ::_pbi::TcParseTable<1, 2, 0, 0, 2>
609FlowNodeProto::_table_ = {
610 {
611 PROTOBUF_FIELD_OFFSET(FlowNodeProto, _impl_._has_bits_),
612 0, // no _extensions_
613 2, 8, // max_field_number, fast_idx_mask
614 offsetof(decltype(_table_), field_lookup_table),
615 4294967292, // skipmap
616 offsetof(decltype(_table_), field_entries),
617 2, // num_field_entries
618 0, // num_aux_entries
619 offsetof(decltype(_table_), field_names), // no aux_entries
621 nullptr, // post_loop_handler
622 ::_pbi::TcParser::GenericFallback, // fallback
623 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
624 ::_pbi::TcParser::GetTable<::operations_research::FlowNodeProto>(), // to_prefetch
625 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
626 }, {{
627 // optional int64 supply = 2 [default = 0];
628 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(FlowNodeProto, _impl_.supply_), 1>(),
629 {16, 1, 0, PROTOBUF_FIELD_OFFSET(FlowNodeProto, _impl_.supply_)}},
630 // optional int64 id = 1;
631 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(FlowNodeProto, _impl_.id_), 0>(),
632 {8, 0, 0, PROTOBUF_FIELD_OFFSET(FlowNodeProto, _impl_.id_)}},
633 }}, {{
634 65535, 65535
635 }}, {{
636 // optional int64 id = 1;
637 {PROTOBUF_FIELD_OFFSET(FlowNodeProto, _impl_.id_), _Internal::kHasBitsOffset + 0, 0,
638 (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
639 // optional int64 supply = 2 [default = 0];
640 {PROTOBUF_FIELD_OFFSET(FlowNodeProto, _impl_.supply_), _Internal::kHasBitsOffset + 1, 0,
641 (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
642 }},
643 // no aux_entries
644 {{
645 }},
646};
647PROTOBUF_NOINLINE void FlowNodeProto::Clear() {
648// @@protoc_insertion_point(message_clear_start:operations_research.FlowNodeProto)
649 ::google::protobuf::internal::TSanWrite(&_impl_);
650 ::uint32_t cached_has_bits = 0;
651 // Prevent compiler warnings about cached_has_bits being unused
652 (void) cached_has_bits;
653
654 cached_has_bits = _impl_._has_bits_[0];
655 if ((cached_has_bits & 0x00000003u) != 0) {
656 ::memset(&_impl_.id_, 0, static_cast<::size_t>(
657 reinterpret_cast<char*>(&_impl_.supply_) -
658 reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.supply_));
659 }
660 _impl_._has_bits_.Clear();
661 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
662}
663
664#if defined(PROTOBUF_CUSTOM_VTABLE)
665::uint8_t* PROTOBUF_NONNULL FlowNodeProto::_InternalSerialize(
666 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
667 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
668 const FlowNodeProto& this_ = static_cast<const FlowNodeProto&>(base);
669#else // PROTOBUF_CUSTOM_VTABLE
670::uint8_t* PROTOBUF_NONNULL FlowNodeProto::_InternalSerialize(
671 ::uint8_t* PROTOBUF_NONNULL target,
672 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
673 const FlowNodeProto& this_ = *this;
674#endif // PROTOBUF_CUSTOM_VTABLE
675 // @@protoc_insertion_point(serialize_to_array_start:operations_research.FlowNodeProto)
676 ::uint32_t cached_has_bits = 0;
677 (void)cached_has_bits;
678
679 cached_has_bits = this_._impl_._has_bits_[0];
680 // optional int64 id = 1;
681 if ((cached_has_bits & 0x00000001u) != 0) {
682 target =
683 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<1>(
684 stream, this_._internal_id(), target);
685 }
686
687 // optional int64 supply = 2 [default = 0];
688 if ((cached_has_bits & 0x00000002u) != 0) {
689 target =
690 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<2>(
691 stream, this_._internal_supply(), target);
692 }
693
694 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
695 target =
696 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
697 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
698 }
699 // @@protoc_insertion_point(serialize_to_array_end:operations_research.FlowNodeProto)
700 return target;
701}
702
703#if defined(PROTOBUF_CUSTOM_VTABLE)
705 const FlowNodeProto& this_ = static_cast<const FlowNodeProto&>(base);
706#else // PROTOBUF_CUSTOM_VTABLE
707::size_t FlowNodeProto::ByteSizeLong() const {
708 const FlowNodeProto& this_ = *this;
709#endif // PROTOBUF_CUSTOM_VTABLE
710 // @@protoc_insertion_point(message_byte_size_start:operations_research.FlowNodeProto)
711 ::size_t total_size = 0;
712
713 ::uint32_t cached_has_bits = 0;
714 // Prevent compiler warnings about cached_has_bits being unused
715 (void)cached_has_bits;
716
717 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
718 cached_has_bits = this_._impl_._has_bits_[0];
719 if ((cached_has_bits & 0x00000003u) != 0) {
720 // optional int64 id = 1;
721 if ((cached_has_bits & 0x00000001u) != 0) {
722 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
723 this_._internal_id());
724 }
725 // optional int64 supply = 2 [default = 0];
726 if ((cached_has_bits & 0x00000002u) != 0) {
727 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
728 this_._internal_supply());
729 }
730 }
731 return this_.MaybeComputeUnknownFieldsSize(total_size,
732 &this_._impl_._cached_size_);
733}
734
735void FlowNodeProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
736 auto* const _this = static_cast<FlowNodeProto*>(&to_msg);
737 auto& from = static_cast<const FlowNodeProto&>(from_msg);
738 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.FlowNodeProto)
739 ABSL_DCHECK_NE(&from, _this);
740 ::uint32_t cached_has_bits = 0;
741 (void) cached_has_bits;
742
743 cached_has_bits = from._impl_._has_bits_[0];
744 if ((cached_has_bits & 0x00000003u) != 0) {
745 if ((cached_has_bits & 0x00000001u) != 0) {
746 _this->_impl_.id_ = from._impl_.id_;
747 }
748 if ((cached_has_bits & 0x00000002u) != 0) {
749 _this->_impl_.supply_ = from._impl_.supply_;
750 }
751 }
752 _this->_impl_._has_bits_[0] |= cached_has_bits;
753 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
754}
755
756void FlowNodeProto::CopyFrom(const FlowNodeProto& from) {
757// @@protoc_insertion_point(class_specific_copy_from_start:operations_research.FlowNodeProto)
758 if (&from == this) return;
759 Clear();
760 MergeFrom(from);
761}
762
763
764void FlowNodeProto::InternalSwap(FlowNodeProto* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
765 using ::std::swap;
766 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
767 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
768 ::google::protobuf::internal::memswap<
769 PROTOBUF_FIELD_OFFSET(FlowNodeProto, _impl_.supply_)
770 + sizeof(FlowNodeProto::_impl_.supply_)
771 - PROTOBUF_FIELD_OFFSET(FlowNodeProto, _impl_.id_)>(
772 reinterpret_cast<char*>(&_impl_.id_),
773 reinterpret_cast<char*>(&other->_impl_.id_));
774}
775
776::google::protobuf::Metadata FlowNodeProto::GetMetadata() const {
777 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
779// ===================================================================
780
782 public:
783 using HasBits =
784 decltype(::std::declval<FlowModelProto>()._impl_._has_bits_);
785 static constexpr ::int32_t kHasBitsOffset =
786 8 * PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_._has_bits_);
787};
789FlowModelProto::FlowModelProto(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
790#if defined(PROTOBUF_CUSTOM_VTABLE)
791 : ::google::protobuf::Message(arena, FlowModelProto_class_data_.base()) {
792#else // PROTOBUF_CUSTOM_VTABLE
793 : ::google::protobuf::Message(arena) {
794#endif // PROTOBUF_CUSTOM_VTABLE
795 SharedCtor(arena);
796 // @@protoc_insertion_point(arena_constructor:operations_research.FlowModelProto)
797}
798PROTOBUF_NDEBUG_INLINE FlowModelProto::Impl_::Impl_(
799 ::google::protobuf::internal::InternalVisibility visibility,
800 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
801 const ::operations_research::FlowModelProto& from_msg)
802 : _has_bits_{from._has_bits_},
803 _cached_size_{0},
804 nodes_{visibility, arena, from.nodes_},
805 arcs_{visibility, arena, from.arcs_} {}
806
808 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
809 const FlowModelProto& from)
810#if defined(PROTOBUF_CUSTOM_VTABLE)
811 : ::google::protobuf::Message(arena, FlowModelProto_class_data_.base()) {
812#else // PROTOBUF_CUSTOM_VTABLE
813 : ::google::protobuf::Message(arena) {
814#endif // PROTOBUF_CUSTOM_VTABLE
815 FlowModelProto* const _this = this;
816 (void)_this;
817 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
818 from._internal_metadata_);
819 new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
820 _impl_.problem_type_ = from._impl_.problem_type_;
821
822 // @@protoc_insertion_point(copy_constructor:operations_research.FlowModelProto)
823}
824PROTOBUF_NDEBUG_INLINE FlowModelProto::Impl_::Impl_(
825 ::google::protobuf::internal::InternalVisibility visibility,
826 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
827 : _cached_size_{0},
828 nodes_{visibility, arena},
829 arcs_{visibility, arena} {}
830
831inline void FlowModelProto::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
832 new (&_impl_) Impl_(internal_visibility(), arena);
833 _impl_.problem_type_ = {};
834}
836 // @@protoc_insertion_point(destructor:operations_research.FlowModelProto)
837 SharedDtor(*this);
839inline void FlowModelProto::SharedDtor(MessageLite& self) {
840 FlowModelProto& this_ = static_cast<FlowModelProto&>(self);
841 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
842 ABSL_DCHECK(this_.GetArena() == nullptr);
843 this_._impl_.~Impl_();
844}
845
846inline void* PROTOBUF_NONNULL FlowModelProto::PlacementNew_(
847 const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
848 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
849 return ::new (mem) FlowModelProto(arena);
850}
851constexpr auto FlowModelProto::InternalNewImpl_() {
852 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
853 PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_.nodes_) +
854 decltype(FlowModelProto::_impl_.nodes_)::
855 InternalGetArenaOffset(
856 ::google::protobuf::Message::internal_visibility()),
857 PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_.arcs_) +
858 decltype(FlowModelProto::_impl_.arcs_)::
859 InternalGetArenaOffset(
860 ::google::protobuf::Message::internal_visibility()),
861 });
862 if (arena_bits.has_value()) {
863 return ::google::protobuf::internal::MessageCreator::ZeroInit(
864 sizeof(FlowModelProto), alignof(FlowModelProto), *arena_bits);
865 } else {
866 return ::google::protobuf::internal::MessageCreator(&FlowModelProto::PlacementNew_,
867 sizeof(FlowModelProto),
868 alignof(FlowModelProto));
869 }
870}
872 return ::google::protobuf::internal::ClassDataFull{
873 ::google::protobuf::internal::ClassData{
875 &_table_.header,
876 nullptr, // OnDemandRegisterArenaDtor
877 nullptr, // IsInitialized
878 &FlowModelProto::MergeImpl,
879 ::google::protobuf::Message::GetNewImpl<FlowModelProto>(),
880#if defined(PROTOBUF_CUSTOM_VTABLE)
881 &FlowModelProto::SharedDtor,
882 ::google::protobuf::Message::GetClearImpl<FlowModelProto>(), &FlowModelProto::ByteSizeLong,
884#endif // PROTOBUF_CUSTOM_VTABLE
885 PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_._cached_size_),
886 false,
887 },
888 &FlowModelProto::kDescriptorMethods,
890 nullptr, // tracker
891 };
892}
893
894PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
895 ::google::protobuf::internal::ClassDataFull FlowModelProto_class_data_ =
897
898PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
900 ::google::protobuf::internal::PrefetchToLocalCache(&FlowModelProto_class_data_);
901 ::google::protobuf::internal::PrefetchToLocalCache(FlowModelProto_class_data_.tc_table);
903}
904PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
905const ::_pbi::TcParseTable<2, 3, 3, 0, 2>
906FlowModelProto::_table_ = {
907 {
908 PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_._has_bits_),
909 0, // no _extensions_
910 3, 24, // max_field_number, fast_idx_mask
911 offsetof(decltype(_table_), field_lookup_table),
912 4294967288, // skipmap
913 offsetof(decltype(_table_), field_entries),
914 3, // num_field_entries
915 3, // num_aux_entries
916 offsetof(decltype(_table_), aux_entries),
918 nullptr, // post_loop_handler
919 ::_pbi::TcParser::GenericFallback, // fallback
920 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
921 ::_pbi::TcParser::GetTable<::operations_research::FlowModelProto>(), // to_prefetch
922 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
923 }, {{
924 {::_pbi::TcParser::MiniParse, {}},
925 // repeated .operations_research.FlowNodeProto nodes = 1;
926 {::_pbi::TcParser::FastMtR1,
927 {10, 63, 0, PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_.nodes_)}},
928 // repeated .operations_research.FlowArcProto arcs = 2;
929 {::_pbi::TcParser::FastMtR1,
930 {18, 63, 1, PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_.arcs_)}},
931 // optional .operations_research.FlowModelProto.ProblemType problem_type = 3;
932 {::_pbi::TcParser::FastEr0S1,
933 {24, 0, 2, PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_.problem_type_)}},
934 }}, {{
935 65535, 65535
936 }}, {{
937 // repeated .operations_research.FlowNodeProto nodes = 1;
938 {PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_.nodes_), -1, 0,
939 (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
940 // repeated .operations_research.FlowArcProto arcs = 2;
941 {PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_.arcs_), -1, 1,
942 (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
943 // optional .operations_research.FlowModelProto.ProblemType problem_type = 3;
944 {PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_.problem_type_), _Internal::kHasBitsOffset + 0, 2,
945 (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
946 }},
947 {{
948 {::_pbi::TcParser::GetTable<::operations_research::FlowNodeProto>()},
949 {::_pbi::TcParser::GetTable<::operations_research::FlowArcProto>()},
950 {0, 2},
951 }},
952 {{
953 }},
954};
955PROTOBUF_NOINLINE void FlowModelProto::Clear() {
956// @@protoc_insertion_point(message_clear_start:operations_research.FlowModelProto)
957 ::google::protobuf::internal::TSanWrite(&_impl_);
958 ::uint32_t cached_has_bits = 0;
959 // Prevent compiler warnings about cached_has_bits being unused
960 (void) cached_has_bits;
961
962 _impl_.nodes_.Clear();
963 _impl_.arcs_.Clear();
964 _impl_.problem_type_ = 0;
965 _impl_._has_bits_.Clear();
966 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
967}
968
969#if defined(PROTOBUF_CUSTOM_VTABLE)
970::uint8_t* PROTOBUF_NONNULL FlowModelProto::_InternalSerialize(
971 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
972 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
973 const FlowModelProto& this_ = static_cast<const FlowModelProto&>(base);
974#else // PROTOBUF_CUSTOM_VTABLE
975::uint8_t* PROTOBUF_NONNULL FlowModelProto::_InternalSerialize(
976 ::uint8_t* PROTOBUF_NONNULL target,
977 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
978 const FlowModelProto& this_ = *this;
979#endif // PROTOBUF_CUSTOM_VTABLE
980 // @@protoc_insertion_point(serialize_to_array_start:operations_research.FlowModelProto)
981 ::uint32_t cached_has_bits = 0;
982 (void)cached_has_bits;
983
984 // repeated .operations_research.FlowNodeProto nodes = 1;
985 for (unsigned i = 0, n = static_cast<unsigned>(
986 this_._internal_nodes_size());
987 i < n; i++) {
988 const auto& repfield = this_._internal_nodes().Get(i);
989 target =
990 ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
991 1, repfield, repfield.GetCachedSize(),
992 target, stream);
993 }
994
995 // repeated .operations_research.FlowArcProto arcs = 2;
996 for (unsigned i = 0, n = static_cast<unsigned>(
997 this_._internal_arcs_size());
998 i < n; i++) {
999 const auto& repfield = this_._internal_arcs().Get(i);
1000 target =
1001 ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
1002 2, repfield, repfield.GetCachedSize(),
1003 target, stream);
1004 }
1005
1006 cached_has_bits = this_._impl_._has_bits_[0];
1007 // optional .operations_research.FlowModelProto.ProblemType problem_type = 3;
1008 if ((cached_has_bits & 0x00000001u) != 0) {
1009 target = stream->EnsureSpace(target);
1010 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1011 3, this_._internal_problem_type(), target);
1012 }
1013
1014 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
1015 target =
1016 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
1017 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
1018 }
1019 // @@protoc_insertion_point(serialize_to_array_end:operations_research.FlowModelProto)
1020 return target;
1021}
1022
1023#if defined(PROTOBUF_CUSTOM_VTABLE)
1024::size_t FlowModelProto::ByteSizeLong(const MessageLite& base) {
1025 const FlowModelProto& this_ = static_cast<const FlowModelProto&>(base);
1026#else // PROTOBUF_CUSTOM_VTABLE
1027::size_t FlowModelProto::ByteSizeLong() const {
1028 const FlowModelProto& this_ = *this;
1029#endif // PROTOBUF_CUSTOM_VTABLE
1030 // @@protoc_insertion_point(message_byte_size_start:operations_research.FlowModelProto)
1031 ::size_t total_size = 0;
1032
1033 ::uint32_t cached_has_bits = 0;
1034 // Prevent compiler warnings about cached_has_bits being unused
1035 (void)cached_has_bits;
1036
1037 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
1038 {
1039 // repeated .operations_research.FlowNodeProto nodes = 1;
1040 {
1041 total_size += 1UL * this_._internal_nodes_size();
1042 for (const auto& msg : this_._internal_nodes()) {
1043 total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
1044 }
1045 }
1046 // repeated .operations_research.FlowArcProto arcs = 2;
1047 {
1048 total_size += 1UL * this_._internal_arcs_size();
1049 for (const auto& msg : this_._internal_arcs()) {
1050 total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
1051 }
1052 }
1053 }
1054 {
1055 // optional .operations_research.FlowModelProto.ProblemType problem_type = 3;
1056 cached_has_bits = this_._impl_._has_bits_[0];
1057 if ((cached_has_bits & 0x00000001u) != 0) {
1058 total_size += 1 +
1059 ::_pbi::WireFormatLite::EnumSize(this_._internal_problem_type());
1060 }
1061 }
1062 return this_.MaybeComputeUnknownFieldsSize(total_size,
1063 &this_._impl_._cached_size_);
1064}
1065
1066void FlowModelProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
1067 auto* const _this = static_cast<FlowModelProto*>(&to_msg);
1068 auto& from = static_cast<const FlowModelProto&>(from_msg);
1069 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.FlowModelProto)
1070 ABSL_DCHECK_NE(&from, _this);
1071 ::uint32_t cached_has_bits = 0;
1072 (void) cached_has_bits;
1073
1074 _this->_internal_mutable_nodes()->MergeFrom(
1075 from._internal_nodes());
1076 _this->_internal_mutable_arcs()->MergeFrom(
1077 from._internal_arcs());
1078 cached_has_bits = from._impl_._has_bits_[0];
1079 if ((cached_has_bits & 0x00000001u) != 0) {
1080 _this->_impl_.problem_type_ = from._impl_.problem_type_;
1081 }
1082 _this->_impl_._has_bits_[0] |= cached_has_bits;
1083 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
1084}
1085
1086void FlowModelProto::CopyFrom(const FlowModelProto& from) {
1087// @@protoc_insertion_point(class_specific_copy_from_start:operations_research.FlowModelProto)
1088 if (&from == this) return;
1090 MergeFrom(from);
1091}
1092
1093
1094void FlowModelProto::InternalSwap(FlowModelProto* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
1095 using ::std::swap;
1096 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1097 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1098 _impl_.nodes_.InternalSwap(&other->_impl_.nodes_);
1099 _impl_.arcs_.InternalSwap(&other->_impl_.arcs_);
1100 swap(_impl_.problem_type_, other->_impl_.problem_type_);
1101}
1102
1103::google::protobuf::Metadata FlowModelProto::GetMetadata() const {
1104 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
1105}
1106// @@protoc_insertion_point(namespace_scope)
1107} // namespace operations_research
1108namespace google {
1109namespace protobuf {
1110} // namespace protobuf
1111} // namespace google
1112// @@protoc_insertion_point(global_scope)
1113PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type
1114 _static_init2_ [[maybe_unused]] =
1116 ::std::false_type{});
1117#include "google/protobuf/port_undef.inc"
static PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::std::false_type _static_init2_
@protoc_insertion_point(global_scope)
static const ::_pb::Message *PROTOBUF_NONNULL const file_default_instances[]
static constexpr ::int32_t kHasBitsOffset
decltype(::std::declval< FlowArcProto >()._impl_._has_bits_) HasBits
static constexpr auto InternalNewImpl_()
friend class ::google::protobuf::MessageLite
ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL
static void *PROTOBUF_NONNULL PlacementNew_(const void *PROTOBUF_NONNULL, void *PROTOBUF_NONNULL mem, ::google::protobuf::Arena *PROTOBUF_NULLABLE arena)
::size_t ByteSizeLong() const final
::google::protobuf::Metadata GetMetadata() const
const ::google::protobuf::UnknownFieldSet & unknown_fields() const ABSL_ATTRIBUTE_LIFETIME_BOUND
static constexpr auto InternalGenerateClassData_()
friend void swap(FlowArcProto &a, FlowArcProto &b)
void MergeFrom(const FlowArcProto &from)
void CopyFrom(const FlowArcProto &from)
::uint8_t *PROTOBUF_NONNULL _InternalSerialize(::uint8_t *PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream *PROTOBUF_NONNULL stream) const final
const ::google::protobuf::internal::ClassData *PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL
friend class ::google::protobuf::MessageLite
static void *PROTOBUF_NONNULL PlacementNew_(const void *PROTOBUF_NONNULL, void *PROTOBUF_NONNULL mem, ::google::protobuf::Arena *PROTOBUF_NULLABLE arena)
const ::google::protobuf::UnknownFieldSet & unknown_fields() const ABSL_ATTRIBUTE_LIFETIME_BOUND
::google::protobuf::Metadata GetMetadata() const
void MergeFrom(const FlowModelProto &from)
ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL
::uint8_t *PROTOBUF_NONNULL _InternalSerialize(::uint8_t *PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream *PROTOBUF_NONNULL stream) const final
const ::google::protobuf::internal::ClassData *PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL
void CopyFrom(const FlowModelProto &from)
friend void swap(FlowModelProto &a, FlowModelProto &b)
static constexpr auto InternalNewImpl_()
static constexpr auto InternalGenerateClassData_()
decltype(::std::declval< FlowNodeProto >()._impl_._has_bits_) HasBits
const ::google::protobuf::UnknownFieldSet & unknown_fields() const ABSL_ATTRIBUTE_LIFETIME_BOUND
friend class ::google::protobuf::MessageLite
static constexpr auto InternalNewImpl_()
::uint8_t *PROTOBUF_NONNULL _InternalSerialize(::uint8_t *PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream *PROTOBUF_NONNULL stream) const final
static void *PROTOBUF_NONNULL PlacementNew_(const void *PROTOBUF_NONNULL, void *PROTOBUF_NONNULL mem, ::google::protobuf::Arena *PROTOBUF_NULLABLE arena)
static constexpr auto InternalGenerateClassData_()
const ::google::protobuf::internal::ClassData *PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL
void CopyFrom(const FlowNodeProto &from)
::google::protobuf::Metadata GetMetadata() const
friend void swap(FlowNodeProto &a, FlowNodeProto &b)
ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL
void MergeFrom(const FlowNodeProto &from)
PROTOBUF_CONSTINITconst ::_pbi::DescriptorTable descriptor_table_ortools_2fgraph_2fflow_5fproblem_2eproto
static const ::_pb::EnumDescriptor *PROTOBUF_NONNULL file_level_enum_descriptors_ortools_2fgraph_2fflow_5fproblem_2eproto[1]
const ::uint32_t TableStruct_ortools_2fgraph_2fflow_5fproblem_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold)
::absl::once_flag descriptor_table_ortools_2fgraph_2fflow_5fproblem_2eproto_once
static constexprconst ::_pb::ServiceDescriptor *PROTOBUF_NONNULL *PROTOBUF_NULLABLE file_level_service_descriptors_ortools_2fgraph_2fflow_5fproblem_2eproto
In SWIG mode, we don't want anything besides these top-level includes.
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FlowModelProtoDefaultTypeInternal _FlowModelProto_default_instance_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull FlowNodeProto_class_data_
PROTOBUF_CONSTINIT const uint32_t FlowModelProto_ProblemType_internal_data_[]
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FlowNodeProtoDefaultTypeInternal _FlowNodeProto_default_instance_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull FlowArcProto_class_data_
const ::google::protobuf::EnumDescriptor *PROTOBUF_NONNULL FlowModelProto_ProblemType_descriptor()
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull FlowModelProto_class_data_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FlowArcProtoDefaultTypeInternal _FlowArcProto_default_instance_
static constexpr ::_pbi::MigrationSchema *PROTOBUF_NULLABLE schemas