Google OR-Tools v9.15
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.33.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 0,
142 1,
143 2,
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 [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
229 [[maybe_unused]] ::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 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
249 this_.CheckHasBitConsistency();
250 }
251 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
252 ABSL_DCHECK(this_.GetArena() == nullptr);
253 this_._impl_.~Impl_();
254}
255
256inline void* PROTOBUF_NONNULL FlowArcProto::PlacementNew_(
257 const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
258 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
259 return ::new (mem) FlowArcProto(arena);
260}
261constexpr auto FlowArcProto::InternalNewImpl_() {
262 return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(FlowArcProto),
263 alignof(FlowArcProto));
264}
266 return ::google::protobuf::internal::ClassDataFull{
267 ::google::protobuf::internal::ClassData{
269 &_table_.header,
270 nullptr, // OnDemandRegisterArenaDtor
271 nullptr, // IsInitialized
272 &FlowArcProto::MergeImpl,
273 ::google::protobuf::Message::GetNewImpl<FlowArcProto>(),
274#if defined(PROTOBUF_CUSTOM_VTABLE)
275 &FlowArcProto::SharedDtor,
276 ::google::protobuf::Message::GetClearImpl<FlowArcProto>(), &FlowArcProto::ByteSizeLong,
278#endif // PROTOBUF_CUSTOM_VTABLE
279 PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_._cached_size_),
280 false,
281 },
282 &FlowArcProto::kDescriptorMethods,
284 nullptr, // tracker
285 };
286}
287
288PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
289 ::google::protobuf::internal::ClassDataFull FlowArcProto_class_data_ =
291
292PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
293FlowArcProto::GetClassData() const {
294 ::google::protobuf::internal::PrefetchToLocalCache(&FlowArcProto_class_data_);
295 ::google::protobuf::internal::PrefetchToLocalCache(FlowArcProto_class_data_.tc_table);
296 return FlowArcProto_class_data_.base();
297}
298PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
299const ::_pbi::TcParseTable<2, 4, 0, 0, 2>
300FlowArcProto::_table_ = {
301 {
302 PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_._has_bits_),
303 0, // no _extensions_
304 4, 24, // max_field_number, fast_idx_mask
305 offsetof(decltype(_table_), field_lookup_table),
306 4294967280, // skipmap
307 offsetof(decltype(_table_), field_entries),
308 4, // num_field_entries
309 0, // num_aux_entries
310 offsetof(decltype(_table_), field_names), // no aux_entries
312 nullptr, // post_loop_handler
313 ::_pbi::TcParser::GenericFallback, // fallback
314 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
315 ::_pbi::TcParser::GetTable<::operations_research::FlowArcProto>(), // to_prefetch
316 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
317 }, {{
318 // optional int64 unit_cost = 4 [default = 0];
319 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(FlowArcProto, _impl_.unit_cost_), 2>(),
320 {32, 2, 0,
321 PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.unit_cost_)}},
322 // optional int64 tail = 1;
323 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(FlowArcProto, _impl_.tail_), 0>(),
324 {8, 0, 0,
325 PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.tail_)}},
326 // optional int64 head = 2;
327 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(FlowArcProto, _impl_.head_), 1>(),
328 {16, 1, 0,
329 PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.head_)}},
330 // optional int64 capacity = 3 [default = 1];
331 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(FlowArcProto, _impl_.capacity_), 3>(),
332 {24, 3, 0,
333 PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.capacity_)}},
334 }}, {{
335 65535, 65535
336 }}, {{
337 // optional int64 tail = 1;
338 {PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.tail_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
339 // optional int64 head = 2;
340 {PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.head_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
341 // optional int64 capacity = 3 [default = 1];
342 {PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.capacity_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
343 // optional int64 unit_cost = 4 [default = 0];
344 {PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.unit_cost_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
345 }},
346 // no aux_entries
347 {{
348 }},
349};
350PROTOBUF_NOINLINE void FlowArcProto::Clear() {
351// @@protoc_insertion_point(message_clear_start:operations_research.FlowArcProto)
352 ::google::protobuf::internal::TSanWrite(&_impl_);
353 ::uint32_t cached_has_bits = 0;
354 // Prevent compiler warnings about cached_has_bits being unused
355 (void) cached_has_bits;
356
357 cached_has_bits = _impl_._has_bits_[0];
358 if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) {
359 ::memset(&_impl_.tail_, 0, static_cast<::size_t>(
360 reinterpret_cast<char*>(&_impl_.unit_cost_) -
361 reinterpret_cast<char*>(&_impl_.tail_)) + sizeof(_impl_.unit_cost_));
362 _impl_.capacity_ = ::int64_t{1};
363 }
364 _impl_._has_bits_.Clear();
365 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
366}
367
368#if defined(PROTOBUF_CUSTOM_VTABLE)
369::uint8_t* PROTOBUF_NONNULL FlowArcProto::_InternalSerialize(
370 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
371 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
372 const FlowArcProto& this_ = static_cast<const FlowArcProto&>(base);
373#else // PROTOBUF_CUSTOM_VTABLE
374::uint8_t* PROTOBUF_NONNULL FlowArcProto::_InternalSerialize(
375 ::uint8_t* PROTOBUF_NONNULL target,
376 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
377 const FlowArcProto& this_ = *this;
378#endif // PROTOBUF_CUSTOM_VTABLE
379 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
380 this_.CheckHasBitConsistency();
381 }
382 // @@protoc_insertion_point(serialize_to_array_start:operations_research.FlowArcProto)
383 ::uint32_t cached_has_bits = 0;
384 (void)cached_has_bits;
385
386 cached_has_bits = this_._impl_._has_bits_[0];
387 // optional int64 tail = 1;
388 if (CheckHasBit(cached_has_bits, 0x00000001U)) {
389 target =
390 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<1>(
391 stream, this_._internal_tail(), target);
392 }
393
394 // optional int64 head = 2;
395 if (CheckHasBit(cached_has_bits, 0x00000002U)) {
396 target =
397 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<2>(
398 stream, this_._internal_head(), target);
399 }
400
401 // optional int64 capacity = 3 [default = 1];
402 if (CheckHasBit(cached_has_bits, 0x00000008U)) {
403 target =
404 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<3>(
405 stream, this_._internal_capacity(), target);
406 }
407
408 // optional int64 unit_cost = 4 [default = 0];
409 if (CheckHasBit(cached_has_bits, 0x00000004U)) {
410 target =
411 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<4>(
412 stream, this_._internal_unit_cost(), target);
413 }
414
415 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
416 target =
417 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
418 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
419 }
420 // @@protoc_insertion_point(serialize_to_array_end:operations_research.FlowArcProto)
421 return target;
422}
423
424#if defined(PROTOBUF_CUSTOM_VTABLE)
426 const FlowArcProto& this_ = static_cast<const FlowArcProto&>(base);
427#else // PROTOBUF_CUSTOM_VTABLE
428::size_t FlowArcProto::ByteSizeLong() const {
429 const FlowArcProto& this_ = *this;
430#endif // PROTOBUF_CUSTOM_VTABLE
431 // @@protoc_insertion_point(message_byte_size_start:operations_research.FlowArcProto)
432 ::size_t total_size = 0;
433
434 ::uint32_t cached_has_bits = 0;
435 // Prevent compiler warnings about cached_has_bits being unused
436 (void)cached_has_bits;
437
438 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
439 cached_has_bits = this_._impl_._has_bits_[0];
440 if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) {
441 // optional int64 tail = 1;
442 if (CheckHasBit(cached_has_bits, 0x00000001U)) {
443 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
444 this_._internal_tail());
445 }
446 // optional int64 head = 2;
447 if (CheckHasBit(cached_has_bits, 0x00000002U)) {
448 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
449 this_._internal_head());
450 }
451 // optional int64 unit_cost = 4 [default = 0];
452 if (CheckHasBit(cached_has_bits, 0x00000004U)) {
453 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
454 this_._internal_unit_cost());
455 }
456 // optional int64 capacity = 3 [default = 1];
457 if (CheckHasBit(cached_has_bits, 0x00000008U)) {
458 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
459 this_._internal_capacity());
460 }
461 }
462 return this_.MaybeComputeUnknownFieldsSize(total_size,
463 &this_._impl_._cached_size_);
464}
465
466void FlowArcProto::MergeImpl(::google::protobuf::MessageLite& to_msg,
467 const ::google::protobuf::MessageLite& from_msg) {
468 auto* const _this =
469 static_cast<FlowArcProto*>(&to_msg);
470 auto& from = static_cast<const FlowArcProto&>(from_msg);
471 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
472 from.CheckHasBitConsistency();
473 }
474 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.FlowArcProto)
475 ABSL_DCHECK_NE(&from, _this);
476 ::uint32_t cached_has_bits = 0;
477 (void)cached_has_bits;
478
479 cached_has_bits = from._impl_._has_bits_[0];
480 if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) {
481 if (CheckHasBit(cached_has_bits, 0x00000001U)) {
482 _this->_impl_.tail_ = from._impl_.tail_;
483 }
484 if (CheckHasBit(cached_has_bits, 0x00000002U)) {
485 _this->_impl_.head_ = from._impl_.head_;
486 }
487 if (CheckHasBit(cached_has_bits, 0x00000004U)) {
488 _this->_impl_.unit_cost_ = from._impl_.unit_cost_;
489 }
490 if (CheckHasBit(cached_has_bits, 0x00000008U)) {
491 _this->_impl_.capacity_ = from._impl_.capacity_;
492 }
493 }
494 _this->_impl_._has_bits_[0] |= cached_has_bits;
495 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
496 from._internal_metadata_);
497}
498
499void FlowArcProto::CopyFrom(const FlowArcProto& from) {
500 // @@protoc_insertion_point(class_specific_copy_from_start:operations_research.FlowArcProto)
501 if (&from == this) return;
502 Clear();
503 MergeFrom(from);
504}
505
506
507void FlowArcProto::InternalSwap(FlowArcProto* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
508 using ::std::swap;
509 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
510 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
511 ::google::protobuf::internal::memswap<
512 PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.capacity_)
513 + sizeof(FlowArcProto::_impl_.capacity_)
514 - PROTOBUF_FIELD_OFFSET(FlowArcProto, _impl_.tail_)>(
515 reinterpret_cast<char*>(&_impl_.tail_),
516 reinterpret_cast<char*>(&other->_impl_.tail_));
517}
518
519::google::protobuf::Metadata FlowArcProto::GetMetadata() const {
520 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
521}
522// ===================================================================
523
525 public:
526 using HasBits =
527 decltype(::std::declval<FlowNodeProto>()._impl_._has_bits_);
528 static constexpr ::int32_t kHasBitsOffset =
529 8 * PROTOBUF_FIELD_OFFSET(FlowNodeProto, _impl_._has_bits_);
531
532FlowNodeProto::FlowNodeProto(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
533#if defined(PROTOBUF_CUSTOM_VTABLE)
534 : ::google::protobuf::Message(arena, FlowNodeProto_class_data_.base()) {
535#else // PROTOBUF_CUSTOM_VTABLE
536 : ::google::protobuf::Message(arena) {
537#endif // PROTOBUF_CUSTOM_VTABLE
538 SharedCtor(arena);
539 // @@protoc_insertion_point(arena_constructor:operations_research.FlowNodeProto)
540}
542 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const FlowNodeProto& from)
543#if defined(PROTOBUF_CUSTOM_VTABLE)
544 : ::google::protobuf::Message(arena, FlowNodeProto_class_data_.base()),
545#else // PROTOBUF_CUSTOM_VTABLE
546 : ::google::protobuf::Message(arena),
547#endif // PROTOBUF_CUSTOM_VTABLE
548 _impl_(from._impl_) {
549 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
550 from._internal_metadata_);
551}
552PROTOBUF_NDEBUG_INLINE FlowNodeProto::Impl_::Impl_(
553 [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
554 [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
555 : _cached_size_{0} {}
556
557inline void FlowNodeProto::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
558 new (&_impl_) Impl_(internal_visibility(), arena);
559 ::memset(reinterpret_cast<char*>(&_impl_) +
560 offsetof(Impl_, id_),
561 0,
562 offsetof(Impl_, supply_) -
563 offsetof(Impl_, id_) +
564 sizeof(Impl_::supply_));
565}
567 // @@protoc_insertion_point(destructor:operations_research.FlowNodeProto)
568 SharedDtor(*this);
569}
570inline void FlowNodeProto::SharedDtor(MessageLite& self) {
571 FlowNodeProto& this_ = static_cast<FlowNodeProto&>(self);
572 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
573 this_.CheckHasBitConsistency();
574 }
575 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
576 ABSL_DCHECK(this_.GetArena() == nullptr);
577 this_._impl_.~Impl_();
578}
579
580inline void* PROTOBUF_NONNULL FlowNodeProto::PlacementNew_(
581 const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
582 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
583 return ::new (mem) FlowNodeProto(arena);
584}
585constexpr auto FlowNodeProto::InternalNewImpl_() {
586 return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(FlowNodeProto),
587 alignof(FlowNodeProto));
588}
590 return ::google::protobuf::internal::ClassDataFull{
591 ::google::protobuf::internal::ClassData{
593 &_table_.header,
594 nullptr, // OnDemandRegisterArenaDtor
595 nullptr, // IsInitialized
596 &FlowNodeProto::MergeImpl,
597 ::google::protobuf::Message::GetNewImpl<FlowNodeProto>(),
598#if defined(PROTOBUF_CUSTOM_VTABLE)
599 &FlowNodeProto::SharedDtor,
600 ::google::protobuf::Message::GetClearImpl<FlowNodeProto>(), &FlowNodeProto::ByteSizeLong,
602#endif // PROTOBUF_CUSTOM_VTABLE
603 PROTOBUF_FIELD_OFFSET(FlowNodeProto, _impl_._cached_size_),
604 false,
605 },
606 &FlowNodeProto::kDescriptorMethods,
608 nullptr, // tracker
609 };
610}
611
612PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
613 ::google::protobuf::internal::ClassDataFull FlowNodeProto_class_data_ =
616PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
617FlowNodeProto::GetClassData() const {
618 ::google::protobuf::internal::PrefetchToLocalCache(&FlowNodeProto_class_data_);
619 ::google::protobuf::internal::PrefetchToLocalCache(FlowNodeProto_class_data_.tc_table);
620 return FlowNodeProto_class_data_.base();
621}
622PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
623const ::_pbi::TcParseTable<1, 2, 0, 0, 2>
624FlowNodeProto::_table_ = {
625 {
626 PROTOBUF_FIELD_OFFSET(FlowNodeProto, _impl_._has_bits_),
627 0, // no _extensions_
628 2, 8, // max_field_number, fast_idx_mask
629 offsetof(decltype(_table_), field_lookup_table),
630 4294967292, // skipmap
631 offsetof(decltype(_table_), field_entries),
632 2, // num_field_entries
633 0, // num_aux_entries
634 offsetof(decltype(_table_), field_names), // no aux_entries
636 nullptr, // post_loop_handler
637 ::_pbi::TcParser::GenericFallback, // fallback
638 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
639 ::_pbi::TcParser::GetTable<::operations_research::FlowNodeProto>(), // to_prefetch
640 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
641 }, {{
642 // optional int64 supply = 2 [default = 0];
643 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(FlowNodeProto, _impl_.supply_), 1>(),
644 {16, 1, 0,
645 PROTOBUF_FIELD_OFFSET(FlowNodeProto, _impl_.supply_)}},
646 // optional int64 id = 1;
647 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(FlowNodeProto, _impl_.id_), 0>(),
648 {8, 0, 0,
649 PROTOBUF_FIELD_OFFSET(FlowNodeProto, _impl_.id_)}},
650 }}, {{
651 65535, 65535
652 }}, {{
653 // optional int64 id = 1;
654 {PROTOBUF_FIELD_OFFSET(FlowNodeProto, _impl_.id_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
655 // optional int64 supply = 2 [default = 0];
656 {PROTOBUF_FIELD_OFFSET(FlowNodeProto, _impl_.supply_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
657 }},
658 // no aux_entries
659 {{
660 }},
661};
662PROTOBUF_NOINLINE void FlowNodeProto::Clear() {
663// @@protoc_insertion_point(message_clear_start:operations_research.FlowNodeProto)
664 ::google::protobuf::internal::TSanWrite(&_impl_);
665 ::uint32_t cached_has_bits = 0;
666 // Prevent compiler warnings about cached_has_bits being unused
667 (void) cached_has_bits;
668
669 cached_has_bits = _impl_._has_bits_[0];
670 if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
671 ::memset(&_impl_.id_, 0, static_cast<::size_t>(
672 reinterpret_cast<char*>(&_impl_.supply_) -
673 reinterpret_cast<char*>(&_impl_.id_)) + sizeof(_impl_.supply_));
674 }
675 _impl_._has_bits_.Clear();
676 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
677}
678
679#if defined(PROTOBUF_CUSTOM_VTABLE)
680::uint8_t* PROTOBUF_NONNULL FlowNodeProto::_InternalSerialize(
681 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
682 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
683 const FlowNodeProto& this_ = static_cast<const FlowNodeProto&>(base);
684#else // PROTOBUF_CUSTOM_VTABLE
685::uint8_t* PROTOBUF_NONNULL FlowNodeProto::_InternalSerialize(
686 ::uint8_t* PROTOBUF_NONNULL target,
687 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
688 const FlowNodeProto& this_ = *this;
689#endif // PROTOBUF_CUSTOM_VTABLE
690 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
691 this_.CheckHasBitConsistency();
692 }
693 // @@protoc_insertion_point(serialize_to_array_start:operations_research.FlowNodeProto)
694 ::uint32_t cached_has_bits = 0;
695 (void)cached_has_bits;
696
697 cached_has_bits = this_._impl_._has_bits_[0];
698 // optional int64 id = 1;
699 if (CheckHasBit(cached_has_bits, 0x00000001U)) {
700 target =
701 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<1>(
702 stream, this_._internal_id(), target);
703 }
704
705 // optional int64 supply = 2 [default = 0];
706 if (CheckHasBit(cached_has_bits, 0x00000002U)) {
707 target =
708 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<2>(
709 stream, this_._internal_supply(), target);
710 }
711
712 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
713 target =
714 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
715 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
716 }
717 // @@protoc_insertion_point(serialize_to_array_end:operations_research.FlowNodeProto)
718 return target;
719}
720
721#if defined(PROTOBUF_CUSTOM_VTABLE)
723 const FlowNodeProto& this_ = static_cast<const FlowNodeProto&>(base);
724#else // PROTOBUF_CUSTOM_VTABLE
725::size_t FlowNodeProto::ByteSizeLong() const {
726 const FlowNodeProto& this_ = *this;
727#endif // PROTOBUF_CUSTOM_VTABLE
728 // @@protoc_insertion_point(message_byte_size_start:operations_research.FlowNodeProto)
729 ::size_t total_size = 0;
730
731 ::uint32_t cached_has_bits = 0;
732 // Prevent compiler warnings about cached_has_bits being unused
733 (void)cached_has_bits;
734
735 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
736 cached_has_bits = this_._impl_._has_bits_[0];
737 if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
738 // optional int64 id = 1;
739 if (CheckHasBit(cached_has_bits, 0x00000001U)) {
740 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
741 this_._internal_id());
742 }
743 // optional int64 supply = 2 [default = 0];
744 if (CheckHasBit(cached_has_bits, 0x00000002U)) {
745 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
746 this_._internal_supply());
747 }
748 }
749 return this_.MaybeComputeUnknownFieldsSize(total_size,
750 &this_._impl_._cached_size_);
751}
752
753void FlowNodeProto::MergeImpl(::google::protobuf::MessageLite& to_msg,
754 const ::google::protobuf::MessageLite& from_msg) {
755 auto* const _this =
756 static_cast<FlowNodeProto*>(&to_msg);
757 auto& from = static_cast<const FlowNodeProto&>(from_msg);
758 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
759 from.CheckHasBitConsistency();
760 }
761 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.FlowNodeProto)
762 ABSL_DCHECK_NE(&from, _this);
763 ::uint32_t cached_has_bits = 0;
764 (void)cached_has_bits;
765
766 cached_has_bits = from._impl_._has_bits_[0];
767 if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
768 if (CheckHasBit(cached_has_bits, 0x00000001U)) {
769 _this->_impl_.id_ = from._impl_.id_;
770 }
771 if (CheckHasBit(cached_has_bits, 0x00000002U)) {
772 _this->_impl_.supply_ = from._impl_.supply_;
773 }
774 }
775 _this->_impl_._has_bits_[0] |= cached_has_bits;
776 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
777 from._internal_metadata_);
778}
779
780void FlowNodeProto::CopyFrom(const FlowNodeProto& from) {
781 // @@protoc_insertion_point(class_specific_copy_from_start:operations_research.FlowNodeProto)
782 if (&from == this) return;
783 Clear();
784 MergeFrom(from);
785}
786
787
788void FlowNodeProto::InternalSwap(FlowNodeProto* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
789 using ::std::swap;
790 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
791 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
792 ::google::protobuf::internal::memswap<
793 PROTOBUF_FIELD_OFFSET(FlowNodeProto, _impl_.supply_)
794 + sizeof(FlowNodeProto::_impl_.supply_)
795 - PROTOBUF_FIELD_OFFSET(FlowNodeProto, _impl_.id_)>(
796 reinterpret_cast<char*>(&_impl_.id_),
797 reinterpret_cast<char*>(&other->_impl_.id_));
798}
799
800::google::protobuf::Metadata FlowNodeProto::GetMetadata() const {
801 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
803// ===================================================================
804
806 public:
807 using HasBits =
808 decltype(::std::declval<FlowModelProto>()._impl_._has_bits_);
809 static constexpr ::int32_t kHasBitsOffset =
810 8 * PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_._has_bits_);
811};
813FlowModelProto::FlowModelProto(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
814#if defined(PROTOBUF_CUSTOM_VTABLE)
815 : ::google::protobuf::Message(arena, FlowModelProto_class_data_.base()) {
816#else // PROTOBUF_CUSTOM_VTABLE
817 : ::google::protobuf::Message(arena) {
818#endif // PROTOBUF_CUSTOM_VTABLE
819 SharedCtor(arena);
820 // @@protoc_insertion_point(arena_constructor:operations_research.FlowModelProto)
821}
822PROTOBUF_NDEBUG_INLINE FlowModelProto::Impl_::Impl_(
823 [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
824 [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
825 [[maybe_unused]] const ::operations_research::FlowModelProto& from_msg)
826 : _has_bits_{from._has_bits_},
827 _cached_size_{0},
828 nodes_{visibility, arena, from.nodes_},
829 arcs_{visibility, arena, from.arcs_} {}
830
832 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
833 const FlowModelProto& from)
834#if defined(PROTOBUF_CUSTOM_VTABLE)
835 : ::google::protobuf::Message(arena, FlowModelProto_class_data_.base()) {
836#else // PROTOBUF_CUSTOM_VTABLE
837 : ::google::protobuf::Message(arena) {
838#endif // PROTOBUF_CUSTOM_VTABLE
839 FlowModelProto* const _this = this;
840 (void)_this;
841 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
842 from._internal_metadata_);
843 new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
844 _impl_.problem_type_ = from._impl_.problem_type_;
845
846 // @@protoc_insertion_point(copy_constructor:operations_research.FlowModelProto)
847}
848PROTOBUF_NDEBUG_INLINE FlowModelProto::Impl_::Impl_(
849 [[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
850 [[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
851 : _cached_size_{0},
852 nodes_{visibility, arena},
853 arcs_{visibility, arena} {}
854
855inline void FlowModelProto::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
856 new (&_impl_) Impl_(internal_visibility(), arena);
857 _impl_.problem_type_ = {};
858}
860 // @@protoc_insertion_point(destructor:operations_research.FlowModelProto)
861 SharedDtor(*this);
863inline void FlowModelProto::SharedDtor(MessageLite& self) {
864 FlowModelProto& this_ = static_cast<FlowModelProto&>(self);
865 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
866 this_.CheckHasBitConsistency();
867 }
868 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
869 ABSL_DCHECK(this_.GetArena() == nullptr);
870 this_._impl_.~Impl_();
871}
872
873inline void* PROTOBUF_NONNULL FlowModelProto::PlacementNew_(
874 const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
875 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
876 return ::new (mem) FlowModelProto(arena);
877}
878constexpr auto FlowModelProto::InternalNewImpl_() {
879 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
880 PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_.nodes_) +
881 decltype(FlowModelProto::_impl_.nodes_)::
882 InternalGetArenaOffset(
883 ::google::protobuf::Message::internal_visibility()),
884 PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_.arcs_) +
885 decltype(FlowModelProto::_impl_.arcs_)::
886 InternalGetArenaOffset(
887 ::google::protobuf::Message::internal_visibility()),
888 });
889 if (arena_bits.has_value()) {
890 return ::google::protobuf::internal::MessageCreator::ZeroInit(
891 sizeof(FlowModelProto), alignof(FlowModelProto), *arena_bits);
892 } else {
893 return ::google::protobuf::internal::MessageCreator(&FlowModelProto::PlacementNew_,
894 sizeof(FlowModelProto),
895 alignof(FlowModelProto));
896 }
897}
899 return ::google::protobuf::internal::ClassDataFull{
900 ::google::protobuf::internal::ClassData{
902 &_table_.header,
903 nullptr, // OnDemandRegisterArenaDtor
904 nullptr, // IsInitialized
905 &FlowModelProto::MergeImpl,
906 ::google::protobuf::Message::GetNewImpl<FlowModelProto>(),
907#if defined(PROTOBUF_CUSTOM_VTABLE)
908 &FlowModelProto::SharedDtor,
909 ::google::protobuf::Message::GetClearImpl<FlowModelProto>(), &FlowModelProto::ByteSizeLong,
911#endif // PROTOBUF_CUSTOM_VTABLE
912 PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_._cached_size_),
913 false,
914 },
915 &FlowModelProto::kDescriptorMethods,
917 nullptr, // tracker
918 };
919}
920
921PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
922 ::google::protobuf::internal::ClassDataFull FlowModelProto_class_data_ =
924
925PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
926FlowModelProto::GetClassData() const {
927 ::google::protobuf::internal::PrefetchToLocalCache(&FlowModelProto_class_data_);
928 ::google::protobuf::internal::PrefetchToLocalCache(FlowModelProto_class_data_.tc_table);
929 return FlowModelProto_class_data_.base();
930}
931PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
932const ::_pbi::TcParseTable<2, 3, 3, 0, 2>
933FlowModelProto::_table_ = {
934 {
935 PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_._has_bits_),
936 0, // no _extensions_
937 3, 24, // max_field_number, fast_idx_mask
938 offsetof(decltype(_table_), field_lookup_table),
939 4294967288, // skipmap
940 offsetof(decltype(_table_), field_entries),
941 3, // num_field_entries
942 3, // num_aux_entries
943 offsetof(decltype(_table_), aux_entries),
945 nullptr, // post_loop_handler
946 ::_pbi::TcParser::GenericFallback, // fallback
947 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
948 ::_pbi::TcParser::GetTable<::operations_research::FlowModelProto>(), // to_prefetch
949 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
950 }, {{
951 {::_pbi::TcParser::MiniParse, {}},
952 // repeated .operations_research.FlowNodeProto nodes = 1;
953 {::_pbi::TcParser::FastMtR1,
954 {10, 0, 0,
955 PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_.nodes_)}},
956 // repeated .operations_research.FlowArcProto arcs = 2;
957 {::_pbi::TcParser::FastMtR1,
958 {18, 1, 1,
959 PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_.arcs_)}},
960 // optional .operations_research.FlowModelProto.ProblemType problem_type = 3;
961 {::_pbi::TcParser::FastEr0S1,
962 {24, 2, 2,
963 PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_.problem_type_)}},
964 }}, {{
965 65535, 65535
966 }}, {{
967 // repeated .operations_research.FlowNodeProto nodes = 1;
968 {PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_.nodes_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
969 // repeated .operations_research.FlowArcProto arcs = 2;
970 {PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_.arcs_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
971 // optional .operations_research.FlowModelProto.ProblemType problem_type = 3;
972 {PROTOBUF_FIELD_OFFSET(FlowModelProto, _impl_.problem_type_), _Internal::kHasBitsOffset + 2, 2, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
973 }},
974 {{
975 {::_pbi::TcParser::GetTable<::operations_research::FlowNodeProto>()},
976 {::_pbi::TcParser::GetTable<::operations_research::FlowArcProto>()},
977 {0, 2},
978 }},
979 {{
980 }},
981};
982PROTOBUF_NOINLINE void FlowModelProto::Clear() {
983// @@protoc_insertion_point(message_clear_start:operations_research.FlowModelProto)
984 ::google::protobuf::internal::TSanWrite(&_impl_);
985 ::uint32_t cached_has_bits = 0;
986 // Prevent compiler warnings about cached_has_bits being unused
987 (void) cached_has_bits;
988
989 cached_has_bits = _impl_._has_bits_[0];
990 if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
991 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
992 _impl_.nodes_.Clear();
993 }
994 if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) {
995 _impl_.arcs_.Clear();
996 }
997 }
998 _impl_.problem_type_ = 0;
999 _impl_._has_bits_.Clear();
1000 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
1001}
1002
1003#if defined(PROTOBUF_CUSTOM_VTABLE)
1004::uint8_t* PROTOBUF_NONNULL FlowModelProto::_InternalSerialize(
1005 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
1006 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
1007 const FlowModelProto& this_ = static_cast<const FlowModelProto&>(base);
1008#else // PROTOBUF_CUSTOM_VTABLE
1009::uint8_t* PROTOBUF_NONNULL FlowModelProto::_InternalSerialize(
1010 ::uint8_t* PROTOBUF_NONNULL target,
1011 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
1012 const FlowModelProto& this_ = *this;
1013#endif // PROTOBUF_CUSTOM_VTABLE
1014 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
1015 this_.CheckHasBitConsistency();
1016 }
1017 // @@protoc_insertion_point(serialize_to_array_start:operations_research.FlowModelProto)
1018 ::uint32_t cached_has_bits = 0;
1019 (void)cached_has_bits;
1020
1021 cached_has_bits = this_._impl_._has_bits_[0];
1022 // repeated .operations_research.FlowNodeProto nodes = 1;
1023 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
1024 for (unsigned i = 0, n = static_cast<unsigned>(
1025 this_._internal_nodes_size());
1026 i < n; i++) {
1027 const auto& repfield = this_._internal_nodes().Get(i);
1028 target =
1029 ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
1030 1, repfield, repfield.GetCachedSize(),
1031 target, stream);
1032 }
1033 }
1034
1035 // repeated .operations_research.FlowArcProto arcs = 2;
1036 if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) {
1037 for (unsigned i = 0, n = static_cast<unsigned>(
1038 this_._internal_arcs_size());
1039 i < n; i++) {
1040 const auto& repfield = this_._internal_arcs().Get(i);
1041 target =
1042 ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
1043 2, repfield, repfield.GetCachedSize(),
1044 target, stream);
1045 }
1046 }
1047
1048 // optional .operations_research.FlowModelProto.ProblemType problem_type = 3;
1049 if (CheckHasBit(cached_has_bits, 0x00000004U)) {
1050 target = stream->EnsureSpace(target);
1051 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1052 3, this_._internal_problem_type(), target);
1053 }
1054
1055 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
1056 target =
1057 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
1058 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
1059 }
1060 // @@protoc_insertion_point(serialize_to_array_end:operations_research.FlowModelProto)
1061 return target;
1062}
1063
1064#if defined(PROTOBUF_CUSTOM_VTABLE)
1065::size_t FlowModelProto::ByteSizeLong(const MessageLite& base) {
1066 const FlowModelProto& this_ = static_cast<const FlowModelProto&>(base);
1067#else // PROTOBUF_CUSTOM_VTABLE
1068::size_t FlowModelProto::ByteSizeLong() const {
1069 const FlowModelProto& this_ = *this;
1070#endif // PROTOBUF_CUSTOM_VTABLE
1071 // @@protoc_insertion_point(message_byte_size_start:operations_research.FlowModelProto)
1072 ::size_t total_size = 0;
1073
1074 ::uint32_t cached_has_bits = 0;
1075 // Prevent compiler warnings about cached_has_bits being unused
1076 (void)cached_has_bits;
1077
1078 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
1079 cached_has_bits = this_._impl_._has_bits_[0];
1080 if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
1081 // repeated .operations_research.FlowNodeProto nodes = 1;
1082 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
1083 total_size += 1UL * this_._internal_nodes_size();
1084 for (const auto& msg : this_._internal_nodes()) {
1085 total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
1086 }
1087 }
1088 // repeated .operations_research.FlowArcProto arcs = 2;
1089 if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) {
1090 total_size += 1UL * this_._internal_arcs_size();
1091 for (const auto& msg : this_._internal_arcs()) {
1092 total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
1093 }
1094 }
1095 // optional .operations_research.FlowModelProto.ProblemType problem_type = 3;
1096 if (CheckHasBit(cached_has_bits, 0x00000004U)) {
1097 total_size += 1 +
1098 ::_pbi::WireFormatLite::EnumSize(this_._internal_problem_type());
1099 }
1100 }
1101 return this_.MaybeComputeUnknownFieldsSize(total_size,
1102 &this_._impl_._cached_size_);
1103}
1104
1105void FlowModelProto::MergeImpl(::google::protobuf::MessageLite& to_msg,
1106 const ::google::protobuf::MessageLite& from_msg) {
1107 auto* const _this =
1108 static_cast<FlowModelProto*>(&to_msg);
1109 auto& from = static_cast<const FlowModelProto&>(from_msg);
1110 if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
1111 from.CheckHasBitConsistency();
1112 }
1113 ::google::protobuf::Arena* arena = _this->GetArena();
1114 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.FlowModelProto)
1115 ABSL_DCHECK_NE(&from, _this);
1116 ::uint32_t cached_has_bits = 0;
1117 (void)cached_has_bits;
1118
1119 cached_has_bits = from._impl_._has_bits_[0];
1120 if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
1121 if (CheckHasBitForRepeated(cached_has_bits, 0x00000001U)) {
1122 _this->_internal_mutable_nodes()->InternalMergeFromWithArena(
1123 ::google::protobuf::MessageLite::internal_visibility(), arena,
1124 from._internal_nodes());
1125 }
1126 if (CheckHasBitForRepeated(cached_has_bits, 0x00000002U)) {
1127 _this->_internal_mutable_arcs()->InternalMergeFromWithArena(
1128 ::google::protobuf::MessageLite::internal_visibility(), arena,
1129 from._internal_arcs());
1130 }
1131 if (CheckHasBit(cached_has_bits, 0x00000004U)) {
1132 _this->_impl_.problem_type_ = from._impl_.problem_type_;
1133 }
1134 }
1135 _this->_impl_._has_bits_[0] |= cached_has_bits;
1136 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
1137 from._internal_metadata_);
1138}
1139
1140void FlowModelProto::CopyFrom(const FlowModelProto& from) {
1141 // @@protoc_insertion_point(class_specific_copy_from_start:operations_research.FlowModelProto)
1142 if (&from == this) return;
1144 MergeFrom(from);
1145}
1146
1147
1148void FlowModelProto::InternalSwap(FlowModelProto* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
1149 using ::std::swap;
1150 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1151 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1152 _impl_.nodes_.InternalSwap(&other->_impl_.nodes_);
1153 _impl_.arcs_.InternalSwap(&other->_impl_.arcs_);
1154 swap(_impl_.problem_type_, other->_impl_.problem_type_);
1155}
1156
1157::google::protobuf::Metadata FlowModelProto::GetMetadata() const {
1158 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
1159}
1160// @@protoc_insertion_point(namespace_scope)
1161} // namespace operations_research
1162namespace google {
1163namespace protobuf {
1164} // namespace protobuf
1165} // namespace google
1166// @@protoc_insertion_point(global_scope)
1167PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type
1168 _static_init2_ [[maybe_unused]] =
1170 ::std::false_type{});
1171#include "google/protobuf/port_undef.inc"
static PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::std::false_type _static_init2_
static const ::_pb::Message *PROTOBUF_NONNULL const file_default_instances[]
static constexpr ::int32_t kHasBitsOffset
decltype(::std::declval< FlowArcProto >()._impl_._has_bits_) HasBits
friend class ::google::protobuf::MessageLite
ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL
::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::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
void CopyFrom(const FlowModelProto &from)
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
::uint8_t *PROTOBUF_NONNULL _InternalSerialize(::uint8_t *PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream *PROTOBUF_NONNULL stream) const final
static constexpr auto InternalGenerateClassData_()
void CopyFrom(const FlowNodeProto &from)
::google::protobuf::Metadata GetMetadata() const
friend void swap(FlowNodeProto &a, FlowNodeProto &b)
ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL
friend class ::google::protobuf::Arena
void MergeFrom(const FlowNodeProto &from)
static constexpr ::_pbi::MigrationSchema *PROTOBUF_NULLABLE schemas
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
OR-Tools root namespace.
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_