Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
capacity.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/set_cover/capacity.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 CapacityConstraintProto_CapacityTerm_ElementWeightPair::Impl_::Impl_(
30 ::_pbi::ConstantInitialized) noexcept
31 : _cached_size_{0},
32 element_{::int64_t{0}},
33 weight_{::int64_t{0}} {}
34
35template <typename>
37#if defined(PROTOBUF_CUSTOM_VTABLE)
39#else // PROTOBUF_CUSTOM_VTABLE
40 : ::google::protobuf::Message(),
41#endif // PROTOBUF_CUSTOM_VTABLE
42 _impl_(::_pbi::ConstantInitialized()) {
43}
51
52PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL
54
55inline constexpr CapacityConstraintProto_CapacityTerm::Impl_::Impl_(
56 ::_pbi::ConstantInitialized) noexcept
57 : _cached_size_{0},
58 element_weights_{},
59 subset_{::int64_t{0}} {}
60
61template <typename>
63#if defined(PROTOBUF_CUSTOM_VTABLE)
64 : ::google::protobuf::Message(CapacityConstraintProto_CapacityTerm_class_data_.base()),
65#else // PROTOBUF_CUSTOM_VTABLE
66 : ::google::protobuf::Message(),
67#endif // PROTOBUF_CUSTOM_VTABLE
68 _impl_(::_pbi::ConstantInitialized()) {
69}
77
78PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL
80
81inline constexpr CapacityConstraintProto::Impl_::Impl_(
82 ::_pbi::ConstantInitialized) noexcept
83 : _cached_size_{0},
84 capacity_term_{},
85 min_capacity_{::int64_t{0}},
86 max_capacity_{::int64_t{0}} {}
87
88template <typename>
89PROTOBUF_CONSTEXPR CapacityConstraintProto::CapacityConstraintProto(::_pbi::ConstantInitialized)
90#if defined(PROTOBUF_CUSTOM_VTABLE)
91 : ::google::protobuf::Message(CapacityConstraintProto_class_data_.base()),
92#else // PROTOBUF_CUSTOM_VTABLE
93 : ::google::protobuf::Message(),
94#endif // PROTOBUF_CUSTOM_VTABLE
95 _impl_(::_pbi::ConstantInitialized()) {
96}
104
105PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL
107} // namespace operations_research
108static constexpr const ::_pb::EnumDescriptor *PROTOBUF_NONNULL *PROTOBUF_NULLABLE
110static constexpr const ::_pb::ServiceDescriptor *PROTOBUF_NONNULL *PROTOBUF_NULLABLE
112const ::uint32_t
114 protodesc_cold) = {
115 0x081, // bitmap
117 5, // hasbit index offset
120 0,
121 1,
122 0x081, // bitmap
123 PROTOBUF_FIELD_OFFSET(::operations_research::CapacityConstraintProto_CapacityTerm, _impl_._has_bits_),
124 5, // hasbit index offset
125 PROTOBUF_FIELD_OFFSET(::operations_research::CapacityConstraintProto_CapacityTerm, _impl_.subset_),
126 PROTOBUF_FIELD_OFFSET(::operations_research::CapacityConstraintProto_CapacityTerm, _impl_.element_weights_),
127 0,
128 ~0u,
129 0x081, // bitmap
130 PROTOBUF_FIELD_OFFSET(::operations_research::CapacityConstraintProto, _impl_._has_bits_),
131 6, // hasbit index offset
132 PROTOBUF_FIELD_OFFSET(::operations_research::CapacityConstraintProto, _impl_.capacity_term_),
133 PROTOBUF_FIELD_OFFSET(::operations_research::CapacityConstraintProto, _impl_.min_capacity_),
134 PROTOBUF_FIELD_OFFSET(::operations_research::CapacityConstraintProto, _impl_.max_capacity_),
135 ~0u,
136 0,
137 1,
138};
139
140static const ::_pbi::MigrationSchema
141 schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
145};
151const char descriptor_table_protodef_ortools_2fset_5fcover_2fcapacity_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
152 protodesc_cold) = {
153 "\n ortools/set_cover/capacity.proto\022\023oper"
154 "ations_research\"\324\002\n\027CapacityConstraintPr"
155 "oto\022P\n\rcapacity_term\030\001 \003(\01329.operations_"
156 "research.CapacityConstraintProto.Capacit"
157 "yTerm\022\024\n\014min_capacity\030\002 \001(\003\022\024\n\014max_capac"
158 "ity\030\003 \001(\003\032\272\001\n\014CapacityTerm\022\016\n\006subset\030\001 \001"
159 "(\003\022d\n\017element_weights\030\002 \003(\0132K.operations"
160 "_research.CapacityConstraintProto.Capaci"
161 "tyTerm.ElementWeightPair\0324\n\021ElementWeigh"
162 "tPair\022\017\n\007element\030\001 \001(\003\022\016\n\006weight\030\002 \001(\003B\037"
163 "\n\033com.google.ortools.setcoverP\001b\006proto3"
164};
166PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ortools_2fset_5fcover_2fcapacity_2eproto = {
167 false,
168 false,
169 439,
170 descriptor_table_protodef_ortools_2fset_5fcover_2fcapacity_2eproto,
171 "ortools/set_cover/capacity.proto",
173 nullptr,
174 0,
175 3,
176 schemas,
181};
182namespace operations_research {
183// ===================================================================
184
186 public:
187 using HasBits =
188 decltype(::std::declval<CapacityConstraintProto_CapacityTerm_ElementWeightPair>()._impl_._has_bits_);
189 static constexpr ::int32_t kHasBitsOffset =
191};
192
194#if defined(PROTOBUF_CUSTOM_VTABLE)
195 : ::google::protobuf::Message(arena, CapacityConstraintProto_CapacityTerm_ElementWeightPair_class_data_.base()) {
196#else // PROTOBUF_CUSTOM_VTABLE
197 : ::google::protobuf::Message(arena) {
198#endif // PROTOBUF_CUSTOM_VTABLE
199 SharedCtor(arena);
200 // @@protoc_insertion_point(arena_constructor:operations_research.CapacityConstraintProto.CapacityTerm.ElementWeightPair)
201}
203 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const CapacityConstraintProto_CapacityTerm_ElementWeightPair& from)
204#if defined(PROTOBUF_CUSTOM_VTABLE)
205 : ::google::protobuf::Message(arena, CapacityConstraintProto_CapacityTerm_ElementWeightPair_class_data_.base()),
206#else // PROTOBUF_CUSTOM_VTABLE
207 : ::google::protobuf::Message(arena),
208#endif // PROTOBUF_CUSTOM_VTABLE
209 _impl_(from._impl_) {
210 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
211 from._internal_metadata_);
212}
213PROTOBUF_NDEBUG_INLINE CapacityConstraintProto_CapacityTerm_ElementWeightPair::Impl_::Impl_(
214 ::google::protobuf::internal::InternalVisibility visibility,
215 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
216 : _cached_size_{0} {}
217
218inline void CapacityConstraintProto_CapacityTerm_ElementWeightPair::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
219 new (&_impl_) Impl_(internal_visibility(), arena);
220 ::memset(reinterpret_cast<char *>(&_impl_) +
221 offsetof(Impl_, element_),
222 0,
223 offsetof(Impl_, weight_) -
224 offsetof(Impl_, element_) +
225 sizeof(Impl_::weight_));
226}
228 // @@protoc_insertion_point(destructor:operations_research.CapacityConstraintProto.CapacityTerm.ElementWeightPair)
229 SharedDtor(*this);
230}
231inline void CapacityConstraintProto_CapacityTerm_ElementWeightPair::SharedDtor(MessageLite& self) {
233 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
234 ABSL_DCHECK(this_.GetArena() == nullptr);
235 this_._impl_.~Impl_();
236}
237
239 const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
240 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
242}
248 return ::google::protobuf::internal::ClassDataFull{
249 ::google::protobuf::internal::ClassData{
251 &_table_.header,
252 nullptr, // OnDemandRegisterArenaDtor
253 nullptr, // IsInitialized
254 &CapacityConstraintProto_CapacityTerm_ElementWeightPair::MergeImpl,
255 ::google::protobuf::Message::GetNewImpl<CapacityConstraintProto_CapacityTerm_ElementWeightPair>(),
256#if defined(PROTOBUF_CUSTOM_VTABLE)
257 &CapacityConstraintProto_CapacityTerm_ElementWeightPair::SharedDtor,
258 ::google::protobuf::Message::GetClearImpl<CapacityConstraintProto_CapacityTerm_ElementWeightPair>(), &CapacityConstraintProto_CapacityTerm_ElementWeightPair::ByteSizeLong,
260#endif // PROTOBUF_CUSTOM_VTABLE
261 PROTOBUF_FIELD_OFFSET(CapacityConstraintProto_CapacityTerm_ElementWeightPair, _impl_._cached_size_),
262 false,
263 },
264 &CapacityConstraintProto_CapacityTerm_ElementWeightPair::kDescriptorMethods,
266 nullptr, // tracker
267 };
268}
269
270PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
271 ::google::protobuf::internal::ClassDataFull CapacityConstraintProto_CapacityTerm_ElementWeightPair_class_data_ =
273
274PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
276 ::google::protobuf::internal::PrefetchToLocalCache(&CapacityConstraintProto_CapacityTerm_ElementWeightPair_class_data_);
277 ::google::protobuf::internal::PrefetchToLocalCache(CapacityConstraintProto_CapacityTerm_ElementWeightPair_class_data_.tc_table);
279}
280PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
281const ::_pbi::TcParseTable<1, 2, 0, 0, 2>
282CapacityConstraintProto_CapacityTerm_ElementWeightPair::_table_ = {
283 {
284 PROTOBUF_FIELD_OFFSET(CapacityConstraintProto_CapacityTerm_ElementWeightPair, _impl_._has_bits_),
285 0, // no _extensions_
286 2, 8, // max_field_number, fast_idx_mask
287 offsetof(decltype(_table_), field_lookup_table),
288 4294967292, // skipmap
289 offsetof(decltype(_table_), field_entries),
290 2, // num_field_entries
291 0, // num_aux_entries
292 offsetof(decltype(_table_), field_names), // no aux_entries
294 nullptr, // post_loop_handler
295 ::_pbi::TcParser::GenericFallback, // fallback
296 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
297 ::_pbi::TcParser::GetTable<::operations_research::CapacityConstraintProto_CapacityTerm_ElementWeightPair>(), // to_prefetch
298 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
299 }, {{
300 // int64 weight = 2;
301 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(CapacityConstraintProto_CapacityTerm_ElementWeightPair, _impl_.weight_), 1>(),
302 {16, 1, 0, PROTOBUF_FIELD_OFFSET(CapacityConstraintProto_CapacityTerm_ElementWeightPair, _impl_.weight_)}},
303 // int64 element = 1;
304 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(CapacityConstraintProto_CapacityTerm_ElementWeightPair, _impl_.element_), 0>(),
305 {8, 0, 0, PROTOBUF_FIELD_OFFSET(CapacityConstraintProto_CapacityTerm_ElementWeightPair, _impl_.element_)}},
306 }}, {{
307 65535, 65535
308 }}, {{
309 // int64 element = 1;
310 {PROTOBUF_FIELD_OFFSET(CapacityConstraintProto_CapacityTerm_ElementWeightPair, _impl_.element_), _Internal::kHasBitsOffset + 0, 0,
311 (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
312 // int64 weight = 2;
313 {PROTOBUF_FIELD_OFFSET(CapacityConstraintProto_CapacityTerm_ElementWeightPair, _impl_.weight_), _Internal::kHasBitsOffset + 1, 0,
314 (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
315 }},
316 // no aux_entries
317 {{
318 }},
319};
321// @@protoc_insertion_point(message_clear_start:operations_research.CapacityConstraintProto.CapacityTerm.ElementWeightPair)
322 ::google::protobuf::internal::TSanWrite(&_impl_);
323 ::uint32_t cached_has_bits = 0;
324 // Prevent compiler warnings about cached_has_bits being unused
325 (void) cached_has_bits;
326
327 cached_has_bits = _impl_._has_bits_[0];
328 if ((cached_has_bits & 0x00000003u) != 0) {
329 ::memset(&_impl_.element_, 0, static_cast<::size_t>(
330 reinterpret_cast<char*>(&_impl_.weight_) -
331 reinterpret_cast<char*>(&_impl_.element_)) + sizeof(_impl_.weight_));
332 }
333 _impl_._has_bits_.Clear();
334 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
335}
336
337#if defined(PROTOBUF_CUSTOM_VTABLE)
339 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
340 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
342#else // PROTOBUF_CUSTOM_VTABLE
344 ::uint8_t* PROTOBUF_NONNULL target,
345 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
347#endif // PROTOBUF_CUSTOM_VTABLE
348 // @@protoc_insertion_point(serialize_to_array_start:operations_research.CapacityConstraintProto.CapacityTerm.ElementWeightPair)
349 ::uint32_t cached_has_bits = 0;
350 (void)cached_has_bits;
351
352 // int64 element = 1;
353 if ((this_._impl_._has_bits_[0] & 0x00000001u) != 0) {
354 if (this_._internal_element() != 0) {
355 target =
356 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<1>(
357 stream, this_._internal_element(), target);
358 }
359 }
360
361 // int64 weight = 2;
362 if ((this_._impl_._has_bits_[0] & 0x00000002u) != 0) {
363 if (this_._internal_weight() != 0) {
364 target =
365 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<2>(
366 stream, this_._internal_weight(), target);
367 }
368 }
369
370 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
371 target =
372 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
373 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
374 }
375 // @@protoc_insertion_point(serialize_to_array_end:operations_research.CapacityConstraintProto.CapacityTerm.ElementWeightPair)
376 return target;
377}
378
379#if defined(PROTOBUF_CUSTOM_VTABLE)
382#else // PROTOBUF_CUSTOM_VTABLE
385#endif // PROTOBUF_CUSTOM_VTABLE
386 // @@protoc_insertion_point(message_byte_size_start:operations_research.CapacityConstraintProto.CapacityTerm.ElementWeightPair)
387 ::size_t total_size = 0;
388
389 ::uint32_t cached_has_bits = 0;
390 // Prevent compiler warnings about cached_has_bits being unused
391 (void)cached_has_bits;
392
393 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
394 cached_has_bits = this_._impl_._has_bits_[0];
395 if ((cached_has_bits & 0x00000003u) != 0) {
396 // int64 element = 1;
397 if ((cached_has_bits & 0x00000001u) != 0) {
398 if (this_._internal_element() != 0) {
399 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
400 this_._internal_element());
401 }
402 }
403 // int64 weight = 2;
404 if ((cached_has_bits & 0x00000002u) != 0) {
405 if (this_._internal_weight() != 0) {
406 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
407 this_._internal_weight());
408 }
409 }
410 }
411 return this_.MaybeComputeUnknownFieldsSize(total_size,
412 &this_._impl_._cached_size_);
413}
414
415void CapacityConstraintProto_CapacityTerm_ElementWeightPair::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
416 auto* const _this = static_cast<CapacityConstraintProto_CapacityTerm_ElementWeightPair*>(&to_msg);
417 auto& from = static_cast<const CapacityConstraintProto_CapacityTerm_ElementWeightPair&>(from_msg);
418 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.CapacityConstraintProto.CapacityTerm.ElementWeightPair)
419 ABSL_DCHECK_NE(&from, _this);
420 ::uint32_t cached_has_bits = 0;
421 (void) cached_has_bits;
422
423 cached_has_bits = from._impl_._has_bits_[0];
424 if ((cached_has_bits & 0x00000003u) != 0) {
425 if ((cached_has_bits & 0x00000001u) != 0) {
426 if (from._internal_element() != 0) {
427 _this->_impl_.element_ = from._impl_.element_;
428 }
429 }
430 if ((cached_has_bits & 0x00000002u) != 0) {
431 if (from._internal_weight() != 0) {
432 _this->_impl_.weight_ = from._impl_.weight_;
433 }
434 }
435 }
436 _this->_impl_._has_bits_[0] |= cached_has_bits;
437 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
438}
439
441// @@protoc_insertion_point(class_specific_copy_from_start:operations_research.CapacityConstraintProto.CapacityTerm.ElementWeightPair)
442 if (&from == this) return;
443 Clear();
444 MergeFrom(from);
445}
446
447
448void CapacityConstraintProto_CapacityTerm_ElementWeightPair::InternalSwap(CapacityConstraintProto_CapacityTerm_ElementWeightPair* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
449 using ::std::swap;
450 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
451 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
452 ::google::protobuf::internal::memswap<
455 - PROTOBUF_FIELD_OFFSET(CapacityConstraintProto_CapacityTerm_ElementWeightPair, _impl_.element_)>(
456 reinterpret_cast<char*>(&_impl_.element_),
457 reinterpret_cast<char*>(&other->_impl_.element_));
458}
459
461 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
462}
463// ===================================================================
464
466 public:
467 using HasBits =
468 decltype(::std::declval<CapacityConstraintProto_CapacityTerm>()._impl_._has_bits_);
469 static constexpr ::int32_t kHasBitsOffset =
470 8 * PROTOBUF_FIELD_OFFSET(CapacityConstraintProto_CapacityTerm, _impl_._has_bits_);
472
473CapacityConstraintProto_CapacityTerm::CapacityConstraintProto_CapacityTerm(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
474#if defined(PROTOBUF_CUSTOM_VTABLE)
475 : ::google::protobuf::Message(arena, CapacityConstraintProto_CapacityTerm_class_data_.base()) {
476#else // PROTOBUF_CUSTOM_VTABLE
477 : ::google::protobuf::Message(arena) {
478#endif // PROTOBUF_CUSTOM_VTABLE
479 SharedCtor(arena);
480 // @@protoc_insertion_point(arena_constructor:operations_research.CapacityConstraintProto.CapacityTerm)
481}
482PROTOBUF_NDEBUG_INLINE CapacityConstraintProto_CapacityTerm::Impl_::Impl_(
483 ::google::protobuf::internal::InternalVisibility visibility,
484 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
485 const ::operations_research::CapacityConstraintProto_CapacityTerm& from_msg)
486 : _has_bits_{from._has_bits_},
487 _cached_size_{0},
488 element_weights_{visibility, arena, from.element_weights_} {}
489
491 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
493#if defined(PROTOBUF_CUSTOM_VTABLE)
494 : ::google::protobuf::Message(arena, CapacityConstraintProto_CapacityTerm_class_data_.base()) {
495#else // PROTOBUF_CUSTOM_VTABLE
496 : ::google::protobuf::Message(arena) {
497#endif // PROTOBUF_CUSTOM_VTABLE
498 CapacityConstraintProto_CapacityTerm* const _this = this;
499 (void)_this;
500 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
501 from._internal_metadata_);
502 new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
503 _impl_.subset_ = from._impl_.subset_;
504
505 // @@protoc_insertion_point(copy_constructor:operations_research.CapacityConstraintProto.CapacityTerm)
506}
507PROTOBUF_NDEBUG_INLINE CapacityConstraintProto_CapacityTerm::Impl_::Impl_(
508 ::google::protobuf::internal::InternalVisibility visibility,
509 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
510 : _cached_size_{0},
511 element_weights_{visibility, arena} {}
512
513inline void CapacityConstraintProto_CapacityTerm::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
514 new (&_impl_) Impl_(internal_visibility(), arena);
515 _impl_.subset_ = {};
516}
518 // @@protoc_insertion_point(destructor:operations_research.CapacityConstraintProto.CapacityTerm)
519 SharedDtor(*this);
520}
521inline void CapacityConstraintProto_CapacityTerm::SharedDtor(MessageLite& self) {
523 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
524 ABSL_DCHECK(this_.GetArena() == nullptr);
525 this_._impl_.~Impl_();
526}
527
528inline void* PROTOBUF_NONNULL CapacityConstraintProto_CapacityTerm::PlacementNew_(
529 const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
530 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
531 return ::new (mem) CapacityConstraintProto_CapacityTerm(arena);
532}
534 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
535 PROTOBUF_FIELD_OFFSET(CapacityConstraintProto_CapacityTerm, _impl_.element_weights_) +
536 decltype(CapacityConstraintProto_CapacityTerm::_impl_.element_weights_)::
537 InternalGetArenaOffset(
538 ::google::protobuf::Message::internal_visibility()),
539 });
540 if (arena_bits.has_value()) {
541 return ::google::protobuf::internal::MessageCreator::ZeroInit(
542 sizeof(CapacityConstraintProto_CapacityTerm), alignof(CapacityConstraintProto_CapacityTerm), *arena_bits);
543 } else {
544 return ::google::protobuf::internal::MessageCreator(&CapacityConstraintProto_CapacityTerm::PlacementNew_,
545 sizeof(CapacityConstraintProto_CapacityTerm),
546 alignof(CapacityConstraintProto_CapacityTerm));
547 }
548}
550 return ::google::protobuf::internal::ClassDataFull{
551 ::google::protobuf::internal::ClassData{
553 &_table_.header,
554 nullptr, // OnDemandRegisterArenaDtor
555 nullptr, // IsInitialized
556 &CapacityConstraintProto_CapacityTerm::MergeImpl,
557 ::google::protobuf::Message::GetNewImpl<CapacityConstraintProto_CapacityTerm>(),
558#if defined(PROTOBUF_CUSTOM_VTABLE)
559 &CapacityConstraintProto_CapacityTerm::SharedDtor,
560 ::google::protobuf::Message::GetClearImpl<CapacityConstraintProto_CapacityTerm>(), &CapacityConstraintProto_CapacityTerm::ByteSizeLong,
562#endif // PROTOBUF_CUSTOM_VTABLE
563 PROTOBUF_FIELD_OFFSET(CapacityConstraintProto_CapacityTerm, _impl_._cached_size_),
564 false,
565 },
566 &CapacityConstraintProto_CapacityTerm::kDescriptorMethods,
568 nullptr, // tracker
569 };
570}
571
572PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
573 ::google::protobuf::internal::ClassDataFull CapacityConstraintProto_CapacityTerm_class_data_ =
576PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
578 ::google::protobuf::internal::PrefetchToLocalCache(&CapacityConstraintProto_CapacityTerm_class_data_);
579 ::google::protobuf::internal::PrefetchToLocalCache(CapacityConstraintProto_CapacityTerm_class_data_.tc_table);
581}
582PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
583const ::_pbi::TcParseTable<1, 2, 1, 0, 2>
584CapacityConstraintProto_CapacityTerm::_table_ = {
585 {
586 PROTOBUF_FIELD_OFFSET(CapacityConstraintProto_CapacityTerm, _impl_._has_bits_),
587 0, // no _extensions_
588 2, 8, // max_field_number, fast_idx_mask
589 offsetof(decltype(_table_), field_lookup_table),
590 4294967292, // skipmap
591 offsetof(decltype(_table_), field_entries),
592 2, // num_field_entries
593 1, // num_aux_entries
594 offsetof(decltype(_table_), aux_entries),
596 nullptr, // post_loop_handler
597 ::_pbi::TcParser::GenericFallback, // fallback
598 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
599 ::_pbi::TcParser::GetTable<::operations_research::CapacityConstraintProto_CapacityTerm>(), // to_prefetch
600 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
601 }, {{
602 // repeated .operations_research.CapacityConstraintProto.CapacityTerm.ElementWeightPair element_weights = 2;
603 {::_pbi::TcParser::FastMtR1,
604 {18, 63, 0, PROTOBUF_FIELD_OFFSET(CapacityConstraintProto_CapacityTerm, _impl_.element_weights_)}},
605 // int64 subset = 1;
606 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(CapacityConstraintProto_CapacityTerm, _impl_.subset_), 0>(),
607 {8, 0, 0, PROTOBUF_FIELD_OFFSET(CapacityConstraintProto_CapacityTerm, _impl_.subset_)}},
608 }}, {{
609 65535, 65535
610 }}, {{
611 // int64 subset = 1;
612 {PROTOBUF_FIELD_OFFSET(CapacityConstraintProto_CapacityTerm, _impl_.subset_), _Internal::kHasBitsOffset + 0, 0,
613 (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
614 // repeated .operations_research.CapacityConstraintProto.CapacityTerm.ElementWeightPair element_weights = 2;
615 {PROTOBUF_FIELD_OFFSET(CapacityConstraintProto_CapacityTerm, _impl_.element_weights_), -1, 0,
616 (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
617 }},
618 {{
619 {::_pbi::TcParser::GetTable<::operations_research::CapacityConstraintProto_CapacityTerm_ElementWeightPair>()},
620 }},
621 {{
622 }},
623};
624PROTOBUF_NOINLINE void CapacityConstraintProto_CapacityTerm::Clear() {
625// @@protoc_insertion_point(message_clear_start:operations_research.CapacityConstraintProto.CapacityTerm)
626 ::google::protobuf::internal::TSanWrite(&_impl_);
627 ::uint32_t cached_has_bits = 0;
628 // Prevent compiler warnings about cached_has_bits being unused
629 (void) cached_has_bits;
630
631 _impl_.element_weights_.Clear();
632 _impl_.subset_ = ::int64_t{0};
633 _impl_._has_bits_.Clear();
634 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
635}
636
637#if defined(PROTOBUF_CUSTOM_VTABLE)
639 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
640 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
641 const CapacityConstraintProto_CapacityTerm& this_ = static_cast<const CapacityConstraintProto_CapacityTerm&>(base);
642#else // PROTOBUF_CUSTOM_VTABLE
644 ::uint8_t* PROTOBUF_NONNULL target,
645 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
646 const CapacityConstraintProto_CapacityTerm& this_ = *this;
647#endif // PROTOBUF_CUSTOM_VTABLE
648 // @@protoc_insertion_point(serialize_to_array_start:operations_research.CapacityConstraintProto.CapacityTerm)
649 ::uint32_t cached_has_bits = 0;
650 (void)cached_has_bits;
651
652 // int64 subset = 1;
653 if ((this_._impl_._has_bits_[0] & 0x00000001u) != 0) {
654 if (this_._internal_subset() != 0) {
655 target =
656 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<1>(
657 stream, this_._internal_subset(), target);
658 }
659 }
660
661 // repeated .operations_research.CapacityConstraintProto.CapacityTerm.ElementWeightPair element_weights = 2;
662 for (unsigned i = 0, n = static_cast<unsigned>(
663 this_._internal_element_weights_size());
664 i < n; i++) {
665 const auto& repfield = this_._internal_element_weights().Get(i);
666 target =
667 ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
668 2, repfield, repfield.GetCachedSize(),
669 target, stream);
670 }
671
672 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
673 target =
674 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
675 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
676 }
677 // @@protoc_insertion_point(serialize_to_array_end:operations_research.CapacityConstraintProto.CapacityTerm)
678 return target;
679}
680
681#if defined(PROTOBUF_CUSTOM_VTABLE)
684#else // PROTOBUF_CUSTOM_VTABLE
686 const CapacityConstraintProto_CapacityTerm& this_ = *this;
687#endif // PROTOBUF_CUSTOM_VTABLE
688 // @@protoc_insertion_point(message_byte_size_start:operations_research.CapacityConstraintProto.CapacityTerm)
689 ::size_t total_size = 0;
690
691 ::uint32_t cached_has_bits = 0;
692 // Prevent compiler warnings about cached_has_bits being unused
693 (void)cached_has_bits;
694
695 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
696 {
697 // repeated .operations_research.CapacityConstraintProto.CapacityTerm.ElementWeightPair element_weights = 2;
698 {
699 total_size += 1UL * this_._internal_element_weights_size();
700 for (const auto& msg : this_._internal_element_weights()) {
701 total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
702 }
703 }
704 }
705 {
706 // int64 subset = 1;
707 cached_has_bits = this_._impl_._has_bits_[0];
708 if ((cached_has_bits & 0x00000001u) != 0) {
709 if (this_._internal_subset() != 0) {
710 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
711 this_._internal_subset());
712 }
713 }
714 }
715 return this_.MaybeComputeUnknownFieldsSize(total_size,
716 &this_._impl_._cached_size_);
717}
718
719void CapacityConstraintProto_CapacityTerm::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
720 auto* const _this = static_cast<CapacityConstraintProto_CapacityTerm*>(&to_msg);
721 auto& from = static_cast<const CapacityConstraintProto_CapacityTerm&>(from_msg);
722 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.CapacityConstraintProto.CapacityTerm)
723 ABSL_DCHECK_NE(&from, _this);
724 ::uint32_t cached_has_bits = 0;
725 (void) cached_has_bits;
726
727 _this->_internal_mutable_element_weights()->MergeFrom(
728 from._internal_element_weights());
729 cached_has_bits = from._impl_._has_bits_[0];
730 if ((cached_has_bits & 0x00000001u) != 0) {
731 if (from._internal_subset() != 0) {
732 _this->_impl_.subset_ = from._impl_.subset_;
733 }
734 }
735 _this->_impl_._has_bits_[0] |= cached_has_bits;
736 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
737}
738
739void CapacityConstraintProto_CapacityTerm::CopyFrom(const CapacityConstraintProto_CapacityTerm& from) {
740// @@protoc_insertion_point(class_specific_copy_from_start:operations_research.CapacityConstraintProto.CapacityTerm)
741 if (&from == this) return;
742 Clear();
743 MergeFrom(from);
744}
745
746
747void CapacityConstraintProto_CapacityTerm::InternalSwap(CapacityConstraintProto_CapacityTerm* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
748 using ::std::swap;
749 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
750 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
751 _impl_.element_weights_.InternalSwap(&other->_impl_.element_weights_);
752 swap(_impl_.subset_, other->_impl_.subset_);
753}
754
755::google::protobuf::Metadata CapacityConstraintProto_CapacityTerm::GetMetadata() const {
756 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
758// ===================================================================
759
761 public:
762 using HasBits =
763 decltype(::std::declval<CapacityConstraintProto>()._impl_._has_bits_);
764 static constexpr ::int32_t kHasBitsOffset =
765 8 * PROTOBUF_FIELD_OFFSET(CapacityConstraintProto, _impl_._has_bits_);
766};
768CapacityConstraintProto::CapacityConstraintProto(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
769#if defined(PROTOBUF_CUSTOM_VTABLE)
770 : ::google::protobuf::Message(arena, CapacityConstraintProto_class_data_.base()) {
771#else // PROTOBUF_CUSTOM_VTABLE
772 : ::google::protobuf::Message(arena) {
773#endif // PROTOBUF_CUSTOM_VTABLE
774 SharedCtor(arena);
775 // @@protoc_insertion_point(arena_constructor:operations_research.CapacityConstraintProto)
776}
777PROTOBUF_NDEBUG_INLINE CapacityConstraintProto::Impl_::Impl_(
778 ::google::protobuf::internal::InternalVisibility visibility,
779 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
780 const ::operations_research::CapacityConstraintProto& from_msg)
781 : _has_bits_{from._has_bits_},
782 _cached_size_{0},
783 capacity_term_{visibility, arena, from.capacity_term_} {}
784
786 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
787 const CapacityConstraintProto& from)
788#if defined(PROTOBUF_CUSTOM_VTABLE)
789 : ::google::protobuf::Message(arena, CapacityConstraintProto_class_data_.base()) {
790#else // PROTOBUF_CUSTOM_VTABLE
791 : ::google::protobuf::Message(arena) {
792#endif // PROTOBUF_CUSTOM_VTABLE
793 CapacityConstraintProto* const _this = this;
794 (void)_this;
795 _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
796 from._internal_metadata_);
797 new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
798 ::memcpy(reinterpret_cast<char *>(&_impl_) +
799 offsetof(Impl_, min_capacity_),
800 reinterpret_cast<const char *>(&from._impl_) +
801 offsetof(Impl_, min_capacity_),
802 offsetof(Impl_, max_capacity_) -
803 offsetof(Impl_, min_capacity_) +
804 sizeof(Impl_::max_capacity_));
805
806 // @@protoc_insertion_point(copy_constructor:operations_research.CapacityConstraintProto)
807}
808PROTOBUF_NDEBUG_INLINE CapacityConstraintProto::Impl_::Impl_(
809 ::google::protobuf::internal::InternalVisibility visibility,
810 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
811 : _cached_size_{0},
812 capacity_term_{visibility, arena} {}
813
814inline void CapacityConstraintProto::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
815 new (&_impl_) Impl_(internal_visibility(), arena);
816 ::memset(reinterpret_cast<char *>(&_impl_) +
817 offsetof(Impl_, min_capacity_),
818 0,
819 offsetof(Impl_, max_capacity_) -
820 offsetof(Impl_, min_capacity_) +
821 sizeof(Impl_::max_capacity_));
822}
824 // @@protoc_insertion_point(destructor:operations_research.CapacityConstraintProto)
825 SharedDtor(*this);
827inline void CapacityConstraintProto::SharedDtor(MessageLite& self) {
828 CapacityConstraintProto& this_ = static_cast<CapacityConstraintProto&>(self);
829 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
830 ABSL_DCHECK(this_.GetArena() == nullptr);
831 this_._impl_.~Impl_();
832}
833
834inline void* PROTOBUF_NONNULL CapacityConstraintProto::PlacementNew_(
835 const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
836 ::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
837 return ::new (mem) CapacityConstraintProto(arena);
838}
840 constexpr auto arena_bits = ::google::protobuf::internal::EncodePlacementArenaOffsets({
841 PROTOBUF_FIELD_OFFSET(CapacityConstraintProto, _impl_.capacity_term_) +
842 decltype(CapacityConstraintProto::_impl_.capacity_term_)::
843 InternalGetArenaOffset(
844 ::google::protobuf::Message::internal_visibility()),
845 });
846 if (arena_bits.has_value()) {
847 return ::google::protobuf::internal::MessageCreator::ZeroInit(
848 sizeof(CapacityConstraintProto), alignof(CapacityConstraintProto), *arena_bits);
849 } else {
850 return ::google::protobuf::internal::MessageCreator(&CapacityConstraintProto::PlacementNew_,
851 sizeof(CapacityConstraintProto),
852 alignof(CapacityConstraintProto));
853 }
854}
856 return ::google::protobuf::internal::ClassDataFull{
857 ::google::protobuf::internal::ClassData{
859 &_table_.header,
860 nullptr, // OnDemandRegisterArenaDtor
861 nullptr, // IsInitialized
862 &CapacityConstraintProto::MergeImpl,
863 ::google::protobuf::Message::GetNewImpl<CapacityConstraintProto>(),
864#if defined(PROTOBUF_CUSTOM_VTABLE)
865 &CapacityConstraintProto::SharedDtor,
866 ::google::protobuf::Message::GetClearImpl<CapacityConstraintProto>(), &CapacityConstraintProto::ByteSizeLong,
868#endif // PROTOBUF_CUSTOM_VTABLE
869 PROTOBUF_FIELD_OFFSET(CapacityConstraintProto, _impl_._cached_size_),
870 false,
871 },
872 &CapacityConstraintProto::kDescriptorMethods,
874 nullptr, // tracker
875 };
876}
877
878PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const
879 ::google::protobuf::internal::ClassDataFull CapacityConstraintProto_class_data_ =
881
882PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
884 ::google::protobuf::internal::PrefetchToLocalCache(&CapacityConstraintProto_class_data_);
885 ::google::protobuf::internal::PrefetchToLocalCache(CapacityConstraintProto_class_data_.tc_table);
887}
888PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
889const ::_pbi::TcParseTable<2, 3, 1, 0, 2>
890CapacityConstraintProto::_table_ = {
891 {
892 PROTOBUF_FIELD_OFFSET(CapacityConstraintProto, _impl_._has_bits_),
893 0, // no _extensions_
894 3, 24, // max_field_number, fast_idx_mask
895 offsetof(decltype(_table_), field_lookup_table),
896 4294967288, // skipmap
897 offsetof(decltype(_table_), field_entries),
898 3, // num_field_entries
899 1, // num_aux_entries
900 offsetof(decltype(_table_), aux_entries),
902 nullptr, // post_loop_handler
903 ::_pbi::TcParser::GenericFallback, // fallback
904 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
905 ::_pbi::TcParser::GetTable<::operations_research::CapacityConstraintProto>(), // to_prefetch
906 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
907 }, {{
908 {::_pbi::TcParser::MiniParse, {}},
909 // repeated .operations_research.CapacityConstraintProto.CapacityTerm capacity_term = 1;
910 {::_pbi::TcParser::FastMtR1,
911 {10, 63, 0, PROTOBUF_FIELD_OFFSET(CapacityConstraintProto, _impl_.capacity_term_)}},
912 // int64 min_capacity = 2;
913 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(CapacityConstraintProto, _impl_.min_capacity_), 0>(),
914 {16, 0, 0, PROTOBUF_FIELD_OFFSET(CapacityConstraintProto, _impl_.min_capacity_)}},
915 // int64 max_capacity = 3;
916 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(CapacityConstraintProto, _impl_.max_capacity_), 1>(),
917 {24, 1, 0, PROTOBUF_FIELD_OFFSET(CapacityConstraintProto, _impl_.max_capacity_)}},
918 }}, {{
919 65535, 65535
920 }}, {{
921 // repeated .operations_research.CapacityConstraintProto.CapacityTerm capacity_term = 1;
922 {PROTOBUF_FIELD_OFFSET(CapacityConstraintProto, _impl_.capacity_term_), -1, 0,
923 (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
924 // int64 min_capacity = 2;
925 {PROTOBUF_FIELD_OFFSET(CapacityConstraintProto, _impl_.min_capacity_), _Internal::kHasBitsOffset + 0, 0,
926 (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
927 // int64 max_capacity = 3;
928 {PROTOBUF_FIELD_OFFSET(CapacityConstraintProto, _impl_.max_capacity_), _Internal::kHasBitsOffset + 1, 0,
929 (0 | ::_fl::kFcOptional | ::_fl::kInt64)},
930 }},
931 {{
932 {::_pbi::TcParser::GetTable<::operations_research::CapacityConstraintProto_CapacityTerm>()},
933 }},
934 {{
935 }},
936};
937PROTOBUF_NOINLINE void CapacityConstraintProto::Clear() {
938// @@protoc_insertion_point(message_clear_start:operations_research.CapacityConstraintProto)
939 ::google::protobuf::internal::TSanWrite(&_impl_);
940 ::uint32_t cached_has_bits = 0;
941 // Prevent compiler warnings about cached_has_bits being unused
942 (void) cached_has_bits;
943
944 _impl_.capacity_term_.Clear();
945 cached_has_bits = _impl_._has_bits_[0];
946 if ((cached_has_bits & 0x00000003u) != 0) {
947 ::memset(&_impl_.min_capacity_, 0, static_cast<::size_t>(
948 reinterpret_cast<char*>(&_impl_.max_capacity_) -
949 reinterpret_cast<char*>(&_impl_.min_capacity_)) + sizeof(_impl_.max_capacity_));
950 }
951 _impl_._has_bits_.Clear();
952 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
953}
954
955#if defined(PROTOBUF_CUSTOM_VTABLE)
956::uint8_t* PROTOBUF_NONNULL CapacityConstraintProto::_InternalSerialize(
957 const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
958 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
959 const CapacityConstraintProto& this_ = static_cast<const CapacityConstraintProto&>(base);
960#else // PROTOBUF_CUSTOM_VTABLE
961::uint8_t* PROTOBUF_NONNULL CapacityConstraintProto::_InternalSerialize(
962 ::uint8_t* PROTOBUF_NONNULL target,
963 ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
964 const CapacityConstraintProto& this_ = *this;
965#endif // PROTOBUF_CUSTOM_VTABLE
966 // @@protoc_insertion_point(serialize_to_array_start:operations_research.CapacityConstraintProto)
967 ::uint32_t cached_has_bits = 0;
968 (void)cached_has_bits;
969
970 // repeated .operations_research.CapacityConstraintProto.CapacityTerm capacity_term = 1;
971 for (unsigned i = 0, n = static_cast<unsigned>(
972 this_._internal_capacity_term_size());
973 i < n; i++) {
974 const auto& repfield = this_._internal_capacity_term().Get(i);
975 target =
976 ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
977 1, repfield, repfield.GetCachedSize(),
978 target, stream);
979 }
980
981 // int64 min_capacity = 2;
982 if ((this_._impl_._has_bits_[0] & 0x00000001u) != 0) {
983 if (this_._internal_min_capacity() != 0) {
984 target =
985 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<2>(
986 stream, this_._internal_min_capacity(), target);
987 }
988 }
989
990 // int64 max_capacity = 3;
991 if ((this_._impl_._has_bits_[0] & 0x00000002u) != 0) {
992 if (this_._internal_max_capacity() != 0) {
993 target =
994 ::google::protobuf::internal::WireFormatLite::WriteInt64ToArrayWithField<3>(
995 stream, this_._internal_max_capacity(), target);
996 }
997 }
998
999 if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
1000 target =
1001 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
1002 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
1003 }
1004 // @@protoc_insertion_point(serialize_to_array_end:operations_research.CapacityConstraintProto)
1005 return target;
1006}
1007
1008#if defined(PROTOBUF_CUSTOM_VTABLE)
1010 const CapacityConstraintProto& this_ = static_cast<const CapacityConstraintProto&>(base);
1011#else // PROTOBUF_CUSTOM_VTABLE
1013 const CapacityConstraintProto& this_ = *this;
1014#endif // PROTOBUF_CUSTOM_VTABLE
1015 // @@protoc_insertion_point(message_byte_size_start:operations_research.CapacityConstraintProto)
1016 ::size_t total_size = 0;
1017
1018 ::uint32_t cached_has_bits = 0;
1019 // Prevent compiler warnings about cached_has_bits being unused
1020 (void)cached_has_bits;
1021
1022 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
1023 {
1024 // repeated .operations_research.CapacityConstraintProto.CapacityTerm capacity_term = 1;
1025 {
1026 total_size += 1UL * this_._internal_capacity_term_size();
1027 for (const auto& msg : this_._internal_capacity_term()) {
1028 total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
1029 }
1030 }
1031 }
1032 cached_has_bits = this_._impl_._has_bits_[0];
1033 if ((cached_has_bits & 0x00000003u) != 0) {
1034 // int64 min_capacity = 2;
1035 if ((cached_has_bits & 0x00000001u) != 0) {
1036 if (this_._internal_min_capacity() != 0) {
1037 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
1038 this_._internal_min_capacity());
1039 }
1040 }
1041 // int64 max_capacity = 3;
1042 if ((cached_has_bits & 0x00000002u) != 0) {
1043 if (this_._internal_max_capacity() != 0) {
1044 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
1045 this_._internal_max_capacity());
1046 }
1047 }
1048 }
1049 return this_.MaybeComputeUnknownFieldsSize(total_size,
1050 &this_._impl_._cached_size_);
1051}
1052
1053void CapacityConstraintProto::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
1054 auto* const _this = static_cast<CapacityConstraintProto*>(&to_msg);
1055 auto& from = static_cast<const CapacityConstraintProto&>(from_msg);
1056 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.CapacityConstraintProto)
1057 ABSL_DCHECK_NE(&from, _this);
1058 ::uint32_t cached_has_bits = 0;
1059 (void) cached_has_bits;
1060
1061 _this->_internal_mutable_capacity_term()->MergeFrom(
1062 from._internal_capacity_term());
1063 cached_has_bits = from._impl_._has_bits_[0];
1064 if ((cached_has_bits & 0x00000003u) != 0) {
1065 if ((cached_has_bits & 0x00000001u) != 0) {
1066 if (from._internal_min_capacity() != 0) {
1067 _this->_impl_.min_capacity_ = from._impl_.min_capacity_;
1068 }
1069 }
1070 if ((cached_has_bits & 0x00000002u) != 0) {
1071 if (from._internal_max_capacity() != 0) {
1072 _this->_impl_.max_capacity_ = from._impl_.max_capacity_;
1073 }
1074 }
1075 }
1076 _this->_impl_._has_bits_[0] |= cached_has_bits;
1077 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
1078}
1079
1081// @@protoc_insertion_point(class_specific_copy_from_start:operations_research.CapacityConstraintProto)
1082 if (&from == this) return;
1084 MergeFrom(from);
1085}
1086
1087
1088void CapacityConstraintProto::InternalSwap(CapacityConstraintProto* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
1089 using ::std::swap;
1090 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1091 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1092 _impl_.capacity_term_.InternalSwap(&other->_impl_.capacity_term_);
1093 ::google::protobuf::internal::memswap<
1094 PROTOBUF_FIELD_OFFSET(CapacityConstraintProto, _impl_.max_capacity_)
1095 + sizeof(CapacityConstraintProto::_impl_.max_capacity_)
1096 - PROTOBUF_FIELD_OFFSET(CapacityConstraintProto, _impl_.min_capacity_)>(
1097 reinterpret_cast<char*>(&_impl_.min_capacity_),
1098 reinterpret_cast<char*>(&other->_impl_.min_capacity_));
1099}
1100
1101::google::protobuf::Metadata CapacityConstraintProto::GetMetadata() const {
1102 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
1103}
1104// @@protoc_insertion_point(namespace_scope)
1105} // namespace operations_research
1106namespace google {
1107namespace protobuf {
1108} // namespace protobuf
1109} // namespace google
1110// @@protoc_insertion_point(global_scope)
1111PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type
1112 _static_init2_ [[maybe_unused]] =
1114 ::std::false_type{});
1115#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 constexprconst ::_pb::ServiceDescriptor *PROTOBUF_NONNULL *PROTOBUF_NULLABLE file_level_service_descriptors_ortools_2fset_5fcover_2fcapacity_2eproto
PROTOBUF_CONSTINITconst ::_pbi::DescriptorTable descriptor_table_ortools_2fset_5fcover_2fcapacity_2eproto
const ::uint32_t TableStruct_ortools_2fset_5fcover_2fcapacity_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold)
static constexprconst ::_pb::EnumDescriptor *PROTOBUF_NONNULL *PROTOBUF_NULLABLE file_level_enum_descriptors_ortools_2fset_5fcover_2fcapacity_2eproto
::absl::once_flag descriptor_table_ortools_2fset_5fcover_2fcapacity_2eproto_once
decltype(::std::declval< CapacityConstraintProto_CapacityTerm >()._impl_._has_bits_) HasBits
decltype(::std::declval< CapacityConstraintProto_CapacityTerm_ElementWeightPair >()._impl_._has_bits_) HasBits
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
void MergeFrom(const CapacityConstraintProto_CapacityTerm_ElementWeightPair &from)
void CopyFrom(const CapacityConstraintProto_CapacityTerm_ElementWeightPair &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
friend void swap(CapacityConstraintProto_CapacityTerm_ElementWeightPair &a, CapacityConstraintProto_CapacityTerm_ElementWeightPair &b)
ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL
const ::google::protobuf::UnknownFieldSet & unknown_fields() const ABSL_ATTRIBUTE_LIFETIME_BOUND
::google::protobuf::Metadata GetMetadata() const
void MergeFrom(const CapacityConstraintProto_CapacityTerm &from)
static void *PROTOBUF_NONNULL PlacementNew_(const void *PROTOBUF_NONNULL, void *PROTOBUF_NONNULL mem, ::google::protobuf::Arena *PROTOBUF_NULLABLE arena)
const ::google::protobuf::internal::ClassData *PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL
void CopyFrom(const CapacityConstraintProto_CapacityTerm &from)
::uint8_t *PROTOBUF_NONNULL _InternalSerialize(::uint8_t *PROTOBUF_NONNULL target, ::google::protobuf::io::EpsCopyOutputStream *PROTOBUF_NONNULL stream) const final
friend class ::google::protobuf::MessageLite
::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
const ::google::protobuf::internal::ClassData *PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL
::google::protobuf::Metadata GetMetadata() const
static constexpr auto InternalGenerateClassData_()
void MergeFrom(const CapacityConstraintProto &from)
void CopyFrom(const CapacityConstraintProto &from)
static void *PROTOBUF_NONNULL PlacementNew_(const void *PROTOBUF_NONNULL, void *PROTOBUF_NONNULL mem, ::google::protobuf::Arena *PROTOBUF_NULLABLE arena)
friend void swap(CapacityConstraintProto &a, CapacityConstraintProto &b)
ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL
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 CapacityConstraintProto_CapacityTermDefaultTypeInternal _CapacityConstraintProto_CapacityTerm_default_instance_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CapacityConstraintProtoDefaultTypeInternal _CapacityConstraintProto_default_instance_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull CapacityConstraintProto_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull CapacityConstraintProto_CapacityTerm_class_data_
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const::google::protobuf::internal::ClassDataFull CapacityConstraintProto_CapacityTerm_ElementWeightPair_class_data_
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT OR_PROTO_DLL PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CapacityConstraintProto_CapacityTerm_ElementWeightPairDefaultTypeInternal _CapacityConstraintProto_CapacityTerm_ElementWeightPair_default_instance_
static constexpr ::_pbi::MigrationSchema *PROTOBUF_NULLABLE schemas