OR-Tools  9.2
search_limit.pb.cc
Go to the documentation of this file.
1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: ortools/constraint_solver/search_limit.proto
3 
5 
6 #include <algorithm>
7 
8 #include <google/protobuf/io/coded_stream.h>
9 #include <google/protobuf/extension_set.h>
10 #include <google/protobuf/wire_format_lite.h>
11 #include <google/protobuf/descriptor.h>
12 #include <google/protobuf/generated_message_reflection.h>
13 #include <google/protobuf/reflection_ops.h>
14 #include <google/protobuf/wire_format.h>
15 // @@protoc_insertion_point(includes)
16 #include <google/protobuf/port_def.inc>
17 
18 PROTOBUF_PRAGMA_INIT_SEG
19 namespace operations_research {
21  ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
22  : time_(int64_t{0})
23  , branches_(int64_t{0})
24  , failures_(int64_t{0})
25  , solutions_(int64_t{0})
26  , smart_time_check_(false)
27  , cumulative_(false){}
30  : _instance(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized{}) {}
32  union {
34  };
35 };
37 } // namespace operations_research
39 static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_ortools_2fconstraint_5fsolver_2fsearch_5flimit_2eproto = nullptr;
40 static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_ortools_2fconstraint_5fsolver_2fsearch_5flimit_2eproto = nullptr;
41 
43  ~0u, // no _has_bits_
44  PROTOBUF_FIELD_OFFSET(::operations_research::RegularLimitParameters, _internal_metadata_),
45  ~0u, // no _extensions_
46  ~0u, // no _oneof_case_
47  ~0u, // no _weak_field_map_
48  ~0u, // no _inlined_string_donated_
49  PROTOBUF_FIELD_OFFSET(::operations_research::RegularLimitParameters, time_),
50  PROTOBUF_FIELD_OFFSET(::operations_research::RegularLimitParameters, branches_),
51  PROTOBUF_FIELD_OFFSET(::operations_research::RegularLimitParameters, failures_),
52  PROTOBUF_FIELD_OFFSET(::operations_research::RegularLimitParameters, solutions_),
53  PROTOBUF_FIELD_OFFSET(::operations_research::RegularLimitParameters, smart_time_check_),
54  PROTOBUF_FIELD_OFFSET(::operations_research::RegularLimitParameters, cumulative_),
55 };
56 static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
58 };
59 
60 static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
61  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::operations_research::_RegularLimitParameters_default_instance_),
62 };
63 
64 const char descriptor_table_protodef_ortools_2fconstraint_5fsolver_2fsearch_5flimit_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
65  "\n,ortools/constraint_solver/search_limit"
66  ".proto\022\023operations_research\"\213\001\n\026RegularL"
67  "imitParameters\022\014\n\004time\030\001 \001(\003\022\020\n\010branches"
68  "\030\002 \001(\003\022\020\n\010failures\030\003 \001(\003\022\021\n\tsolutions\030\004 "
69  "\001(\003\022\030\n\020smart_time_check\030\005 \001(\010\022\022\n\ncumulat"
70  "ive\030\006 \001(\010B^\n#com.google.ortools.constrai"
71  "ntsolverB\023SearchLimitProtobufP\001\252\002\037Google"
72  ".OrTools.ConstraintSolverb\006proto3"
73  ;
74 static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_ortools_2fconstraint_5fsolver_2fsearch_5flimit_2eproto_once;
75 const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ortools_2fconstraint_5fsolver_2fsearch_5flimit_2eproto = {
76  false, false, 313, descriptor_table_protodef_ortools_2fconstraint_5fsolver_2fsearch_5flimit_2eproto, "ortools/constraint_solver/search_limit.proto",
80 };
81 PROTOBUF_ATTRIBUTE_WEAK const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable* descriptor_table_ortools_2fconstraint_5fsolver_2fsearch_5flimit_2eproto_getter() {
83 }
84 
85 // Force running AddDescriptors() at dynamic initialization time.
86 PROTOBUF_ATTRIBUTE_INIT_PRIORITY static ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptorsRunner dynamic_init_dummy_ortools_2fconstraint_5fsolver_2fsearch_5flimit_2eproto(&descriptor_table_ortools_2fconstraint_5fsolver_2fsearch_5flimit_2eproto);
87 namespace operations_research {
88 
89 // ===================================================================
90 
92  public:
93 };
94 
95 RegularLimitParameters::RegularLimitParameters(::PROTOBUF_NAMESPACE_ID::Arena* arena,
96  bool is_message_owned)
97  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
98  SharedCtor();
99  if (!is_message_owned) {
100  RegisterArenaDtor(arena);
101  }
102  // @@protoc_insertion_point(arena_constructor:operations_research.RegularLimitParameters)
103 }
105  : ::PROTOBUF_NAMESPACE_ID::Message() {
106  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
107  ::memcpy(&time_, &from.time_,
108  static_cast<size_t>(reinterpret_cast<char*>(&cumulative_) -
109  reinterpret_cast<char*>(&time_)) + sizeof(cumulative_));
110  // @@protoc_insertion_point(copy_constructor:operations_research.RegularLimitParameters)
111 }
112 
113 inline void RegularLimitParameters::SharedCtor() {
114 ::memset(reinterpret_cast<char*>(this) + static_cast<size_t>(
115  reinterpret_cast<char*>(&time_) - reinterpret_cast<char*>(this)),
116  0, static_cast<size_t>(reinterpret_cast<char*>(&cumulative_) -
117  reinterpret_cast<char*>(&time_)) + sizeof(cumulative_));
118 }
119 
121  // @@protoc_insertion_point(destructor:operations_research.RegularLimitParameters)
122  if (GetArenaForAllocation() != nullptr) return;
123  SharedDtor();
124  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
125 }
126 
127 inline void RegularLimitParameters::SharedDtor() {
128  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
129 }
130 
131 void RegularLimitParameters::ArenaDtor(void* object) {
132  RegularLimitParameters* _this = reinterpret_cast< RegularLimitParameters* >(object);
133  (void)_this;
134 }
135 void RegularLimitParameters::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
136 }
137 void RegularLimitParameters::SetCachedSize(int size) const {
138  _cached_size_.Set(size);
139 }
140 
142 // @@protoc_insertion_point(message_clear_start:operations_research.RegularLimitParameters)
143  uint32_t cached_has_bits = 0;
144  // Prevent compiler warnings about cached_has_bits being unused
145  (void) cached_has_bits;
146 
147  ::memset(&time_, 0, static_cast<size_t>(
148  reinterpret_cast<char*>(&cumulative_) -
149  reinterpret_cast<char*>(&time_)) + sizeof(cumulative_));
150  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
151 }
152 
153 const char* RegularLimitParameters::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
154 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
155  while (!ctx->Done(&ptr)) {
156  uint32_t tag;
157  ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
158  switch (tag >> 3) {
159  // int64 time = 1;
160  case 1:
161  if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
162  time_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
163  CHK_(ptr);
164  } else
165  goto handle_unusual;
166  continue;
167  // int64 branches = 2;
168  case 2:
169  if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
170  branches_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
171  CHK_(ptr);
172  } else
173  goto handle_unusual;
174  continue;
175  // int64 failures = 3;
176  case 3:
177  if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
178  failures_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
179  CHK_(ptr);
180  } else
181  goto handle_unusual;
182  continue;
183  // int64 solutions = 4;
184  case 4:
185  if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
186  solutions_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
187  CHK_(ptr);
188  } else
189  goto handle_unusual;
190  continue;
191  // bool smart_time_check = 5;
192  case 5:
193  if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
194  smart_time_check_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
195  CHK_(ptr);
196  } else
197  goto handle_unusual;
198  continue;
199  // bool cumulative = 6;
200  case 6:
201  if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
202  cumulative_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
203  CHK_(ptr);
204  } else
205  goto handle_unusual;
206  continue;
207  default:
208  goto handle_unusual;
209  } // switch
210  handle_unusual:
211  if ((tag == 0) || ((tag & 7) == 4)) {
212  CHK_(ptr);
213  ctx->SetLastTag(tag);
214  goto message_done;
215  }
216  ptr = UnknownFieldParse(
217  tag,
218  _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
219  ptr, ctx);
220  CHK_(ptr != nullptr);
221  } // while
222 message_done:
223  return ptr;
224 failure:
225  ptr = nullptr;
226  goto message_done;
227 #undef CHK_
228 }
229 
231  uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
232  // @@protoc_insertion_point(serialize_to_array_start:operations_research.RegularLimitParameters)
233  uint32_t cached_has_bits = 0;
234  (void) cached_has_bits;
235 
236  // int64 time = 1;
237  if (this->_internal_time() != 0) {
238  target = stream->EnsureSpace(target);
239  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(1, this->_internal_time(), target);
240  }
241 
242  // int64 branches = 2;
243  if (this->_internal_branches() != 0) {
244  target = stream->EnsureSpace(target);
245  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(2, this->_internal_branches(), target);
246  }
247 
248  // int64 failures = 3;
249  if (this->_internal_failures() != 0) {
250  target = stream->EnsureSpace(target);
251  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(3, this->_internal_failures(), target);
252  }
253 
254  // int64 solutions = 4;
255  if (this->_internal_solutions() != 0) {
256  target = stream->EnsureSpace(target);
257  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->_internal_solutions(), target);
258  }
259 
260  // bool smart_time_check = 5;
261  if (this->_internal_smart_time_check() != 0) {
262  target = stream->EnsureSpace(target);
263  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_smart_time_check(), target);
264  }
265 
266  // bool cumulative = 6;
267  if (this->_internal_cumulative() != 0) {
268  target = stream->EnsureSpace(target);
269  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_cumulative(), target);
270  }
271 
272  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
273  target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
274  _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
275  }
276  // @@protoc_insertion_point(serialize_to_array_end:operations_research.RegularLimitParameters)
277  return target;
278 }
279 
281 // @@protoc_insertion_point(message_byte_size_start:operations_research.RegularLimitParameters)
282  size_t total_size = 0;
283 
284  uint32_t cached_has_bits = 0;
285  // Prevent compiler warnings about cached_has_bits being unused
286  (void) cached_has_bits;
287 
288  // int64 time = 1;
289  if (this->_internal_time() != 0) {
290  total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_time());
291  }
292 
293  // int64 branches = 2;
294  if (this->_internal_branches() != 0) {
295  total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_branches());
296  }
297 
298  // int64 failures = 3;
299  if (this->_internal_failures() != 0) {
300  total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_failures());
301  }
302 
303  // int64 solutions = 4;
304  if (this->_internal_solutions() != 0) {
305  total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64SizePlusOne(this->_internal_solutions());
306  }
307 
308  // bool smart_time_check = 5;
309  if (this->_internal_smart_time_check() != 0) {
310  total_size += 1 + 1;
311  }
312 
313  // bool cumulative = 6;
314  if (this->_internal_cumulative() != 0) {
315  total_size += 1 + 1;
316  }
317 
318  return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_);
319 }
320 
321 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData RegularLimitParameters::_class_data_ = {
322  ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
323  RegularLimitParameters::MergeImpl
324 };
325 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*RegularLimitParameters::GetClassData() const { return &_class_data_; }
326 
327 void RegularLimitParameters::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to,
328  const ::PROTOBUF_NAMESPACE_ID::Message& from) {
329  static_cast<RegularLimitParameters *>(to)->MergeFrom(
330  static_cast<const RegularLimitParameters &>(from));
331 }
332 
333 
335 // @@protoc_insertion_point(class_specific_merge_from_start:operations_research.RegularLimitParameters)
336  GOOGLE_DCHECK_NE(&from, this);
337  uint32_t cached_has_bits = 0;
338  (void) cached_has_bits;
339 
340  if (from._internal_time() != 0) {
341  _internal_set_time(from._internal_time());
342  }
343  if (from._internal_branches() != 0) {
344  _internal_set_branches(from._internal_branches());
345  }
346  if (from._internal_failures() != 0) {
347  _internal_set_failures(from._internal_failures());
348  }
349  if (from._internal_solutions() != 0) {
350  _internal_set_solutions(from._internal_solutions());
351  }
352  if (from._internal_smart_time_check() != 0) {
353  _internal_set_smart_time_check(from._internal_smart_time_check());
354  }
355  if (from._internal_cumulative() != 0) {
356  _internal_set_cumulative(from._internal_cumulative());
357  }
358  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
359 }
360 
362 // @@protoc_insertion_point(class_specific_copy_from_start:operations_research.RegularLimitParameters)
363  if (&from == this) return;
364  Clear();
365  MergeFrom(from);
366 }
367 
369  return true;
370 }
371 
372 void RegularLimitParameters::InternalSwap(RegularLimitParameters* other) {
373  using std::swap;
374  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
375  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
376  PROTOBUF_FIELD_OFFSET(RegularLimitParameters, cumulative_)
377  + sizeof(RegularLimitParameters::cumulative_)
378  - PROTOBUF_FIELD_OFFSET(RegularLimitParameters, time_)>(
379  reinterpret_cast<char*>(&time_),
380  reinterpret_cast<char*>(&other->time_));
381 }
382 
383 ::PROTOBUF_NAMESPACE_ID::Metadata RegularLimitParameters::GetMetadata() const {
384  return ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(
387 }
388 
389 // @@protoc_insertion_point(namespace_scope)
390 } // namespace operations_research
391 PROTOBUF_NAMESPACE_OPEN
392 template<> PROTOBUF_NOINLINE ::operations_research::RegularLimitParameters* Arena::CreateMaybeMessage< ::operations_research::RegularLimitParameters >(Arena* arena) {
393  return Arena::CreateMessageInternal< ::operations_research::RegularLimitParameters >(arena);
394 }
395 PROTOBUF_NAMESPACE_CLOSE
396 
397 // @@protoc_insertion_point(global_scope)
398 #include <google/protobuf/port_undef.inc>
PROTOBUF_NAMESPACE_OPEN PROTOBUF_NOINLINE ::operations_research::RegularLimitParameters * Arena::CreateMaybeMessage< ::operations_research::RegularLimitParameters >(Arena *arena)
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const ** file_level_service_descriptors_ortools_2fconstraint_5fsolver_2fsearch_5flimit_2eproto
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_ortools_2fconstraint_5fsolver_2fsearch_5flimit_2eproto
void swap(IdMap< K, V > &a, IdMap< K, V > &b)
Definition: id_map.h:263
uint8_t * _InternalSerialize(uint8_t *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const final
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final
#define CHK_(x)
PROTOBUF_ATTRIBUTE_WEAKconst ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable * descriptor_table_ortools_2fconstraint_5fsolver_2fsearch_5flimit_2eproto_getter()
::PROTOBUF_NAMESPACE_ID::Message const *const file_default_instances[]
void CopyFrom(const RegularLimitParameters &from)
::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_ortools_2fconstraint_5fsolver_2fsearch_5flimit_2eproto_once
const char * _InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) final
const uint32_t TableStruct_ortools_2fconstraint_5fsolver_2fsearch_5flimit_2eproto::offsets [] PROTOBUF_SECTION_VARIABLE(protodesc_cold)
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData * GetClassData() const final
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT RegularLimitParametersDefaultTypeInternal _RegularLimitParameters_default_instance_
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final
Collection of objects used to extend the Constraint Solver library.
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const ** file_level_enum_descriptors_ortools_2fconstraint_5fsolver_2fsearch_5flimit_2eproto
static constexpr ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema * schemas
void MergeFrom(const RegularLimitParameters &from)
::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_ortools_2fconstraint_5fsolver_2fsearch_5flimit_2eproto[1]