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