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