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