From 3c01f2139d2e881afcaeacb0c7d8016fd5135f09 Mon Sep 17 00:00:00 2001 From: Shitaro Date: Sun, 11 Aug 2024 16:08:04 +0900 Subject: [PATCH 1/7] gen by protoc --- cpp/ommx/v1/constraint.pb.cc | 1268 +++++++++++++++++ cpp/ommx/v1/constraint.pb.h | 1510 +++++++++++++++++++++ cpp/ommx/v1/decision_variables.pb.cc | 923 +++++++++++++ cpp/ommx/v1/decision_variables.pb.h | 1075 +++++++++++++++ cpp/ommx/v1/function.pb.cc | 540 ++++++++ cpp/ommx/v1/function.pb.h | 604 +++++++++ cpp/ommx/v1/instance.pb.cc | 870 ++++++++++++ cpp/ommx/v1/instance.pb.h | 1284 ++++++++++++++++++ cpp/ommx/v1/linear.pb.cc | 595 ++++++++ cpp/ommx/v1/linear.pb.h | 596 ++++++++ cpp/ommx/v1/polynomial.pb.cc | 568 ++++++++ cpp/ommx/v1/polynomial.pb.h | 593 ++++++++ cpp/ommx/v1/quadratic.pb.cc | 443 ++++++ cpp/ommx/v1/quadratic.pb.h | 566 ++++++++ cpp/ommx/v1/solution.pb.cc | 1479 ++++++++++++++++++++ cpp/ommx/v1/solution.pb.h | 1870 ++++++++++++++++++++++++++ 16 files changed, 14784 insertions(+) create mode 100644 cpp/ommx/v1/constraint.pb.cc create mode 100644 cpp/ommx/v1/constraint.pb.h create mode 100644 cpp/ommx/v1/decision_variables.pb.cc create mode 100644 cpp/ommx/v1/decision_variables.pb.h create mode 100644 cpp/ommx/v1/function.pb.cc create mode 100644 cpp/ommx/v1/function.pb.h create mode 100644 cpp/ommx/v1/instance.pb.cc create mode 100644 cpp/ommx/v1/instance.pb.h create mode 100644 cpp/ommx/v1/linear.pb.cc create mode 100644 cpp/ommx/v1/linear.pb.h create mode 100644 cpp/ommx/v1/polynomial.pb.cc create mode 100644 cpp/ommx/v1/polynomial.pb.h create mode 100644 cpp/ommx/v1/quadratic.pb.cc create mode 100644 cpp/ommx/v1/quadratic.pb.h create mode 100644 cpp/ommx/v1/solution.pb.cc create mode 100644 cpp/ommx/v1/solution.pb.h diff --git a/cpp/ommx/v1/constraint.pb.cc b/cpp/ommx/v1/constraint.pb.cc new file mode 100644 index 00000000..2c275b9c --- /dev/null +++ b/cpp/ommx/v1/constraint.pb.cc @@ -0,0 +1,1268 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: ommx/v1/constraint.proto +// Protobuf C++ Version: 5.27.3 + +#include "ommx/v1/constraint.pb.h" + +#include +#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/generated_message_tctable_impl.h" +#include "google/protobuf/extension_set.h" +#include "google/protobuf/wire_format_lite.h" +#include "google/protobuf/descriptor.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/reflection_ops.h" +#include "google/protobuf/wire_format.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" +PROTOBUF_PRAGMA_INIT_SEG +namespace _pb = ::google::protobuf; +namespace _pbi = ::google::protobuf::internal; +namespace _fl = ::google::protobuf::internal::field_layout; +namespace ommx { +namespace v1 { + template +PROTOBUF_CONSTEXPR EvaluatedConstraint_ParametersEntry_DoNotUse::EvaluatedConstraint_ParametersEntry_DoNotUse(::_pbi::ConstantInitialized) {} +struct EvaluatedConstraint_ParametersEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR EvaluatedConstraint_ParametersEntry_DoNotUseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~EvaluatedConstraint_ParametersEntry_DoNotUseDefaultTypeInternal() {} + union { + EvaluatedConstraint_ParametersEntry_DoNotUse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EvaluatedConstraint_ParametersEntry_DoNotUseDefaultTypeInternal _EvaluatedConstraint_ParametersEntry_DoNotUse_default_instance_; + template +PROTOBUF_CONSTEXPR Constraint_ParametersEntry_DoNotUse::Constraint_ParametersEntry_DoNotUse(::_pbi::ConstantInitialized) {} +struct Constraint_ParametersEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR Constraint_ParametersEntry_DoNotUseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~Constraint_ParametersEntry_DoNotUseDefaultTypeInternal() {} + union { + Constraint_ParametersEntry_DoNotUse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Constraint_ParametersEntry_DoNotUseDefaultTypeInternal _Constraint_ParametersEntry_DoNotUse_default_instance_; + +inline constexpr EvaluatedConstraint::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + used_decision_variable_ids_{}, + _used_decision_variable_ids_cached_byte_size_{0}, + parameters_{}, + subscripts_{}, + _subscripts_cached_byte_size_{0}, + name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + description_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + id_{::uint64_t{0u}}, + evaluated_value_{0}, + dual_variable_{0}, + equality_{static_cast< ::ommx::v1::Equality >(0)} {} + +template +PROTOBUF_CONSTEXPR EvaluatedConstraint::EvaluatedConstraint(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct EvaluatedConstraintDefaultTypeInternal { + PROTOBUF_CONSTEXPR EvaluatedConstraintDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~EvaluatedConstraintDefaultTypeInternal() {} + union { + EvaluatedConstraint _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EvaluatedConstraintDefaultTypeInternal _EvaluatedConstraint_default_instance_; + +inline constexpr Constraint::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + parameters_{}, + subscripts_{}, + _subscripts_cached_byte_size_{0}, + name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + description_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + function_{nullptr}, + id_{::uint64_t{0u}}, + equality_{static_cast< ::ommx::v1::Equality >(0)} {} + +template +PROTOBUF_CONSTEXPR Constraint::Constraint(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct ConstraintDefaultTypeInternal { + PROTOBUF_CONSTEXPR ConstraintDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ConstraintDefaultTypeInternal() {} + union { + Constraint _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConstraintDefaultTypeInternal _Constraint_default_instance_; +} // namespace v1 +} // namespace ommx +static const ::_pb::EnumDescriptor* file_level_enum_descriptors_ommx_2fv1_2fconstraint_2eproto[1]; +static constexpr const ::_pb::ServiceDescriptor** + file_level_service_descriptors_ommx_2fv1_2fconstraint_2eproto = nullptr; +const ::uint32_t + TableStruct_ommx_2fv1_2fconstraint_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::ommx::v1::Constraint_ParametersEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Constraint_ParametersEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::ommx::v1::Constraint_ParametersEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Constraint_ParametersEntry_DoNotUse, value_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::ommx::v1::Constraint, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Constraint, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::ommx::v1::Constraint, _impl_.id_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Constraint, _impl_.equality_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Constraint, _impl_.function_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Constraint, _impl_.subscripts_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Constraint, _impl_.parameters_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Constraint, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Constraint, _impl_.description_), + ~0u, + ~0u, + 2, + ~0u, + ~0u, + 0, + 1, + PROTOBUF_FIELD_OFFSET(::ommx::v1::EvaluatedConstraint_ParametersEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::EvaluatedConstraint_ParametersEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::ommx::v1::EvaluatedConstraint_ParametersEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::EvaluatedConstraint_ParametersEntry_DoNotUse, value_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::ommx::v1::EvaluatedConstraint, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::EvaluatedConstraint, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::ommx::v1::EvaluatedConstraint, _impl_.id_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::EvaluatedConstraint, _impl_.equality_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::EvaluatedConstraint, _impl_.evaluated_value_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::EvaluatedConstraint, _impl_.used_decision_variable_ids_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::EvaluatedConstraint, _impl_.subscripts_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::EvaluatedConstraint, _impl_.parameters_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::EvaluatedConstraint, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::EvaluatedConstraint, _impl_.description_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::EvaluatedConstraint, _impl_.dual_variable_), + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + 0, + 1, + 2, +}; + +static const ::_pbi::MigrationSchema + schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + {0, 10, -1, sizeof(::ommx::v1::Constraint_ParametersEntry_DoNotUse)}, + {12, 27, -1, sizeof(::ommx::v1::Constraint)}, + {34, 44, -1, sizeof(::ommx::v1::EvaluatedConstraint_ParametersEntry_DoNotUse)}, + {46, 63, -1, sizeof(::ommx::v1::EvaluatedConstraint)}, +}; +static const ::_pb::Message* const file_default_instances[] = { + &::ommx::v1::_Constraint_ParametersEntry_DoNotUse_default_instance_._instance, + &::ommx::v1::_Constraint_default_instance_._instance, + &::ommx::v1::_EvaluatedConstraint_ParametersEntry_DoNotUse_default_instance_._instance, + &::ommx::v1::_EvaluatedConstraint_default_instance_._instance, +}; +const char descriptor_table_protodef_ommx_2fv1_2fconstraint_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + "\n\030ommx/v1/constraint.proto\022\007ommx.v1\032\026omm" + "x/v1/function.proto\"\250\002\n\nConstraint\022\n\n\002id" + "\030\001 \001(\004\022#\n\010equality\030\002 \001(\0162\021.ommx.v1.Equal" + "ity\022#\n\010function\030\003 \001(\0132\021.ommx.v1.Function" + "\022\022\n\nsubscripts\030\010 \003(\003\0227\n\nparameters\030\005 \003(\013" + "2#.ommx.v1.Constraint.ParametersEntry\022\021\n" + "\004name\030\006 \001(\tH\000\210\001\001\022\030\n\013description\030\007 \001(\tH\001\210" + "\001\001\0321\n\017ParametersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" + "lue\030\002 \001(\t:\0028\001B\007\n\005_nameB\016\n\014_description\"\200" + "\003\n\023EvaluatedConstraint\022\n\n\002id\030\001 \001(\004\022#\n\010eq" + "uality\030\002 \001(\0162\021.ommx.v1.Equality\022\027\n\017evalu" + "ated_value\030\003 \001(\001\022\"\n\032used_decision_variab" + "le_ids\030\004 \003(\004\022\022\n\nsubscripts\030\t \003(\003\022@\n\npara" + "meters\030\005 \003(\0132,.ommx.v1.EvaluatedConstrai" + "nt.ParametersEntry\022\021\n\004name\030\006 \001(\tH\000\210\001\001\022\030\n" + "\013description\030\007 \001(\tH\001\210\001\001\022\032\n\rdual_variable" + "\030\010 \001(\001H\002\210\001\001\0321\n\017ParametersEntry\022\013\n\003key\030\001 " + "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\007\n\005_nameB\016\n\014_desc" + "riptionB\020\n\016_dual_variable*i\n\010Equality\022\030\n" + "\024EQUALITY_UNSPECIFIED\020\000\022\032\n\026EQUALITY_EQUA" + "L_TO_ZERO\020\001\022\'\n#EQUALITY_LESS_THAN_OR_EQU" + "AL_TO_ZERO\020\002b\006proto3" +}; +static const ::_pbi::DescriptorTable* const descriptor_table_ommx_2fv1_2fconstraint_2eproto_deps[1] = + { + &::descriptor_table_ommx_2fv1_2ffunction_2eproto, +}; +static ::absl::once_flag descriptor_table_ommx_2fv1_2fconstraint_2eproto_once; +PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fconstraint_2eproto = { + false, + false, + 860, + descriptor_table_protodef_ommx_2fv1_2fconstraint_2eproto, + "ommx/v1/constraint.proto", + &descriptor_table_ommx_2fv1_2fconstraint_2eproto_once, + descriptor_table_ommx_2fv1_2fconstraint_2eproto_deps, + 1, + 4, + schemas, + file_default_instances, + TableStruct_ommx_2fv1_2fconstraint_2eproto::offsets, + file_level_enum_descriptors_ommx_2fv1_2fconstraint_2eproto, + file_level_service_descriptors_ommx_2fv1_2fconstraint_2eproto, +}; +namespace ommx { +namespace v1 { +const ::google::protobuf::EnumDescriptor* Equality_descriptor() { + ::google::protobuf::internal::AssignDescriptors(&descriptor_table_ommx_2fv1_2fconstraint_2eproto); + return file_level_enum_descriptors_ommx_2fv1_2fconstraint_2eproto[0]; +} +PROTOBUF_CONSTINIT const uint32_t Equality_internal_data_[] = { + 196608u, 0u, }; +bool Equality_IsValid(int value) { + return 0 <= value && value <= 2; +} +// =================================================================== + +Constraint_ParametersEntry_DoNotUse::Constraint_ParametersEntry_DoNotUse() {} +Constraint_ParametersEntry_DoNotUse::Constraint_ParametersEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {} +const ::google::protobuf::MessageLite::ClassData* +Constraint_ParametersEntry_DoNotUse::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + nullptr, // tc_table + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(Constraint_ParametersEntry_DoNotUse, _cached_size_), + false, + }, + &Constraint_ParametersEntry_DoNotUse::MergeImpl, + &Constraint_ParametersEntry_DoNotUse::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2fconstraint_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +// =================================================================== + +class Constraint::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(Constraint, _impl_._has_bits_); +}; + +void Constraint::clear_function() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.function_ != nullptr) _impl_.function_->Clear(); + _impl_._has_bits_[0] &= ~0x00000004u; +} +Constraint::Constraint(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:ommx.v1.Constraint) +} +inline PROTOBUF_NDEBUG_INLINE Constraint::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::ommx::v1::Constraint& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + parameters_{visibility, arena, from.parameters_}, + subscripts_{visibility, arena, from.subscripts_}, + _subscripts_cached_byte_size_{0}, + name_(arena, from.name_), + description_(arena, from.description_) {} + +Constraint::Constraint( + ::google::protobuf::Arena* arena, + const Constraint& from) + : ::google::protobuf::Message(arena) { + Constraint* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.function_ = (cached_has_bits & 0x00000004u) ? ::google::protobuf::Message::CopyConstruct<::ommx::v1::Function>( + arena, *from._impl_.function_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, id_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, id_), + offsetof(Impl_, equality_) - + offsetof(Impl_, id_) + + sizeof(Impl_::equality_)); + + // @@protoc_insertion_point(copy_constructor:ommx.v1.Constraint) +} +inline PROTOBUF_NDEBUG_INLINE Constraint::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + parameters_{visibility, arena}, + subscripts_{visibility, arena}, + _subscripts_cached_byte_size_{0}, + name_(arena), + description_(arena) {} + +inline void Constraint::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, function_), + 0, + offsetof(Impl_, equality_) - + offsetof(Impl_, function_) + + sizeof(Impl_::equality_)); +} +Constraint::~Constraint() { + // @@protoc_insertion_point(destructor:ommx.v1.Constraint) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void Constraint::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.name_.Destroy(); + _impl_.description_.Destroy(); + delete _impl_.function_; + _impl_.~Impl_(); +} + +const ::google::protobuf::MessageLite::ClassData* +Constraint::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(Constraint, _impl_._cached_size_), + false, + }, + &Constraint::MergeImpl, + &Constraint::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2fconstraint_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 7, 2, 52, 2> Constraint::_table_ = { + { + PROTOBUF_FIELD_OFFSET(Constraint, _impl_._has_bits_), + 0, // no _extensions_ + 8, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967048, // skipmap + offsetof(decltype(_table_), field_entries), + 7, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_Constraint_default_instance_._instance, + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::ommx::v1::Constraint>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated int64 subscripts = 8; + {::_pbi::TcParser::FastV64P1, + {66, 63, 0, PROTOBUF_FIELD_OFFSET(Constraint, _impl_.subscripts_)}}, + // uint64 id = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Constraint, _impl_.id_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(Constraint, _impl_.id_)}}, + // .ommx.v1.Equality equality = 2; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Constraint, _impl_.equality_), 63>(), + {16, 63, 0, PROTOBUF_FIELD_OFFSET(Constraint, _impl_.equality_)}}, + // .ommx.v1.Function function = 3; + {::_pbi::TcParser::FastMtS1, + {26, 2, 0, PROTOBUF_FIELD_OFFSET(Constraint, _impl_.function_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + // optional string name = 6; + {::_pbi::TcParser::FastUS1, + {50, 0, 0, PROTOBUF_FIELD_OFFSET(Constraint, _impl_.name_)}}, + // optional string description = 7; + {::_pbi::TcParser::FastUS1, + {58, 1, 0, PROTOBUF_FIELD_OFFSET(Constraint, _impl_.description_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 id = 1; + {PROTOBUF_FIELD_OFFSET(Constraint, _impl_.id_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // .ommx.v1.Equality equality = 2; + {PROTOBUF_FIELD_OFFSET(Constraint, _impl_.equality_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, + // .ommx.v1.Function function = 3; + {PROTOBUF_FIELD_OFFSET(Constraint, _impl_.function_), _Internal::kHasBitsOffset + 2, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // map parameters = 5; + {PROTOBUF_FIELD_OFFSET(Constraint, _impl_.parameters_), -1, 1, + (0 | ::_fl::kFcRepeated | ::_fl::kMap)}, + // optional string name = 6; + {PROTOBUF_FIELD_OFFSET(Constraint, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // optional string description = 7; + {PROTOBUF_FIELD_OFFSET(Constraint, _impl_.description_), _Internal::kHasBitsOffset + 1, 0, + (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // repeated int64 subscripts = 8; + {PROTOBUF_FIELD_OFFSET(Constraint, _impl_.subscripts_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt64)}, + }}, {{ + {::_pbi::TcParser::GetTable<::ommx::v1::Function>()}, + {::_pbi::TcParser::GetMapAuxInfo< + decltype(Constraint()._impl_.parameters_)>( + 1, 0, 0, 9, + 9)}, + }}, {{ + "\22\0\0\0\12\4\13\0" + "ommx.v1.Constraint" + "parameters" + "name" + "description" + }}, +}; + +PROTOBUF_NOINLINE void Constraint::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Constraint) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.parameters_.Clear(); + _impl_.subscripts_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.description_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + ABSL_DCHECK(_impl_.function_ != nullptr); + _impl_.function_->Clear(); + } + } + ::memset(&_impl_.id_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.equality_) - + reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.equality_)); + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +::uint8_t* Constraint::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:ommx.v1.Constraint) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // uint64 id = 1; + if (this->_internal_id() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this->_internal_id(), target); + } + + // .ommx.v1.Equality equality = 2; + if (this->_internal_equality() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this->_internal_equality(), target); + } + + cached_has_bits = _impl_._has_bits_[0]; + // .ommx.v1.Function function = 3; + if (cached_has_bits & 0x00000004u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *_impl_.function_, _impl_.function_->GetCachedSize(), target, stream); + } + + // map parameters = 5; + if (!_internal_parameters().empty()) { + using MapType = ::google::protobuf::Map; + using WireHelper = _pbi::MapEntryFuncs; + const auto& field = _internal_parameters(); + + if (stream->IsSerializationDeterministic() && field.size() > 1) { + for (const auto& entry : ::google::protobuf::internal::MapSorterPtr(field)) { + target = WireHelper::InternalSerialize( + 5, entry.first, entry.second, target, stream); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + entry.first.data(), static_cast(entry.first.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.Constraint.parameters"); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + entry.second.data(), static_cast(entry.second.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.Constraint.parameters"); + } + } else { + for (const auto& entry : field) { + target = WireHelper::InternalSerialize( + 5, entry.first, entry.second, target, stream); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + entry.first.data(), static_cast(entry.first.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.Constraint.parameters"); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + entry.second.data(), static_cast(entry.second.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.Constraint.parameters"); + } + } + } + + // optional string name = 6; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this->_internal_name(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.Constraint.name"); + target = stream->WriteStringMaybeAliased(6, _s, target); + } + + // optional string description = 7; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this->_internal_description(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.Constraint.description"); + target = stream->WriteStringMaybeAliased(7, _s, target); + } + + // repeated int64 subscripts = 8; + { + int byte_size = _impl_._subscripts_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt64Packed( + 8, _internal_subscripts(), byte_size, target); + } + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:ommx.v1.Constraint) + return target; +} + +::size_t Constraint::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:ommx.v1.Constraint) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); + // map parameters = 5; + total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_parameters_size()); + for (const auto& entry : _internal_parameters()) { + total_size += _pbi::MapEntryFuncs::ByteSizeLong(entry.first, entry.second); + } + // repeated int64 subscripts = 8; + { + std::size_t data_size = ::_pbi::WireFormatLite::Int64Size( + this->_internal_subscripts()) + ; + _impl_._subscripts_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size)); + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; + } + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional string name = 6; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // optional string description = 7; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_description()); + } + + // .ommx.v1.Function function = 3; + if (cached_has_bits & 0x00000004u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.function_); + } + + } + // uint64 id = 1; + if (this->_internal_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_id()); + } + + // .ommx.v1.Equality equality = 2; + if (this->_internal_equality() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_equality()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void Constraint::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:ommx.v1.Constraint) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.parameters_.MergeFrom(from._impl_.parameters_); + _this->_internal_mutable_subscripts()->MergeFrom(from._internal_subscripts()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_name(from._internal_name()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_description(from._internal_description()); + } + if (cached_has_bits & 0x00000004u) { + ABSL_DCHECK(from._impl_.function_ != nullptr); + if (_this->_impl_.function_ == nullptr) { + _this->_impl_.function_ = + ::google::protobuf::Message::CopyConstruct<::ommx::v1::Function>(arena, *from._impl_.function_); + } else { + _this->_impl_.function_->MergeFrom(*from._impl_.function_); + } + } + } + if (from._internal_id() != 0) { + _this->_impl_.id_ = from._impl_.id_; + } + if (from._internal_equality() != 0) { + _this->_impl_.equality_ = from._impl_.equality_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void Constraint::CopyFrom(const Constraint& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:ommx.v1.Constraint) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void Constraint::InternalSwap(Constraint* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.parameters_.InternalSwap(&other->_impl_.parameters_); + _impl_.subscripts_.InternalSwap(&other->_impl_.subscripts_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.description_, &other->_impl_.description_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(Constraint, _impl_.equality_) + + sizeof(Constraint::_impl_.equality_) + - PROTOBUF_FIELD_OFFSET(Constraint, _impl_.function_)>( + reinterpret_cast(&_impl_.function_), + reinterpret_cast(&other->_impl_.function_)); +} + +::google::protobuf::Metadata Constraint::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + +EvaluatedConstraint_ParametersEntry_DoNotUse::EvaluatedConstraint_ParametersEntry_DoNotUse() {} +EvaluatedConstraint_ParametersEntry_DoNotUse::EvaluatedConstraint_ParametersEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {} +const ::google::protobuf::MessageLite::ClassData* +EvaluatedConstraint_ParametersEntry_DoNotUse::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + nullptr, // tc_table + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(EvaluatedConstraint_ParametersEntry_DoNotUse, _cached_size_), + false, + }, + &EvaluatedConstraint_ParametersEntry_DoNotUse::MergeImpl, + &EvaluatedConstraint_ParametersEntry_DoNotUse::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2fconstraint_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +// =================================================================== + +class EvaluatedConstraint::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_._has_bits_); +}; + +EvaluatedConstraint::EvaluatedConstraint(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:ommx.v1.EvaluatedConstraint) +} +inline PROTOBUF_NDEBUG_INLINE EvaluatedConstraint::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::ommx::v1::EvaluatedConstraint& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + used_decision_variable_ids_{visibility, arena, from.used_decision_variable_ids_}, + _used_decision_variable_ids_cached_byte_size_{0}, + parameters_{visibility, arena, from.parameters_}, + subscripts_{visibility, arena, from.subscripts_}, + _subscripts_cached_byte_size_{0}, + name_(arena, from.name_), + description_(arena, from.description_) {} + +EvaluatedConstraint::EvaluatedConstraint( + ::google::protobuf::Arena* arena, + const EvaluatedConstraint& from) + : ::google::protobuf::Message(arena) { + EvaluatedConstraint* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, id_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, id_), + offsetof(Impl_, equality_) - + offsetof(Impl_, id_) + + sizeof(Impl_::equality_)); + + // @@protoc_insertion_point(copy_constructor:ommx.v1.EvaluatedConstraint) +} +inline PROTOBUF_NDEBUG_INLINE EvaluatedConstraint::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + used_decision_variable_ids_{visibility, arena}, + _used_decision_variable_ids_cached_byte_size_{0}, + parameters_{visibility, arena}, + subscripts_{visibility, arena}, + _subscripts_cached_byte_size_{0}, + name_(arena), + description_(arena) {} + +inline void EvaluatedConstraint::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, id_), + 0, + offsetof(Impl_, equality_) - + offsetof(Impl_, id_) + + sizeof(Impl_::equality_)); +} +EvaluatedConstraint::~EvaluatedConstraint() { + // @@protoc_insertion_point(destructor:ommx.v1.EvaluatedConstraint) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void EvaluatedConstraint::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.name_.Destroy(); + _impl_.description_.Destroy(); + _impl_.~Impl_(); +} + +const ::google::protobuf::MessageLite::ClassData* +EvaluatedConstraint::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_._cached_size_), + false, + }, + &EvaluatedConstraint::MergeImpl, + &EvaluatedConstraint::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2fconstraint_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<4, 9, 1, 69, 2> EvaluatedConstraint::_table_ = { + { + PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_._has_bits_), + 0, // no _extensions_ + 9, 120, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294966784, // skipmap + offsetof(decltype(_table_), field_entries), + 9, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_EvaluatedConstraint_default_instance_._instance, + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::ommx::v1::EvaluatedConstraint>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint64 id = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(EvaluatedConstraint, _impl_.id_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.id_)}}, + // .ommx.v1.Equality equality = 2; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(EvaluatedConstraint, _impl_.equality_), 63>(), + {16, 63, 0, PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.equality_)}}, + // double evaluated_value = 3; + {::_pbi::TcParser::FastF64S1, + {25, 63, 0, PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.evaluated_value_)}}, + // repeated uint64 used_decision_variable_ids = 4; + {::_pbi::TcParser::FastV64P1, + {34, 63, 0, PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.used_decision_variable_ids_)}}, + {::_pbi::TcParser::MiniParse, {}}, + // optional string name = 6; + {::_pbi::TcParser::FastUS1, + {50, 0, 0, PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.name_)}}, + // optional string description = 7; + {::_pbi::TcParser::FastUS1, + {58, 1, 0, PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.description_)}}, + // optional double dual_variable = 8; + {::_pbi::TcParser::FastF64S1, + {65, 2, 0, PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.dual_variable_)}}, + // repeated int64 subscripts = 9; + {::_pbi::TcParser::FastV64P1, + {74, 63, 0, PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.subscripts_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 id = 1; + {PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.id_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // .ommx.v1.Equality equality = 2; + {PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.equality_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, + // double evaluated_value = 3; + {PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.evaluated_value_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // repeated uint64 used_decision_variable_ids = 4; + {PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.used_decision_variable_ids_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt64)}, + // map parameters = 5; + {PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.parameters_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kMap)}, + // optional string name = 6; + {PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // optional string description = 7; + {PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.description_), _Internal::kHasBitsOffset + 1, 0, + (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // optional double dual_variable = 8; + {PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.dual_variable_), _Internal::kHasBitsOffset + 2, 0, + (0 | ::_fl::kFcOptional | ::_fl::kDouble)}, + // repeated int64 subscripts = 9; + {PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.subscripts_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt64)}, + }}, {{ + {::_pbi::TcParser::GetMapAuxInfo< + decltype(EvaluatedConstraint()._impl_.parameters_)>( + 1, 0, 0, 9, + 9)}, + }}, {{ + "\33\0\0\0\0\12\4\13\0\0\0\0\0\0\0\0" + "ommx.v1.EvaluatedConstraint" + "parameters" + "name" + "description" + }}, +}; + +PROTOBUF_NOINLINE void EvaluatedConstraint::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.EvaluatedConstraint) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.used_decision_variable_ids_.Clear(); + _impl_.parameters_.Clear(); + _impl_.subscripts_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.description_.ClearNonDefaultToEmpty(); + } + } + ::memset(&_impl_.id_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.evaluated_value_) - + reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.evaluated_value_)); + _impl_.dual_variable_ = 0; + _impl_.equality_ = 0; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +::uint8_t* EvaluatedConstraint::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:ommx.v1.EvaluatedConstraint) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // uint64 id = 1; + if (this->_internal_id() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this->_internal_id(), target); + } + + // .ommx.v1.Equality equality = 2; + if (this->_internal_equality() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this->_internal_equality(), target); + } + + // double evaluated_value = 3; + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_evaluated_value = this->_internal_evaluated_value(); + ::uint64_t raw_evaluated_value; + memcpy(&raw_evaluated_value, &tmp_evaluated_value, sizeof(tmp_evaluated_value)); + if (raw_evaluated_value != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 3, this->_internal_evaluated_value(), target); + } + + // repeated uint64 used_decision_variable_ids = 4; + { + int byte_size = _impl_._used_decision_variable_ids_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteUInt64Packed( + 4, _internal_used_decision_variable_ids(), byte_size, target); + } + } + + // map parameters = 5; + if (!_internal_parameters().empty()) { + using MapType = ::google::protobuf::Map; + using WireHelper = _pbi::MapEntryFuncs; + const auto& field = _internal_parameters(); + + if (stream->IsSerializationDeterministic() && field.size() > 1) { + for (const auto& entry : ::google::protobuf::internal::MapSorterPtr(field)) { + target = WireHelper::InternalSerialize( + 5, entry.first, entry.second, target, stream); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + entry.first.data(), static_cast(entry.first.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.EvaluatedConstraint.parameters"); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + entry.second.data(), static_cast(entry.second.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.EvaluatedConstraint.parameters"); + } + } else { + for (const auto& entry : field) { + target = WireHelper::InternalSerialize( + 5, entry.first, entry.second, target, stream); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + entry.first.data(), static_cast(entry.first.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.EvaluatedConstraint.parameters"); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + entry.second.data(), static_cast(entry.second.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.EvaluatedConstraint.parameters"); + } + } + } + + cached_has_bits = _impl_._has_bits_[0]; + // optional string name = 6; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this->_internal_name(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.EvaluatedConstraint.name"); + target = stream->WriteStringMaybeAliased(6, _s, target); + } + + // optional string description = 7; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this->_internal_description(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.EvaluatedConstraint.description"); + target = stream->WriteStringMaybeAliased(7, _s, target); + } + + // optional double dual_variable = 8; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 8, this->_internal_dual_variable(), target); + } + + // repeated int64 subscripts = 9; + { + int byte_size = _impl_._subscripts_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt64Packed( + 9, _internal_subscripts(), byte_size, target); + } + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:ommx.v1.EvaluatedConstraint) + return target; +} + +::size_t EvaluatedConstraint::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:ommx.v1.EvaluatedConstraint) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); + // repeated uint64 used_decision_variable_ids = 4; + { + std::size_t data_size = ::_pbi::WireFormatLite::UInt64Size( + this->_internal_used_decision_variable_ids()) + ; + _impl_._used_decision_variable_ids_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size)); + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; + } + // map parameters = 5; + total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_parameters_size()); + for (const auto& entry : _internal_parameters()) { + total_size += _pbi::MapEntryFuncs::ByteSizeLong(entry.first, entry.second); + } + // repeated int64 subscripts = 9; + { + std::size_t data_size = ::_pbi::WireFormatLite::Int64Size( + this->_internal_subscripts()) + ; + _impl_._subscripts_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size)); + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; + } + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string name = 6; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // optional string description = 7; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_description()); + } + + } + // uint64 id = 1; + if (this->_internal_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_id()); + } + + // double evaluated_value = 3; + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_evaluated_value = this->_internal_evaluated_value(); + ::uint64_t raw_evaluated_value; + memcpy(&raw_evaluated_value, &tmp_evaluated_value, sizeof(tmp_evaluated_value)); + if (raw_evaluated_value != 0) { + total_size += 9; + } + + // optional double dual_variable = 8; + if (cached_has_bits & 0x00000004u) { + total_size += 9; + } + + // .ommx.v1.Equality equality = 2; + if (this->_internal_equality() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_equality()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void EvaluatedConstraint::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:ommx.v1.EvaluatedConstraint) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_used_decision_variable_ids()->MergeFrom(from._internal_used_decision_variable_ids()); + _this->_impl_.parameters_.MergeFrom(from._impl_.parameters_); + _this->_internal_mutable_subscripts()->MergeFrom(from._internal_subscripts()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_name(from._internal_name()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_description(from._internal_description()); + } + } + if (from._internal_id() != 0) { + _this->_impl_.id_ = from._impl_.id_; + } + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_evaluated_value = from._internal_evaluated_value(); + ::uint64_t raw_evaluated_value; + memcpy(&raw_evaluated_value, &tmp_evaluated_value, sizeof(tmp_evaluated_value)); + if (raw_evaluated_value != 0) { + _this->_impl_.evaluated_value_ = from._impl_.evaluated_value_; + } + if (cached_has_bits & 0x00000004u) { + _this->_impl_.dual_variable_ = from._impl_.dual_variable_; + } + if (from._internal_equality() != 0) { + _this->_impl_.equality_ = from._impl_.equality_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void EvaluatedConstraint::CopyFrom(const EvaluatedConstraint& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:ommx.v1.EvaluatedConstraint) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void EvaluatedConstraint::InternalSwap(EvaluatedConstraint* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.used_decision_variable_ids_.InternalSwap(&other->_impl_.used_decision_variable_ids_); + _impl_.parameters_.InternalSwap(&other->_impl_.parameters_); + _impl_.subscripts_.InternalSwap(&other->_impl_.subscripts_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.description_, &other->_impl_.description_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.equality_) + + sizeof(EvaluatedConstraint::_impl_.equality_) + - PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.id_)>( + reinterpret_cast(&_impl_.id_), + reinterpret_cast(&other->_impl_.id_)); +} + +::google::protobuf::Metadata EvaluatedConstraint::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace ommx +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google +// @@protoc_insertion_point(global_scope) +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type + _static_init2_ PROTOBUF_UNUSED = + (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2fconstraint_2eproto), + ::std::false_type{}); +#include "google/protobuf/port_undef.inc" diff --git a/cpp/ommx/v1/constraint.pb.h b/cpp/ommx/v1/constraint.pb.h new file mode 100644 index 00000000..6654b972 --- /dev/null +++ b/cpp/ommx/v1/constraint.pb.h @@ -0,0 +1,1510 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: ommx/v1/constraint.proto +// Protobuf C++ Version: 5.27.3 + +#ifndef GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fconstraint_2eproto_2epb_2eh +#define GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fconstraint_2eproto_2epb_2eh + +#include +#include +#include +#include + +#include "google/protobuf/runtime_version.h" +#if PROTOBUF_VERSION != 5027003 +#error "Protobuf C++ gencode is built with an incompatible version of" +#error "Protobuf C++ headers/runtime. See" +#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" +#endif +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/message.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export +#include "google/protobuf/map.h" // IWYU pragma: export +#include "google/protobuf/map_entry.h" +#include "google/protobuf/map_field_inl.h" +#include "google/protobuf/generated_enum_reflection.h" +#include "google/protobuf/unknown_field_set.h" +#include "ommx/v1/function.pb.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" + +#define PROTOBUF_INTERNAL_EXPORT_ommx_2fv1_2fconstraint_2eproto + +namespace google { +namespace protobuf { +namespace internal { +class AnyMetadata; +} // namespace internal +} // namespace protobuf +} // namespace google + +// Internal implementation detail -- do not use these members. +struct TableStruct_ommx_2fv1_2fconstraint_2eproto { + static const ::uint32_t offsets[]; +}; +extern const ::google::protobuf::internal::DescriptorTable + descriptor_table_ommx_2fv1_2fconstraint_2eproto; +namespace ommx { +namespace v1 { +class Constraint; +struct ConstraintDefaultTypeInternal; +extern ConstraintDefaultTypeInternal _Constraint_default_instance_; +class Constraint_ParametersEntry_DoNotUse; +struct Constraint_ParametersEntry_DoNotUseDefaultTypeInternal; +extern Constraint_ParametersEntry_DoNotUseDefaultTypeInternal _Constraint_ParametersEntry_DoNotUse_default_instance_; +class EvaluatedConstraint; +struct EvaluatedConstraintDefaultTypeInternal; +extern EvaluatedConstraintDefaultTypeInternal _EvaluatedConstraint_default_instance_; +class EvaluatedConstraint_ParametersEntry_DoNotUse; +struct EvaluatedConstraint_ParametersEntry_DoNotUseDefaultTypeInternal; +extern EvaluatedConstraint_ParametersEntry_DoNotUseDefaultTypeInternal _EvaluatedConstraint_ParametersEntry_DoNotUse_default_instance_; +} // namespace v1 +} // namespace ommx +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google + +namespace ommx { +namespace v1 { +enum Equality : int { + EQUALITY_UNSPECIFIED = 0, + EQUALITY_EQUAL_TO_ZERO = 1, + EQUALITY_LESS_THAN_OR_EQUAL_TO_ZERO = 2, + Equality_INT_MIN_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::min(), + Equality_INT_MAX_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::max(), +}; + +bool Equality_IsValid(int value); +extern const uint32_t Equality_internal_data_[]; +constexpr Equality Equality_MIN = static_cast(0); +constexpr Equality Equality_MAX = static_cast(2); +constexpr int Equality_ARRAYSIZE = 2 + 1; +const ::google::protobuf::EnumDescriptor* +Equality_descriptor(); +template +const std::string& Equality_Name(T value) { + static_assert(std::is_same::value || + std::is_integral::value, + "Incorrect type passed to Equality_Name()."); + return Equality_Name(static_cast(value)); +} +template <> +inline const std::string& Equality_Name(Equality value) { + return ::google::protobuf::internal::NameOfDenseEnum( + static_cast(value)); +} +inline bool Equality_Parse(absl::string_view name, Equality* value) { + return ::google::protobuf::internal::ParseNamedEnum( + Equality_descriptor(), name, value); +} + +// =================================================================== + + +// ------------------------------------------------------------------- + +class EvaluatedConstraint_ParametersEntry_DoNotUse final + : public ::google::protobuf::internal::MapEntry< + EvaluatedConstraint_ParametersEntry_DoNotUse, std::string, std::string, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING> { + public: + using SuperType = ::google::protobuf::internal::MapEntry< + EvaluatedConstraint_ParametersEntry_DoNotUse, std::string, std::string, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING>; + EvaluatedConstraint_ParametersEntry_DoNotUse(); + template + explicit PROTOBUF_CONSTEXPR EvaluatedConstraint_ParametersEntry_DoNotUse( + ::google::protobuf::internal::ConstantInitialized); + explicit EvaluatedConstraint_ParametersEntry_DoNotUse(::google::protobuf::Arena* arena); + static const EvaluatedConstraint_ParametersEntry_DoNotUse* internal_default_instance() { + return reinterpret_cast( + &_EvaluatedConstraint_ParametersEntry_DoNotUse_default_instance_); + } +const ::google::protobuf::Message::ClassData* GetClassData() const final; + friend struct ::TableStruct_ommx_2fv1_2fconstraint_2eproto; +}; +// ------------------------------------------------------------------- + +class Constraint_ParametersEntry_DoNotUse final + : public ::google::protobuf::internal::MapEntry< + Constraint_ParametersEntry_DoNotUse, std::string, std::string, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING> { + public: + using SuperType = ::google::protobuf::internal::MapEntry< + Constraint_ParametersEntry_DoNotUse, std::string, std::string, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING>; + Constraint_ParametersEntry_DoNotUse(); + template + explicit PROTOBUF_CONSTEXPR Constraint_ParametersEntry_DoNotUse( + ::google::protobuf::internal::ConstantInitialized); + explicit Constraint_ParametersEntry_DoNotUse(::google::protobuf::Arena* arena); + static const Constraint_ParametersEntry_DoNotUse* internal_default_instance() { + return reinterpret_cast( + &_Constraint_ParametersEntry_DoNotUse_default_instance_); + } +const ::google::protobuf::Message::ClassData* GetClassData() const final; + friend struct ::TableStruct_ommx_2fv1_2fconstraint_2eproto; +}; +// ------------------------------------------------------------------- + +class EvaluatedConstraint final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:ommx.v1.EvaluatedConstraint) */ { + public: + inline EvaluatedConstraint() : EvaluatedConstraint(nullptr) {} + ~EvaluatedConstraint() override; + template + explicit PROTOBUF_CONSTEXPR EvaluatedConstraint( + ::google::protobuf::internal::ConstantInitialized); + + inline EvaluatedConstraint(const EvaluatedConstraint& from) : EvaluatedConstraint(nullptr, from) {} + inline EvaluatedConstraint(EvaluatedConstraint&& from) noexcept + : EvaluatedConstraint(nullptr, std::move(from)) {} + inline EvaluatedConstraint& operator=(const EvaluatedConstraint& from) { + CopyFrom(from); + return *this; + } + inline EvaluatedConstraint& operator=(EvaluatedConstraint&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const EvaluatedConstraint& default_instance() { + return *internal_default_instance(); + } + static inline const EvaluatedConstraint* internal_default_instance() { + return reinterpret_cast( + &_EvaluatedConstraint_default_instance_); + } + static constexpr int kIndexInFileMessages = 3; + friend void swap(EvaluatedConstraint& a, EvaluatedConstraint& b) { a.Swap(&b); } + inline void Swap(EvaluatedConstraint* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(EvaluatedConstraint* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + EvaluatedConstraint* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const EvaluatedConstraint& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const EvaluatedConstraint& from) { EvaluatedConstraint::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(EvaluatedConstraint* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "ommx.v1.EvaluatedConstraint"; } + + protected: + explicit EvaluatedConstraint(::google::protobuf::Arena* arena); + EvaluatedConstraint(::google::protobuf::Arena* arena, const EvaluatedConstraint& from); + EvaluatedConstraint(::google::protobuf::Arena* arena, EvaluatedConstraint&& from) noexcept + : EvaluatedConstraint(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::Message::ClassData* GetClassData() const final; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kUsedDecisionVariableIdsFieldNumber = 4, + kParametersFieldNumber = 5, + kSubscriptsFieldNumber = 9, + kNameFieldNumber = 6, + kDescriptionFieldNumber = 7, + kIdFieldNumber = 1, + kEvaluatedValueFieldNumber = 3, + kDualVariableFieldNumber = 8, + kEqualityFieldNumber = 2, + }; + // repeated uint64 used_decision_variable_ids = 4; + int used_decision_variable_ids_size() const; + private: + int _internal_used_decision_variable_ids_size() const; + + public: + void clear_used_decision_variable_ids() ; + ::uint64_t used_decision_variable_ids(int index) const; + void set_used_decision_variable_ids(int index, ::uint64_t value); + void add_used_decision_variable_ids(::uint64_t value); + const ::google::protobuf::RepeatedField<::uint64_t>& used_decision_variable_ids() const; + ::google::protobuf::RepeatedField<::uint64_t>* mutable_used_decision_variable_ids(); + + private: + const ::google::protobuf::RepeatedField<::uint64_t>& _internal_used_decision_variable_ids() const; + ::google::protobuf::RepeatedField<::uint64_t>* _internal_mutable_used_decision_variable_ids(); + + public: + // map parameters = 5; + int parameters_size() const; + private: + int _internal_parameters_size() const; + + public: + void clear_parameters() ; + const ::google::protobuf::Map& parameters() const; + ::google::protobuf::Map* mutable_parameters(); + + private: + const ::google::protobuf::Map& _internal_parameters() const; + ::google::protobuf::Map* _internal_mutable_parameters(); + + public: + // repeated int64 subscripts = 9; + int subscripts_size() const; + private: + int _internal_subscripts_size() const; + + public: + void clear_subscripts() ; + ::int64_t subscripts(int index) const; + void set_subscripts(int index, ::int64_t value); + void add_subscripts(::int64_t value); + const ::google::protobuf::RepeatedField<::int64_t>& subscripts() const; + ::google::protobuf::RepeatedField<::int64_t>* mutable_subscripts(); + + private: + const ::google::protobuf::RepeatedField<::int64_t>& _internal_subscripts() const; + ::google::protobuf::RepeatedField<::int64_t>* _internal_mutable_subscripts(); + + public: + // optional string name = 6; + bool has_name() const; + void clear_name() ; + const std::string& name() const; + template + void set_name(Arg_&& arg, Args_... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* value); + + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( + const std::string& value); + std::string* _internal_mutable_name(); + + public: + // optional string description = 7; + bool has_description() const; + void clear_description() ; + const std::string& description() const; + template + void set_description(Arg_&& arg, Args_... args); + std::string* mutable_description(); + PROTOBUF_NODISCARD std::string* release_description(); + void set_allocated_description(std::string* value); + + private: + const std::string& _internal_description() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_description( + const std::string& value); + std::string* _internal_mutable_description(); + + public: + // uint64 id = 1; + void clear_id() ; + ::uint64_t id() const; + void set_id(::uint64_t value); + + private: + ::uint64_t _internal_id() const; + void _internal_set_id(::uint64_t value); + + public: + // double evaluated_value = 3; + void clear_evaluated_value() ; + double evaluated_value() const; + void set_evaluated_value(double value); + + private: + double _internal_evaluated_value() const; + void _internal_set_evaluated_value(double value); + + public: + // optional double dual_variable = 8; + bool has_dual_variable() const; + void clear_dual_variable() ; + double dual_variable() const; + void set_dual_variable(double value); + + private: + double _internal_dual_variable() const; + void _internal_set_dual_variable(double value); + + public: + // .ommx.v1.Equality equality = 2; + void clear_equality() ; + ::ommx::v1::Equality equality() const; + void set_equality(::ommx::v1::Equality value); + + private: + ::ommx::v1::Equality _internal_equality() const; + void _internal_set_equality(::ommx::v1::Equality value); + + public: + // @@protoc_insertion_point(class_scope:ommx.v1.EvaluatedConstraint) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 4, 9, 1, + 69, 2> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_EvaluatedConstraint_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const EvaluatedConstraint& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedField<::uint64_t> used_decision_variable_ids_; + mutable ::google::protobuf::internal::CachedSize _used_decision_variable_ids_cached_byte_size_; + ::google::protobuf::internal::MapField + parameters_; + ::google::protobuf::RepeatedField<::int64_t> subscripts_; + mutable ::google::protobuf::internal::CachedSize _subscripts_cached_byte_size_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr description_; + ::uint64_t id_; + double evaluated_value_; + double dual_variable_; + int equality_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_ommx_2fv1_2fconstraint_2eproto; +}; +// ------------------------------------------------------------------- + +class Constraint final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:ommx.v1.Constraint) */ { + public: + inline Constraint() : Constraint(nullptr) {} + ~Constraint() override; + template + explicit PROTOBUF_CONSTEXPR Constraint( + ::google::protobuf::internal::ConstantInitialized); + + inline Constraint(const Constraint& from) : Constraint(nullptr, from) {} + inline Constraint(Constraint&& from) noexcept + : Constraint(nullptr, std::move(from)) {} + inline Constraint& operator=(const Constraint& from) { + CopyFrom(from); + return *this; + } + inline Constraint& operator=(Constraint&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Constraint& default_instance() { + return *internal_default_instance(); + } + static inline const Constraint* internal_default_instance() { + return reinterpret_cast( + &_Constraint_default_instance_); + } + static constexpr int kIndexInFileMessages = 1; + friend void swap(Constraint& a, Constraint& b) { a.Swap(&b); } + inline void Swap(Constraint* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Constraint* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Constraint* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Constraint& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const Constraint& from) { Constraint::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(Constraint* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "ommx.v1.Constraint"; } + + protected: + explicit Constraint(::google::protobuf::Arena* arena); + Constraint(::google::protobuf::Arena* arena, const Constraint& from); + Constraint(::google::protobuf::Arena* arena, Constraint&& from) noexcept + : Constraint(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::Message::ClassData* GetClassData() const final; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kParametersFieldNumber = 5, + kSubscriptsFieldNumber = 8, + kNameFieldNumber = 6, + kDescriptionFieldNumber = 7, + kFunctionFieldNumber = 3, + kIdFieldNumber = 1, + kEqualityFieldNumber = 2, + }; + // map parameters = 5; + int parameters_size() const; + private: + int _internal_parameters_size() const; + + public: + void clear_parameters() ; + const ::google::protobuf::Map& parameters() const; + ::google::protobuf::Map* mutable_parameters(); + + private: + const ::google::protobuf::Map& _internal_parameters() const; + ::google::protobuf::Map* _internal_mutable_parameters(); + + public: + // repeated int64 subscripts = 8; + int subscripts_size() const; + private: + int _internal_subscripts_size() const; + + public: + void clear_subscripts() ; + ::int64_t subscripts(int index) const; + void set_subscripts(int index, ::int64_t value); + void add_subscripts(::int64_t value); + const ::google::protobuf::RepeatedField<::int64_t>& subscripts() const; + ::google::protobuf::RepeatedField<::int64_t>* mutable_subscripts(); + + private: + const ::google::protobuf::RepeatedField<::int64_t>& _internal_subscripts() const; + ::google::protobuf::RepeatedField<::int64_t>* _internal_mutable_subscripts(); + + public: + // optional string name = 6; + bool has_name() const; + void clear_name() ; + const std::string& name() const; + template + void set_name(Arg_&& arg, Args_... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* value); + + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( + const std::string& value); + std::string* _internal_mutable_name(); + + public: + // optional string description = 7; + bool has_description() const; + void clear_description() ; + const std::string& description() const; + template + void set_description(Arg_&& arg, Args_... args); + std::string* mutable_description(); + PROTOBUF_NODISCARD std::string* release_description(); + void set_allocated_description(std::string* value); + + private: + const std::string& _internal_description() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_description( + const std::string& value); + std::string* _internal_mutable_description(); + + public: + // .ommx.v1.Function function = 3; + bool has_function() const; + void clear_function() ; + const ::ommx::v1::Function& function() const; + PROTOBUF_NODISCARD ::ommx::v1::Function* release_function(); + ::ommx::v1::Function* mutable_function(); + void set_allocated_function(::ommx::v1::Function* value); + void unsafe_arena_set_allocated_function(::ommx::v1::Function* value); + ::ommx::v1::Function* unsafe_arena_release_function(); + + private: + const ::ommx::v1::Function& _internal_function() const; + ::ommx::v1::Function* _internal_mutable_function(); + + public: + // uint64 id = 1; + void clear_id() ; + ::uint64_t id() const; + void set_id(::uint64_t value); + + private: + ::uint64_t _internal_id() const; + void _internal_set_id(::uint64_t value); + + public: + // .ommx.v1.Equality equality = 2; + void clear_equality() ; + ::ommx::v1::Equality equality() const; + void set_equality(::ommx::v1::Equality value); + + private: + ::ommx::v1::Equality _internal_equality() const; + void _internal_set_equality(::ommx::v1::Equality value); + + public: + // @@protoc_insertion_point(class_scope:ommx.v1.Constraint) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 3, 7, 2, + 52, 2> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_Constraint_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const Constraint& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::internal::MapField + parameters_; + ::google::protobuf::RepeatedField<::int64_t> subscripts_; + mutable ::google::protobuf::internal::CachedSize _subscripts_cached_byte_size_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr description_; + ::ommx::v1::Function* function_; + ::uint64_t id_; + int equality_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_ommx_2fv1_2fconstraint_2eproto; +}; + +// =================================================================== + + + + +// =================================================================== + + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// Constraint + +// uint64 id = 1; +inline void Constraint::clear_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.id_ = ::uint64_t{0u}; +} +inline ::uint64_t Constraint::id() const { + // @@protoc_insertion_point(field_get:ommx.v1.Constraint.id) + return _internal_id(); +} +inline void Constraint::set_id(::uint64_t value) { + _internal_set_id(value); + // @@protoc_insertion_point(field_set:ommx.v1.Constraint.id) +} +inline ::uint64_t Constraint::_internal_id() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.id_; +} +inline void Constraint::_internal_set_id(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.id_ = value; +} + +// .ommx.v1.Equality equality = 2; +inline void Constraint::clear_equality() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.equality_ = 0; +} +inline ::ommx::v1::Equality Constraint::equality() const { + // @@protoc_insertion_point(field_get:ommx.v1.Constraint.equality) + return _internal_equality(); +} +inline void Constraint::set_equality(::ommx::v1::Equality value) { + _internal_set_equality(value); + // @@protoc_insertion_point(field_set:ommx.v1.Constraint.equality) +} +inline ::ommx::v1::Equality Constraint::_internal_equality() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return static_cast<::ommx::v1::Equality>(_impl_.equality_); +} +inline void Constraint::_internal_set_equality(::ommx::v1::Equality value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.equality_ = value; +} + +// .ommx.v1.Function function = 3; +inline bool Constraint::has_function() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || _impl_.function_ != nullptr); + return value; +} +inline const ::ommx::v1::Function& Constraint::_internal_function() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::ommx::v1::Function* p = _impl_.function_; + return p != nullptr ? *p : reinterpret_cast(::ommx::v1::_Function_default_instance_); +} +inline const ::ommx::v1::Function& Constraint::function() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Constraint.function) + return _internal_function(); +} +inline void Constraint::unsafe_arena_set_allocated_function(::ommx::v1::Function* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.function_); + } + _impl_.function_ = reinterpret_cast<::ommx::v1::Function*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ommx.v1.Constraint.function) +} +inline ::ommx::v1::Function* Constraint::release_function() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000004u; + ::ommx::v1::Function* released = _impl_.function_; + _impl_.function_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return released; +} +inline ::ommx::v1::Function* Constraint::unsafe_arena_release_function() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:ommx.v1.Constraint.function) + + _impl_._has_bits_[0] &= ~0x00000004u; + ::ommx::v1::Function* temp = _impl_.function_; + _impl_.function_ = nullptr; + return temp; +} +inline ::ommx::v1::Function* Constraint::_internal_mutable_function() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.function_ == nullptr) { + auto* p = ::google::protobuf::Message::DefaultConstruct<::ommx::v1::Function>(GetArena()); + _impl_.function_ = reinterpret_cast<::ommx::v1::Function*>(p); + } + return _impl_.function_; +} +inline ::ommx::v1::Function* Constraint::mutable_function() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000004u; + ::ommx::v1::Function* _msg = _internal_mutable_function(); + // @@protoc_insertion_point(field_mutable:ommx.v1.Constraint.function) + return _msg; +} +inline void Constraint::set_allocated_function(::ommx::v1::Function* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.function_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + + _impl_.function_ = reinterpret_cast<::ommx::v1::Function*>(value); + // @@protoc_insertion_point(field_set_allocated:ommx.v1.Constraint.function) +} + +// repeated int64 subscripts = 8; +inline int Constraint::_internal_subscripts_size() const { + return _internal_subscripts().size(); +} +inline int Constraint::subscripts_size() const { + return _internal_subscripts_size(); +} +inline void Constraint::clear_subscripts() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.subscripts_.Clear(); +} +inline ::int64_t Constraint::subscripts(int index) const { + // @@protoc_insertion_point(field_get:ommx.v1.Constraint.subscripts) + return _internal_subscripts().Get(index); +} +inline void Constraint::set_subscripts(int index, ::int64_t value) { + _internal_mutable_subscripts()->Set(index, value); + // @@protoc_insertion_point(field_set:ommx.v1.Constraint.subscripts) +} +inline void Constraint::add_subscripts(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_subscripts()->Add(value); + // @@protoc_insertion_point(field_add:ommx.v1.Constraint.subscripts) +} +inline const ::google::protobuf::RepeatedField<::int64_t>& Constraint::subscripts() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:ommx.v1.Constraint.subscripts) + return _internal_subscripts(); +} +inline ::google::protobuf::RepeatedField<::int64_t>* Constraint::mutable_subscripts() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:ommx.v1.Constraint.subscripts) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_subscripts(); +} +inline const ::google::protobuf::RepeatedField<::int64_t>& +Constraint::_internal_subscripts() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.subscripts_; +} +inline ::google::protobuf::RepeatedField<::int64_t>* Constraint::_internal_mutable_subscripts() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.subscripts_; +} + +// map parameters = 5; +inline int Constraint::_internal_parameters_size() const { + return _internal_parameters().size(); +} +inline int Constraint::parameters_size() const { + return _internal_parameters_size(); +} +inline void Constraint::clear_parameters() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.parameters_.Clear(); +} +inline const ::google::protobuf::Map& Constraint::_internal_parameters() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.parameters_.GetMap(); +} +inline const ::google::protobuf::Map& Constraint::parameters() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_map:ommx.v1.Constraint.parameters) + return _internal_parameters(); +} +inline ::google::protobuf::Map* Constraint::_internal_mutable_parameters() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.parameters_.MutableMap(); +} +inline ::google::protobuf::Map* Constraint::mutable_parameters() ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_map:ommx.v1.Constraint.parameters) + return _internal_mutable_parameters(); +} + +// optional string name = 6; +inline bool Constraint::has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline void Constraint::clear_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Constraint::name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Constraint.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE void Constraint::set_name(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:ommx.v1.Constraint.name) +} +inline std::string* Constraint::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:ommx.v1.Constraint.name) + return _s; +} +inline const std::string& Constraint::_internal_name() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.name_.Get(); +} +inline void Constraint::_internal_set_name(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArena()); +} +inline std::string* Constraint::_internal_mutable_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable( GetArena()); +} +inline std::string* Constraint::release_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:ommx.v1.Constraint.name) + if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* released = _impl_.name_.Release(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArena()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return released; +} +inline void Constraint::set_allocated_name(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.name_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:ommx.v1.Constraint.name) +} + +// optional string description = 7; +inline bool Constraint::has_description() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline void Constraint::clear_description() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.description_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& Constraint::description() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Constraint.description) + return _internal_description(); +} +template +inline PROTOBUF_ALWAYS_INLINE void Constraint::set_description(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.description_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:ommx.v1.Constraint.description) +} +inline std::string* Constraint::mutable_description() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_description(); + // @@protoc_insertion_point(field_mutable:ommx.v1.Constraint.description) + return _s; +} +inline const std::string& Constraint::_internal_description() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.description_.Get(); +} +inline void Constraint::_internal_set_description(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.description_.Set(value, GetArena()); +} +inline std::string* Constraint::_internal_mutable_description() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.description_.Mutable( GetArena()); +} +inline std::string* Constraint::release_description() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:ommx.v1.Constraint.description) + if ((_impl_._has_bits_[0] & 0x00000002u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* released = _impl_.description_.Release(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.description_.Set("", GetArena()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return released; +} +inline void Constraint::set_allocated_description(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.description_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.description_.IsDefault()) { + _impl_.description_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:ommx.v1.Constraint.description) +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// EvaluatedConstraint + +// uint64 id = 1; +inline void EvaluatedConstraint::clear_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.id_ = ::uint64_t{0u}; +} +inline ::uint64_t EvaluatedConstraint::id() const { + // @@protoc_insertion_point(field_get:ommx.v1.EvaluatedConstraint.id) + return _internal_id(); +} +inline void EvaluatedConstraint::set_id(::uint64_t value) { + _internal_set_id(value); + // @@protoc_insertion_point(field_set:ommx.v1.EvaluatedConstraint.id) +} +inline ::uint64_t EvaluatedConstraint::_internal_id() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.id_; +} +inline void EvaluatedConstraint::_internal_set_id(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.id_ = value; +} + +// .ommx.v1.Equality equality = 2; +inline void EvaluatedConstraint::clear_equality() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.equality_ = 0; +} +inline ::ommx::v1::Equality EvaluatedConstraint::equality() const { + // @@protoc_insertion_point(field_get:ommx.v1.EvaluatedConstraint.equality) + return _internal_equality(); +} +inline void EvaluatedConstraint::set_equality(::ommx::v1::Equality value) { + _internal_set_equality(value); + // @@protoc_insertion_point(field_set:ommx.v1.EvaluatedConstraint.equality) +} +inline ::ommx::v1::Equality EvaluatedConstraint::_internal_equality() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return static_cast<::ommx::v1::Equality>(_impl_.equality_); +} +inline void EvaluatedConstraint::_internal_set_equality(::ommx::v1::Equality value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.equality_ = value; +} + +// double evaluated_value = 3; +inline void EvaluatedConstraint::clear_evaluated_value() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.evaluated_value_ = 0; +} +inline double EvaluatedConstraint::evaluated_value() const { + // @@protoc_insertion_point(field_get:ommx.v1.EvaluatedConstraint.evaluated_value) + return _internal_evaluated_value(); +} +inline void EvaluatedConstraint::set_evaluated_value(double value) { + _internal_set_evaluated_value(value); + // @@protoc_insertion_point(field_set:ommx.v1.EvaluatedConstraint.evaluated_value) +} +inline double EvaluatedConstraint::_internal_evaluated_value() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.evaluated_value_; +} +inline void EvaluatedConstraint::_internal_set_evaluated_value(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.evaluated_value_ = value; +} + +// repeated uint64 used_decision_variable_ids = 4; +inline int EvaluatedConstraint::_internal_used_decision_variable_ids_size() const { + return _internal_used_decision_variable_ids().size(); +} +inline int EvaluatedConstraint::used_decision_variable_ids_size() const { + return _internal_used_decision_variable_ids_size(); +} +inline void EvaluatedConstraint::clear_used_decision_variable_ids() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.used_decision_variable_ids_.Clear(); +} +inline ::uint64_t EvaluatedConstraint::used_decision_variable_ids(int index) const { + // @@protoc_insertion_point(field_get:ommx.v1.EvaluatedConstraint.used_decision_variable_ids) + return _internal_used_decision_variable_ids().Get(index); +} +inline void EvaluatedConstraint::set_used_decision_variable_ids(int index, ::uint64_t value) { + _internal_mutable_used_decision_variable_ids()->Set(index, value); + // @@protoc_insertion_point(field_set:ommx.v1.EvaluatedConstraint.used_decision_variable_ids) +} +inline void EvaluatedConstraint::add_used_decision_variable_ids(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_used_decision_variable_ids()->Add(value); + // @@protoc_insertion_point(field_add:ommx.v1.EvaluatedConstraint.used_decision_variable_ids) +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& EvaluatedConstraint::used_decision_variable_ids() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:ommx.v1.EvaluatedConstraint.used_decision_variable_ids) + return _internal_used_decision_variable_ids(); +} +inline ::google::protobuf::RepeatedField<::uint64_t>* EvaluatedConstraint::mutable_used_decision_variable_ids() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:ommx.v1.EvaluatedConstraint.used_decision_variable_ids) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_used_decision_variable_ids(); +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& +EvaluatedConstraint::_internal_used_decision_variable_ids() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.used_decision_variable_ids_; +} +inline ::google::protobuf::RepeatedField<::uint64_t>* EvaluatedConstraint::_internal_mutable_used_decision_variable_ids() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.used_decision_variable_ids_; +} + +// repeated int64 subscripts = 9; +inline int EvaluatedConstraint::_internal_subscripts_size() const { + return _internal_subscripts().size(); +} +inline int EvaluatedConstraint::subscripts_size() const { + return _internal_subscripts_size(); +} +inline void EvaluatedConstraint::clear_subscripts() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.subscripts_.Clear(); +} +inline ::int64_t EvaluatedConstraint::subscripts(int index) const { + // @@protoc_insertion_point(field_get:ommx.v1.EvaluatedConstraint.subscripts) + return _internal_subscripts().Get(index); +} +inline void EvaluatedConstraint::set_subscripts(int index, ::int64_t value) { + _internal_mutable_subscripts()->Set(index, value); + // @@protoc_insertion_point(field_set:ommx.v1.EvaluatedConstraint.subscripts) +} +inline void EvaluatedConstraint::add_subscripts(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_subscripts()->Add(value); + // @@protoc_insertion_point(field_add:ommx.v1.EvaluatedConstraint.subscripts) +} +inline const ::google::protobuf::RepeatedField<::int64_t>& EvaluatedConstraint::subscripts() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:ommx.v1.EvaluatedConstraint.subscripts) + return _internal_subscripts(); +} +inline ::google::protobuf::RepeatedField<::int64_t>* EvaluatedConstraint::mutable_subscripts() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:ommx.v1.EvaluatedConstraint.subscripts) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_subscripts(); +} +inline const ::google::protobuf::RepeatedField<::int64_t>& +EvaluatedConstraint::_internal_subscripts() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.subscripts_; +} +inline ::google::protobuf::RepeatedField<::int64_t>* EvaluatedConstraint::_internal_mutable_subscripts() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.subscripts_; +} + +// map parameters = 5; +inline int EvaluatedConstraint::_internal_parameters_size() const { + return _internal_parameters().size(); +} +inline int EvaluatedConstraint::parameters_size() const { + return _internal_parameters_size(); +} +inline void EvaluatedConstraint::clear_parameters() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.parameters_.Clear(); +} +inline const ::google::protobuf::Map& EvaluatedConstraint::_internal_parameters() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.parameters_.GetMap(); +} +inline const ::google::protobuf::Map& EvaluatedConstraint::parameters() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_map:ommx.v1.EvaluatedConstraint.parameters) + return _internal_parameters(); +} +inline ::google::protobuf::Map* EvaluatedConstraint::_internal_mutable_parameters() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.parameters_.MutableMap(); +} +inline ::google::protobuf::Map* EvaluatedConstraint::mutable_parameters() ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_map:ommx.v1.EvaluatedConstraint.parameters) + return _internal_mutable_parameters(); +} + +// optional string name = 6; +inline bool EvaluatedConstraint::has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline void EvaluatedConstraint::clear_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& EvaluatedConstraint::name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.EvaluatedConstraint.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE void EvaluatedConstraint::set_name(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:ommx.v1.EvaluatedConstraint.name) +} +inline std::string* EvaluatedConstraint::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:ommx.v1.EvaluatedConstraint.name) + return _s; +} +inline const std::string& EvaluatedConstraint::_internal_name() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.name_.Get(); +} +inline void EvaluatedConstraint::_internal_set_name(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArena()); +} +inline std::string* EvaluatedConstraint::_internal_mutable_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable( GetArena()); +} +inline std::string* EvaluatedConstraint::release_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:ommx.v1.EvaluatedConstraint.name) + if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* released = _impl_.name_.Release(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArena()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return released; +} +inline void EvaluatedConstraint::set_allocated_name(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.name_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:ommx.v1.EvaluatedConstraint.name) +} + +// optional string description = 7; +inline bool EvaluatedConstraint::has_description() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline void EvaluatedConstraint::clear_description() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.description_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& EvaluatedConstraint::description() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.EvaluatedConstraint.description) + return _internal_description(); +} +template +inline PROTOBUF_ALWAYS_INLINE void EvaluatedConstraint::set_description(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.description_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:ommx.v1.EvaluatedConstraint.description) +} +inline std::string* EvaluatedConstraint::mutable_description() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_description(); + // @@protoc_insertion_point(field_mutable:ommx.v1.EvaluatedConstraint.description) + return _s; +} +inline const std::string& EvaluatedConstraint::_internal_description() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.description_.Get(); +} +inline void EvaluatedConstraint::_internal_set_description(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.description_.Set(value, GetArena()); +} +inline std::string* EvaluatedConstraint::_internal_mutable_description() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.description_.Mutable( GetArena()); +} +inline std::string* EvaluatedConstraint::release_description() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:ommx.v1.EvaluatedConstraint.description) + if ((_impl_._has_bits_[0] & 0x00000002u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* released = _impl_.description_.Release(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.description_.Set("", GetArena()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return released; +} +inline void EvaluatedConstraint::set_allocated_description(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.description_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.description_.IsDefault()) { + _impl_.description_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:ommx.v1.EvaluatedConstraint.description) +} + +// optional double dual_variable = 8; +inline bool EvaluatedConstraint::has_dual_variable() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline void EvaluatedConstraint::clear_dual_variable() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.dual_variable_ = 0; + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline double EvaluatedConstraint::dual_variable() const { + // @@protoc_insertion_point(field_get:ommx.v1.EvaluatedConstraint.dual_variable) + return _internal_dual_variable(); +} +inline void EvaluatedConstraint::set_dual_variable(double value) { + _internal_set_dual_variable(value); + _impl_._has_bits_[0] |= 0x00000004u; + // @@protoc_insertion_point(field_set:ommx.v1.EvaluatedConstraint.dual_variable) +} +inline double EvaluatedConstraint::_internal_dual_variable() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.dual_variable_; +} +inline void EvaluatedConstraint::_internal_set_dual_variable(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.dual_variable_ = value; +} + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace ommx + + +namespace google { +namespace protobuf { + +template <> +struct is_proto_enum<::ommx::v1::Equality> : std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor<::ommx::v1::Equality>() { + return ::ommx::v1::Equality_descriptor(); +} + +} // namespace protobuf +} // namespace google + +// @@protoc_insertion_point(global_scope) + +#include "google/protobuf/port_undef.inc" + +#endif // GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fconstraint_2eproto_2epb_2eh diff --git a/cpp/ommx/v1/decision_variables.pb.cc b/cpp/ommx/v1/decision_variables.pb.cc new file mode 100644 index 00000000..6a4261c8 --- /dev/null +++ b/cpp/ommx/v1/decision_variables.pb.cc @@ -0,0 +1,923 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: ommx/v1/decision_variables.proto +// Protobuf C++ Version: 5.27.3 + +#include "ommx/v1/decision_variables.pb.h" + +#include +#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/generated_message_tctable_impl.h" +#include "google/protobuf/extension_set.h" +#include "google/protobuf/wire_format_lite.h" +#include "google/protobuf/descriptor.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/reflection_ops.h" +#include "google/protobuf/wire_format.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" +PROTOBUF_PRAGMA_INIT_SEG +namespace _pb = ::google::protobuf; +namespace _pbi = ::google::protobuf::internal; +namespace _fl = ::google::protobuf::internal::field_layout; +namespace ommx { +namespace v1 { + template +PROTOBUF_CONSTEXPR DecisionVariable_ParametersEntry_DoNotUse::DecisionVariable_ParametersEntry_DoNotUse(::_pbi::ConstantInitialized) {} +struct DecisionVariable_ParametersEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR DecisionVariable_ParametersEntry_DoNotUseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~DecisionVariable_ParametersEntry_DoNotUseDefaultTypeInternal() {} + union { + DecisionVariable_ParametersEntry_DoNotUse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DecisionVariable_ParametersEntry_DoNotUseDefaultTypeInternal _DecisionVariable_ParametersEntry_DoNotUse_default_instance_; + +inline constexpr Bound::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : lower_{0}, + upper_{0}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR Bound::Bound(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct BoundDefaultTypeInternal { + PROTOBUF_CONSTEXPR BoundDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~BoundDefaultTypeInternal() {} + union { + Bound _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BoundDefaultTypeInternal _Bound_default_instance_; + +inline constexpr DecisionVariable::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + subscripts_{}, + _subscripts_cached_byte_size_{0}, + parameters_{}, + name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + description_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + bound_{nullptr}, + id_{::uint64_t{0u}}, + kind_{static_cast< ::ommx::v1::DecisionVariable_Kind >(0)} {} + +template +PROTOBUF_CONSTEXPR DecisionVariable::DecisionVariable(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct DecisionVariableDefaultTypeInternal { + PROTOBUF_CONSTEXPR DecisionVariableDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~DecisionVariableDefaultTypeInternal() {} + union { + DecisionVariable _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DecisionVariableDefaultTypeInternal _DecisionVariable_default_instance_; +} // namespace v1 +} // namespace ommx +static const ::_pb::EnumDescriptor* file_level_enum_descriptors_ommx_2fv1_2fdecision_5fvariables_2eproto[1]; +static constexpr const ::_pb::ServiceDescriptor** + file_level_service_descriptors_ommx_2fv1_2fdecision_5fvariables_2eproto = nullptr; +const ::uint32_t + TableStruct_ommx_2fv1_2fdecision_5fvariables_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::ommx::v1::Bound, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::ommx::v1::Bound, _impl_.lower_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Bound, _impl_.upper_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::DecisionVariable_ParametersEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::DecisionVariable_ParametersEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::ommx::v1::DecisionVariable_ParametersEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::DecisionVariable_ParametersEntry_DoNotUse, value_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::ommx::v1::DecisionVariable, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::DecisionVariable, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::ommx::v1::DecisionVariable, _impl_.id_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::DecisionVariable, _impl_.kind_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::DecisionVariable, _impl_.bound_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::DecisionVariable, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::DecisionVariable, _impl_.subscripts_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::DecisionVariable, _impl_.parameters_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::DecisionVariable, _impl_.description_), + ~0u, + ~0u, + 2, + 0, + ~0u, + ~0u, + 1, +}; + +static const ::_pbi::MigrationSchema + schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + {0, -1, -1, sizeof(::ommx::v1::Bound)}, + {10, 20, -1, sizeof(::ommx::v1::DecisionVariable_ParametersEntry_DoNotUse)}, + {22, 37, -1, sizeof(::ommx::v1::DecisionVariable)}, +}; +static const ::_pb::Message* const file_default_instances[] = { + &::ommx::v1::_Bound_default_instance_._instance, + &::ommx::v1::_DecisionVariable_ParametersEntry_DoNotUse_default_instance_._instance, + &::ommx::v1::_DecisionVariable_default_instance_._instance, +}; +const char descriptor_table_protodef_ommx_2fv1_2fdecision_5fvariables_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + "\n ommx/v1/decision_variables.proto\022\007ommx" + ".v1\"%\n\005Bound\022\r\n\005lower\030\001 \001(\001\022\r\n\005upper\030\002 \001" + "(\001\"\316\003\n\020DecisionVariable\022\n\n\002id\030\001 \001(\004\022,\n\004k" + "ind\030\002 \001(\0162\036.ommx.v1.DecisionVariable.Kin" + "d\022\"\n\005bound\030\003 \001(\0132\016.ommx.v1.BoundH\000\210\001\001\022\021\n" + "\004name\030\004 \001(\tH\001\210\001\001\022\022\n\nsubscripts\030\005 \003(\003\022=\n\n" + "parameters\030\006 \003(\0132).ommx.v1.DecisionVaria" + "ble.ParametersEntry\022\030\n\013description\030\007 \001(\t" + "H\002\210\001\001\0321\n\017ParametersEntry\022\013\n\003key\030\001 \001(\t\022\r\n" + "\005value\030\002 \001(\t:\0028\001\"\205\001\n\004Kind\022\024\n\020KIND_UNSPEC" + "IFIED\020\000\022\017\n\013KIND_BINARY\020\001\022\020\n\014KIND_INTEGER" + "\020\002\022\023\n\017KIND_CONTINUOUS\020\003\022\025\n\021KIND_SEMI_INT" + "EGER\020\004\022\030\n\024KIND_SEMI_CONTINUOUS\020\005B\010\n\006_bou" + "ndB\007\n\005_nameB\016\n\014_descriptionb\006proto3" +}; +static ::absl::once_flag descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto_once; +PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto = { + false, + false, + 555, + descriptor_table_protodef_ommx_2fv1_2fdecision_5fvariables_2eproto, + "ommx/v1/decision_variables.proto", + &descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto_once, + nullptr, + 0, + 3, + schemas, + file_default_instances, + TableStruct_ommx_2fv1_2fdecision_5fvariables_2eproto::offsets, + file_level_enum_descriptors_ommx_2fv1_2fdecision_5fvariables_2eproto, + file_level_service_descriptors_ommx_2fv1_2fdecision_5fvariables_2eproto, +}; +namespace ommx { +namespace v1 { +const ::google::protobuf::EnumDescriptor* DecisionVariable_Kind_descriptor() { + ::google::protobuf::internal::AssignDescriptors(&descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto); + return file_level_enum_descriptors_ommx_2fv1_2fdecision_5fvariables_2eproto[0]; +} +PROTOBUF_CONSTINIT const uint32_t DecisionVariable_Kind_internal_data_[] = { + 393216u, 0u, }; +bool DecisionVariable_Kind_IsValid(int value) { + return 0 <= value && value <= 5; +} +#if (__cplusplus < 201703) && \ + (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) + +constexpr DecisionVariable_Kind DecisionVariable::KIND_UNSPECIFIED; +constexpr DecisionVariable_Kind DecisionVariable::KIND_BINARY; +constexpr DecisionVariable_Kind DecisionVariable::KIND_INTEGER; +constexpr DecisionVariable_Kind DecisionVariable::KIND_CONTINUOUS; +constexpr DecisionVariable_Kind DecisionVariable::KIND_SEMI_INTEGER; +constexpr DecisionVariable_Kind DecisionVariable::KIND_SEMI_CONTINUOUS; +constexpr DecisionVariable_Kind DecisionVariable::Kind_MIN; +constexpr DecisionVariable_Kind DecisionVariable::Kind_MAX; +constexpr int DecisionVariable::Kind_ARRAYSIZE; + +#endif // (__cplusplus < 201703) && + // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +// =================================================================== + +class Bound::_Internal { + public: +}; + +Bound::Bound(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:ommx.v1.Bound) +} +Bound::Bound( + ::google::protobuf::Arena* arena, const Bound& from) + : Bound(arena) { + MergeFrom(from); +} +inline PROTOBUF_NDEBUG_INLINE Bound::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + +inline void Bound::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, lower_), + 0, + offsetof(Impl_, upper_) - + offsetof(Impl_, lower_) + + sizeof(Impl_::upper_)); +} +Bound::~Bound() { + // @@protoc_insertion_point(destructor:ommx.v1.Bound) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void Bound::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); +} + +const ::google::protobuf::MessageLite::ClassData* +Bound::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(Bound, _impl_._cached_size_), + false, + }, + &Bound::MergeImpl, + &Bound::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 0, 2> Bound::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_Bound_default_instance_._instance, + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::ommx::v1::Bound>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // double upper = 2; + {::_pbi::TcParser::FastF64S1, + {17, 63, 0, PROTOBUF_FIELD_OFFSET(Bound, _impl_.upper_)}}, + // double lower = 1; + {::_pbi::TcParser::FastF64S1, + {9, 63, 0, PROTOBUF_FIELD_OFFSET(Bound, _impl_.lower_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // double lower = 1; + {PROTOBUF_FIELD_OFFSET(Bound, _impl_.lower_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // double upper = 2; + {PROTOBUF_FIELD_OFFSET(Bound, _impl_.upper_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + }}, + // no aux_entries + {{ + }}, +}; + +PROTOBUF_NOINLINE void Bound::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Bound) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&_impl_.lower_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.upper_) - + reinterpret_cast(&_impl_.lower_)) + sizeof(_impl_.upper_)); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +::uint8_t* Bound::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:ommx.v1.Bound) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // double lower = 1; + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_lower = this->_internal_lower(); + ::uint64_t raw_lower; + memcpy(&raw_lower, &tmp_lower, sizeof(tmp_lower)); + if (raw_lower != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 1, this->_internal_lower(), target); + } + + // double upper = 2; + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_upper = this->_internal_upper(); + ::uint64_t raw_upper; + memcpy(&raw_upper, &tmp_upper, sizeof(tmp_upper)); + if (raw_upper != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 2, this->_internal_upper(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:ommx.v1.Bound) + return target; +} + +::size_t Bound::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:ommx.v1.Bound) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); + // double lower = 1; + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_lower = this->_internal_lower(); + ::uint64_t raw_lower; + memcpy(&raw_lower, &tmp_lower, sizeof(tmp_lower)); + if (raw_lower != 0) { + total_size += 9; + } + + // double upper = 2; + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_upper = this->_internal_upper(); + ::uint64_t raw_upper; + memcpy(&raw_upper, &tmp_upper, sizeof(tmp_upper)); + if (raw_upper != 0) { + total_size += 9; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void Bound::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:ommx.v1.Bound) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_lower = from._internal_lower(); + ::uint64_t raw_lower; + memcpy(&raw_lower, &tmp_lower, sizeof(tmp_lower)); + if (raw_lower != 0) { + _this->_impl_.lower_ = from._impl_.lower_; + } + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_upper = from._internal_upper(); + ::uint64_t raw_upper; + memcpy(&raw_upper, &tmp_upper, sizeof(tmp_upper)); + if (raw_upper != 0) { + _this->_impl_.upper_ = from._impl_.upper_; + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void Bound::CopyFrom(const Bound& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:ommx.v1.Bound) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void Bound::InternalSwap(Bound* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(Bound, _impl_.upper_) + + sizeof(Bound::_impl_.upper_) + - PROTOBUF_FIELD_OFFSET(Bound, _impl_.lower_)>( + reinterpret_cast(&_impl_.lower_), + reinterpret_cast(&other->_impl_.lower_)); +} + +::google::protobuf::Metadata Bound::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + +DecisionVariable_ParametersEntry_DoNotUse::DecisionVariable_ParametersEntry_DoNotUse() {} +DecisionVariable_ParametersEntry_DoNotUse::DecisionVariable_ParametersEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {} +const ::google::protobuf::MessageLite::ClassData* +DecisionVariable_ParametersEntry_DoNotUse::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + nullptr, // tc_table + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(DecisionVariable_ParametersEntry_DoNotUse, _cached_size_), + false, + }, + &DecisionVariable_ParametersEntry_DoNotUse::MergeImpl, + &DecisionVariable_ParametersEntry_DoNotUse::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +// =================================================================== + +class DecisionVariable::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_._has_bits_); +}; + +DecisionVariable::DecisionVariable(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:ommx.v1.DecisionVariable) +} +inline PROTOBUF_NDEBUG_INLINE DecisionVariable::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::ommx::v1::DecisionVariable& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + subscripts_{visibility, arena, from.subscripts_}, + _subscripts_cached_byte_size_{0}, + parameters_{visibility, arena, from.parameters_}, + name_(arena, from.name_), + description_(arena, from.description_) {} + +DecisionVariable::DecisionVariable( + ::google::protobuf::Arena* arena, + const DecisionVariable& from) + : ::google::protobuf::Message(arena) { + DecisionVariable* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.bound_ = (cached_has_bits & 0x00000004u) ? ::google::protobuf::Message::CopyConstruct<::ommx::v1::Bound>( + arena, *from._impl_.bound_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, id_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, id_), + offsetof(Impl_, kind_) - + offsetof(Impl_, id_) + + sizeof(Impl_::kind_)); + + // @@protoc_insertion_point(copy_constructor:ommx.v1.DecisionVariable) +} +inline PROTOBUF_NDEBUG_INLINE DecisionVariable::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + subscripts_{visibility, arena}, + _subscripts_cached_byte_size_{0}, + parameters_{visibility, arena}, + name_(arena), + description_(arena) {} + +inline void DecisionVariable::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, bound_), + 0, + offsetof(Impl_, kind_) - + offsetof(Impl_, bound_) + + sizeof(Impl_::kind_)); +} +DecisionVariable::~DecisionVariable() { + // @@protoc_insertion_point(destructor:ommx.v1.DecisionVariable) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void DecisionVariable::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.name_.Destroy(); + _impl_.description_.Destroy(); + delete _impl_.bound_; + _impl_.~Impl_(); +} + +const ::google::protobuf::MessageLite::ClassData* +DecisionVariable::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_._cached_size_), + false, + }, + &DecisionVariable::MergeImpl, + &DecisionVariable::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 7, 2, 58, 2> DecisionVariable::_table_ = { + { + PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_._has_bits_), + 0, // no _extensions_ + 7, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967168, // skipmap + offsetof(decltype(_table_), field_entries), + 7, // num_field_entries + 2, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_DecisionVariable_default_instance_._instance, + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::ommx::v1::DecisionVariable>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // uint64 id = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(DecisionVariable, _impl_.id_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.id_)}}, + // .ommx.v1.DecisionVariable.Kind kind = 2; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(DecisionVariable, _impl_.kind_), 63>(), + {16, 63, 0, PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.kind_)}}, + // optional .ommx.v1.Bound bound = 3; + {::_pbi::TcParser::FastMtS1, + {26, 2, 0, PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.bound_)}}, + // optional string name = 4; + {::_pbi::TcParser::FastUS1, + {34, 0, 0, PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.name_)}}, + // repeated int64 subscripts = 5; + {::_pbi::TcParser::FastV64P1, + {42, 63, 0, PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.subscripts_)}}, + {::_pbi::TcParser::MiniParse, {}}, + // optional string description = 7; + {::_pbi::TcParser::FastUS1, + {58, 1, 0, PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.description_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 id = 1; + {PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.id_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // .ommx.v1.DecisionVariable.Kind kind = 2; + {PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.kind_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, + // optional .ommx.v1.Bound bound = 3; + {PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.bound_), _Internal::kHasBitsOffset + 2, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // optional string name = 4; + {PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // repeated int64 subscripts = 5; + {PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.subscripts_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt64)}, + // map parameters = 6; + {PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.parameters_), -1, 1, + (0 | ::_fl::kFcRepeated | ::_fl::kMap)}, + // optional string description = 7; + {PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.description_), _Internal::kHasBitsOffset + 1, 0, + (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, {{ + {::_pbi::TcParser::GetTable<::ommx::v1::Bound>()}, + {::_pbi::TcParser::GetMapAuxInfo< + decltype(DecisionVariable()._impl_.parameters_)>( + 1, 0, 0, 9, + 9)}, + }}, {{ + "\30\0\0\0\4\0\12\13" + "ommx.v1.DecisionVariable" + "name" + "parameters" + "description" + }}, +}; + +PROTOBUF_NOINLINE void DecisionVariable::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.DecisionVariable) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.subscripts_.Clear(); + _impl_.parameters_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.description_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + ABSL_DCHECK(_impl_.bound_ != nullptr); + _impl_.bound_->Clear(); + } + } + ::memset(&_impl_.id_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.kind_) - + reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.kind_)); + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +::uint8_t* DecisionVariable::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:ommx.v1.DecisionVariable) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // uint64 id = 1; + if (this->_internal_id() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this->_internal_id(), target); + } + + // .ommx.v1.DecisionVariable.Kind kind = 2; + if (this->_internal_kind() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this->_internal_kind(), target); + } + + cached_has_bits = _impl_._has_bits_[0]; + // optional .ommx.v1.Bound bound = 3; + if (cached_has_bits & 0x00000004u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *_impl_.bound_, _impl_.bound_->GetCachedSize(), target, stream); + } + + // optional string name = 4; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this->_internal_name(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.DecisionVariable.name"); + target = stream->WriteStringMaybeAliased(4, _s, target); + } + + // repeated int64 subscripts = 5; + { + int byte_size = _impl_._subscripts_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteInt64Packed( + 5, _internal_subscripts(), byte_size, target); + } + } + + // map parameters = 6; + if (!_internal_parameters().empty()) { + using MapType = ::google::protobuf::Map; + using WireHelper = _pbi::MapEntryFuncs; + const auto& field = _internal_parameters(); + + if (stream->IsSerializationDeterministic() && field.size() > 1) { + for (const auto& entry : ::google::protobuf::internal::MapSorterPtr(field)) { + target = WireHelper::InternalSerialize( + 6, entry.first, entry.second, target, stream); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + entry.first.data(), static_cast(entry.first.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.DecisionVariable.parameters"); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + entry.second.data(), static_cast(entry.second.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.DecisionVariable.parameters"); + } + } else { + for (const auto& entry : field) { + target = WireHelper::InternalSerialize( + 6, entry.first, entry.second, target, stream); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + entry.first.data(), static_cast(entry.first.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.DecisionVariable.parameters"); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + entry.second.data(), static_cast(entry.second.length()), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.DecisionVariable.parameters"); + } + } + } + + // optional string description = 7; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this->_internal_description(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.DecisionVariable.description"); + target = stream->WriteStringMaybeAliased(7, _s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:ommx.v1.DecisionVariable) + return target; +} + +::size_t DecisionVariable::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:ommx.v1.DecisionVariable) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); + // repeated int64 subscripts = 5; + { + std::size_t data_size = ::_pbi::WireFormatLite::Int64Size( + this->_internal_subscripts()) + ; + _impl_._subscripts_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size)); + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; + } + // map parameters = 6; + total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_parameters_size()); + for (const auto& entry : _internal_parameters()) { + total_size += _pbi::MapEntryFuncs::ByteSizeLong(entry.first, entry.second); + } + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional string name = 4; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // optional string description = 7; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_description()); + } + + // optional .ommx.v1.Bound bound = 3; + if (cached_has_bits & 0x00000004u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.bound_); + } + + } + // uint64 id = 1; + if (this->_internal_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_id()); + } + + // .ommx.v1.DecisionVariable.Kind kind = 2; + if (this->_internal_kind() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_kind()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void DecisionVariable::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:ommx.v1.DecisionVariable) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_subscripts()->MergeFrom(from._internal_subscripts()); + _this->_impl_.parameters_.MergeFrom(from._impl_.parameters_); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_name(from._internal_name()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_description(from._internal_description()); + } + if (cached_has_bits & 0x00000004u) { + ABSL_DCHECK(from._impl_.bound_ != nullptr); + if (_this->_impl_.bound_ == nullptr) { + _this->_impl_.bound_ = + ::google::protobuf::Message::CopyConstruct<::ommx::v1::Bound>(arena, *from._impl_.bound_); + } else { + _this->_impl_.bound_->MergeFrom(*from._impl_.bound_); + } + } + } + if (from._internal_id() != 0) { + _this->_impl_.id_ = from._impl_.id_; + } + if (from._internal_kind() != 0) { + _this->_impl_.kind_ = from._impl_.kind_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void DecisionVariable::CopyFrom(const DecisionVariable& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:ommx.v1.DecisionVariable) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void DecisionVariable::InternalSwap(DecisionVariable* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.subscripts_.InternalSwap(&other->_impl_.subscripts_); + _impl_.parameters_.InternalSwap(&other->_impl_.parameters_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.description_, &other->_impl_.description_, arena); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.kind_) + + sizeof(DecisionVariable::_impl_.kind_) + - PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.bound_)>( + reinterpret_cast(&_impl_.bound_), + reinterpret_cast(&other->_impl_.bound_)); +} + +::google::protobuf::Metadata DecisionVariable::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace ommx +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google +// @@protoc_insertion_point(global_scope) +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type + _static_init2_ PROTOBUF_UNUSED = + (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto), + ::std::false_type{}); +#include "google/protobuf/port_undef.inc" diff --git a/cpp/ommx/v1/decision_variables.pb.h b/cpp/ommx/v1/decision_variables.pb.h new file mode 100644 index 00000000..0a8730de --- /dev/null +++ b/cpp/ommx/v1/decision_variables.pb.h @@ -0,0 +1,1075 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: ommx/v1/decision_variables.proto +// Protobuf C++ Version: 5.27.3 + +#ifndef GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fdecision_5fvariables_2eproto_2epb_2eh +#define GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fdecision_5fvariables_2eproto_2epb_2eh + +#include +#include +#include +#include + +#include "google/protobuf/runtime_version.h" +#if PROTOBUF_VERSION != 5027003 +#error "Protobuf C++ gencode is built with an incompatible version of" +#error "Protobuf C++ headers/runtime. See" +#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" +#endif +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/message.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export +#include "google/protobuf/map.h" // IWYU pragma: export +#include "google/protobuf/map_entry.h" +#include "google/protobuf/map_field_inl.h" +#include "google/protobuf/generated_enum_reflection.h" +#include "google/protobuf/unknown_field_set.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" + +#define PROTOBUF_INTERNAL_EXPORT_ommx_2fv1_2fdecision_5fvariables_2eproto + +namespace google { +namespace protobuf { +namespace internal { +class AnyMetadata; +} // namespace internal +} // namespace protobuf +} // namespace google + +// Internal implementation detail -- do not use these members. +struct TableStruct_ommx_2fv1_2fdecision_5fvariables_2eproto { + static const ::uint32_t offsets[]; +}; +extern const ::google::protobuf::internal::DescriptorTable + descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto; +namespace ommx { +namespace v1 { +class Bound; +struct BoundDefaultTypeInternal; +extern BoundDefaultTypeInternal _Bound_default_instance_; +class DecisionVariable; +struct DecisionVariableDefaultTypeInternal; +extern DecisionVariableDefaultTypeInternal _DecisionVariable_default_instance_; +class DecisionVariable_ParametersEntry_DoNotUse; +struct DecisionVariable_ParametersEntry_DoNotUseDefaultTypeInternal; +extern DecisionVariable_ParametersEntry_DoNotUseDefaultTypeInternal _DecisionVariable_ParametersEntry_DoNotUse_default_instance_; +} // namespace v1 +} // namespace ommx +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google + +namespace ommx { +namespace v1 { +enum DecisionVariable_Kind : int { + DecisionVariable_Kind_KIND_UNSPECIFIED = 0, + DecisionVariable_Kind_KIND_BINARY = 1, + DecisionVariable_Kind_KIND_INTEGER = 2, + DecisionVariable_Kind_KIND_CONTINUOUS = 3, + DecisionVariable_Kind_KIND_SEMI_INTEGER = 4, + DecisionVariable_Kind_KIND_SEMI_CONTINUOUS = 5, + DecisionVariable_Kind_DecisionVariable_Kind_INT_MIN_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::min(), + DecisionVariable_Kind_DecisionVariable_Kind_INT_MAX_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::max(), +}; + +bool DecisionVariable_Kind_IsValid(int value); +extern const uint32_t DecisionVariable_Kind_internal_data_[]; +constexpr DecisionVariable_Kind DecisionVariable_Kind_Kind_MIN = static_cast(0); +constexpr DecisionVariable_Kind DecisionVariable_Kind_Kind_MAX = static_cast(5); +constexpr int DecisionVariable_Kind_Kind_ARRAYSIZE = 5 + 1; +const ::google::protobuf::EnumDescriptor* +DecisionVariable_Kind_descriptor(); +template +const std::string& DecisionVariable_Kind_Name(T value) { + static_assert(std::is_same::value || + std::is_integral::value, + "Incorrect type passed to Kind_Name()."); + return DecisionVariable_Kind_Name(static_cast(value)); +} +template <> +inline const std::string& DecisionVariable_Kind_Name(DecisionVariable_Kind value) { + return ::google::protobuf::internal::NameOfDenseEnum( + static_cast(value)); +} +inline bool DecisionVariable_Kind_Parse(absl::string_view name, DecisionVariable_Kind* value) { + return ::google::protobuf::internal::ParseNamedEnum( + DecisionVariable_Kind_descriptor(), name, value); +} + +// =================================================================== + + +// ------------------------------------------------------------------- + +class DecisionVariable_ParametersEntry_DoNotUse final + : public ::google::protobuf::internal::MapEntry< + DecisionVariable_ParametersEntry_DoNotUse, std::string, std::string, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING> { + public: + using SuperType = ::google::protobuf::internal::MapEntry< + DecisionVariable_ParametersEntry_DoNotUse, std::string, std::string, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING, + ::google::protobuf::internal::WireFormatLite::TYPE_STRING>; + DecisionVariable_ParametersEntry_DoNotUse(); + template + explicit PROTOBUF_CONSTEXPR DecisionVariable_ParametersEntry_DoNotUse( + ::google::protobuf::internal::ConstantInitialized); + explicit DecisionVariable_ParametersEntry_DoNotUse(::google::protobuf::Arena* arena); + static const DecisionVariable_ParametersEntry_DoNotUse* internal_default_instance() { + return reinterpret_cast( + &_DecisionVariable_ParametersEntry_DoNotUse_default_instance_); + } +const ::google::protobuf::Message::ClassData* GetClassData() const final; + friend struct ::TableStruct_ommx_2fv1_2fdecision_5fvariables_2eproto; +}; +// ------------------------------------------------------------------- + +class Bound final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:ommx.v1.Bound) */ { + public: + inline Bound() : Bound(nullptr) {} + ~Bound() override; + template + explicit PROTOBUF_CONSTEXPR Bound( + ::google::protobuf::internal::ConstantInitialized); + + inline Bound(const Bound& from) : Bound(nullptr, from) {} + inline Bound(Bound&& from) noexcept + : Bound(nullptr, std::move(from)) {} + inline Bound& operator=(const Bound& from) { + CopyFrom(from); + return *this; + } + inline Bound& operator=(Bound&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Bound& default_instance() { + return *internal_default_instance(); + } + static inline const Bound* internal_default_instance() { + return reinterpret_cast( + &_Bound_default_instance_); + } + static constexpr int kIndexInFileMessages = 0; + friend void swap(Bound& a, Bound& b) { a.Swap(&b); } + inline void Swap(Bound* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Bound* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Bound* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Bound& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const Bound& from) { Bound::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(Bound* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "ommx.v1.Bound"; } + + protected: + explicit Bound(::google::protobuf::Arena* arena); + Bound(::google::protobuf::Arena* arena, const Bound& from); + Bound(::google::protobuf::Arena* arena, Bound&& from) noexcept + : Bound(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::Message::ClassData* GetClassData() const final; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kLowerFieldNumber = 1, + kUpperFieldNumber = 2, + }; + // double lower = 1; + void clear_lower() ; + double lower() const; + void set_lower(double value); + + private: + double _internal_lower() const; + void _internal_set_lower(double value); + + public: + // double upper = 2; + void clear_upper() ; + double upper() const; + void set_upper(double value); + + private: + double _internal_upper() const; + void _internal_set_upper(double value); + + public: + // @@protoc_insertion_point(class_scope:ommx.v1.Bound) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 0, + 0, 2> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_Bound_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const Bound& from_msg); + double lower_; + double upper_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_ommx_2fv1_2fdecision_5fvariables_2eproto; +}; +// ------------------------------------------------------------------- + +class DecisionVariable final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:ommx.v1.DecisionVariable) */ { + public: + inline DecisionVariable() : DecisionVariable(nullptr) {} + ~DecisionVariable() override; + template + explicit PROTOBUF_CONSTEXPR DecisionVariable( + ::google::protobuf::internal::ConstantInitialized); + + inline DecisionVariable(const DecisionVariable& from) : DecisionVariable(nullptr, from) {} + inline DecisionVariable(DecisionVariable&& from) noexcept + : DecisionVariable(nullptr, std::move(from)) {} + inline DecisionVariable& operator=(const DecisionVariable& from) { + CopyFrom(from); + return *this; + } + inline DecisionVariable& operator=(DecisionVariable&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const DecisionVariable& default_instance() { + return *internal_default_instance(); + } + static inline const DecisionVariable* internal_default_instance() { + return reinterpret_cast( + &_DecisionVariable_default_instance_); + } + static constexpr int kIndexInFileMessages = 2; + friend void swap(DecisionVariable& a, DecisionVariable& b) { a.Swap(&b); } + inline void Swap(DecisionVariable* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(DecisionVariable* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + DecisionVariable* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const DecisionVariable& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const DecisionVariable& from) { DecisionVariable::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(DecisionVariable* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "ommx.v1.DecisionVariable"; } + + protected: + explicit DecisionVariable(::google::protobuf::Arena* arena); + DecisionVariable(::google::protobuf::Arena* arena, const DecisionVariable& from); + DecisionVariable(::google::protobuf::Arena* arena, DecisionVariable&& from) noexcept + : DecisionVariable(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::Message::ClassData* GetClassData() const final; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + using Kind = DecisionVariable_Kind; + static constexpr Kind KIND_UNSPECIFIED = DecisionVariable_Kind_KIND_UNSPECIFIED; + static constexpr Kind KIND_BINARY = DecisionVariable_Kind_KIND_BINARY; + static constexpr Kind KIND_INTEGER = DecisionVariable_Kind_KIND_INTEGER; + static constexpr Kind KIND_CONTINUOUS = DecisionVariable_Kind_KIND_CONTINUOUS; + static constexpr Kind KIND_SEMI_INTEGER = DecisionVariable_Kind_KIND_SEMI_INTEGER; + static constexpr Kind KIND_SEMI_CONTINUOUS = DecisionVariable_Kind_KIND_SEMI_CONTINUOUS; + static inline bool Kind_IsValid(int value) { + return DecisionVariable_Kind_IsValid(value); + } + static constexpr Kind Kind_MIN = DecisionVariable_Kind_Kind_MIN; + static constexpr Kind Kind_MAX = DecisionVariable_Kind_Kind_MAX; + static constexpr int Kind_ARRAYSIZE = DecisionVariable_Kind_Kind_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* Kind_descriptor() { + return DecisionVariable_Kind_descriptor(); + } + template + static inline const std::string& Kind_Name(T value) { + return DecisionVariable_Kind_Name(value); + } + static inline bool Kind_Parse(absl::string_view name, Kind* value) { + return DecisionVariable_Kind_Parse(name, value); + } + + // accessors ------------------------------------------------------- + enum : int { + kSubscriptsFieldNumber = 5, + kParametersFieldNumber = 6, + kNameFieldNumber = 4, + kDescriptionFieldNumber = 7, + kBoundFieldNumber = 3, + kIdFieldNumber = 1, + kKindFieldNumber = 2, + }; + // repeated int64 subscripts = 5; + int subscripts_size() const; + private: + int _internal_subscripts_size() const; + + public: + void clear_subscripts() ; + ::int64_t subscripts(int index) const; + void set_subscripts(int index, ::int64_t value); + void add_subscripts(::int64_t value); + const ::google::protobuf::RepeatedField<::int64_t>& subscripts() const; + ::google::protobuf::RepeatedField<::int64_t>* mutable_subscripts(); + + private: + const ::google::protobuf::RepeatedField<::int64_t>& _internal_subscripts() const; + ::google::protobuf::RepeatedField<::int64_t>* _internal_mutable_subscripts(); + + public: + // map parameters = 6; + int parameters_size() const; + private: + int _internal_parameters_size() const; + + public: + void clear_parameters() ; + const ::google::protobuf::Map& parameters() const; + ::google::protobuf::Map* mutable_parameters(); + + private: + const ::google::protobuf::Map& _internal_parameters() const; + ::google::protobuf::Map* _internal_mutable_parameters(); + + public: + // optional string name = 4; + bool has_name() const; + void clear_name() ; + const std::string& name() const; + template + void set_name(Arg_&& arg, Args_... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* value); + + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( + const std::string& value); + std::string* _internal_mutable_name(); + + public: + // optional string description = 7; + bool has_description() const; + void clear_description() ; + const std::string& description() const; + template + void set_description(Arg_&& arg, Args_... args); + std::string* mutable_description(); + PROTOBUF_NODISCARD std::string* release_description(); + void set_allocated_description(std::string* value); + + private: + const std::string& _internal_description() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_description( + const std::string& value); + std::string* _internal_mutable_description(); + + public: + // optional .ommx.v1.Bound bound = 3; + bool has_bound() const; + void clear_bound() ; + const ::ommx::v1::Bound& bound() const; + PROTOBUF_NODISCARD ::ommx::v1::Bound* release_bound(); + ::ommx::v1::Bound* mutable_bound(); + void set_allocated_bound(::ommx::v1::Bound* value); + void unsafe_arena_set_allocated_bound(::ommx::v1::Bound* value); + ::ommx::v1::Bound* unsafe_arena_release_bound(); + + private: + const ::ommx::v1::Bound& _internal_bound() const; + ::ommx::v1::Bound* _internal_mutable_bound(); + + public: + // uint64 id = 1; + void clear_id() ; + ::uint64_t id() const; + void set_id(::uint64_t value); + + private: + ::uint64_t _internal_id() const; + void _internal_set_id(::uint64_t value); + + public: + // .ommx.v1.DecisionVariable.Kind kind = 2; + void clear_kind() ; + ::ommx::v1::DecisionVariable_Kind kind() const; + void set_kind(::ommx::v1::DecisionVariable_Kind value); + + private: + ::ommx::v1::DecisionVariable_Kind _internal_kind() const; + void _internal_set_kind(::ommx::v1::DecisionVariable_Kind value); + + public: + // @@protoc_insertion_point(class_scope:ommx.v1.DecisionVariable) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 3, 7, 2, + 58, 2> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_DecisionVariable_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const DecisionVariable& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedField<::int64_t> subscripts_; + mutable ::google::protobuf::internal::CachedSize _subscripts_cached_byte_size_; + ::google::protobuf::internal::MapField + parameters_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr description_; + ::ommx::v1::Bound* bound_; + ::uint64_t id_; + int kind_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_ommx_2fv1_2fdecision_5fvariables_2eproto; +}; + +// =================================================================== + + + + +// =================================================================== + + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// Bound + +// double lower = 1; +inline void Bound::clear_lower() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lower_ = 0; +} +inline double Bound::lower() const { + // @@protoc_insertion_point(field_get:ommx.v1.Bound.lower) + return _internal_lower(); +} +inline void Bound::set_lower(double value) { + _internal_set_lower(value); + // @@protoc_insertion_point(field_set:ommx.v1.Bound.lower) +} +inline double Bound::_internal_lower() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.lower_; +} +inline void Bound::_internal_set_lower(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.lower_ = value; +} + +// double upper = 2; +inline void Bound::clear_upper() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.upper_ = 0; +} +inline double Bound::upper() const { + // @@protoc_insertion_point(field_get:ommx.v1.Bound.upper) + return _internal_upper(); +} +inline void Bound::set_upper(double value) { + _internal_set_upper(value); + // @@protoc_insertion_point(field_set:ommx.v1.Bound.upper) +} +inline double Bound::_internal_upper() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.upper_; +} +inline void Bound::_internal_set_upper(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.upper_ = value; +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// DecisionVariable + +// uint64 id = 1; +inline void DecisionVariable::clear_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.id_ = ::uint64_t{0u}; +} +inline ::uint64_t DecisionVariable::id() const { + // @@protoc_insertion_point(field_get:ommx.v1.DecisionVariable.id) + return _internal_id(); +} +inline void DecisionVariable::set_id(::uint64_t value) { + _internal_set_id(value); + // @@protoc_insertion_point(field_set:ommx.v1.DecisionVariable.id) +} +inline ::uint64_t DecisionVariable::_internal_id() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.id_; +} +inline void DecisionVariable::_internal_set_id(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.id_ = value; +} + +// .ommx.v1.DecisionVariable.Kind kind = 2; +inline void DecisionVariable::clear_kind() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.kind_ = 0; +} +inline ::ommx::v1::DecisionVariable_Kind DecisionVariable::kind() const { + // @@protoc_insertion_point(field_get:ommx.v1.DecisionVariable.kind) + return _internal_kind(); +} +inline void DecisionVariable::set_kind(::ommx::v1::DecisionVariable_Kind value) { + _internal_set_kind(value); + // @@protoc_insertion_point(field_set:ommx.v1.DecisionVariable.kind) +} +inline ::ommx::v1::DecisionVariable_Kind DecisionVariable::_internal_kind() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return static_cast<::ommx::v1::DecisionVariable_Kind>(_impl_.kind_); +} +inline void DecisionVariable::_internal_set_kind(::ommx::v1::DecisionVariable_Kind value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.kind_ = value; +} + +// optional .ommx.v1.Bound bound = 3; +inline bool DecisionVariable::has_bound() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || _impl_.bound_ != nullptr); + return value; +} +inline void DecisionVariable::clear_bound() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.bound_ != nullptr) _impl_.bound_->Clear(); + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline const ::ommx::v1::Bound& DecisionVariable::_internal_bound() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::ommx::v1::Bound* p = _impl_.bound_; + return p != nullptr ? *p : reinterpret_cast(::ommx::v1::_Bound_default_instance_); +} +inline const ::ommx::v1::Bound& DecisionVariable::bound() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.DecisionVariable.bound) + return _internal_bound(); +} +inline void DecisionVariable::unsafe_arena_set_allocated_bound(::ommx::v1::Bound* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.bound_); + } + _impl_.bound_ = reinterpret_cast<::ommx::v1::Bound*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ommx.v1.DecisionVariable.bound) +} +inline ::ommx::v1::Bound* DecisionVariable::release_bound() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000004u; + ::ommx::v1::Bound* released = _impl_.bound_; + _impl_.bound_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return released; +} +inline ::ommx::v1::Bound* DecisionVariable::unsafe_arena_release_bound() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:ommx.v1.DecisionVariable.bound) + + _impl_._has_bits_[0] &= ~0x00000004u; + ::ommx::v1::Bound* temp = _impl_.bound_; + _impl_.bound_ = nullptr; + return temp; +} +inline ::ommx::v1::Bound* DecisionVariable::_internal_mutable_bound() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.bound_ == nullptr) { + auto* p = ::google::protobuf::Message::DefaultConstruct<::ommx::v1::Bound>(GetArena()); + _impl_.bound_ = reinterpret_cast<::ommx::v1::Bound*>(p); + } + return _impl_.bound_; +} +inline ::ommx::v1::Bound* DecisionVariable::mutable_bound() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000004u; + ::ommx::v1::Bound* _msg = _internal_mutable_bound(); + // @@protoc_insertion_point(field_mutable:ommx.v1.DecisionVariable.bound) + return _msg; +} +inline void DecisionVariable::set_allocated_bound(::ommx::v1::Bound* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete (_impl_.bound_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + + _impl_.bound_ = reinterpret_cast<::ommx::v1::Bound*>(value); + // @@protoc_insertion_point(field_set_allocated:ommx.v1.DecisionVariable.bound) +} + +// optional string name = 4; +inline bool DecisionVariable::has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline void DecisionVariable::clear_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& DecisionVariable::name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.DecisionVariable.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE void DecisionVariable::set_name(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:ommx.v1.DecisionVariable.name) +} +inline std::string* DecisionVariable::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:ommx.v1.DecisionVariable.name) + return _s; +} +inline const std::string& DecisionVariable::_internal_name() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.name_.Get(); +} +inline void DecisionVariable::_internal_set_name(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArena()); +} +inline std::string* DecisionVariable::_internal_mutable_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable( GetArena()); +} +inline std::string* DecisionVariable::release_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:ommx.v1.DecisionVariable.name) + if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* released = _impl_.name_.Release(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArena()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return released; +} +inline void DecisionVariable::set_allocated_name(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.name_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:ommx.v1.DecisionVariable.name) +} + +// repeated int64 subscripts = 5; +inline int DecisionVariable::_internal_subscripts_size() const { + return _internal_subscripts().size(); +} +inline int DecisionVariable::subscripts_size() const { + return _internal_subscripts_size(); +} +inline void DecisionVariable::clear_subscripts() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.subscripts_.Clear(); +} +inline ::int64_t DecisionVariable::subscripts(int index) const { + // @@protoc_insertion_point(field_get:ommx.v1.DecisionVariable.subscripts) + return _internal_subscripts().Get(index); +} +inline void DecisionVariable::set_subscripts(int index, ::int64_t value) { + _internal_mutable_subscripts()->Set(index, value); + // @@protoc_insertion_point(field_set:ommx.v1.DecisionVariable.subscripts) +} +inline void DecisionVariable::add_subscripts(::int64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_subscripts()->Add(value); + // @@protoc_insertion_point(field_add:ommx.v1.DecisionVariable.subscripts) +} +inline const ::google::protobuf::RepeatedField<::int64_t>& DecisionVariable::subscripts() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:ommx.v1.DecisionVariable.subscripts) + return _internal_subscripts(); +} +inline ::google::protobuf::RepeatedField<::int64_t>* DecisionVariable::mutable_subscripts() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:ommx.v1.DecisionVariable.subscripts) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_subscripts(); +} +inline const ::google::protobuf::RepeatedField<::int64_t>& +DecisionVariable::_internal_subscripts() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.subscripts_; +} +inline ::google::protobuf::RepeatedField<::int64_t>* DecisionVariable::_internal_mutable_subscripts() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.subscripts_; +} + +// map parameters = 6; +inline int DecisionVariable::_internal_parameters_size() const { + return _internal_parameters().size(); +} +inline int DecisionVariable::parameters_size() const { + return _internal_parameters_size(); +} +inline void DecisionVariable::clear_parameters() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.parameters_.Clear(); +} +inline const ::google::protobuf::Map& DecisionVariable::_internal_parameters() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.parameters_.GetMap(); +} +inline const ::google::protobuf::Map& DecisionVariable::parameters() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_map:ommx.v1.DecisionVariable.parameters) + return _internal_parameters(); +} +inline ::google::protobuf::Map* DecisionVariable::_internal_mutable_parameters() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.parameters_.MutableMap(); +} +inline ::google::protobuf::Map* DecisionVariable::mutable_parameters() ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_map:ommx.v1.DecisionVariable.parameters) + return _internal_mutable_parameters(); +} + +// optional string description = 7; +inline bool DecisionVariable::has_description() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline void DecisionVariable::clear_description() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.description_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& DecisionVariable::description() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.DecisionVariable.description) + return _internal_description(); +} +template +inline PROTOBUF_ALWAYS_INLINE void DecisionVariable::set_description(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.description_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:ommx.v1.DecisionVariable.description) +} +inline std::string* DecisionVariable::mutable_description() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_description(); + // @@protoc_insertion_point(field_mutable:ommx.v1.DecisionVariable.description) + return _s; +} +inline const std::string& DecisionVariable::_internal_description() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.description_.Get(); +} +inline void DecisionVariable::_internal_set_description(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.description_.Set(value, GetArena()); +} +inline std::string* DecisionVariable::_internal_mutable_description() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.description_.Mutable( GetArena()); +} +inline std::string* DecisionVariable::release_description() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:ommx.v1.DecisionVariable.description) + if ((_impl_._has_bits_[0] & 0x00000002u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* released = _impl_.description_.Release(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.description_.Set("", GetArena()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return released; +} +inline void DecisionVariable::set_allocated_description(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.description_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.description_.IsDefault()) { + _impl_.description_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:ommx.v1.DecisionVariable.description) +} + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace ommx + + +namespace google { +namespace protobuf { + +template <> +struct is_proto_enum<::ommx::v1::DecisionVariable_Kind> : std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor<::ommx::v1::DecisionVariable_Kind>() { + return ::ommx::v1::DecisionVariable_Kind_descriptor(); +} + +} // namespace protobuf +} // namespace google + +// @@protoc_insertion_point(global_scope) + +#include "google/protobuf/port_undef.inc" + +#endif // GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fdecision_5fvariables_2eproto_2epb_2eh diff --git a/cpp/ommx/v1/function.pb.cc b/cpp/ommx/v1/function.pb.cc new file mode 100644 index 00000000..fe4e04ac --- /dev/null +++ b/cpp/ommx/v1/function.pb.cc @@ -0,0 +1,540 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: ommx/v1/function.proto +// Protobuf C++ Version: 5.27.3 + +#include "ommx/v1/function.pb.h" + +#include +#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/generated_message_tctable_impl.h" +#include "google/protobuf/extension_set.h" +#include "google/protobuf/wire_format_lite.h" +#include "google/protobuf/descriptor.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/reflection_ops.h" +#include "google/protobuf/wire_format.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" +PROTOBUF_PRAGMA_INIT_SEG +namespace _pb = ::google::protobuf; +namespace _pbi = ::google::protobuf::internal; +namespace _fl = ::google::protobuf::internal::field_layout; +namespace ommx { +namespace v1 { + +inline constexpr Function::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : function_{}, + _cached_size_{0}, + _oneof_case_{} {} + +template +PROTOBUF_CONSTEXPR Function::Function(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct FunctionDefaultTypeInternal { + PROTOBUF_CONSTEXPR FunctionDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~FunctionDefaultTypeInternal() {} + union { + Function _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FunctionDefaultTypeInternal _Function_default_instance_; +} // namespace v1 +} // namespace ommx +static constexpr const ::_pb::EnumDescriptor** + file_level_enum_descriptors_ommx_2fv1_2ffunction_2eproto = nullptr; +static constexpr const ::_pb::ServiceDescriptor** + file_level_service_descriptors_ommx_2fv1_2ffunction_2eproto = nullptr; +const ::uint32_t + TableStruct_ommx_2fv1_2ffunction_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::ommx::v1::Function, _internal_metadata_), + ~0u, // no _extensions_ + PROTOBUF_FIELD_OFFSET(::ommx::v1::Function, _impl_._oneof_case_[0]), + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, + PROTOBUF_FIELD_OFFSET(::ommx::v1::Function, _impl_.function_), +}; + +static const ::_pbi::MigrationSchema + schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + {0, -1, -1, sizeof(::ommx::v1::Function)}, +}; +static const ::_pb::Message* const file_default_instances[] = { + &::ommx::v1::_Function_default_instance_._instance, +}; +const char descriptor_table_protodef_ommx_2fv1_2ffunction_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + "\n\026ommx/v1/function.proto\022\007ommx.v1\032\024ommx/" + "v1/linear.proto\032\030ommx/v1/polynomial.prot" + "o\032\027ommx/v1/quadratic.proto\"\241\001\n\010Function\022" + "\022\n\010constant\030\001 \001(\001H\000\022!\n\006linear\030\002 \001(\0132\017.om" + "mx.v1.LinearH\000\022\'\n\tquadratic\030\003 \001(\0132\022.ommx" + ".v1.QuadraticH\000\022)\n\npolynomial\030\004 \001(\0132\023.om" + "mx.v1.PolynomialH\000B\n\n\010functionb\006proto3" +}; +static const ::_pbi::DescriptorTable* const descriptor_table_ommx_2fv1_2ffunction_2eproto_deps[3] = + { + &::descriptor_table_ommx_2fv1_2flinear_2eproto, + &::descriptor_table_ommx_2fv1_2fpolynomial_2eproto, + &::descriptor_table_ommx_2fv1_2fquadratic_2eproto, +}; +static ::absl::once_flag descriptor_table_ommx_2fv1_2ffunction_2eproto_once; +PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2ffunction_2eproto = { + false, + false, + 278, + descriptor_table_protodef_ommx_2fv1_2ffunction_2eproto, + "ommx/v1/function.proto", + &descriptor_table_ommx_2fv1_2ffunction_2eproto_once, + descriptor_table_ommx_2fv1_2ffunction_2eproto_deps, + 3, + 1, + schemas, + file_default_instances, + TableStruct_ommx_2fv1_2ffunction_2eproto::offsets, + file_level_enum_descriptors_ommx_2fv1_2ffunction_2eproto, + file_level_service_descriptors_ommx_2fv1_2ffunction_2eproto, +}; +namespace ommx { +namespace v1 { +// =================================================================== + +class Function::_Internal { + public: + static constexpr ::int32_t kOneofCaseOffset = + PROTOBUF_FIELD_OFFSET(::ommx::v1::Function, _impl_._oneof_case_); +}; + +void Function::set_allocated_linear(::ommx::v1::Linear* linear) { + ::google::protobuf::Arena* message_arena = GetArena(); + clear_function(); + if (linear) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(linear)->GetArena(); + if (message_arena != submessage_arena) { + linear = ::google::protobuf::internal::GetOwnedMessage(message_arena, linear, submessage_arena); + } + set_has_linear(); + _impl_.function_.linear_ = linear; + } + // @@protoc_insertion_point(field_set_allocated:ommx.v1.Function.linear) +} +void Function::clear_linear() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (function_case() == kLinear) { + if (GetArena() == nullptr) { + delete _impl_.function_.linear_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.function_.linear_); + } + clear_has_function(); + } +} +void Function::set_allocated_quadratic(::ommx::v1::Quadratic* quadratic) { + ::google::protobuf::Arena* message_arena = GetArena(); + clear_function(); + if (quadratic) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(quadratic)->GetArena(); + if (message_arena != submessage_arena) { + quadratic = ::google::protobuf::internal::GetOwnedMessage(message_arena, quadratic, submessage_arena); + } + set_has_quadratic(); + _impl_.function_.quadratic_ = quadratic; + } + // @@protoc_insertion_point(field_set_allocated:ommx.v1.Function.quadratic) +} +void Function::clear_quadratic() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (function_case() == kQuadratic) { + if (GetArena() == nullptr) { + delete _impl_.function_.quadratic_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.function_.quadratic_); + } + clear_has_function(); + } +} +void Function::set_allocated_polynomial(::ommx::v1::Polynomial* polynomial) { + ::google::protobuf::Arena* message_arena = GetArena(); + clear_function(); + if (polynomial) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(polynomial)->GetArena(); + if (message_arena != submessage_arena) { + polynomial = ::google::protobuf::internal::GetOwnedMessage(message_arena, polynomial, submessage_arena); + } + set_has_polynomial(); + _impl_.function_.polynomial_ = polynomial; + } + // @@protoc_insertion_point(field_set_allocated:ommx.v1.Function.polynomial) +} +void Function::clear_polynomial() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (function_case() == kPolynomial) { + if (GetArena() == nullptr) { + delete _impl_.function_.polynomial_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.function_.polynomial_); + } + clear_has_function(); + } +} +Function::Function(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:ommx.v1.Function) +} +inline PROTOBUF_NDEBUG_INLINE Function::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::ommx::v1::Function& from_msg) + : function_{}, + _cached_size_{0}, + _oneof_case_{from._oneof_case_[0]} {} + +Function::Function( + ::google::protobuf::Arena* arena, + const Function& from) + : ::google::protobuf::Message(arena) { + Function* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + switch (function_case()) { + case FUNCTION_NOT_SET: + break; + case kConstant: + _impl_.function_.constant_ = from._impl_.function_.constant_; + break; + case kLinear: + _impl_.function_.linear_ = ::google::protobuf::Message::CopyConstruct<::ommx::v1::Linear>(arena, *from._impl_.function_.linear_); + break; + case kQuadratic: + _impl_.function_.quadratic_ = ::google::protobuf::Message::CopyConstruct<::ommx::v1::Quadratic>(arena, *from._impl_.function_.quadratic_); + break; + case kPolynomial: + _impl_.function_.polynomial_ = ::google::protobuf::Message::CopyConstruct<::ommx::v1::Polynomial>(arena, *from._impl_.function_.polynomial_); + break; + } + + // @@protoc_insertion_point(copy_constructor:ommx.v1.Function) +} +inline PROTOBUF_NDEBUG_INLINE Function::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : function_{}, + _cached_size_{0}, + _oneof_case_{} {} + +inline void Function::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +Function::~Function() { + // @@protoc_insertion_point(destructor:ommx.v1.Function) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void Function::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + if (has_function()) { + clear_function(); + } + _impl_.~Impl_(); +} + +void Function::clear_function() { +// @@protoc_insertion_point(one_of_clear_start:ommx.v1.Function) + ::google::protobuf::internal::TSanWrite(&_impl_); + switch (function_case()) { + case kConstant: { + // No need to clear + break; + } + case kLinear: { + if (GetArena() == nullptr) { + delete _impl_.function_.linear_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.function_.linear_); + } + break; + } + case kQuadratic: { + if (GetArena() == nullptr) { + delete _impl_.function_.quadratic_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.function_.quadratic_); + } + break; + } + case kPolynomial: { + if (GetArena() == nullptr) { + delete _impl_.function_.polynomial_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.function_.polynomial_); + } + break; + } + case FUNCTION_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = FUNCTION_NOT_SET; +} + + +const ::google::protobuf::MessageLite::ClassData* +Function::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(Function, _impl_._cached_size_), + false, + }, + &Function::MergeImpl, + &Function::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2ffunction_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 4, 3, 0, 2> Function::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 4, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 3, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_Function_default_instance_._instance, + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::ommx::v1::Function>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // double constant = 1; + {PROTOBUF_FIELD_OFFSET(Function, _impl_.function_.constant_), _Internal::kOneofCaseOffset + 0, 0, + (0 | ::_fl::kFcOneof | ::_fl::kDouble)}, + // .ommx.v1.Linear linear = 2; + {PROTOBUF_FIELD_OFFSET(Function, _impl_.function_.linear_), _Internal::kOneofCaseOffset + 0, 0, + (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + // .ommx.v1.Quadratic quadratic = 3; + {PROTOBUF_FIELD_OFFSET(Function, _impl_.function_.quadratic_), _Internal::kOneofCaseOffset + 0, 1, + (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + // .ommx.v1.Polynomial polynomial = 4; + {PROTOBUF_FIELD_OFFSET(Function, _impl_.function_.polynomial_), _Internal::kOneofCaseOffset + 0, 2, + (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::ommx::v1::Linear>()}, + {::_pbi::TcParser::GetTable<::ommx::v1::Quadratic>()}, + {::_pbi::TcParser::GetTable<::ommx::v1::Polynomial>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void Function::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Function) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + clear_function(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +::uint8_t* Function::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:ommx.v1.Function) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + switch (function_case()) { + case kConstant: { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 1, this->_internal_constant(), target); + break; + } + case kLinear: { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *_impl_.function_.linear_, _impl_.function_.linear_->GetCachedSize(), target, stream); + break; + } + case kQuadratic: { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *_impl_.function_.quadratic_, _impl_.function_.quadratic_->GetCachedSize(), target, stream); + break; + } + case kPolynomial: { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, *_impl_.function_.polynomial_, _impl_.function_.polynomial_->GetCachedSize(), target, stream); + break; + } + default: + break; + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:ommx.v1.Function) + return target; +} + +::size_t Function::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:ommx.v1.Function) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + switch (function_case()) { + // double constant = 1; + case kConstant: { + total_size += 9; + break; + } + // .ommx.v1.Linear linear = 2; + case kLinear: { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.function_.linear_); + break; + } + // .ommx.v1.Quadratic quadratic = 3; + case kQuadratic: { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.function_.quadratic_); + break; + } + // .ommx.v1.Polynomial polynomial = 4; + case kPolynomial: { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.function_.polynomial_); + break; + } + case FUNCTION_NOT_SET: { + break; + } + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void Function::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:ommx.v1.Function) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (const uint32_t oneof_from_case = from._impl_._oneof_case_[0]) { + const uint32_t oneof_to_case = _this->_impl_._oneof_case_[0]; + const bool oneof_needs_init = oneof_to_case != oneof_from_case; + if (oneof_needs_init) { + if (oneof_to_case != 0) { + _this->clear_function(); + } + _this->_impl_._oneof_case_[0] = oneof_from_case; + } + + switch (oneof_from_case) { + case kConstant: { + _this->_impl_.function_.constant_ = from._impl_.function_.constant_; + break; + } + case kLinear: { + if (oneof_needs_init) { + _this->_impl_.function_.linear_ = + ::google::protobuf::Message::CopyConstruct<::ommx::v1::Linear>(arena, *from._impl_.function_.linear_); + } else { + _this->_impl_.function_.linear_->MergeFrom(from._internal_linear()); + } + break; + } + case kQuadratic: { + if (oneof_needs_init) { + _this->_impl_.function_.quadratic_ = + ::google::protobuf::Message::CopyConstruct<::ommx::v1::Quadratic>(arena, *from._impl_.function_.quadratic_); + } else { + _this->_impl_.function_.quadratic_->MergeFrom(from._internal_quadratic()); + } + break; + } + case kPolynomial: { + if (oneof_needs_init) { + _this->_impl_.function_.polynomial_ = + ::google::protobuf::Message::CopyConstruct<::ommx::v1::Polynomial>(arena, *from._impl_.function_.polynomial_); + } else { + _this->_impl_.function_.polynomial_->MergeFrom(from._internal_polynomial()); + } + break; + } + case FUNCTION_NOT_SET: + break; + } + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void Function::CopyFrom(const Function& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:ommx.v1.Function) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void Function::InternalSwap(Function* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.function_, other->_impl_.function_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); +} + +::google::protobuf::Metadata Function::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace ommx +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google +// @@protoc_insertion_point(global_scope) +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type + _static_init2_ PROTOBUF_UNUSED = + (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2ffunction_2eproto), + ::std::false_type{}); +#include "google/protobuf/port_undef.inc" diff --git a/cpp/ommx/v1/function.pb.h b/cpp/ommx/v1/function.pb.h new file mode 100644 index 00000000..86193341 --- /dev/null +++ b/cpp/ommx/v1/function.pb.h @@ -0,0 +1,604 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: ommx/v1/function.proto +// Protobuf C++ Version: 5.27.3 + +#ifndef GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2ffunction_2eproto_2epb_2eh +#define GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2ffunction_2eproto_2epb_2eh + +#include +#include +#include +#include + +#include "google/protobuf/runtime_version.h" +#if PROTOBUF_VERSION != 5027003 +#error "Protobuf C++ gencode is built with an incompatible version of" +#error "Protobuf C++ headers/runtime. See" +#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" +#endif +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/message.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export +#include "google/protobuf/unknown_field_set.h" +#include "ommx/v1/linear.pb.h" +#include "ommx/v1/polynomial.pb.h" +#include "ommx/v1/quadratic.pb.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" + +#define PROTOBUF_INTERNAL_EXPORT_ommx_2fv1_2ffunction_2eproto + +namespace google { +namespace protobuf { +namespace internal { +class AnyMetadata; +} // namespace internal +} // namespace protobuf +} // namespace google + +// Internal implementation detail -- do not use these members. +struct TableStruct_ommx_2fv1_2ffunction_2eproto { + static const ::uint32_t offsets[]; +}; +extern const ::google::protobuf::internal::DescriptorTable + descriptor_table_ommx_2fv1_2ffunction_2eproto; +namespace ommx { +namespace v1 { +class Function; +struct FunctionDefaultTypeInternal; +extern FunctionDefaultTypeInternal _Function_default_instance_; +} // namespace v1 +} // namespace ommx +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google + +namespace ommx { +namespace v1 { + +// =================================================================== + + +// ------------------------------------------------------------------- + +class Function final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:ommx.v1.Function) */ { + public: + inline Function() : Function(nullptr) {} + ~Function() override; + template + explicit PROTOBUF_CONSTEXPR Function( + ::google::protobuf::internal::ConstantInitialized); + + inline Function(const Function& from) : Function(nullptr, from) {} + inline Function(Function&& from) noexcept + : Function(nullptr, std::move(from)) {} + inline Function& operator=(const Function& from) { + CopyFrom(from); + return *this; + } + inline Function& operator=(Function&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Function& default_instance() { + return *internal_default_instance(); + } + enum FunctionCase { + kConstant = 1, + kLinear = 2, + kQuadratic = 3, + kPolynomial = 4, + FUNCTION_NOT_SET = 0, + }; + static inline const Function* internal_default_instance() { + return reinterpret_cast( + &_Function_default_instance_); + } + static constexpr int kIndexInFileMessages = 0; + friend void swap(Function& a, Function& b) { a.Swap(&b); } + inline void Swap(Function* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Function* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Function* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Function& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const Function& from) { Function::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(Function* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "ommx.v1.Function"; } + + protected: + explicit Function(::google::protobuf::Arena* arena); + Function(::google::protobuf::Arena* arena, const Function& from); + Function(::google::protobuf::Arena* arena, Function&& from) noexcept + : Function(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::Message::ClassData* GetClassData() const final; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kConstantFieldNumber = 1, + kLinearFieldNumber = 2, + kQuadraticFieldNumber = 3, + kPolynomialFieldNumber = 4, + }; + // double constant = 1; + bool has_constant() const; + void clear_constant() ; + double constant() const; + void set_constant(double value); + + private: + double _internal_constant() const; + void _internal_set_constant(double value); + + public: + // .ommx.v1.Linear linear = 2; + bool has_linear() const; + private: + bool _internal_has_linear() const; + + public: + void clear_linear() ; + const ::ommx::v1::Linear& linear() const; + PROTOBUF_NODISCARD ::ommx::v1::Linear* release_linear(); + ::ommx::v1::Linear* mutable_linear(); + void set_allocated_linear(::ommx::v1::Linear* value); + void unsafe_arena_set_allocated_linear(::ommx::v1::Linear* value); + ::ommx::v1::Linear* unsafe_arena_release_linear(); + + private: + const ::ommx::v1::Linear& _internal_linear() const; + ::ommx::v1::Linear* _internal_mutable_linear(); + + public: + // .ommx.v1.Quadratic quadratic = 3; + bool has_quadratic() const; + private: + bool _internal_has_quadratic() const; + + public: + void clear_quadratic() ; + const ::ommx::v1::Quadratic& quadratic() const; + PROTOBUF_NODISCARD ::ommx::v1::Quadratic* release_quadratic(); + ::ommx::v1::Quadratic* mutable_quadratic(); + void set_allocated_quadratic(::ommx::v1::Quadratic* value); + void unsafe_arena_set_allocated_quadratic(::ommx::v1::Quadratic* value); + ::ommx::v1::Quadratic* unsafe_arena_release_quadratic(); + + private: + const ::ommx::v1::Quadratic& _internal_quadratic() const; + ::ommx::v1::Quadratic* _internal_mutable_quadratic(); + + public: + // .ommx.v1.Polynomial polynomial = 4; + bool has_polynomial() const; + private: + bool _internal_has_polynomial() const; + + public: + void clear_polynomial() ; + const ::ommx::v1::Polynomial& polynomial() const; + PROTOBUF_NODISCARD ::ommx::v1::Polynomial* release_polynomial(); + ::ommx::v1::Polynomial* mutable_polynomial(); + void set_allocated_polynomial(::ommx::v1::Polynomial* value); + void unsafe_arena_set_allocated_polynomial(::ommx::v1::Polynomial* value); + ::ommx::v1::Polynomial* unsafe_arena_release_polynomial(); + + private: + const ::ommx::v1::Polynomial& _internal_polynomial() const; + ::ommx::v1::Polynomial* _internal_mutable_polynomial(); + + public: + void clear_function(); + FunctionCase function_case() const; + // @@protoc_insertion_point(class_scope:ommx.v1.Function) + private: + class _Internal; + void set_has_constant(); + void set_has_linear(); + void set_has_quadratic(); + void set_has_polynomial(); + inline bool has_function() const; + inline void clear_has_function(); + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 4, 3, + 0, 2> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_Function_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const Function& from_msg); + union FunctionUnion { + constexpr FunctionUnion() : _constinit_{} {} + ::google::protobuf::internal::ConstantInitialized _constinit_; + double constant_; + ::ommx::v1::Linear* linear_; + ::ommx::v1::Quadratic* quadratic_; + ::ommx::v1::Polynomial* polynomial_; + } function_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::uint32_t _oneof_case_[1]; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_ommx_2fv1_2ffunction_2eproto; +}; + +// =================================================================== + + + + +// =================================================================== + + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// Function + +// double constant = 1; +inline bool Function::has_constant() const { + return function_case() == kConstant; +} +inline void Function::set_has_constant() { + _impl_._oneof_case_[0] = kConstant; +} +inline void Function::clear_constant() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (function_case() == kConstant) { + _impl_.function_.constant_ = 0; + clear_has_function(); + } +} +inline double Function::constant() const { + // @@protoc_insertion_point(field_get:ommx.v1.Function.constant) + return _internal_constant(); +} +inline void Function::set_constant(double value) { + if (function_case() != kConstant) { + clear_function(); + set_has_constant(); + } + _impl_.function_.constant_ = value; + // @@protoc_insertion_point(field_set:ommx.v1.Function.constant) +} +inline double Function::_internal_constant() const { + if (function_case() == kConstant) { + return _impl_.function_.constant_; + } + return 0; +} + +// .ommx.v1.Linear linear = 2; +inline bool Function::has_linear() const { + return function_case() == kLinear; +} +inline bool Function::_internal_has_linear() const { + return function_case() == kLinear; +} +inline void Function::set_has_linear() { + _impl_._oneof_case_[0] = kLinear; +} +inline ::ommx::v1::Linear* Function::release_linear() { + // @@protoc_insertion_point(field_release:ommx.v1.Function.linear) + if (function_case() == kLinear) { + clear_has_function(); + auto* temp = _impl_.function_.linear_; + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.function_.linear_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::ommx::v1::Linear& Function::_internal_linear() const { + return function_case() == kLinear ? *_impl_.function_.linear_ : reinterpret_cast<::ommx::v1::Linear&>(::ommx::v1::_Linear_default_instance_); +} +inline const ::ommx::v1::Linear& Function::linear() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Function.linear) + return _internal_linear(); +} +inline ::ommx::v1::Linear* Function::unsafe_arena_release_linear() { + // @@protoc_insertion_point(field_unsafe_arena_release:ommx.v1.Function.linear) + if (function_case() == kLinear) { + clear_has_function(); + auto* temp = _impl_.function_.linear_; + _impl_.function_.linear_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void Function::unsafe_arena_set_allocated_linear(::ommx::v1::Linear* value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_function(); + if (value) { + set_has_linear(); + _impl_.function_.linear_ = value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ommx.v1.Function.linear) +} +inline ::ommx::v1::Linear* Function::_internal_mutable_linear() { + if (function_case() != kLinear) { + clear_function(); + set_has_linear(); + _impl_.function_.linear_ = + ::google::protobuf::Message::DefaultConstruct<::ommx::v1::Linear>(GetArena()); + } + return _impl_.function_.linear_; +} +inline ::ommx::v1::Linear* Function::mutable_linear() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::ommx::v1::Linear* _msg = _internal_mutable_linear(); + // @@protoc_insertion_point(field_mutable:ommx.v1.Function.linear) + return _msg; +} + +// .ommx.v1.Quadratic quadratic = 3; +inline bool Function::has_quadratic() const { + return function_case() == kQuadratic; +} +inline bool Function::_internal_has_quadratic() const { + return function_case() == kQuadratic; +} +inline void Function::set_has_quadratic() { + _impl_._oneof_case_[0] = kQuadratic; +} +inline ::ommx::v1::Quadratic* Function::release_quadratic() { + // @@protoc_insertion_point(field_release:ommx.v1.Function.quadratic) + if (function_case() == kQuadratic) { + clear_has_function(); + auto* temp = _impl_.function_.quadratic_; + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.function_.quadratic_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::ommx::v1::Quadratic& Function::_internal_quadratic() const { + return function_case() == kQuadratic ? *_impl_.function_.quadratic_ : reinterpret_cast<::ommx::v1::Quadratic&>(::ommx::v1::_Quadratic_default_instance_); +} +inline const ::ommx::v1::Quadratic& Function::quadratic() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Function.quadratic) + return _internal_quadratic(); +} +inline ::ommx::v1::Quadratic* Function::unsafe_arena_release_quadratic() { + // @@protoc_insertion_point(field_unsafe_arena_release:ommx.v1.Function.quadratic) + if (function_case() == kQuadratic) { + clear_has_function(); + auto* temp = _impl_.function_.quadratic_; + _impl_.function_.quadratic_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void Function::unsafe_arena_set_allocated_quadratic(::ommx::v1::Quadratic* value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_function(); + if (value) { + set_has_quadratic(); + _impl_.function_.quadratic_ = value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ommx.v1.Function.quadratic) +} +inline ::ommx::v1::Quadratic* Function::_internal_mutable_quadratic() { + if (function_case() != kQuadratic) { + clear_function(); + set_has_quadratic(); + _impl_.function_.quadratic_ = + ::google::protobuf::Message::DefaultConstruct<::ommx::v1::Quadratic>(GetArena()); + } + return _impl_.function_.quadratic_; +} +inline ::ommx::v1::Quadratic* Function::mutable_quadratic() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::ommx::v1::Quadratic* _msg = _internal_mutable_quadratic(); + // @@protoc_insertion_point(field_mutable:ommx.v1.Function.quadratic) + return _msg; +} + +// .ommx.v1.Polynomial polynomial = 4; +inline bool Function::has_polynomial() const { + return function_case() == kPolynomial; +} +inline bool Function::_internal_has_polynomial() const { + return function_case() == kPolynomial; +} +inline void Function::set_has_polynomial() { + _impl_._oneof_case_[0] = kPolynomial; +} +inline ::ommx::v1::Polynomial* Function::release_polynomial() { + // @@protoc_insertion_point(field_release:ommx.v1.Function.polynomial) + if (function_case() == kPolynomial) { + clear_has_function(); + auto* temp = _impl_.function_.polynomial_; + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.function_.polynomial_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::ommx::v1::Polynomial& Function::_internal_polynomial() const { + return function_case() == kPolynomial ? *_impl_.function_.polynomial_ : reinterpret_cast<::ommx::v1::Polynomial&>(::ommx::v1::_Polynomial_default_instance_); +} +inline const ::ommx::v1::Polynomial& Function::polynomial() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Function.polynomial) + return _internal_polynomial(); +} +inline ::ommx::v1::Polynomial* Function::unsafe_arena_release_polynomial() { + // @@protoc_insertion_point(field_unsafe_arena_release:ommx.v1.Function.polynomial) + if (function_case() == kPolynomial) { + clear_has_function(); + auto* temp = _impl_.function_.polynomial_; + _impl_.function_.polynomial_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void Function::unsafe_arena_set_allocated_polynomial(::ommx::v1::Polynomial* value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_function(); + if (value) { + set_has_polynomial(); + _impl_.function_.polynomial_ = value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ommx.v1.Function.polynomial) +} +inline ::ommx::v1::Polynomial* Function::_internal_mutable_polynomial() { + if (function_case() != kPolynomial) { + clear_function(); + set_has_polynomial(); + _impl_.function_.polynomial_ = + ::google::protobuf::Message::DefaultConstruct<::ommx::v1::Polynomial>(GetArena()); + } + return _impl_.function_.polynomial_; +} +inline ::ommx::v1::Polynomial* Function::mutable_polynomial() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::ommx::v1::Polynomial* _msg = _internal_mutable_polynomial(); + // @@protoc_insertion_point(field_mutable:ommx.v1.Function.polynomial) + return _msg; +} + +inline bool Function::has_function() const { + return function_case() != FUNCTION_NOT_SET; +} +inline void Function::clear_has_function() { + _impl_._oneof_case_[0] = FUNCTION_NOT_SET; +} +inline Function::FunctionCase Function::function_case() const { + return Function::FunctionCase(_impl_._oneof_case_[0]); +} +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace ommx + + +// @@protoc_insertion_point(global_scope) + +#include "google/protobuf/port_undef.inc" + +#endif // GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2ffunction_2eproto_2epb_2eh diff --git a/cpp/ommx/v1/instance.pb.cc b/cpp/ommx/v1/instance.pb.cc new file mode 100644 index 00000000..c663c5f0 --- /dev/null +++ b/cpp/ommx/v1/instance.pb.cc @@ -0,0 +1,870 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: ommx/v1/instance.proto +// Protobuf C++ Version: 5.27.3 + +#include "ommx/v1/instance.pb.h" + +#include +#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/generated_message_tctable_impl.h" +#include "google/protobuf/extension_set.h" +#include "google/protobuf/wire_format_lite.h" +#include "google/protobuf/descriptor.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/reflection_ops.h" +#include "google/protobuf/wire_format.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" +PROTOBUF_PRAGMA_INIT_SEG +namespace _pb = ::google::protobuf; +namespace _pbi = ::google::protobuf::internal; +namespace _fl = ::google::protobuf::internal::field_layout; +namespace ommx { +namespace v1 { + +inline constexpr Instance_Description::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + authors_{}, + name_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + description_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()), + created_by_( + &::google::protobuf::internal::fixed_address_empty_string, + ::_pbi::ConstantInitialized()) {} + +template +PROTOBUF_CONSTEXPR Instance_Description::Instance_Description(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct Instance_DescriptionDefaultTypeInternal { + PROTOBUF_CONSTEXPR Instance_DescriptionDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~Instance_DescriptionDefaultTypeInternal() {} + union { + Instance_Description _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Instance_DescriptionDefaultTypeInternal _Instance_Description_default_instance_; + +inline constexpr Instance::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + decision_variables_{}, + constraints_{}, + description_{nullptr}, + objective_{nullptr}, + sense_{static_cast< ::ommx::v1::Instance_Sense >(0)} {} + +template +PROTOBUF_CONSTEXPR Instance::Instance(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct InstanceDefaultTypeInternal { + PROTOBUF_CONSTEXPR InstanceDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~InstanceDefaultTypeInternal() {} + union { + Instance _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstanceDefaultTypeInternal _Instance_default_instance_; +} // namespace v1 +} // namespace ommx +static const ::_pb::EnumDescriptor* file_level_enum_descriptors_ommx_2fv1_2finstance_2eproto[1]; +static constexpr const ::_pb::ServiceDescriptor** + file_level_service_descriptors_ommx_2fv1_2finstance_2eproto = nullptr; +const ::uint32_t + TableStruct_ommx_2fv1_2finstance_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::ommx::v1::Instance_Description, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Instance_Description, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::ommx::v1::Instance_Description, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Instance_Description, _impl_.description_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Instance_Description, _impl_.authors_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Instance_Description, _impl_.created_by_), + 0, + 1, + ~0u, + 2, + PROTOBUF_FIELD_OFFSET(::ommx::v1::Instance, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Instance, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::ommx::v1::Instance, _impl_.description_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Instance, _impl_.decision_variables_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Instance, _impl_.objective_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Instance, _impl_.constraints_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Instance, _impl_.sense_), + 0, + ~0u, + 1, + ~0u, + ~0u, +}; + +static const ::_pbi::MigrationSchema + schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + {0, 12, -1, sizeof(::ommx::v1::Instance_Description)}, + {16, 29, -1, sizeof(::ommx::v1::Instance)}, +}; +static const ::_pb::Message* const file_default_instances[] = { + &::ommx::v1::_Instance_Description_default_instance_._instance, + &::ommx::v1::_Instance_default_instance_._instance, +}; +const char descriptor_table_protodef_ommx_2fv1_2finstance_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + "\n\026ommx/v1/instance.proto\022\007ommx.v1\032\030ommx/" + "v1/constraint.proto\032 ommx/v1/decision_va" + "riables.proto\032\026ommx/v1/function.proto\"\304\003" + "\n\010Instance\0222\n\013description\030\001 \001(\0132\035.ommx.v" + "1.Instance.Description\0225\n\022decision_varia" + "bles\030\002 \003(\0132\031.ommx.v1.DecisionVariable\022$\n" + "\tobjective\030\003 \001(\0132\021.ommx.v1.Function\022(\n\013c" + "onstraints\030\004 \003(\0132\023.ommx.v1.Constraint\022&\n" + "\005sense\030\005 \001(\0162\027.ommx.v1.Instance.Sense\032\214\001" + "\n\013Description\022\021\n\004name\030\001 \001(\tH\000\210\001\001\022\030\n\013desc" + "ription\030\002 \001(\tH\001\210\001\001\022\017\n\007authors\030\003 \003(\t\022\027\n\nc" + "reated_by\030\004 \001(\tH\002\210\001\001B\007\n\005_nameB\016\n\014_descri" + "ptionB\r\n\013_created_by\"F\n\005Sense\022\025\n\021SENSE_U" + "NSPECIFIED\020\000\022\022\n\016SENSE_MINIMIZE\020\001\022\022\n\016SENS" + "E_MAXIMIZE\020\002b\006proto3" +}; +static const ::_pbi::DescriptorTable* const descriptor_table_ommx_2fv1_2finstance_2eproto_deps[3] = + { + &::descriptor_table_ommx_2fv1_2fconstraint_2eproto, + &::descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto, + &::descriptor_table_ommx_2fv1_2ffunction_2eproto, +}; +static ::absl::once_flag descriptor_table_ommx_2fv1_2finstance_2eproto_once; +PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2finstance_2eproto = { + false, + false, + 580, + descriptor_table_protodef_ommx_2fv1_2finstance_2eproto, + "ommx/v1/instance.proto", + &descriptor_table_ommx_2fv1_2finstance_2eproto_once, + descriptor_table_ommx_2fv1_2finstance_2eproto_deps, + 3, + 2, + schemas, + file_default_instances, + TableStruct_ommx_2fv1_2finstance_2eproto::offsets, + file_level_enum_descriptors_ommx_2fv1_2finstance_2eproto, + file_level_service_descriptors_ommx_2fv1_2finstance_2eproto, +}; +namespace ommx { +namespace v1 { +const ::google::protobuf::EnumDescriptor* Instance_Sense_descriptor() { + ::google::protobuf::internal::AssignDescriptors(&descriptor_table_ommx_2fv1_2finstance_2eproto); + return file_level_enum_descriptors_ommx_2fv1_2finstance_2eproto[0]; +} +PROTOBUF_CONSTINIT const uint32_t Instance_Sense_internal_data_[] = { + 196608u, 0u, }; +bool Instance_Sense_IsValid(int value) { + return 0 <= value && value <= 2; +} +#if (__cplusplus < 201703) && \ + (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) + +constexpr Instance_Sense Instance::SENSE_UNSPECIFIED; +constexpr Instance_Sense Instance::SENSE_MINIMIZE; +constexpr Instance_Sense Instance::SENSE_MAXIMIZE; +constexpr Instance_Sense Instance::Sense_MIN; +constexpr Instance_Sense Instance::Sense_MAX; +constexpr int Instance::Sense_ARRAYSIZE; + +#endif // (__cplusplus < 201703) && + // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +// =================================================================== + +class Instance_Description::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_._has_bits_); +}; + +Instance_Description::Instance_Description(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:ommx.v1.Instance.Description) +} +inline PROTOBUF_NDEBUG_INLINE Instance_Description::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::ommx::v1::Instance_Description& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + authors_{visibility, arena, from.authors_}, + name_(arena, from.name_), + description_(arena, from.description_), + created_by_(arena, from.created_by_) {} + +Instance_Description::Instance_Description( + ::google::protobuf::Arena* arena, + const Instance_Description& from) + : ::google::protobuf::Message(arena) { + Instance_Description* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:ommx.v1.Instance.Description) +} +inline PROTOBUF_NDEBUG_INLINE Instance_Description::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + authors_{visibility, arena}, + name_(arena), + description_(arena), + created_by_(arena) {} + +inline void Instance_Description::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +Instance_Description::~Instance_Description() { + // @@protoc_insertion_point(destructor:ommx.v1.Instance.Description) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void Instance_Description::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.name_.Destroy(); + _impl_.description_.Destroy(); + _impl_.created_by_.Destroy(); + _impl_.~Impl_(); +} + +const ::google::protobuf::MessageLite::ClassData* +Instance_Description::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_._cached_size_), + false, + }, + &Instance_Description::MergeImpl, + &Instance_Description::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2finstance_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 0, 69, 2> Instance_Description::_table_ = { + { + PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_Instance_Description_default_instance_._instance, + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::ommx::v1::Instance_Description>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // optional string created_by = 4; + {::_pbi::TcParser::FastUS1, + {34, 2, 0, PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_.created_by_)}}, + // optional string name = 1; + {::_pbi::TcParser::FastUS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_.name_)}}, + // optional string description = 2; + {::_pbi::TcParser::FastUS1, + {18, 1, 0, PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_.description_)}}, + // repeated string authors = 3; + {::_pbi::TcParser::FastUR1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_.authors_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // optional string name = 1; + {PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // optional string description = 2; + {PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_.description_), _Internal::kHasBitsOffset + 1, 0, + (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // repeated string authors = 3; + {PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_.authors_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)}, + // optional string created_by = 4; + {PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_.created_by_), _Internal::kHasBitsOffset + 2, 0, + (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, + }}, + // no aux_entries + {{ + "\34\4\13\7\12\0\0\0" + "ommx.v1.Instance.Description" + "name" + "description" + "authors" + "created_by" + }}, +}; + +PROTOBUF_NOINLINE void Instance_Description::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Instance.Description) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.authors_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.description_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + _impl_.created_by_.ClearNonDefaultToEmpty(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +::uint8_t* Instance_Description::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:ommx.v1.Instance.Description) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + const std::string& _s = this->_internal_name(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.Instance.Description.name"); + target = stream->WriteStringMaybeAliased(1, _s, target); + } + + // optional string description = 2; + if (cached_has_bits & 0x00000002u) { + const std::string& _s = this->_internal_description(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.Instance.Description.description"); + target = stream->WriteStringMaybeAliased(2, _s, target); + } + + // repeated string authors = 3; + for (int i = 0, n = this->_internal_authors_size(); i < n; ++i) { + const auto& s = this->_internal_authors().Get(i); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.Instance.Description.authors"); + target = stream->WriteString(3, s, target); + } + + // optional string created_by = 4; + if (cached_has_bits & 0x00000004u) { + const std::string& _s = this->_internal_created_by(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.Instance.Description.created_by"); + target = stream->WriteStringMaybeAliased(4, _s, target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:ommx.v1.Instance.Description) + return target; +} + +::size_t Instance_Description::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:ommx.v1.Instance.Description) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); + // repeated string authors = 3; + total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_authors().size()); + for (int i = 0, n = _internal_authors().size(); i < n; ++i) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + _internal_authors().Get(i)); + } + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // optional string description = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_description()); + } + + // optional string created_by = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_created_by()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void Instance_Description::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:ommx.v1.Instance.Description) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_authors()->MergeFrom(from._internal_authors()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_name(from._internal_name()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_description(from._internal_description()); + } + if (cached_has_bits & 0x00000004u) { + _this->_internal_set_created_by(from._internal_created_by()); + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void Instance_Description::CopyFrom(const Instance_Description& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:ommx.v1.Instance.Description) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void Instance_Description::InternalSwap(Instance_Description* PROTOBUF_RESTRICT other) { + using std::swap; + auto* arena = GetArena(); + ABSL_DCHECK_EQ(arena, other->GetArena()); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.authors_.InternalSwap(&other->_impl_.authors_); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_, &other->_impl_.name_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.description_, &other->_impl_.description_, arena); + ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.created_by_, &other->_impl_.created_by_, arena); +} + +::google::protobuf::Metadata Instance_Description::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + +class Instance::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(Instance, _impl_._has_bits_); +}; + +void Instance::clear_decision_variables() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.decision_variables_.Clear(); +} +void Instance::clear_objective() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.objective_ != nullptr) _impl_.objective_->Clear(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +void Instance::clear_constraints() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.constraints_.Clear(); +} +Instance::Instance(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:ommx.v1.Instance) +} +inline PROTOBUF_NDEBUG_INLINE Instance::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::ommx::v1::Instance& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + decision_variables_{visibility, arena, from.decision_variables_}, + constraints_{visibility, arena, from.constraints_} {} + +Instance::Instance( + ::google::protobuf::Arena* arena, + const Instance& from) + : ::google::protobuf::Message(arena) { + Instance* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.description_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::Message::CopyConstruct<::ommx::v1::Instance_Description>( + arena, *from._impl_.description_) + : nullptr; + _impl_.objective_ = (cached_has_bits & 0x00000002u) ? ::google::protobuf::Message::CopyConstruct<::ommx::v1::Function>( + arena, *from._impl_.objective_) + : nullptr; + _impl_.sense_ = from._impl_.sense_; + + // @@protoc_insertion_point(copy_constructor:ommx.v1.Instance) +} +inline PROTOBUF_NDEBUG_INLINE Instance::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + decision_variables_{visibility, arena}, + constraints_{visibility, arena} {} + +inline void Instance::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, description_), + 0, + offsetof(Impl_, sense_) - + offsetof(Impl_, description_) + + sizeof(Impl_::sense_)); +} +Instance::~Instance() { + // @@protoc_insertion_point(destructor:ommx.v1.Instance) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void Instance::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + delete _impl_.description_; + delete _impl_.objective_; + _impl_.~Impl_(); +} + +const ::google::protobuf::MessageLite::ClassData* +Instance::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(Instance, _impl_._cached_size_), + false, + }, + &Instance::MergeImpl, + &Instance::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2finstance_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 5, 4, 0, 2> Instance::_table_ = { + { + PROTOBUF_FIELD_OFFSET(Instance, _impl_._has_bits_), + 0, // no _extensions_ + 5, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967264, // skipmap + offsetof(decltype(_table_), field_entries), + 5, // num_field_entries + 4, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_Instance_default_instance_._instance, + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::ommx::v1::Instance>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .ommx.v1.Instance.Description description = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(Instance, _impl_.description_)}}, + // repeated .ommx.v1.DecisionVariable decision_variables = 2; + {::_pbi::TcParser::FastMtR1, + {18, 63, 1, PROTOBUF_FIELD_OFFSET(Instance, _impl_.decision_variables_)}}, + // .ommx.v1.Function objective = 3; + {::_pbi::TcParser::FastMtS1, + {26, 1, 2, PROTOBUF_FIELD_OFFSET(Instance, _impl_.objective_)}}, + // repeated .ommx.v1.Constraint constraints = 4; + {::_pbi::TcParser::FastMtR1, + {34, 63, 3, PROTOBUF_FIELD_OFFSET(Instance, _impl_.constraints_)}}, + // .ommx.v1.Instance.Sense sense = 5; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Instance, _impl_.sense_), 63>(), + {40, 63, 0, PROTOBUF_FIELD_OFFSET(Instance, _impl_.sense_)}}, + {::_pbi::TcParser::MiniParse, {}}, + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // .ommx.v1.Instance.Description description = 1; + {PROTOBUF_FIELD_OFFSET(Instance, _impl_.description_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .ommx.v1.DecisionVariable decision_variables = 2; + {PROTOBUF_FIELD_OFFSET(Instance, _impl_.decision_variables_), -1, 1, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // .ommx.v1.Function objective = 3; + {PROTOBUF_FIELD_OFFSET(Instance, _impl_.objective_), _Internal::kHasBitsOffset + 1, 2, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .ommx.v1.Constraint constraints = 4; + {PROTOBUF_FIELD_OFFSET(Instance, _impl_.constraints_), -1, 3, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // .ommx.v1.Instance.Sense sense = 5; + {PROTOBUF_FIELD_OFFSET(Instance, _impl_.sense_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, + }}, {{ + {::_pbi::TcParser::GetTable<::ommx::v1::Instance_Description>()}, + {::_pbi::TcParser::GetTable<::ommx::v1::DecisionVariable>()}, + {::_pbi::TcParser::GetTable<::ommx::v1::Function>()}, + {::_pbi::TcParser::GetTable<::ommx::v1::Constraint>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void Instance::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Instance) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.decision_variables_.Clear(); + _impl_.constraints_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.description_ != nullptr); + _impl_.description_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + ABSL_DCHECK(_impl_.objective_ != nullptr); + _impl_.objective_->Clear(); + } + } + _impl_.sense_ = 0; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +::uint8_t* Instance::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:ommx.v1.Instance) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // .ommx.v1.Instance.Description description = 1; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *_impl_.description_, _impl_.description_->GetCachedSize(), target, stream); + } + + // repeated .ommx.v1.DecisionVariable decision_variables = 2; + for (unsigned i = 0, n = static_cast( + this->_internal_decision_variables_size()); + i < n; i++) { + const auto& repfield = this->_internal_decision_variables().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, repfield, repfield.GetCachedSize(), + target, stream); + } + + // .ommx.v1.Function objective = 3; + if (cached_has_bits & 0x00000002u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *_impl_.objective_, _impl_.objective_->GetCachedSize(), target, stream); + } + + // repeated .ommx.v1.Constraint constraints = 4; + for (unsigned i = 0, n = static_cast( + this->_internal_constraints_size()); + i < n; i++) { + const auto& repfield = this->_internal_constraints().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, repfield, repfield.GetCachedSize(), + target, stream); + } + + // .ommx.v1.Instance.Sense sense = 5; + if (this->_internal_sense() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 5, this->_internal_sense(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:ommx.v1.Instance) + return target; +} + +::size_t Instance::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:ommx.v1.Instance) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); + // repeated .ommx.v1.DecisionVariable decision_variables = 2; + total_size += 1UL * this->_internal_decision_variables_size(); + for (const auto& msg : this->_internal_decision_variables()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + // repeated .ommx.v1.Constraint constraints = 4; + total_size += 1UL * this->_internal_constraints_size(); + for (const auto& msg : this->_internal_constraints()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // .ommx.v1.Instance.Description description = 1; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.description_); + } + + // .ommx.v1.Function objective = 3; + if (cached_has_bits & 0x00000002u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.objective_); + } + + } + // .ommx.v1.Instance.Sense sense = 5; + if (this->_internal_sense() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_sense()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void Instance::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:ommx.v1.Instance) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_decision_variables()->MergeFrom( + from._internal_decision_variables()); + _this->_internal_mutable_constraints()->MergeFrom( + from._internal_constraints()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(from._impl_.description_ != nullptr); + if (_this->_impl_.description_ == nullptr) { + _this->_impl_.description_ = + ::google::protobuf::Message::CopyConstruct<::ommx::v1::Instance_Description>(arena, *from._impl_.description_); + } else { + _this->_impl_.description_->MergeFrom(*from._impl_.description_); + } + } + if (cached_has_bits & 0x00000002u) { + ABSL_DCHECK(from._impl_.objective_ != nullptr); + if (_this->_impl_.objective_ == nullptr) { + _this->_impl_.objective_ = + ::google::protobuf::Message::CopyConstruct<::ommx::v1::Function>(arena, *from._impl_.objective_); + } else { + _this->_impl_.objective_->MergeFrom(*from._impl_.objective_); + } + } + } + if (from._internal_sense() != 0) { + _this->_impl_.sense_ = from._impl_.sense_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void Instance::CopyFrom(const Instance& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:ommx.v1.Instance) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void Instance::InternalSwap(Instance* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.decision_variables_.InternalSwap(&other->_impl_.decision_variables_); + _impl_.constraints_.InternalSwap(&other->_impl_.constraints_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(Instance, _impl_.sense_) + + sizeof(Instance::_impl_.sense_) + - PROTOBUF_FIELD_OFFSET(Instance, _impl_.description_)>( + reinterpret_cast(&_impl_.description_), + reinterpret_cast(&other->_impl_.description_)); +} + +::google::protobuf::Metadata Instance::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace ommx +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google +// @@protoc_insertion_point(global_scope) +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type + _static_init2_ PROTOBUF_UNUSED = + (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2finstance_2eproto), + ::std::false_type{}); +#include "google/protobuf/port_undef.inc" diff --git a/cpp/ommx/v1/instance.pb.h b/cpp/ommx/v1/instance.pb.h new file mode 100644 index 00000000..5118cfe1 --- /dev/null +++ b/cpp/ommx/v1/instance.pb.h @@ -0,0 +1,1284 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: ommx/v1/instance.proto +// Protobuf C++ Version: 5.27.3 + +#ifndef GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2finstance_2eproto_2epb_2eh +#define GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2finstance_2eproto_2epb_2eh + +#include +#include +#include +#include + +#include "google/protobuf/runtime_version.h" +#if PROTOBUF_VERSION != 5027003 +#error "Protobuf C++ gencode is built with an incompatible version of" +#error "Protobuf C++ headers/runtime. See" +#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" +#endif +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/message.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export +#include "google/protobuf/generated_enum_reflection.h" +#include "google/protobuf/unknown_field_set.h" +#include "ommx/v1/constraint.pb.h" +#include "ommx/v1/decision_variables.pb.h" +#include "ommx/v1/function.pb.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" + +#define PROTOBUF_INTERNAL_EXPORT_ommx_2fv1_2finstance_2eproto + +namespace google { +namespace protobuf { +namespace internal { +class AnyMetadata; +} // namespace internal +} // namespace protobuf +} // namespace google + +// Internal implementation detail -- do not use these members. +struct TableStruct_ommx_2fv1_2finstance_2eproto { + static const ::uint32_t offsets[]; +}; +extern const ::google::protobuf::internal::DescriptorTable + descriptor_table_ommx_2fv1_2finstance_2eproto; +namespace ommx { +namespace v1 { +class Instance; +struct InstanceDefaultTypeInternal; +extern InstanceDefaultTypeInternal _Instance_default_instance_; +class Instance_Description; +struct Instance_DescriptionDefaultTypeInternal; +extern Instance_DescriptionDefaultTypeInternal _Instance_Description_default_instance_; +} // namespace v1 +} // namespace ommx +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google + +namespace ommx { +namespace v1 { +enum Instance_Sense : int { + Instance_Sense_SENSE_UNSPECIFIED = 0, + Instance_Sense_SENSE_MINIMIZE = 1, + Instance_Sense_SENSE_MAXIMIZE = 2, + Instance_Sense_Instance_Sense_INT_MIN_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::min(), + Instance_Sense_Instance_Sense_INT_MAX_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::max(), +}; + +bool Instance_Sense_IsValid(int value); +extern const uint32_t Instance_Sense_internal_data_[]; +constexpr Instance_Sense Instance_Sense_Sense_MIN = static_cast(0); +constexpr Instance_Sense Instance_Sense_Sense_MAX = static_cast(2); +constexpr int Instance_Sense_Sense_ARRAYSIZE = 2 + 1; +const ::google::protobuf::EnumDescriptor* +Instance_Sense_descriptor(); +template +const std::string& Instance_Sense_Name(T value) { + static_assert(std::is_same::value || + std::is_integral::value, + "Incorrect type passed to Sense_Name()."); + return Instance_Sense_Name(static_cast(value)); +} +template <> +inline const std::string& Instance_Sense_Name(Instance_Sense value) { + return ::google::protobuf::internal::NameOfDenseEnum( + static_cast(value)); +} +inline bool Instance_Sense_Parse(absl::string_view name, Instance_Sense* value) { + return ::google::protobuf::internal::ParseNamedEnum( + Instance_Sense_descriptor(), name, value); +} + +// =================================================================== + + +// ------------------------------------------------------------------- + +class Instance_Description final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:ommx.v1.Instance.Description) */ { + public: + inline Instance_Description() : Instance_Description(nullptr) {} + ~Instance_Description() override; + template + explicit PROTOBUF_CONSTEXPR Instance_Description( + ::google::protobuf::internal::ConstantInitialized); + + inline Instance_Description(const Instance_Description& from) : Instance_Description(nullptr, from) {} + inline Instance_Description(Instance_Description&& from) noexcept + : Instance_Description(nullptr, std::move(from)) {} + inline Instance_Description& operator=(const Instance_Description& from) { + CopyFrom(from); + return *this; + } + inline Instance_Description& operator=(Instance_Description&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Instance_Description& default_instance() { + return *internal_default_instance(); + } + static inline const Instance_Description* internal_default_instance() { + return reinterpret_cast( + &_Instance_Description_default_instance_); + } + static constexpr int kIndexInFileMessages = 0; + friend void swap(Instance_Description& a, Instance_Description& b) { a.Swap(&b); } + inline void Swap(Instance_Description* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Instance_Description* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Instance_Description* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Instance_Description& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const Instance_Description& from) { Instance_Description::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(Instance_Description* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "ommx.v1.Instance.Description"; } + + protected: + explicit Instance_Description(::google::protobuf::Arena* arena); + Instance_Description(::google::protobuf::Arena* arena, const Instance_Description& from); + Instance_Description(::google::protobuf::Arena* arena, Instance_Description&& from) noexcept + : Instance_Description(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::Message::ClassData* GetClassData() const final; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kAuthorsFieldNumber = 3, + kNameFieldNumber = 1, + kDescriptionFieldNumber = 2, + kCreatedByFieldNumber = 4, + }; + // repeated string authors = 3; + int authors_size() const; + private: + int _internal_authors_size() const; + + public: + void clear_authors() ; + const std::string& authors(int index) const; + std::string* mutable_authors(int index); + void set_authors(int index, const std::string& value); + void set_authors(int index, std::string&& value); + void set_authors(int index, const char* value); + void set_authors(int index, const char* value, std::size_t size); + void set_authors(int index, absl::string_view value); + std::string* add_authors(); + void add_authors(const std::string& value); + void add_authors(std::string&& value); + void add_authors(const char* value); + void add_authors(const char* value, std::size_t size); + void add_authors(absl::string_view value); + const ::google::protobuf::RepeatedPtrField& authors() const; + ::google::protobuf::RepeatedPtrField* mutable_authors(); + + private: + const ::google::protobuf::RepeatedPtrField& _internal_authors() const; + ::google::protobuf::RepeatedPtrField* _internal_mutable_authors(); + + public: + // optional string name = 1; + bool has_name() const; + void clear_name() ; + const std::string& name() const; + template + void set_name(Arg_&& arg, Args_... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* value); + + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name( + const std::string& value); + std::string* _internal_mutable_name(); + + public: + // optional string description = 2; + bool has_description() const; + void clear_description() ; + const std::string& description() const; + template + void set_description(Arg_&& arg, Args_... args); + std::string* mutable_description(); + PROTOBUF_NODISCARD std::string* release_description(); + void set_allocated_description(std::string* value); + + private: + const std::string& _internal_description() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_description( + const std::string& value); + std::string* _internal_mutable_description(); + + public: + // optional string created_by = 4; + bool has_created_by() const; + void clear_created_by() ; + const std::string& created_by() const; + template + void set_created_by(Arg_&& arg, Args_... args); + std::string* mutable_created_by(); + PROTOBUF_NODISCARD std::string* release_created_by(); + void set_allocated_created_by(std::string* value); + + private: + const std::string& _internal_created_by() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_created_by( + const std::string& value); + std::string* _internal_mutable_created_by(); + + public: + // @@protoc_insertion_point(class_scope:ommx.v1.Instance.Description) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 2, 4, 0, + 69, 2> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_Instance_Description_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const Instance_Description& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField authors_; + ::google::protobuf::internal::ArenaStringPtr name_; + ::google::protobuf::internal::ArenaStringPtr description_; + ::google::protobuf::internal::ArenaStringPtr created_by_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_ommx_2fv1_2finstance_2eproto; +}; +// ------------------------------------------------------------------- + +class Instance final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:ommx.v1.Instance) */ { + public: + inline Instance() : Instance(nullptr) {} + ~Instance() override; + template + explicit PROTOBUF_CONSTEXPR Instance( + ::google::protobuf::internal::ConstantInitialized); + + inline Instance(const Instance& from) : Instance(nullptr, from) {} + inline Instance(Instance&& from) noexcept + : Instance(nullptr, std::move(from)) {} + inline Instance& operator=(const Instance& from) { + CopyFrom(from); + return *this; + } + inline Instance& operator=(Instance&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Instance& default_instance() { + return *internal_default_instance(); + } + static inline const Instance* internal_default_instance() { + return reinterpret_cast( + &_Instance_default_instance_); + } + static constexpr int kIndexInFileMessages = 1; + friend void swap(Instance& a, Instance& b) { a.Swap(&b); } + inline void Swap(Instance* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Instance* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Instance* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Instance& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const Instance& from) { Instance::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(Instance* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "ommx.v1.Instance"; } + + protected: + explicit Instance(::google::protobuf::Arena* arena); + Instance(::google::protobuf::Arena* arena, const Instance& from); + Instance(::google::protobuf::Arena* arena, Instance&& from) noexcept + : Instance(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::Message::ClassData* GetClassData() const final; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + using Description = Instance_Description; + using Sense = Instance_Sense; + static constexpr Sense SENSE_UNSPECIFIED = Instance_Sense_SENSE_UNSPECIFIED; + static constexpr Sense SENSE_MINIMIZE = Instance_Sense_SENSE_MINIMIZE; + static constexpr Sense SENSE_MAXIMIZE = Instance_Sense_SENSE_MAXIMIZE; + static inline bool Sense_IsValid(int value) { + return Instance_Sense_IsValid(value); + } + static constexpr Sense Sense_MIN = Instance_Sense_Sense_MIN; + static constexpr Sense Sense_MAX = Instance_Sense_Sense_MAX; + static constexpr int Sense_ARRAYSIZE = Instance_Sense_Sense_ARRAYSIZE; + static inline const ::google::protobuf::EnumDescriptor* Sense_descriptor() { + return Instance_Sense_descriptor(); + } + template + static inline const std::string& Sense_Name(T value) { + return Instance_Sense_Name(value); + } + static inline bool Sense_Parse(absl::string_view name, Sense* value) { + return Instance_Sense_Parse(name, value); + } + + // accessors ------------------------------------------------------- + enum : int { + kDecisionVariablesFieldNumber = 2, + kConstraintsFieldNumber = 4, + kDescriptionFieldNumber = 1, + kObjectiveFieldNumber = 3, + kSenseFieldNumber = 5, + }; + // repeated .ommx.v1.DecisionVariable decision_variables = 2; + int decision_variables_size() const; + private: + int _internal_decision_variables_size() const; + + public: + void clear_decision_variables() ; + ::ommx::v1::DecisionVariable* mutable_decision_variables(int index); + ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>* mutable_decision_variables(); + + private: + const ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>& _internal_decision_variables() const; + ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>* _internal_mutable_decision_variables(); + public: + const ::ommx::v1::DecisionVariable& decision_variables(int index) const; + ::ommx::v1::DecisionVariable* add_decision_variables(); + const ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>& decision_variables() const; + // repeated .ommx.v1.Constraint constraints = 4; + int constraints_size() const; + private: + int _internal_constraints_size() const; + + public: + void clear_constraints() ; + ::ommx::v1::Constraint* mutable_constraints(int index); + ::google::protobuf::RepeatedPtrField<::ommx::v1::Constraint>* mutable_constraints(); + + private: + const ::google::protobuf::RepeatedPtrField<::ommx::v1::Constraint>& _internal_constraints() const; + ::google::protobuf::RepeatedPtrField<::ommx::v1::Constraint>* _internal_mutable_constraints(); + public: + const ::ommx::v1::Constraint& constraints(int index) const; + ::ommx::v1::Constraint* add_constraints(); + const ::google::protobuf::RepeatedPtrField<::ommx::v1::Constraint>& constraints() const; + // .ommx.v1.Instance.Description description = 1; + bool has_description() const; + void clear_description() ; + const ::ommx::v1::Instance_Description& description() const; + PROTOBUF_NODISCARD ::ommx::v1::Instance_Description* release_description(); + ::ommx::v1::Instance_Description* mutable_description(); + void set_allocated_description(::ommx::v1::Instance_Description* value); + void unsafe_arena_set_allocated_description(::ommx::v1::Instance_Description* value); + ::ommx::v1::Instance_Description* unsafe_arena_release_description(); + + private: + const ::ommx::v1::Instance_Description& _internal_description() const; + ::ommx::v1::Instance_Description* _internal_mutable_description(); + + public: + // .ommx.v1.Function objective = 3; + bool has_objective() const; + void clear_objective() ; + const ::ommx::v1::Function& objective() const; + PROTOBUF_NODISCARD ::ommx::v1::Function* release_objective(); + ::ommx::v1::Function* mutable_objective(); + void set_allocated_objective(::ommx::v1::Function* value); + void unsafe_arena_set_allocated_objective(::ommx::v1::Function* value); + ::ommx::v1::Function* unsafe_arena_release_objective(); + + private: + const ::ommx::v1::Function& _internal_objective() const; + ::ommx::v1::Function* _internal_mutable_objective(); + + public: + // .ommx.v1.Instance.Sense sense = 5; + void clear_sense() ; + ::ommx::v1::Instance_Sense sense() const; + void set_sense(::ommx::v1::Instance_Sense value); + + private: + ::ommx::v1::Instance_Sense _internal_sense() const; + void _internal_set_sense(::ommx::v1::Instance_Sense value); + + public: + // @@protoc_insertion_point(class_scope:ommx.v1.Instance) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 3, 5, 4, + 0, 2> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_Instance_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const Instance& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::ommx::v1::DecisionVariable > decision_variables_; + ::google::protobuf::RepeatedPtrField< ::ommx::v1::Constraint > constraints_; + ::ommx::v1::Instance_Description* description_; + ::ommx::v1::Function* objective_; + int sense_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_ommx_2fv1_2finstance_2eproto; +}; + +// =================================================================== + + + + +// =================================================================== + + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// Instance_Description + +// optional string name = 1; +inline bool Instance_Description::has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline void Instance_Description::clear_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Instance_Description::name() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Instance.Description.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE void Instance_Description::set_name(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:ommx.v1.Instance.Description.name) +} +inline std::string* Instance_Description::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:ommx.v1.Instance.Description.name) + return _s; +} +inline const std::string& Instance_Description::_internal_name() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.name_.Get(); +} +inline void Instance_Description::_internal_set_name(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArena()); +} +inline std::string* Instance_Description::_internal_mutable_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable( GetArena()); +} +inline std::string* Instance_Description::release_name() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:ommx.v1.Instance.Description.name) + if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* released = _impl_.name_.Release(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArena()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return released; +} +inline void Instance_Description::set_allocated_name(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.name_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:ommx.v1.Instance.Description.name) +} + +// optional string description = 2; +inline bool Instance_Description::has_description() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline void Instance_Description::clear_description() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.description_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& Instance_Description::description() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Instance.Description.description) + return _internal_description(); +} +template +inline PROTOBUF_ALWAYS_INLINE void Instance_Description::set_description(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.description_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:ommx.v1.Instance.Description.description) +} +inline std::string* Instance_Description::mutable_description() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_description(); + // @@protoc_insertion_point(field_mutable:ommx.v1.Instance.Description.description) + return _s; +} +inline const std::string& Instance_Description::_internal_description() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.description_.Get(); +} +inline void Instance_Description::_internal_set_description(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.description_.Set(value, GetArena()); +} +inline std::string* Instance_Description::_internal_mutable_description() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.description_.Mutable( GetArena()); +} +inline std::string* Instance_Description::release_description() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:ommx.v1.Instance.Description.description) + if ((_impl_._has_bits_[0] & 0x00000002u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* released = _impl_.description_.Release(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.description_.Set("", GetArena()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return released; +} +inline void Instance_Description::set_allocated_description(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.description_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.description_.IsDefault()) { + _impl_.description_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:ommx.v1.Instance.Description.description) +} + +// repeated string authors = 3; +inline int Instance_Description::_internal_authors_size() const { + return _internal_authors().size(); +} +inline int Instance_Description::authors_size() const { + return _internal_authors_size(); +} +inline void Instance_Description::clear_authors() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.authors_.Clear(); +} +inline std::string* Instance_Description::add_authors() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + std::string* _s = _internal_mutable_authors()->Add(); + // @@protoc_insertion_point(field_add_mutable:ommx.v1.Instance.Description.authors) + return _s; +} +inline const std::string& Instance_Description::authors(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Instance.Description.authors) + return _internal_authors().Get(index); +} +inline std::string* Instance_Description::mutable_authors(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:ommx.v1.Instance.Description.authors) + return _internal_mutable_authors()->Mutable(index); +} +inline void Instance_Description::set_authors(int index, const std::string& value) { + _internal_mutable_authors()->Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:ommx.v1.Instance.Description.authors) +} +inline void Instance_Description::set_authors(int index, std::string&& value) { + _internal_mutable_authors()->Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:ommx.v1.Instance.Description.authors) +} +inline void Instance_Description::set_authors(int index, const char* value) { + ABSL_DCHECK(value != nullptr); + _internal_mutable_authors()->Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:ommx.v1.Instance.Description.authors) +} +inline void Instance_Description::set_authors(int index, const char* value, + std::size_t size) { + _internal_mutable_authors()->Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:ommx.v1.Instance.Description.authors) +} +inline void Instance_Description::set_authors(int index, absl::string_view value) { + _internal_mutable_authors()->Mutable(index)->assign( + value.data(), value.size()); + // @@protoc_insertion_point(field_set_string_piece:ommx.v1.Instance.Description.authors) +} +inline void Instance_Description::add_authors(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_authors()->Add()->assign(value); + // @@protoc_insertion_point(field_add:ommx.v1.Instance.Description.authors) +} +inline void Instance_Description::add_authors(std::string&& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_authors()->Add(std::move(value)); + // @@protoc_insertion_point(field_add:ommx.v1.Instance.Description.authors) +} +inline void Instance_Description::add_authors(const char* value) { + ABSL_DCHECK(value != nullptr); + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_authors()->Add()->assign(value); + // @@protoc_insertion_point(field_add_char:ommx.v1.Instance.Description.authors) +} +inline void Instance_Description::add_authors(const char* value, std::size_t size) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_authors()->Add()->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:ommx.v1.Instance.Description.authors) +} +inline void Instance_Description::add_authors(absl::string_view value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_authors()->Add()->assign(value.data(), + value.size()); + // @@protoc_insertion_point(field_add_string_piece:ommx.v1.Instance.Description.authors) +} +inline const ::google::protobuf::RepeatedPtrField& +Instance_Description::authors() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:ommx.v1.Instance.Description.authors) + return _internal_authors(); +} +inline ::google::protobuf::RepeatedPtrField* +Instance_Description::mutable_authors() ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:ommx.v1.Instance.Description.authors) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_authors(); +} +inline const ::google::protobuf::RepeatedPtrField& +Instance_Description::_internal_authors() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.authors_; +} +inline ::google::protobuf::RepeatedPtrField* +Instance_Description::_internal_mutable_authors() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.authors_; +} + +// optional string created_by = 4; +inline bool Instance_Description::has_created_by() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline void Instance_Description::clear_created_by() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.created_by_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline const std::string& Instance_Description::created_by() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Instance.Description.created_by) + return _internal_created_by(); +} +template +inline PROTOBUF_ALWAYS_INLINE void Instance_Description::set_created_by(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.created_by_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:ommx.v1.Instance.Description.created_by) +} +inline std::string* Instance_Description::mutable_created_by() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_created_by(); + // @@protoc_insertion_point(field_mutable:ommx.v1.Instance.Description.created_by) + return _s; +} +inline const std::string& Instance_Description::_internal_created_by() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.created_by_.Get(); +} +inline void Instance_Description::_internal_set_created_by(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.created_by_.Set(value, GetArena()); +} +inline std::string* Instance_Description::_internal_mutable_created_by() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_._has_bits_[0] |= 0x00000004u; + return _impl_.created_by_.Mutable( GetArena()); +} +inline std::string* Instance_Description::release_created_by() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:ommx.v1.Instance.Description.created_by) + if ((_impl_._has_bits_[0] & 0x00000004u) == 0) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000004u; + auto* released = _impl_.created_by_.Release(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.created_by_.Set("", GetArena()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return released; +} +inline void Instance_Description::set_allocated_created_by(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + _impl_.created_by_.SetAllocated(value, GetArena()); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.created_by_.IsDefault()) { + _impl_.created_by_.Set("", GetArena()); + } + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:ommx.v1.Instance.Description.created_by) +} + +// ------------------------------------------------------------------- + +// Instance + +// .ommx.v1.Instance.Description description = 1; +inline bool Instance::has_description() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.description_ != nullptr); + return value; +} +inline void Instance::clear_description() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.description_ != nullptr) _impl_.description_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::ommx::v1::Instance_Description& Instance::_internal_description() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::ommx::v1::Instance_Description* p = _impl_.description_; + return p != nullptr ? *p : reinterpret_cast(::ommx::v1::_Instance_Description_default_instance_); +} +inline const ::ommx::v1::Instance_Description& Instance::description() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Instance.description) + return _internal_description(); +} +inline void Instance::unsafe_arena_set_allocated_description(::ommx::v1::Instance_Description* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.description_); + } + _impl_.description_ = reinterpret_cast<::ommx::v1::Instance_Description*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ommx.v1.Instance.description) +} +inline ::ommx::v1::Instance_Description* Instance::release_description() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::ommx::v1::Instance_Description* released = _impl_.description_; + _impl_.description_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return released; +} +inline ::ommx::v1::Instance_Description* Instance::unsafe_arena_release_description() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:ommx.v1.Instance.description) + + _impl_._has_bits_[0] &= ~0x00000001u; + ::ommx::v1::Instance_Description* temp = _impl_.description_; + _impl_.description_ = nullptr; + return temp; +} +inline ::ommx::v1::Instance_Description* Instance::_internal_mutable_description() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.description_ == nullptr) { + auto* p = ::google::protobuf::Message::DefaultConstruct<::ommx::v1::Instance_Description>(GetArena()); + _impl_.description_ = reinterpret_cast<::ommx::v1::Instance_Description*>(p); + } + return _impl_.description_; +} +inline ::ommx::v1::Instance_Description* Instance::mutable_description() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000001u; + ::ommx::v1::Instance_Description* _msg = _internal_mutable_description(); + // @@protoc_insertion_point(field_mutable:ommx.v1.Instance.description) + return _msg; +} +inline void Instance::set_allocated_description(::ommx::v1::Instance_Description* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete (_impl_.description_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + + _impl_.description_ = reinterpret_cast<::ommx::v1::Instance_Description*>(value); + // @@protoc_insertion_point(field_set_allocated:ommx.v1.Instance.description) +} + +// repeated .ommx.v1.DecisionVariable decision_variables = 2; +inline int Instance::_internal_decision_variables_size() const { + return _internal_decision_variables().size(); +} +inline int Instance::decision_variables_size() const { + return _internal_decision_variables_size(); +} +inline ::ommx::v1::DecisionVariable* Instance::mutable_decision_variables(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:ommx.v1.Instance.decision_variables) + return _internal_mutable_decision_variables()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>* Instance::mutable_decision_variables() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:ommx.v1.Instance.decision_variables) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_decision_variables(); +} +inline const ::ommx::v1::DecisionVariable& Instance::decision_variables(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Instance.decision_variables) + return _internal_decision_variables().Get(index); +} +inline ::ommx::v1::DecisionVariable* Instance::add_decision_variables() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::ommx::v1::DecisionVariable* _add = _internal_mutable_decision_variables()->Add(); + // @@protoc_insertion_point(field_add:ommx.v1.Instance.decision_variables) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>& Instance::decision_variables() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:ommx.v1.Instance.decision_variables) + return _internal_decision_variables(); +} +inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>& +Instance::_internal_decision_variables() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.decision_variables_; +} +inline ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>* +Instance::_internal_mutable_decision_variables() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.decision_variables_; +} + +// .ommx.v1.Function objective = 3; +inline bool Instance::has_objective() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || _impl_.objective_ != nullptr); + return value; +} +inline const ::ommx::v1::Function& Instance::_internal_objective() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::ommx::v1::Function* p = _impl_.objective_; + return p != nullptr ? *p : reinterpret_cast(::ommx::v1::_Function_default_instance_); +} +inline const ::ommx::v1::Function& Instance::objective() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Instance.objective) + return _internal_objective(); +} +inline void Instance::unsafe_arena_set_allocated_objective(::ommx::v1::Function* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.objective_); + } + _impl_.objective_ = reinterpret_cast<::ommx::v1::Function*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ommx.v1.Instance.objective) +} +inline ::ommx::v1::Function* Instance::release_objective() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000002u; + ::ommx::v1::Function* released = _impl_.objective_; + _impl_.objective_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return released; +} +inline ::ommx::v1::Function* Instance::unsafe_arena_release_objective() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:ommx.v1.Instance.objective) + + _impl_._has_bits_[0] &= ~0x00000002u; + ::ommx::v1::Function* temp = _impl_.objective_; + _impl_.objective_ = nullptr; + return temp; +} +inline ::ommx::v1::Function* Instance::_internal_mutable_objective() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.objective_ == nullptr) { + auto* p = ::google::protobuf::Message::DefaultConstruct<::ommx::v1::Function>(GetArena()); + _impl_.objective_ = reinterpret_cast<::ommx::v1::Function*>(p); + } + return _impl_.objective_; +} +inline ::ommx::v1::Function* Instance::mutable_objective() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000002u; + ::ommx::v1::Function* _msg = _internal_mutable_objective(); + // @@protoc_insertion_point(field_mutable:ommx.v1.Instance.objective) + return _msg; +} +inline void Instance::set_allocated_objective(::ommx::v1::Function* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.objective_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + + _impl_.objective_ = reinterpret_cast<::ommx::v1::Function*>(value); + // @@protoc_insertion_point(field_set_allocated:ommx.v1.Instance.objective) +} + +// repeated .ommx.v1.Constraint constraints = 4; +inline int Instance::_internal_constraints_size() const { + return _internal_constraints().size(); +} +inline int Instance::constraints_size() const { + return _internal_constraints_size(); +} +inline ::ommx::v1::Constraint* Instance::mutable_constraints(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:ommx.v1.Instance.constraints) + return _internal_mutable_constraints()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::ommx::v1::Constraint>* Instance::mutable_constraints() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:ommx.v1.Instance.constraints) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_constraints(); +} +inline const ::ommx::v1::Constraint& Instance::constraints(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Instance.constraints) + return _internal_constraints().Get(index); +} +inline ::ommx::v1::Constraint* Instance::add_constraints() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::ommx::v1::Constraint* _add = _internal_mutable_constraints()->Add(); + // @@protoc_insertion_point(field_add:ommx.v1.Instance.constraints) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::Constraint>& Instance::constraints() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:ommx.v1.Instance.constraints) + return _internal_constraints(); +} +inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::Constraint>& +Instance::_internal_constraints() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.constraints_; +} +inline ::google::protobuf::RepeatedPtrField<::ommx::v1::Constraint>* +Instance::_internal_mutable_constraints() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.constraints_; +} + +// .ommx.v1.Instance.Sense sense = 5; +inline void Instance::clear_sense() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.sense_ = 0; +} +inline ::ommx::v1::Instance_Sense Instance::sense() const { + // @@protoc_insertion_point(field_get:ommx.v1.Instance.sense) + return _internal_sense(); +} +inline void Instance::set_sense(::ommx::v1::Instance_Sense value) { + _internal_set_sense(value); + // @@protoc_insertion_point(field_set:ommx.v1.Instance.sense) +} +inline ::ommx::v1::Instance_Sense Instance::_internal_sense() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return static_cast<::ommx::v1::Instance_Sense>(_impl_.sense_); +} +inline void Instance::_internal_set_sense(::ommx::v1::Instance_Sense value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.sense_ = value; +} + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace ommx + + +namespace google { +namespace protobuf { + +template <> +struct is_proto_enum<::ommx::v1::Instance_Sense> : std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor<::ommx::v1::Instance_Sense>() { + return ::ommx::v1::Instance_Sense_descriptor(); +} + +} // namespace protobuf +} // namespace google + +// @@protoc_insertion_point(global_scope) + +#include "google/protobuf/port_undef.inc" + +#endif // GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2finstance_2eproto_2epb_2eh diff --git a/cpp/ommx/v1/linear.pb.cc b/cpp/ommx/v1/linear.pb.cc new file mode 100644 index 00000000..92ad087a --- /dev/null +++ b/cpp/ommx/v1/linear.pb.cc @@ -0,0 +1,595 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: ommx/v1/linear.proto +// Protobuf C++ Version: 5.27.3 + +#include "ommx/v1/linear.pb.h" + +#include +#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/generated_message_tctable_impl.h" +#include "google/protobuf/extension_set.h" +#include "google/protobuf/wire_format_lite.h" +#include "google/protobuf/descriptor.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/reflection_ops.h" +#include "google/protobuf/wire_format.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" +PROTOBUF_PRAGMA_INIT_SEG +namespace _pb = ::google::protobuf; +namespace _pbi = ::google::protobuf::internal; +namespace _fl = ::google::protobuf::internal::field_layout; +namespace ommx { +namespace v1 { + +inline constexpr Linear_Term::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : id_{::uint64_t{0u}}, + coefficient_{0}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR Linear_Term::Linear_Term(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct Linear_TermDefaultTypeInternal { + PROTOBUF_CONSTEXPR Linear_TermDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~Linear_TermDefaultTypeInternal() {} + union { + Linear_Term _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Linear_TermDefaultTypeInternal _Linear_Term_default_instance_; + +inline constexpr Linear::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : terms_{}, + constant_{0}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR Linear::Linear(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct LinearDefaultTypeInternal { + PROTOBUF_CONSTEXPR LinearDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~LinearDefaultTypeInternal() {} + union { + Linear _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LinearDefaultTypeInternal _Linear_default_instance_; +} // namespace v1 +} // namespace ommx +static constexpr const ::_pb::EnumDescriptor** + file_level_enum_descriptors_ommx_2fv1_2flinear_2eproto = nullptr; +static constexpr const ::_pb::ServiceDescriptor** + file_level_service_descriptors_ommx_2fv1_2flinear_2eproto = nullptr; +const ::uint32_t + TableStruct_ommx_2fv1_2flinear_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::ommx::v1::Linear_Term, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::ommx::v1::Linear_Term, _impl_.id_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Linear_Term, _impl_.coefficient_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::ommx::v1::Linear, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::ommx::v1::Linear, _impl_.terms_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Linear, _impl_.constant_), +}; + +static const ::_pbi::MigrationSchema + schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + {0, -1, -1, sizeof(::ommx::v1::Linear_Term)}, + {10, -1, -1, sizeof(::ommx::v1::Linear)}, +}; +static const ::_pb::Message* const file_default_instances[] = { + &::ommx::v1::_Linear_Term_default_instance_._instance, + &::ommx::v1::_Linear_default_instance_._instance, +}; +const char descriptor_table_protodef_ommx_2fv1_2flinear_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + "\n\024ommx/v1/linear.proto\022\007ommx.v1\"h\n\006Linea" + "r\022#\n\005terms\030\001 \003(\0132\024.ommx.v1.Linear.Term\022\020" + "\n\010constant\030\002 \001(\001\032\'\n\004Term\022\n\n\002id\030\001 \001(\004\022\023\n\013" + "coefficient\030\002 \001(\001b\006proto3" +}; +static ::absl::once_flag descriptor_table_ommx_2fv1_2flinear_2eproto_once; +PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2flinear_2eproto = { + false, + false, + 145, + descriptor_table_protodef_ommx_2fv1_2flinear_2eproto, + "ommx/v1/linear.proto", + &descriptor_table_ommx_2fv1_2flinear_2eproto_once, + nullptr, + 0, + 2, + schemas, + file_default_instances, + TableStruct_ommx_2fv1_2flinear_2eproto::offsets, + file_level_enum_descriptors_ommx_2fv1_2flinear_2eproto, + file_level_service_descriptors_ommx_2fv1_2flinear_2eproto, +}; +namespace ommx { +namespace v1 { +// =================================================================== + +class Linear_Term::_Internal { + public: +}; + +Linear_Term::Linear_Term(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:ommx.v1.Linear.Term) +} +Linear_Term::Linear_Term( + ::google::protobuf::Arena* arena, const Linear_Term& from) + : Linear_Term(arena) { + MergeFrom(from); +} +inline PROTOBUF_NDEBUG_INLINE Linear_Term::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0} {} + +inline void Linear_Term::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, id_), + 0, + offsetof(Impl_, coefficient_) - + offsetof(Impl_, id_) + + sizeof(Impl_::coefficient_)); +} +Linear_Term::~Linear_Term() { + // @@protoc_insertion_point(destructor:ommx.v1.Linear.Term) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void Linear_Term::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); +} + +const ::google::protobuf::MessageLite::ClassData* +Linear_Term::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(Linear_Term, _impl_._cached_size_), + false, + }, + &Linear_Term::MergeImpl, + &Linear_Term::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2flinear_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 0, 2> Linear_Term::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_Linear_Term_default_instance_._instance, + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::ommx::v1::Linear_Term>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // double coefficient = 2; + {::_pbi::TcParser::FastF64S1, + {17, 63, 0, PROTOBUF_FIELD_OFFSET(Linear_Term, _impl_.coefficient_)}}, + // uint64 id = 1; + {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Linear_Term, _impl_.id_), 63>(), + {8, 63, 0, PROTOBUF_FIELD_OFFSET(Linear_Term, _impl_.id_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // uint64 id = 1; + {PROTOBUF_FIELD_OFFSET(Linear_Term, _impl_.id_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, + // double coefficient = 2; + {PROTOBUF_FIELD_OFFSET(Linear_Term, _impl_.coefficient_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + }}, + // no aux_entries + {{ + }}, +}; + +PROTOBUF_NOINLINE void Linear_Term::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Linear.Term) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&_impl_.id_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.coefficient_) - + reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.coefficient_)); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +::uint8_t* Linear_Term::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:ommx.v1.Linear.Term) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // uint64 id = 1; + if (this->_internal_id() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt64ToArray( + 1, this->_internal_id(), target); + } + + // double coefficient = 2; + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_coefficient = this->_internal_coefficient(); + ::uint64_t raw_coefficient; + memcpy(&raw_coefficient, &tmp_coefficient, sizeof(tmp_coefficient)); + if (raw_coefficient != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 2, this->_internal_coefficient(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:ommx.v1.Linear.Term) + return target; +} + +::size_t Linear_Term::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:ommx.v1.Linear.Term) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); + // uint64 id = 1; + if (this->_internal_id() != 0) { + total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( + this->_internal_id()); + } + + // double coefficient = 2; + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_coefficient = this->_internal_coefficient(); + ::uint64_t raw_coefficient; + memcpy(&raw_coefficient, &tmp_coefficient, sizeof(tmp_coefficient)); + if (raw_coefficient != 0) { + total_size += 9; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void Linear_Term::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:ommx.v1.Linear.Term) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_id() != 0) { + _this->_impl_.id_ = from._impl_.id_; + } + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_coefficient = from._internal_coefficient(); + ::uint64_t raw_coefficient; + memcpy(&raw_coefficient, &tmp_coefficient, sizeof(tmp_coefficient)); + if (raw_coefficient != 0) { + _this->_impl_.coefficient_ = from._impl_.coefficient_; + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void Linear_Term::CopyFrom(const Linear_Term& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:ommx.v1.Linear.Term) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void Linear_Term::InternalSwap(Linear_Term* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(Linear_Term, _impl_.coefficient_) + + sizeof(Linear_Term::_impl_.coefficient_) + - PROTOBUF_FIELD_OFFSET(Linear_Term, _impl_.id_)>( + reinterpret_cast(&_impl_.id_), + reinterpret_cast(&other->_impl_.id_)); +} + +::google::protobuf::Metadata Linear_Term::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + +class Linear::_Internal { + public: +}; + +Linear::Linear(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:ommx.v1.Linear) +} +inline PROTOBUF_NDEBUG_INLINE Linear::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::ommx::v1::Linear& from_msg) + : terms_{visibility, arena, from.terms_}, + _cached_size_{0} {} + +Linear::Linear( + ::google::protobuf::Arena* arena, + const Linear& from) + : ::google::protobuf::Message(arena) { + Linear* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + _impl_.constant_ = from._impl_.constant_; + + // @@protoc_insertion_point(copy_constructor:ommx.v1.Linear) +} +inline PROTOBUF_NDEBUG_INLINE Linear::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : terms_{visibility, arena}, + _cached_size_{0} {} + +inline void Linear::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.constant_ = {}; +} +Linear::~Linear() { + // @@protoc_insertion_point(destructor:ommx.v1.Linear) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void Linear::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); +} + +const ::google::protobuf::MessageLite::ClassData* +Linear::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(Linear, _impl_._cached_size_), + false, + }, + &Linear::MergeImpl, + &Linear::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2flinear_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 1, 0, 2> Linear::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_Linear_default_instance_._instance, + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::ommx::v1::Linear>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // double constant = 2; + {::_pbi::TcParser::FastF64S1, + {17, 63, 0, PROTOBUF_FIELD_OFFSET(Linear, _impl_.constant_)}}, + // repeated .ommx.v1.Linear.Term terms = 1; + {::_pbi::TcParser::FastMtR1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(Linear, _impl_.terms_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated .ommx.v1.Linear.Term terms = 1; + {PROTOBUF_FIELD_OFFSET(Linear, _impl_.terms_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // double constant = 2; + {PROTOBUF_FIELD_OFFSET(Linear, _impl_.constant_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + }}, {{ + {::_pbi::TcParser::GetTable<::ommx::v1::Linear_Term>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void Linear::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Linear) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.terms_.Clear(); + _impl_.constant_ = 0; + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +::uint8_t* Linear::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:ommx.v1.Linear) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated .ommx.v1.Linear.Term terms = 1; + for (unsigned i = 0, n = static_cast( + this->_internal_terms_size()); + i < n; i++) { + const auto& repfield = this->_internal_terms().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), + target, stream); + } + + // double constant = 2; + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_constant = this->_internal_constant(); + ::uint64_t raw_constant; + memcpy(&raw_constant, &tmp_constant, sizeof(tmp_constant)); + if (raw_constant != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 2, this->_internal_constant(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:ommx.v1.Linear) + return target; +} + +::size_t Linear::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:ommx.v1.Linear) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); + // repeated .ommx.v1.Linear.Term terms = 1; + total_size += 1UL * this->_internal_terms_size(); + for (const auto& msg : this->_internal_terms()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + // double constant = 2; + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_constant = this->_internal_constant(); + ::uint64_t raw_constant; + memcpy(&raw_constant, &tmp_constant, sizeof(tmp_constant)); + if (raw_constant != 0) { + total_size += 9; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void Linear::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:ommx.v1.Linear) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_terms()->MergeFrom( + from._internal_terms()); + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_constant = from._internal_constant(); + ::uint64_t raw_constant; + memcpy(&raw_constant, &tmp_constant, sizeof(tmp_constant)); + if (raw_constant != 0) { + _this->_impl_.constant_ = from._impl_.constant_; + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void Linear::CopyFrom(const Linear& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:ommx.v1.Linear) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void Linear::InternalSwap(Linear* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.terms_.InternalSwap(&other->_impl_.terms_); + swap(_impl_.constant_, other->_impl_.constant_); +} + +::google::protobuf::Metadata Linear::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace ommx +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google +// @@protoc_insertion_point(global_scope) +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type + _static_init2_ PROTOBUF_UNUSED = + (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2flinear_2eproto), + ::std::false_type{}); +#include "google/protobuf/port_undef.inc" diff --git a/cpp/ommx/v1/linear.pb.h b/cpp/ommx/v1/linear.pb.h new file mode 100644 index 00000000..a7388ceb --- /dev/null +++ b/cpp/ommx/v1/linear.pb.h @@ -0,0 +1,596 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: ommx/v1/linear.proto +// Protobuf C++ Version: 5.27.3 + +#ifndef GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2flinear_2eproto_2epb_2eh +#define GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2flinear_2eproto_2epb_2eh + +#include +#include +#include +#include + +#include "google/protobuf/runtime_version.h" +#if PROTOBUF_VERSION != 5027003 +#error "Protobuf C++ gencode is built with an incompatible version of" +#error "Protobuf C++ headers/runtime. See" +#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" +#endif +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/message.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export +#include "google/protobuf/unknown_field_set.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" + +#define PROTOBUF_INTERNAL_EXPORT_ommx_2fv1_2flinear_2eproto + +namespace google { +namespace protobuf { +namespace internal { +class AnyMetadata; +} // namespace internal +} // namespace protobuf +} // namespace google + +// Internal implementation detail -- do not use these members. +struct TableStruct_ommx_2fv1_2flinear_2eproto { + static const ::uint32_t offsets[]; +}; +extern const ::google::protobuf::internal::DescriptorTable + descriptor_table_ommx_2fv1_2flinear_2eproto; +namespace ommx { +namespace v1 { +class Linear; +struct LinearDefaultTypeInternal; +extern LinearDefaultTypeInternal _Linear_default_instance_; +class Linear_Term; +struct Linear_TermDefaultTypeInternal; +extern Linear_TermDefaultTypeInternal _Linear_Term_default_instance_; +} // namespace v1 +} // namespace ommx +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google + +namespace ommx { +namespace v1 { + +// =================================================================== + + +// ------------------------------------------------------------------- + +class Linear_Term final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:ommx.v1.Linear.Term) */ { + public: + inline Linear_Term() : Linear_Term(nullptr) {} + ~Linear_Term() override; + template + explicit PROTOBUF_CONSTEXPR Linear_Term( + ::google::protobuf::internal::ConstantInitialized); + + inline Linear_Term(const Linear_Term& from) : Linear_Term(nullptr, from) {} + inline Linear_Term(Linear_Term&& from) noexcept + : Linear_Term(nullptr, std::move(from)) {} + inline Linear_Term& operator=(const Linear_Term& from) { + CopyFrom(from); + return *this; + } + inline Linear_Term& operator=(Linear_Term&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Linear_Term& default_instance() { + return *internal_default_instance(); + } + static inline const Linear_Term* internal_default_instance() { + return reinterpret_cast( + &_Linear_Term_default_instance_); + } + static constexpr int kIndexInFileMessages = 0; + friend void swap(Linear_Term& a, Linear_Term& b) { a.Swap(&b); } + inline void Swap(Linear_Term* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Linear_Term* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Linear_Term* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Linear_Term& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const Linear_Term& from) { Linear_Term::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(Linear_Term* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "ommx.v1.Linear.Term"; } + + protected: + explicit Linear_Term(::google::protobuf::Arena* arena); + Linear_Term(::google::protobuf::Arena* arena, const Linear_Term& from); + Linear_Term(::google::protobuf::Arena* arena, Linear_Term&& from) noexcept + : Linear_Term(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::Message::ClassData* GetClassData() const final; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kIdFieldNumber = 1, + kCoefficientFieldNumber = 2, + }; + // uint64 id = 1; + void clear_id() ; + ::uint64_t id() const; + void set_id(::uint64_t value); + + private: + ::uint64_t _internal_id() const; + void _internal_set_id(::uint64_t value); + + public: + // double coefficient = 2; + void clear_coefficient() ; + double coefficient() const; + void set_coefficient(double value); + + private: + double _internal_coefficient() const; + void _internal_set_coefficient(double value); + + public: + // @@protoc_insertion_point(class_scope:ommx.v1.Linear.Term) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 0, + 0, 2> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_Linear_Term_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const Linear_Term& from_msg); + ::uint64_t id_; + double coefficient_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_ommx_2fv1_2flinear_2eproto; +}; +// ------------------------------------------------------------------- + +class Linear final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:ommx.v1.Linear) */ { + public: + inline Linear() : Linear(nullptr) {} + ~Linear() override; + template + explicit PROTOBUF_CONSTEXPR Linear( + ::google::protobuf::internal::ConstantInitialized); + + inline Linear(const Linear& from) : Linear(nullptr, from) {} + inline Linear(Linear&& from) noexcept + : Linear(nullptr, std::move(from)) {} + inline Linear& operator=(const Linear& from) { + CopyFrom(from); + return *this; + } + inline Linear& operator=(Linear&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Linear& default_instance() { + return *internal_default_instance(); + } + static inline const Linear* internal_default_instance() { + return reinterpret_cast( + &_Linear_default_instance_); + } + static constexpr int kIndexInFileMessages = 1; + friend void swap(Linear& a, Linear& b) { a.Swap(&b); } + inline void Swap(Linear* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Linear* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Linear* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Linear& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const Linear& from) { Linear::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(Linear* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "ommx.v1.Linear"; } + + protected: + explicit Linear(::google::protobuf::Arena* arena); + Linear(::google::protobuf::Arena* arena, const Linear& from); + Linear(::google::protobuf::Arena* arena, Linear&& from) noexcept + : Linear(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::Message::ClassData* GetClassData() const final; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + using Term = Linear_Term; + + // accessors ------------------------------------------------------- + enum : int { + kTermsFieldNumber = 1, + kConstantFieldNumber = 2, + }; + // repeated .ommx.v1.Linear.Term terms = 1; + int terms_size() const; + private: + int _internal_terms_size() const; + + public: + void clear_terms() ; + ::ommx::v1::Linear_Term* mutable_terms(int index); + ::google::protobuf::RepeatedPtrField<::ommx::v1::Linear_Term>* mutable_terms(); + + private: + const ::google::protobuf::RepeatedPtrField<::ommx::v1::Linear_Term>& _internal_terms() const; + ::google::protobuf::RepeatedPtrField<::ommx::v1::Linear_Term>* _internal_mutable_terms(); + public: + const ::ommx::v1::Linear_Term& terms(int index) const; + ::ommx::v1::Linear_Term* add_terms(); + const ::google::protobuf::RepeatedPtrField<::ommx::v1::Linear_Term>& terms() const; + // double constant = 2; + void clear_constant() ; + double constant() const; + void set_constant(double value); + + private: + double _internal_constant() const; + void _internal_set_constant(double value); + + public: + // @@protoc_insertion_point(class_scope:ommx.v1.Linear) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 1, + 0, 2> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_Linear_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const Linear& from_msg); + ::google::protobuf::RepeatedPtrField< ::ommx::v1::Linear_Term > terms_; + double constant_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_ommx_2fv1_2flinear_2eproto; +}; + +// =================================================================== + + + + +// =================================================================== + + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// Linear_Term + +// uint64 id = 1; +inline void Linear_Term::clear_id() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.id_ = ::uint64_t{0u}; +} +inline ::uint64_t Linear_Term::id() const { + // @@protoc_insertion_point(field_get:ommx.v1.Linear.Term.id) + return _internal_id(); +} +inline void Linear_Term::set_id(::uint64_t value) { + _internal_set_id(value); + // @@protoc_insertion_point(field_set:ommx.v1.Linear.Term.id) +} +inline ::uint64_t Linear_Term::_internal_id() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.id_; +} +inline void Linear_Term::_internal_set_id(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.id_ = value; +} + +// double coefficient = 2; +inline void Linear_Term::clear_coefficient() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.coefficient_ = 0; +} +inline double Linear_Term::coefficient() const { + // @@protoc_insertion_point(field_get:ommx.v1.Linear.Term.coefficient) + return _internal_coefficient(); +} +inline void Linear_Term::set_coefficient(double value) { + _internal_set_coefficient(value); + // @@protoc_insertion_point(field_set:ommx.v1.Linear.Term.coefficient) +} +inline double Linear_Term::_internal_coefficient() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.coefficient_; +} +inline void Linear_Term::_internal_set_coefficient(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.coefficient_ = value; +} + +// ------------------------------------------------------------------- + +// Linear + +// repeated .ommx.v1.Linear.Term terms = 1; +inline int Linear::_internal_terms_size() const { + return _internal_terms().size(); +} +inline int Linear::terms_size() const { + return _internal_terms_size(); +} +inline void Linear::clear_terms() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.terms_.Clear(); +} +inline ::ommx::v1::Linear_Term* Linear::mutable_terms(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:ommx.v1.Linear.terms) + return _internal_mutable_terms()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::ommx::v1::Linear_Term>* Linear::mutable_terms() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:ommx.v1.Linear.terms) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_terms(); +} +inline const ::ommx::v1::Linear_Term& Linear::terms(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Linear.terms) + return _internal_terms().Get(index); +} +inline ::ommx::v1::Linear_Term* Linear::add_terms() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::ommx::v1::Linear_Term* _add = _internal_mutable_terms()->Add(); + // @@protoc_insertion_point(field_add:ommx.v1.Linear.terms) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::Linear_Term>& Linear::terms() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:ommx.v1.Linear.terms) + return _internal_terms(); +} +inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::Linear_Term>& +Linear::_internal_terms() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.terms_; +} +inline ::google::protobuf::RepeatedPtrField<::ommx::v1::Linear_Term>* +Linear::_internal_mutable_terms() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.terms_; +} + +// double constant = 2; +inline void Linear::clear_constant() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.constant_ = 0; +} +inline double Linear::constant() const { + // @@protoc_insertion_point(field_get:ommx.v1.Linear.constant) + return _internal_constant(); +} +inline void Linear::set_constant(double value) { + _internal_set_constant(value); + // @@protoc_insertion_point(field_set:ommx.v1.Linear.constant) +} +inline double Linear::_internal_constant() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.constant_; +} +inline void Linear::_internal_set_constant(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.constant_ = value; +} + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace ommx + + +// @@protoc_insertion_point(global_scope) + +#include "google/protobuf/port_undef.inc" + +#endif // GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2flinear_2eproto_2epb_2eh diff --git a/cpp/ommx/v1/polynomial.pb.cc b/cpp/ommx/v1/polynomial.pb.cc new file mode 100644 index 00000000..66c748a9 --- /dev/null +++ b/cpp/ommx/v1/polynomial.pb.cc @@ -0,0 +1,568 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: ommx/v1/polynomial.proto +// Protobuf C++ Version: 5.27.3 + +#include "ommx/v1/polynomial.pb.h" + +#include +#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/generated_message_tctable_impl.h" +#include "google/protobuf/extension_set.h" +#include "google/protobuf/wire_format_lite.h" +#include "google/protobuf/descriptor.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/reflection_ops.h" +#include "google/protobuf/wire_format.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" +PROTOBUF_PRAGMA_INIT_SEG +namespace _pb = ::google::protobuf; +namespace _pbi = ::google::protobuf::internal; +namespace _fl = ::google::protobuf::internal::field_layout; +namespace ommx { +namespace v1 { + +inline constexpr Monomial::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : ids_{}, + _ids_cached_byte_size_{0}, + coefficient_{0}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR Monomial::Monomial(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct MonomialDefaultTypeInternal { + PROTOBUF_CONSTEXPR MonomialDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~MonomialDefaultTypeInternal() {} + union { + Monomial _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MonomialDefaultTypeInternal _Monomial_default_instance_; + +inline constexpr Polynomial::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : terms_{}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR Polynomial::Polynomial(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct PolynomialDefaultTypeInternal { + PROTOBUF_CONSTEXPR PolynomialDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~PolynomialDefaultTypeInternal() {} + union { + Polynomial _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PolynomialDefaultTypeInternal _Polynomial_default_instance_; +} // namespace v1 +} // namespace ommx +static constexpr const ::_pb::EnumDescriptor** + file_level_enum_descriptors_ommx_2fv1_2fpolynomial_2eproto = nullptr; +static constexpr const ::_pb::ServiceDescriptor** + file_level_service_descriptors_ommx_2fv1_2fpolynomial_2eproto = nullptr; +const ::uint32_t + TableStruct_ommx_2fv1_2fpolynomial_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::ommx::v1::Monomial, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::ommx::v1::Monomial, _impl_.ids_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Monomial, _impl_.coefficient_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::ommx::v1::Polynomial, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::ommx::v1::Polynomial, _impl_.terms_), +}; + +static const ::_pbi::MigrationSchema + schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + {0, -1, -1, sizeof(::ommx::v1::Monomial)}, + {10, -1, -1, sizeof(::ommx::v1::Polynomial)}, +}; +static const ::_pb::Message* const file_default_instances[] = { + &::ommx::v1::_Monomial_default_instance_._instance, + &::ommx::v1::_Polynomial_default_instance_._instance, +}; +const char descriptor_table_protodef_ommx_2fv1_2fpolynomial_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + "\n\030ommx/v1/polynomial.proto\022\007ommx.v1\",\n\010M" + "onomial\022\013\n\003ids\030\001 \003(\004\022\023\n\013coefficient\030\002 \001(" + "\001\".\n\nPolynomial\022 \n\005terms\030\001 \003(\0132\021.ommx.v1" + ".Monomialb\006proto3" +}; +static ::absl::once_flag descriptor_table_ommx_2fv1_2fpolynomial_2eproto_once; +PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fpolynomial_2eproto = { + false, + false, + 137, + descriptor_table_protodef_ommx_2fv1_2fpolynomial_2eproto, + "ommx/v1/polynomial.proto", + &descriptor_table_ommx_2fv1_2fpolynomial_2eproto_once, + nullptr, + 0, + 2, + schemas, + file_default_instances, + TableStruct_ommx_2fv1_2fpolynomial_2eproto::offsets, + file_level_enum_descriptors_ommx_2fv1_2fpolynomial_2eproto, + file_level_service_descriptors_ommx_2fv1_2fpolynomial_2eproto, +}; +namespace ommx { +namespace v1 { +// =================================================================== + +class Monomial::_Internal { + public: +}; + +Monomial::Monomial(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:ommx.v1.Monomial) +} +inline PROTOBUF_NDEBUG_INLINE Monomial::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::ommx::v1::Monomial& from_msg) + : ids_{visibility, arena, from.ids_}, + _ids_cached_byte_size_{0}, + _cached_size_{0} {} + +Monomial::Monomial( + ::google::protobuf::Arena* arena, + const Monomial& from) + : ::google::protobuf::Message(arena) { + Monomial* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + _impl_.coefficient_ = from._impl_.coefficient_; + + // @@protoc_insertion_point(copy_constructor:ommx.v1.Monomial) +} +inline PROTOBUF_NDEBUG_INLINE Monomial::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : ids_{visibility, arena}, + _ids_cached_byte_size_{0}, + _cached_size_{0} {} + +inline void Monomial::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.coefficient_ = {}; +} +Monomial::~Monomial() { + // @@protoc_insertion_point(destructor:ommx.v1.Monomial) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void Monomial::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); +} + +const ::google::protobuf::MessageLite::ClassData* +Monomial::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(Monomial, _impl_._cached_size_), + false, + }, + &Monomial::MergeImpl, + &Monomial::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2fpolynomial_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<1, 2, 0, 0, 2> Monomial::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 2, 8, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967292, // skipmap + offsetof(decltype(_table_), field_entries), + 2, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_Monomial_default_instance_._instance, + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::ommx::v1::Monomial>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // double coefficient = 2; + {::_pbi::TcParser::FastF64S1, + {17, 63, 0, PROTOBUF_FIELD_OFFSET(Monomial, _impl_.coefficient_)}}, + // repeated uint64 ids = 1; + {::_pbi::TcParser::FastV64P1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(Monomial, _impl_.ids_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated uint64 ids = 1; + {PROTOBUF_FIELD_OFFSET(Monomial, _impl_.ids_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt64)}, + // double coefficient = 2; + {PROTOBUF_FIELD_OFFSET(Monomial, _impl_.coefficient_), 0, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + }}, + // no aux_entries + {{ + }}, +}; + +PROTOBUF_NOINLINE void Monomial::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Monomial) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.ids_.Clear(); + _impl_.coefficient_ = 0; + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +::uint8_t* Monomial::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:ommx.v1.Monomial) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated uint64 ids = 1; + { + int byte_size = _impl_._ids_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteUInt64Packed( + 1, _internal_ids(), byte_size, target); + } + } + + // double coefficient = 2; + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_coefficient = this->_internal_coefficient(); + ::uint64_t raw_coefficient; + memcpy(&raw_coefficient, &tmp_coefficient, sizeof(tmp_coefficient)); + if (raw_coefficient != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 2, this->_internal_coefficient(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:ommx.v1.Monomial) + return target; +} + +::size_t Monomial::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:ommx.v1.Monomial) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); + // repeated uint64 ids = 1; + { + std::size_t data_size = ::_pbi::WireFormatLite::UInt64Size( + this->_internal_ids()) + ; + _impl_._ids_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size)); + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; + } + // double coefficient = 2; + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_coefficient = this->_internal_coefficient(); + ::uint64_t raw_coefficient; + memcpy(&raw_coefficient, &tmp_coefficient, sizeof(tmp_coefficient)); + if (raw_coefficient != 0) { + total_size += 9; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void Monomial::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:ommx.v1.Monomial) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_ids()->MergeFrom(from._internal_ids()); + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_coefficient = from._internal_coefficient(); + ::uint64_t raw_coefficient; + memcpy(&raw_coefficient, &tmp_coefficient, sizeof(tmp_coefficient)); + if (raw_coefficient != 0) { + _this->_impl_.coefficient_ = from._impl_.coefficient_; + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void Monomial::CopyFrom(const Monomial& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:ommx.v1.Monomial) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void Monomial::InternalSwap(Monomial* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.ids_.InternalSwap(&other->_impl_.ids_); + swap(_impl_.coefficient_, other->_impl_.coefficient_); +} + +::google::protobuf::Metadata Monomial::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + +class Polynomial::_Internal { + public: +}; + +Polynomial::Polynomial(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:ommx.v1.Polynomial) +} +inline PROTOBUF_NDEBUG_INLINE Polynomial::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::ommx::v1::Polynomial& from_msg) + : terms_{visibility, arena, from.terms_}, + _cached_size_{0} {} + +Polynomial::Polynomial( + ::google::protobuf::Arena* arena, + const Polynomial& from) + : ::google::protobuf::Message(arena) { + Polynomial* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:ommx.v1.Polynomial) +} +inline PROTOBUF_NDEBUG_INLINE Polynomial::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : terms_{visibility, arena}, + _cached_size_{0} {} + +inline void Polynomial::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +Polynomial::~Polynomial() { + // @@protoc_insertion_point(destructor:ommx.v1.Polynomial) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void Polynomial::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); +} + +const ::google::protobuf::MessageLite::ClassData* +Polynomial::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(Polynomial, _impl_._cached_size_), + false, + }, + &Polynomial::MergeImpl, + &Polynomial::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2fpolynomial_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 1, 0, 2> Polynomial::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_Polynomial_default_instance_._instance, + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::ommx::v1::Polynomial>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // repeated .ommx.v1.Monomial terms = 1; + {::_pbi::TcParser::FastMtR1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(Polynomial, _impl_.terms_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated .ommx.v1.Monomial terms = 1; + {PROTOBUF_FIELD_OFFSET(Polynomial, _impl_.terms_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::ommx::v1::Monomial>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void Polynomial::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Polynomial) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.terms_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +::uint8_t* Polynomial::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:ommx.v1.Polynomial) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated .ommx.v1.Monomial terms = 1; + for (unsigned i = 0, n = static_cast( + this->_internal_terms_size()); + i < n; i++) { + const auto& repfield = this->_internal_terms().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, repfield, repfield.GetCachedSize(), + target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:ommx.v1.Polynomial) + return target; +} + +::size_t Polynomial::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:ommx.v1.Polynomial) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); + // repeated .ommx.v1.Monomial terms = 1; + total_size += 1UL * this->_internal_terms_size(); + for (const auto& msg : this->_internal_terms()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void Polynomial::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:ommx.v1.Polynomial) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_terms()->MergeFrom( + from._internal_terms()); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void Polynomial::CopyFrom(const Polynomial& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:ommx.v1.Polynomial) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void Polynomial::InternalSwap(Polynomial* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.terms_.InternalSwap(&other->_impl_.terms_); +} + +::google::protobuf::Metadata Polynomial::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace ommx +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google +// @@protoc_insertion_point(global_scope) +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type + _static_init2_ PROTOBUF_UNUSED = + (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2fpolynomial_2eproto), + ::std::false_type{}); +#include "google/protobuf/port_undef.inc" diff --git a/cpp/ommx/v1/polynomial.pb.h b/cpp/ommx/v1/polynomial.pb.h new file mode 100644 index 00000000..75b17154 --- /dev/null +++ b/cpp/ommx/v1/polynomial.pb.h @@ -0,0 +1,593 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: ommx/v1/polynomial.proto +// Protobuf C++ Version: 5.27.3 + +#ifndef GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fpolynomial_2eproto_2epb_2eh +#define GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fpolynomial_2eproto_2epb_2eh + +#include +#include +#include +#include + +#include "google/protobuf/runtime_version.h" +#if PROTOBUF_VERSION != 5027003 +#error "Protobuf C++ gencode is built with an incompatible version of" +#error "Protobuf C++ headers/runtime. See" +#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" +#endif +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/message.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export +#include "google/protobuf/unknown_field_set.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" + +#define PROTOBUF_INTERNAL_EXPORT_ommx_2fv1_2fpolynomial_2eproto + +namespace google { +namespace protobuf { +namespace internal { +class AnyMetadata; +} // namespace internal +} // namespace protobuf +} // namespace google + +// Internal implementation detail -- do not use these members. +struct TableStruct_ommx_2fv1_2fpolynomial_2eproto { + static const ::uint32_t offsets[]; +}; +extern const ::google::protobuf::internal::DescriptorTable + descriptor_table_ommx_2fv1_2fpolynomial_2eproto; +namespace ommx { +namespace v1 { +class Monomial; +struct MonomialDefaultTypeInternal; +extern MonomialDefaultTypeInternal _Monomial_default_instance_; +class Polynomial; +struct PolynomialDefaultTypeInternal; +extern PolynomialDefaultTypeInternal _Polynomial_default_instance_; +} // namespace v1 +} // namespace ommx +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google + +namespace ommx { +namespace v1 { + +// =================================================================== + + +// ------------------------------------------------------------------- + +class Monomial final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:ommx.v1.Monomial) */ { + public: + inline Monomial() : Monomial(nullptr) {} + ~Monomial() override; + template + explicit PROTOBUF_CONSTEXPR Monomial( + ::google::protobuf::internal::ConstantInitialized); + + inline Monomial(const Monomial& from) : Monomial(nullptr, from) {} + inline Monomial(Monomial&& from) noexcept + : Monomial(nullptr, std::move(from)) {} + inline Monomial& operator=(const Monomial& from) { + CopyFrom(from); + return *this; + } + inline Monomial& operator=(Monomial&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Monomial& default_instance() { + return *internal_default_instance(); + } + static inline const Monomial* internal_default_instance() { + return reinterpret_cast( + &_Monomial_default_instance_); + } + static constexpr int kIndexInFileMessages = 0; + friend void swap(Monomial& a, Monomial& b) { a.Swap(&b); } + inline void Swap(Monomial* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Monomial* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Monomial* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Monomial& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const Monomial& from) { Monomial::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(Monomial* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "ommx.v1.Monomial"; } + + protected: + explicit Monomial(::google::protobuf::Arena* arena); + Monomial(::google::protobuf::Arena* arena, const Monomial& from); + Monomial(::google::protobuf::Arena* arena, Monomial&& from) noexcept + : Monomial(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::Message::ClassData* GetClassData() const final; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kIdsFieldNumber = 1, + kCoefficientFieldNumber = 2, + }; + // repeated uint64 ids = 1; + int ids_size() const; + private: + int _internal_ids_size() const; + + public: + void clear_ids() ; + ::uint64_t ids(int index) const; + void set_ids(int index, ::uint64_t value); + void add_ids(::uint64_t value); + const ::google::protobuf::RepeatedField<::uint64_t>& ids() const; + ::google::protobuf::RepeatedField<::uint64_t>* mutable_ids(); + + private: + const ::google::protobuf::RepeatedField<::uint64_t>& _internal_ids() const; + ::google::protobuf::RepeatedField<::uint64_t>* _internal_mutable_ids(); + + public: + // double coefficient = 2; + void clear_coefficient() ; + double coefficient() const; + void set_coefficient(double value); + + private: + double _internal_coefficient() const; + void _internal_set_coefficient(double value); + + public: + // @@protoc_insertion_point(class_scope:ommx.v1.Monomial) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 1, 2, 0, + 0, 2> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_Monomial_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const Monomial& from_msg); + ::google::protobuf::RepeatedField<::uint64_t> ids_; + mutable ::google::protobuf::internal::CachedSize _ids_cached_byte_size_; + double coefficient_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_ommx_2fv1_2fpolynomial_2eproto; +}; +// ------------------------------------------------------------------- + +class Polynomial final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:ommx.v1.Polynomial) */ { + public: + inline Polynomial() : Polynomial(nullptr) {} + ~Polynomial() override; + template + explicit PROTOBUF_CONSTEXPR Polynomial( + ::google::protobuf::internal::ConstantInitialized); + + inline Polynomial(const Polynomial& from) : Polynomial(nullptr, from) {} + inline Polynomial(Polynomial&& from) noexcept + : Polynomial(nullptr, std::move(from)) {} + inline Polynomial& operator=(const Polynomial& from) { + CopyFrom(from); + return *this; + } + inline Polynomial& operator=(Polynomial&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Polynomial& default_instance() { + return *internal_default_instance(); + } + static inline const Polynomial* internal_default_instance() { + return reinterpret_cast( + &_Polynomial_default_instance_); + } + static constexpr int kIndexInFileMessages = 1; + friend void swap(Polynomial& a, Polynomial& b) { a.Swap(&b); } + inline void Swap(Polynomial* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Polynomial* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Polynomial* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Polynomial& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const Polynomial& from) { Polynomial::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(Polynomial* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "ommx.v1.Polynomial"; } + + protected: + explicit Polynomial(::google::protobuf::Arena* arena); + Polynomial(::google::protobuf::Arena* arena, const Polynomial& from); + Polynomial(::google::protobuf::Arena* arena, Polynomial&& from) noexcept + : Polynomial(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::Message::ClassData* GetClassData() const final; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kTermsFieldNumber = 1, + }; + // repeated .ommx.v1.Monomial terms = 1; + int terms_size() const; + private: + int _internal_terms_size() const; + + public: + void clear_terms() ; + ::ommx::v1::Monomial* mutable_terms(int index); + ::google::protobuf::RepeatedPtrField<::ommx::v1::Monomial>* mutable_terms(); + + private: + const ::google::protobuf::RepeatedPtrField<::ommx::v1::Monomial>& _internal_terms() const; + ::google::protobuf::RepeatedPtrField<::ommx::v1::Monomial>* _internal_mutable_terms(); + public: + const ::ommx::v1::Monomial& terms(int index) const; + ::ommx::v1::Monomial* add_terms(); + const ::google::protobuf::RepeatedPtrField<::ommx::v1::Monomial>& terms() const; + // @@protoc_insertion_point(class_scope:ommx.v1.Polynomial) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 1, 1, + 0, 2> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_Polynomial_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const Polynomial& from_msg); + ::google::protobuf::RepeatedPtrField< ::ommx::v1::Monomial > terms_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_ommx_2fv1_2fpolynomial_2eproto; +}; + +// =================================================================== + + + + +// =================================================================== + + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// Monomial + +// repeated uint64 ids = 1; +inline int Monomial::_internal_ids_size() const { + return _internal_ids().size(); +} +inline int Monomial::ids_size() const { + return _internal_ids_size(); +} +inline void Monomial::clear_ids() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.ids_.Clear(); +} +inline ::uint64_t Monomial::ids(int index) const { + // @@protoc_insertion_point(field_get:ommx.v1.Monomial.ids) + return _internal_ids().Get(index); +} +inline void Monomial::set_ids(int index, ::uint64_t value) { + _internal_mutable_ids()->Set(index, value); + // @@protoc_insertion_point(field_set:ommx.v1.Monomial.ids) +} +inline void Monomial::add_ids(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_ids()->Add(value); + // @@protoc_insertion_point(field_add:ommx.v1.Monomial.ids) +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& Monomial::ids() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:ommx.v1.Monomial.ids) + return _internal_ids(); +} +inline ::google::protobuf::RepeatedField<::uint64_t>* Monomial::mutable_ids() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:ommx.v1.Monomial.ids) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_ids(); +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& +Monomial::_internal_ids() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.ids_; +} +inline ::google::protobuf::RepeatedField<::uint64_t>* Monomial::_internal_mutable_ids() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.ids_; +} + +// double coefficient = 2; +inline void Monomial::clear_coefficient() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.coefficient_ = 0; +} +inline double Monomial::coefficient() const { + // @@protoc_insertion_point(field_get:ommx.v1.Monomial.coefficient) + return _internal_coefficient(); +} +inline void Monomial::set_coefficient(double value) { + _internal_set_coefficient(value); + // @@protoc_insertion_point(field_set:ommx.v1.Monomial.coefficient) +} +inline double Monomial::_internal_coefficient() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.coefficient_; +} +inline void Monomial::_internal_set_coefficient(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.coefficient_ = value; +} + +// ------------------------------------------------------------------- + +// Polynomial + +// repeated .ommx.v1.Monomial terms = 1; +inline int Polynomial::_internal_terms_size() const { + return _internal_terms().size(); +} +inline int Polynomial::terms_size() const { + return _internal_terms_size(); +} +inline void Polynomial::clear_terms() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.terms_.Clear(); +} +inline ::ommx::v1::Monomial* Polynomial::mutable_terms(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:ommx.v1.Polynomial.terms) + return _internal_mutable_terms()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::ommx::v1::Monomial>* Polynomial::mutable_terms() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:ommx.v1.Polynomial.terms) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_terms(); +} +inline const ::ommx::v1::Monomial& Polynomial::terms(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Polynomial.terms) + return _internal_terms().Get(index); +} +inline ::ommx::v1::Monomial* Polynomial::add_terms() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::ommx::v1::Monomial* _add = _internal_mutable_terms()->Add(); + // @@protoc_insertion_point(field_add:ommx.v1.Polynomial.terms) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::Monomial>& Polynomial::terms() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:ommx.v1.Polynomial.terms) + return _internal_terms(); +} +inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::Monomial>& +Polynomial::_internal_terms() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.terms_; +} +inline ::google::protobuf::RepeatedPtrField<::ommx::v1::Monomial>* +Polynomial::_internal_mutable_terms() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.terms_; +} + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace ommx + + +// @@protoc_insertion_point(global_scope) + +#include "google/protobuf/port_undef.inc" + +#endif // GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fpolynomial_2eproto_2epb_2eh diff --git a/cpp/ommx/v1/quadratic.pb.cc b/cpp/ommx/v1/quadratic.pb.cc new file mode 100644 index 00000000..5b4dbf5a --- /dev/null +++ b/cpp/ommx/v1/quadratic.pb.cc @@ -0,0 +1,443 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: ommx/v1/quadratic.proto +// Protobuf C++ Version: 5.27.3 + +#include "ommx/v1/quadratic.pb.h" + +#include +#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/generated_message_tctable_impl.h" +#include "google/protobuf/extension_set.h" +#include "google/protobuf/wire_format_lite.h" +#include "google/protobuf/descriptor.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/reflection_ops.h" +#include "google/protobuf/wire_format.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" +PROTOBUF_PRAGMA_INIT_SEG +namespace _pb = ::google::protobuf; +namespace _pbi = ::google::protobuf::internal; +namespace _fl = ::google::protobuf::internal::field_layout; +namespace ommx { +namespace v1 { + +inline constexpr Quadratic::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + rows_{}, + _rows_cached_byte_size_{0}, + columns_{}, + _columns_cached_byte_size_{0}, + values_{}, + linear_{nullptr} {} + +template +PROTOBUF_CONSTEXPR Quadratic::Quadratic(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct QuadraticDefaultTypeInternal { + PROTOBUF_CONSTEXPR QuadraticDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~QuadraticDefaultTypeInternal() {} + union { + Quadratic _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 QuadraticDefaultTypeInternal _Quadratic_default_instance_; +} // namespace v1 +} // namespace ommx +static constexpr const ::_pb::EnumDescriptor** + file_level_enum_descriptors_ommx_2fv1_2fquadratic_2eproto = nullptr; +static constexpr const ::_pb::ServiceDescriptor** + file_level_service_descriptors_ommx_2fv1_2fquadratic_2eproto = nullptr; +const ::uint32_t + TableStruct_ommx_2fv1_2fquadratic_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::ommx::v1::Quadratic, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Quadratic, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::ommx::v1::Quadratic, _impl_.rows_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Quadratic, _impl_.columns_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Quadratic, _impl_.values_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Quadratic, _impl_.linear_), + ~0u, + ~0u, + ~0u, + 0, +}; + +static const ::_pbi::MigrationSchema + schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + {0, 12, -1, sizeof(::ommx::v1::Quadratic)}, +}; +static const ::_pb::Message* const file_default_instances[] = { + &::ommx::v1::_Quadratic_default_instance_._instance, +}; +const char descriptor_table_protodef_ommx_2fv1_2fquadratic_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + "\n\027ommx/v1/quadratic.proto\022\007ommx.v1\032\024ommx" + "/v1/linear.proto\"k\n\tQuadratic\022\014\n\004rows\030\001 " + "\003(\004\022\017\n\007columns\030\002 \003(\004\022\016\n\006values\030\003 \003(\001\022$\n\006" + "linear\030\004 \001(\0132\017.ommx.v1.LinearH\000\210\001\001B\t\n\007_l" + "inearb\006proto3" +}; +static const ::_pbi::DescriptorTable* const descriptor_table_ommx_2fv1_2fquadratic_2eproto_deps[1] = + { + &::descriptor_table_ommx_2fv1_2flinear_2eproto, +}; +static ::absl::once_flag descriptor_table_ommx_2fv1_2fquadratic_2eproto_once; +PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fquadratic_2eproto = { + false, + false, + 173, + descriptor_table_protodef_ommx_2fv1_2fquadratic_2eproto, + "ommx/v1/quadratic.proto", + &descriptor_table_ommx_2fv1_2fquadratic_2eproto_once, + descriptor_table_ommx_2fv1_2fquadratic_2eproto_deps, + 1, + 1, + schemas, + file_default_instances, + TableStruct_ommx_2fv1_2fquadratic_2eproto::offsets, + file_level_enum_descriptors_ommx_2fv1_2fquadratic_2eproto, + file_level_service_descriptors_ommx_2fv1_2fquadratic_2eproto, +}; +namespace ommx { +namespace v1 { +// =================================================================== + +class Quadratic::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(Quadratic, _impl_._has_bits_); +}; + +void Quadratic::clear_linear() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.linear_ != nullptr) _impl_.linear_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +Quadratic::Quadratic(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:ommx.v1.Quadratic) +} +inline PROTOBUF_NDEBUG_INLINE Quadratic::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::ommx::v1::Quadratic& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + rows_{visibility, arena, from.rows_}, + _rows_cached_byte_size_{0}, + columns_{visibility, arena, from.columns_}, + _columns_cached_byte_size_{0}, + values_{visibility, arena, from.values_} {} + +Quadratic::Quadratic( + ::google::protobuf::Arena* arena, + const Quadratic& from) + : ::google::protobuf::Message(arena) { + Quadratic* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.linear_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::Message::CopyConstruct<::ommx::v1::Linear>( + arena, *from._impl_.linear_) + : nullptr; + + // @@protoc_insertion_point(copy_constructor:ommx.v1.Quadratic) +} +inline PROTOBUF_NDEBUG_INLINE Quadratic::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + rows_{visibility, arena}, + _rows_cached_byte_size_{0}, + columns_{visibility, arena}, + _columns_cached_byte_size_{0}, + values_{visibility, arena} {} + +inline void Quadratic::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + _impl_.linear_ = {}; +} +Quadratic::~Quadratic() { + // @@protoc_insertion_point(destructor:ommx.v1.Quadratic) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void Quadratic::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + delete _impl_.linear_; + _impl_.~Impl_(); +} + +const ::google::protobuf::MessageLite::ClassData* +Quadratic::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(Quadratic, _impl_._cached_size_), + false, + }, + &Quadratic::MergeImpl, + &Quadratic::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2fquadratic_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<2, 4, 1, 0, 2> Quadratic::_table_ = { + { + PROTOBUF_FIELD_OFFSET(Quadratic, _impl_._has_bits_), + 0, // no _extensions_ + 4, 24, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_Quadratic_default_instance_._instance, + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::ommx::v1::Quadratic>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + // optional .ommx.v1.Linear linear = 4; + {::_pbi::TcParser::FastMtS1, + {34, 0, 0, PROTOBUF_FIELD_OFFSET(Quadratic, _impl_.linear_)}}, + // repeated uint64 rows = 1; + {::_pbi::TcParser::FastV64P1, + {10, 63, 0, PROTOBUF_FIELD_OFFSET(Quadratic, _impl_.rows_)}}, + // repeated uint64 columns = 2; + {::_pbi::TcParser::FastV64P1, + {18, 63, 0, PROTOBUF_FIELD_OFFSET(Quadratic, _impl_.columns_)}}, + // repeated double values = 3; + {::_pbi::TcParser::FastF64P1, + {26, 63, 0, PROTOBUF_FIELD_OFFSET(Quadratic, _impl_.values_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // repeated uint64 rows = 1; + {PROTOBUF_FIELD_OFFSET(Quadratic, _impl_.rows_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt64)}, + // repeated uint64 columns = 2; + {PROTOBUF_FIELD_OFFSET(Quadratic, _impl_.columns_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt64)}, + // repeated double values = 3; + {PROTOBUF_FIELD_OFFSET(Quadratic, _impl_.values_), -1, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kPackedDouble)}, + // optional .ommx.v1.Linear linear = 4; + {PROTOBUF_FIELD_OFFSET(Quadratic, _impl_.linear_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::ommx::v1::Linear>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void Quadratic::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Quadratic) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.rows_.Clear(); + _impl_.columns_.Clear(); + _impl_.values_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.linear_ != nullptr); + _impl_.linear_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +::uint8_t* Quadratic::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:ommx.v1.Quadratic) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // repeated uint64 rows = 1; + { + int byte_size = _impl_._rows_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteUInt64Packed( + 1, _internal_rows(), byte_size, target); + } + } + + // repeated uint64 columns = 2; + { + int byte_size = _impl_._columns_cached_byte_size_.Get(); + if (byte_size > 0) { + target = stream->WriteUInt64Packed( + 2, _internal_columns(), byte_size, target); + } + } + + // repeated double values = 3; + if (this->_internal_values_size() > 0) { + target = stream->WriteFixedPacked(3, _internal_values(), target); + } + + cached_has_bits = _impl_._has_bits_[0]; + // optional .ommx.v1.Linear linear = 4; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, *_impl_.linear_, _impl_.linear_->GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:ommx.v1.Quadratic) + return target; +} + +::size_t Quadratic::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:ommx.v1.Quadratic) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); + // repeated uint64 rows = 1; + { + std::size_t data_size = ::_pbi::WireFormatLite::UInt64Size( + this->_internal_rows()) + ; + _impl_._rows_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size)); + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; + } + // repeated uint64 columns = 2; + { + std::size_t data_size = ::_pbi::WireFormatLite::UInt64Size( + this->_internal_columns()) + ; + _impl_._columns_cached_byte_size_.Set(::_pbi::ToCachedSize(data_size)); + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; + } + // repeated double values = 3; + { + std::size_t data_size = std::size_t{8} * + ::_pbi::FromIntSize(this->_internal_values_size()) + ; + std::size_t tag_size = data_size == 0 + ? 0 + : 1 + ::_pbi::WireFormatLite::Int32Size( + static_cast(data_size)) + ; + total_size += tag_size + data_size; + } + // optional .ommx.v1.Linear linear = 4; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.linear_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void Quadratic::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:ommx.v1.Quadratic) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_rows()->MergeFrom(from._internal_rows()); + _this->_internal_mutable_columns()->MergeFrom(from._internal_columns()); + _this->_internal_mutable_values()->MergeFrom(from._internal_values()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(from._impl_.linear_ != nullptr); + if (_this->_impl_.linear_ == nullptr) { + _this->_impl_.linear_ = + ::google::protobuf::Message::CopyConstruct<::ommx::v1::Linear>(arena, *from._impl_.linear_); + } else { + _this->_impl_.linear_->MergeFrom(*from._impl_.linear_); + } + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void Quadratic::CopyFrom(const Quadratic& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:ommx.v1.Quadratic) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void Quadratic::InternalSwap(Quadratic* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.rows_.InternalSwap(&other->_impl_.rows_); + _impl_.columns_.InternalSwap(&other->_impl_.columns_); + _impl_.values_.InternalSwap(&other->_impl_.values_); + swap(_impl_.linear_, other->_impl_.linear_); +} + +::google::protobuf::Metadata Quadratic::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace ommx +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google +// @@protoc_insertion_point(global_scope) +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type + _static_init2_ PROTOBUF_UNUSED = + (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2fquadratic_2eproto), + ::std::false_type{}); +#include "google/protobuf/port_undef.inc" diff --git a/cpp/ommx/v1/quadratic.pb.h b/cpp/ommx/v1/quadratic.pb.h new file mode 100644 index 00000000..eb84f5f9 --- /dev/null +++ b/cpp/ommx/v1/quadratic.pb.h @@ -0,0 +1,566 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: ommx/v1/quadratic.proto +// Protobuf C++ Version: 5.27.3 + +#ifndef GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fquadratic_2eproto_2epb_2eh +#define GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fquadratic_2eproto_2epb_2eh + +#include +#include +#include +#include + +#include "google/protobuf/runtime_version.h" +#if PROTOBUF_VERSION != 5027003 +#error "Protobuf C++ gencode is built with an incompatible version of" +#error "Protobuf C++ headers/runtime. See" +#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" +#endif +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/message.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export +#include "google/protobuf/unknown_field_set.h" +#include "ommx/v1/linear.pb.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" + +#define PROTOBUF_INTERNAL_EXPORT_ommx_2fv1_2fquadratic_2eproto + +namespace google { +namespace protobuf { +namespace internal { +class AnyMetadata; +} // namespace internal +} // namespace protobuf +} // namespace google + +// Internal implementation detail -- do not use these members. +struct TableStruct_ommx_2fv1_2fquadratic_2eproto { + static const ::uint32_t offsets[]; +}; +extern const ::google::protobuf::internal::DescriptorTable + descriptor_table_ommx_2fv1_2fquadratic_2eproto; +namespace ommx { +namespace v1 { +class Quadratic; +struct QuadraticDefaultTypeInternal; +extern QuadraticDefaultTypeInternal _Quadratic_default_instance_; +} // namespace v1 +} // namespace ommx +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google + +namespace ommx { +namespace v1 { + +// =================================================================== + + +// ------------------------------------------------------------------- + +class Quadratic final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:ommx.v1.Quadratic) */ { + public: + inline Quadratic() : Quadratic(nullptr) {} + ~Quadratic() override; + template + explicit PROTOBUF_CONSTEXPR Quadratic( + ::google::protobuf::internal::ConstantInitialized); + + inline Quadratic(const Quadratic& from) : Quadratic(nullptr, from) {} + inline Quadratic(Quadratic&& from) noexcept + : Quadratic(nullptr, std::move(from)) {} + inline Quadratic& operator=(const Quadratic& from) { + CopyFrom(from); + return *this; + } + inline Quadratic& operator=(Quadratic&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Quadratic& default_instance() { + return *internal_default_instance(); + } + static inline const Quadratic* internal_default_instance() { + return reinterpret_cast( + &_Quadratic_default_instance_); + } + static constexpr int kIndexInFileMessages = 0; + friend void swap(Quadratic& a, Quadratic& b) { a.Swap(&b); } + inline void Swap(Quadratic* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Quadratic* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Quadratic* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Quadratic& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const Quadratic& from) { Quadratic::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(Quadratic* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "ommx.v1.Quadratic"; } + + protected: + explicit Quadratic(::google::protobuf::Arena* arena); + Quadratic(::google::protobuf::Arena* arena, const Quadratic& from); + Quadratic(::google::protobuf::Arena* arena, Quadratic&& from) noexcept + : Quadratic(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::Message::ClassData* GetClassData() const final; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kRowsFieldNumber = 1, + kColumnsFieldNumber = 2, + kValuesFieldNumber = 3, + kLinearFieldNumber = 4, + }; + // repeated uint64 rows = 1; + int rows_size() const; + private: + int _internal_rows_size() const; + + public: + void clear_rows() ; + ::uint64_t rows(int index) const; + void set_rows(int index, ::uint64_t value); + void add_rows(::uint64_t value); + const ::google::protobuf::RepeatedField<::uint64_t>& rows() const; + ::google::protobuf::RepeatedField<::uint64_t>* mutable_rows(); + + private: + const ::google::protobuf::RepeatedField<::uint64_t>& _internal_rows() const; + ::google::protobuf::RepeatedField<::uint64_t>* _internal_mutable_rows(); + + public: + // repeated uint64 columns = 2; + int columns_size() const; + private: + int _internal_columns_size() const; + + public: + void clear_columns() ; + ::uint64_t columns(int index) const; + void set_columns(int index, ::uint64_t value); + void add_columns(::uint64_t value); + const ::google::protobuf::RepeatedField<::uint64_t>& columns() const; + ::google::protobuf::RepeatedField<::uint64_t>* mutable_columns(); + + private: + const ::google::protobuf::RepeatedField<::uint64_t>& _internal_columns() const; + ::google::protobuf::RepeatedField<::uint64_t>* _internal_mutable_columns(); + + public: + // repeated double values = 3; + int values_size() const; + private: + int _internal_values_size() const; + + public: + void clear_values() ; + double values(int index) const; + void set_values(int index, double value); + void add_values(double value); + const ::google::protobuf::RepeatedField& values() const; + ::google::protobuf::RepeatedField* mutable_values(); + + private: + const ::google::protobuf::RepeatedField& _internal_values() const; + ::google::protobuf::RepeatedField* _internal_mutable_values(); + + public: + // optional .ommx.v1.Linear linear = 4; + bool has_linear() const; + void clear_linear() ; + const ::ommx::v1::Linear& linear() const; + PROTOBUF_NODISCARD ::ommx::v1::Linear* release_linear(); + ::ommx::v1::Linear* mutable_linear(); + void set_allocated_linear(::ommx::v1::Linear* value); + void unsafe_arena_set_allocated_linear(::ommx::v1::Linear* value); + ::ommx::v1::Linear* unsafe_arena_release_linear(); + + private: + const ::ommx::v1::Linear& _internal_linear() const; + ::ommx::v1::Linear* _internal_mutable_linear(); + + public: + // @@protoc_insertion_point(class_scope:ommx.v1.Quadratic) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 2, 4, 1, + 0, 2> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_Quadratic_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const Quadratic& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedField<::uint64_t> rows_; + mutable ::google::protobuf::internal::CachedSize _rows_cached_byte_size_; + ::google::protobuf::RepeatedField<::uint64_t> columns_; + mutable ::google::protobuf::internal::CachedSize _columns_cached_byte_size_; + ::google::protobuf::RepeatedField values_; + ::ommx::v1::Linear* linear_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_ommx_2fv1_2fquadratic_2eproto; +}; + +// =================================================================== + + + + +// =================================================================== + + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// Quadratic + +// repeated uint64 rows = 1; +inline int Quadratic::_internal_rows_size() const { + return _internal_rows().size(); +} +inline int Quadratic::rows_size() const { + return _internal_rows_size(); +} +inline void Quadratic::clear_rows() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.rows_.Clear(); +} +inline ::uint64_t Quadratic::rows(int index) const { + // @@protoc_insertion_point(field_get:ommx.v1.Quadratic.rows) + return _internal_rows().Get(index); +} +inline void Quadratic::set_rows(int index, ::uint64_t value) { + _internal_mutable_rows()->Set(index, value); + // @@protoc_insertion_point(field_set:ommx.v1.Quadratic.rows) +} +inline void Quadratic::add_rows(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_rows()->Add(value); + // @@protoc_insertion_point(field_add:ommx.v1.Quadratic.rows) +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& Quadratic::rows() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:ommx.v1.Quadratic.rows) + return _internal_rows(); +} +inline ::google::protobuf::RepeatedField<::uint64_t>* Quadratic::mutable_rows() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:ommx.v1.Quadratic.rows) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_rows(); +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& +Quadratic::_internal_rows() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.rows_; +} +inline ::google::protobuf::RepeatedField<::uint64_t>* Quadratic::_internal_mutable_rows() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.rows_; +} + +// repeated uint64 columns = 2; +inline int Quadratic::_internal_columns_size() const { + return _internal_columns().size(); +} +inline int Quadratic::columns_size() const { + return _internal_columns_size(); +} +inline void Quadratic::clear_columns() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.columns_.Clear(); +} +inline ::uint64_t Quadratic::columns(int index) const { + // @@protoc_insertion_point(field_get:ommx.v1.Quadratic.columns) + return _internal_columns().Get(index); +} +inline void Quadratic::set_columns(int index, ::uint64_t value) { + _internal_mutable_columns()->Set(index, value); + // @@protoc_insertion_point(field_set:ommx.v1.Quadratic.columns) +} +inline void Quadratic::add_columns(::uint64_t value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_columns()->Add(value); + // @@protoc_insertion_point(field_add:ommx.v1.Quadratic.columns) +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& Quadratic::columns() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:ommx.v1.Quadratic.columns) + return _internal_columns(); +} +inline ::google::protobuf::RepeatedField<::uint64_t>* Quadratic::mutable_columns() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:ommx.v1.Quadratic.columns) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_columns(); +} +inline const ::google::protobuf::RepeatedField<::uint64_t>& +Quadratic::_internal_columns() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.columns_; +} +inline ::google::protobuf::RepeatedField<::uint64_t>* Quadratic::_internal_mutable_columns() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.columns_; +} + +// repeated double values = 3; +inline int Quadratic::_internal_values_size() const { + return _internal_values().size(); +} +inline int Quadratic::values_size() const { + return _internal_values_size(); +} +inline void Quadratic::clear_values() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.values_.Clear(); +} +inline double Quadratic::values(int index) const { + // @@protoc_insertion_point(field_get:ommx.v1.Quadratic.values) + return _internal_values().Get(index); +} +inline void Quadratic::set_values(int index, double value) { + _internal_mutable_values()->Set(index, value); + // @@protoc_insertion_point(field_set:ommx.v1.Quadratic.values) +} +inline void Quadratic::add_values(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _internal_mutable_values()->Add(value); + // @@protoc_insertion_point(field_add:ommx.v1.Quadratic.values) +} +inline const ::google::protobuf::RepeatedField& Quadratic::values() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:ommx.v1.Quadratic.values) + return _internal_values(); +} +inline ::google::protobuf::RepeatedField* Quadratic::mutable_values() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:ommx.v1.Quadratic.values) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_values(); +} +inline const ::google::protobuf::RepeatedField& +Quadratic::_internal_values() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.values_; +} +inline ::google::protobuf::RepeatedField* Quadratic::_internal_mutable_values() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.values_; +} + +// optional .ommx.v1.Linear linear = 4; +inline bool Quadratic::has_linear() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.linear_ != nullptr); + return value; +} +inline const ::ommx::v1::Linear& Quadratic::_internal_linear() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::ommx::v1::Linear* p = _impl_.linear_; + return p != nullptr ? *p : reinterpret_cast(::ommx::v1::_Linear_default_instance_); +} +inline const ::ommx::v1::Linear& Quadratic::linear() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Quadratic.linear) + return _internal_linear(); +} +inline void Quadratic::unsafe_arena_set_allocated_linear(::ommx::v1::Linear* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.linear_); + } + _impl_.linear_ = reinterpret_cast<::ommx::v1::Linear*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ommx.v1.Quadratic.linear) +} +inline ::ommx::v1::Linear* Quadratic::release_linear() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::ommx::v1::Linear* released = _impl_.linear_; + _impl_.linear_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return released; +} +inline ::ommx::v1::Linear* Quadratic::unsafe_arena_release_linear() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:ommx.v1.Quadratic.linear) + + _impl_._has_bits_[0] &= ~0x00000001u; + ::ommx::v1::Linear* temp = _impl_.linear_; + _impl_.linear_ = nullptr; + return temp; +} +inline ::ommx::v1::Linear* Quadratic::_internal_mutable_linear() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.linear_ == nullptr) { + auto* p = ::google::protobuf::Message::DefaultConstruct<::ommx::v1::Linear>(GetArena()); + _impl_.linear_ = reinterpret_cast<::ommx::v1::Linear*>(p); + } + return _impl_.linear_; +} +inline ::ommx::v1::Linear* Quadratic::mutable_linear() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000001u; + ::ommx::v1::Linear* _msg = _internal_mutable_linear(); + // @@protoc_insertion_point(field_mutable:ommx.v1.Quadratic.linear) + return _msg; +} +inline void Quadratic::set_allocated_linear(::ommx::v1::Linear* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.linear_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::MessageLite*>(value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + + _impl_.linear_ = reinterpret_cast<::ommx::v1::Linear*>(value); + // @@protoc_insertion_point(field_set_allocated:ommx.v1.Quadratic.linear) +} + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace ommx + + +// @@protoc_insertion_point(global_scope) + +#include "google/protobuf/port_undef.inc" + +#endif // GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fquadratic_2eproto_2epb_2eh diff --git a/cpp/ommx/v1/solution.pb.cc b/cpp/ommx/v1/solution.pb.cc new file mode 100644 index 00000000..9d01a9e9 --- /dev/null +++ b/cpp/ommx/v1/solution.pb.cc @@ -0,0 +1,1479 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: ommx/v1/solution.proto +// Protobuf C++ Version: 5.27.3 + +#include "ommx/v1/solution.pb.h" + +#include +#include +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/generated_message_tctable_impl.h" +#include "google/protobuf/extension_set.h" +#include "google/protobuf/wire_format_lite.h" +#include "google/protobuf/descriptor.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/reflection_ops.h" +#include "google/protobuf/wire_format.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" +PROTOBUF_PRAGMA_INIT_SEG +namespace _pb = ::google::protobuf; +namespace _pbi = ::google::protobuf::internal; +namespace _fl = ::google::protobuf::internal::field_layout; +namespace ommx { +namespace v1 { + template +PROTOBUF_CONSTEXPR Unbounded::Unbounded(::_pbi::ConstantInitialized) {} +struct UnboundedDefaultTypeInternal { + PROTOBUF_CONSTEXPR UnboundedDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~UnboundedDefaultTypeInternal() {} + union { + Unbounded _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 UnboundedDefaultTypeInternal _Unbounded_default_instance_; + template +PROTOBUF_CONSTEXPR State_EntriesEntry_DoNotUse::State_EntriesEntry_DoNotUse(::_pbi::ConstantInitialized) {} +struct State_EntriesEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR State_EntriesEntry_DoNotUseDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~State_EntriesEntry_DoNotUseDefaultTypeInternal() {} + union { + State_EntriesEntry_DoNotUse _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 State_EntriesEntry_DoNotUseDefaultTypeInternal _State_EntriesEntry_DoNotUse_default_instance_; + template +PROTOBUF_CONSTEXPR Infeasible::Infeasible(::_pbi::ConstantInitialized) {} +struct InfeasibleDefaultTypeInternal { + PROTOBUF_CONSTEXPR InfeasibleDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~InfeasibleDefaultTypeInternal() {} + union { + Infeasible _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InfeasibleDefaultTypeInternal _Infeasible_default_instance_; + +inline constexpr State::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : entries_{}, + _cached_size_{0} {} + +template +PROTOBUF_CONSTEXPR State::State(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct StateDefaultTypeInternal { + PROTOBUF_CONSTEXPR StateDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~StateDefaultTypeInternal() {} + union { + State _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StateDefaultTypeInternal _State_default_instance_; + +inline constexpr Solution::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : _cached_size_{0}, + decision_variables_{}, + evaluated_constraints_{}, + state_{nullptr}, + objective_{0}, + feasible_{false}, + optimality_{static_cast< ::ommx::v1::Optimality >(0)}, + relaxation_{static_cast< ::ommx::v1::Relaxation >(0)} {} + +template +PROTOBUF_CONSTEXPR Solution::Solution(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct SolutionDefaultTypeInternal { + PROTOBUF_CONSTEXPR SolutionDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~SolutionDefaultTypeInternal() {} + union { + Solution _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SolutionDefaultTypeInternal _Solution_default_instance_; + +inline constexpr Result::Impl_::Impl_( + ::_pbi::ConstantInitialized) noexcept + : result_{}, + _cached_size_{0}, + _oneof_case_{} {} + +template +PROTOBUF_CONSTEXPR Result::Result(::_pbi::ConstantInitialized) + : _impl_(::_pbi::ConstantInitialized()) {} +struct ResultDefaultTypeInternal { + PROTOBUF_CONSTEXPR ResultDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} + ~ResultDefaultTypeInternal() {} + union { + Result _instance; + }; +}; + +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT + PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ResultDefaultTypeInternal _Result_default_instance_; +} // namespace v1 +} // namespace ommx +static const ::_pb::EnumDescriptor* file_level_enum_descriptors_ommx_2fv1_2fsolution_2eproto[2]; +static constexpr const ::_pb::ServiceDescriptor** + file_level_service_descriptors_ommx_2fv1_2fsolution_2eproto = nullptr; +const ::uint32_t + TableStruct_ommx_2fv1_2fsolution_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::ommx::v1::State_EntriesEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::State_EntriesEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::ommx::v1::State_EntriesEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::State_EntriesEntry_DoNotUse, value_), + 0, + 1, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::ommx::v1::State, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::ommx::v1::State, _impl_.entries_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Solution, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Solution, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + PROTOBUF_FIELD_OFFSET(::ommx::v1::Solution, _impl_.state_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Solution, _impl_.objective_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Solution, _impl_.decision_variables_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Solution, _impl_.evaluated_constraints_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Solution, _impl_.feasible_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Solution, _impl_.optimality_), + PROTOBUF_FIELD_OFFSET(::ommx::v1::Solution, _impl_.relaxation_), + 0, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::ommx::v1::Infeasible, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::ommx::v1::Unbounded, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::ommx::v1::Result, _internal_metadata_), + ~0u, // no _extensions_ + PROTOBUF_FIELD_OFFSET(::ommx::v1::Result, _impl_._oneof_case_[0]), + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _split_ + ~0u, // no sizeof(Split) + ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, + ::_pbi::kInvalidFieldOffsetTag, + PROTOBUF_FIELD_OFFSET(::ommx::v1::Result, _impl_.result_), +}; + +static const ::_pbi::MigrationSchema + schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = { + {0, 10, -1, sizeof(::ommx::v1::State_EntriesEntry_DoNotUse)}, + {12, -1, -1, sizeof(::ommx::v1::State)}, + {21, 36, -1, sizeof(::ommx::v1::Solution)}, + {43, -1, -1, sizeof(::ommx::v1::Infeasible)}, + {51, -1, -1, sizeof(::ommx::v1::Unbounded)}, + {59, -1, -1, sizeof(::ommx::v1::Result)}, +}; +static const ::_pb::Message* const file_default_instances[] = { + &::ommx::v1::_State_EntriesEntry_DoNotUse_default_instance_._instance, + &::ommx::v1::_State_default_instance_._instance, + &::ommx::v1::_Solution_default_instance_._instance, + &::ommx::v1::_Infeasible_default_instance_._instance, + &::ommx::v1::_Unbounded_default_instance_._instance, + &::ommx::v1::_Result_default_instance_._instance, +}; +const char descriptor_table_protodef_ommx_2fv1_2fsolution_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( + protodesc_cold) = { + "\n\026ommx/v1/solution.proto\022\007ommx.v1\032\030ommx/" + "v1/constraint.proto\032 ommx/v1/decision_va" + "riables.proto\"e\n\005State\022,\n\007entries\030\001 \003(\0132" + "\033.ommx.v1.State.EntriesEntry\032.\n\014EntriesE" + "ntry\022\013\n\003key\030\001 \001(\004\022\r\n\005value\030\002 \001(\001:\0028\001\"\224\002\n" + "\010Solution\022\035\n\005state\030\001 \001(\0132\016.ommx.v1.State" + "\022\021\n\tobjective\030\002 \001(\001\0225\n\022decision_variable" + "s\030\003 \003(\0132\031.ommx.v1.DecisionVariable\022;\n\025ev" + "aluated_constraints\030\004 \003(\0132\034.ommx.v1.Eval" + "uatedConstraint\022\020\n\010feasible\030\005 \001(\010\022\'\n\nopt" + "imality\030\006 \001(\0162\023.ommx.v1.Optimality\022\'\n\nre" + "laxation\030\007 \001(\0162\023.ommx.v1.Relaxation\"\014\n\nI" + "nfeasible\"\013\n\tUnbounded\"\236\001\n\006Result\022\017\n\005err" + "or\030\001 \001(\tH\000\022%\n\010solution\030\002 \001(\0132\021.ommx.v1.S" + "olutionH\000\022)\n\ninfeasible\030\003 \001(\0132\023.ommx.v1." + "InfeasibleH\000\022\'\n\tunbounded\030\004 \001(\0132\022.ommx.v" + "1.UnboundedH\000B\010\n\006result*\\\n\nOptimality\022\032\n" + "\026OPTIMALITY_UNSPECIFIED\020\000\022\026\n\022OPTIMALITY_" + "OPTIMAL\020\001\022\032\n\026OPTIMALITY_NOT_OPTIMAL\020\002*C\n" + "\nRelaxation\022\032\n\026RELAXATION_UNSPECIFIED\020\000\022" + "\031\n\025RELAXATION_LP_RELAXED\020\001b\006proto3" +}; +static const ::_pbi::DescriptorTable* const descriptor_table_ommx_2fv1_2fsolution_2eproto_deps[2] = + { + &::descriptor_table_ommx_2fv1_2fconstraint_2eproto, + &::descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto, +}; +static ::absl::once_flag descriptor_table_ommx_2fv1_2fsolution_2eproto_once; +PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fsolution_2eproto = { + false, + false, + 834, + descriptor_table_protodef_ommx_2fv1_2fsolution_2eproto, + "ommx/v1/solution.proto", + &descriptor_table_ommx_2fv1_2fsolution_2eproto_once, + descriptor_table_ommx_2fv1_2fsolution_2eproto_deps, + 2, + 6, + schemas, + file_default_instances, + TableStruct_ommx_2fv1_2fsolution_2eproto::offsets, + file_level_enum_descriptors_ommx_2fv1_2fsolution_2eproto, + file_level_service_descriptors_ommx_2fv1_2fsolution_2eproto, +}; +namespace ommx { +namespace v1 { +const ::google::protobuf::EnumDescriptor* Optimality_descriptor() { + ::google::protobuf::internal::AssignDescriptors(&descriptor_table_ommx_2fv1_2fsolution_2eproto); + return file_level_enum_descriptors_ommx_2fv1_2fsolution_2eproto[0]; +} +PROTOBUF_CONSTINIT const uint32_t Optimality_internal_data_[] = { + 196608u, 0u, }; +bool Optimality_IsValid(int value) { + return 0 <= value && value <= 2; +} +const ::google::protobuf::EnumDescriptor* Relaxation_descriptor() { + ::google::protobuf::internal::AssignDescriptors(&descriptor_table_ommx_2fv1_2fsolution_2eproto); + return file_level_enum_descriptors_ommx_2fv1_2fsolution_2eproto[1]; +} +PROTOBUF_CONSTINIT const uint32_t Relaxation_internal_data_[] = { + 131072u, 0u, }; +bool Relaxation_IsValid(int value) { + return 0 <= value && value <= 1; +} +// =================================================================== + +State_EntriesEntry_DoNotUse::State_EntriesEntry_DoNotUse() {} +State_EntriesEntry_DoNotUse::State_EntriesEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {} +const ::google::protobuf::MessageLite::ClassData* +State_EntriesEntry_DoNotUse::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + nullptr, // tc_table + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(State_EntriesEntry_DoNotUse, _cached_size_), + false, + }, + &State_EntriesEntry_DoNotUse::MergeImpl, + &State_EntriesEntry_DoNotUse::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2fsolution_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +// =================================================================== + +class State::_Internal { + public: +}; + +State::State(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:ommx.v1.State) +} +inline PROTOBUF_NDEBUG_INLINE State::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::ommx::v1::State& from_msg) + : entries_{visibility, arena, from.entries_}, + _cached_size_{0} {} + +State::State( + ::google::protobuf::Arena* arena, + const State& from) + : ::google::protobuf::Message(arena) { + State* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + + // @@protoc_insertion_point(copy_constructor:ommx.v1.State) +} +inline PROTOBUF_NDEBUG_INLINE State::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : entries_{visibility, arena}, + _cached_size_{0} {} + +inline void State::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +State::~State() { + // @@protoc_insertion_point(destructor:ommx.v1.State) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void State::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + _impl_.~Impl_(); +} + +const ::google::protobuf::MessageLite::ClassData* +State::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(State, _impl_._cached_size_), + false, + }, + &State::MergeImpl, + &State::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2fsolution_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 1, 1, 0, 2> State::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 1, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967294, // skipmap + offsetof(decltype(_table_), field_entries), + 1, // num_field_entries + 1, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_State_default_instance_._instance, + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::ommx::v1::State>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // map entries = 1; + {PROTOBUF_FIELD_OFFSET(State, _impl_.entries_), 0, 0, + (0 | ::_fl::kFcRepeated | ::_fl::kMap)}, + }}, {{ + {::_pbi::TcParser::GetMapAuxInfo< + decltype(State()._impl_.entries_)>( + 0, 0, 0, 4, + 1)}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void State::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.State) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.entries_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +::uint8_t* State::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:ommx.v1.State) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + // map entries = 1; + if (!_internal_entries().empty()) { + using MapType = ::google::protobuf::Map<::uint64_t, double>; + using WireHelper = _pbi::MapEntryFuncs<::uint64_t, double, + _pbi::WireFormatLite::TYPE_UINT64, + _pbi::WireFormatLite::TYPE_DOUBLE>; + const auto& field = _internal_entries(); + + if (stream->IsSerializationDeterministic() && field.size() > 1) { + for (const auto& entry : ::google::protobuf::internal::MapSorterFlat(field)) { + target = WireHelper::InternalSerialize( + 1, entry.first, entry.second, target, stream); + } + } else { + for (const auto& entry : field) { + target = WireHelper::InternalSerialize( + 1, entry.first, entry.second, target, stream); + } + } + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:ommx.v1.State) + return target; +} + +::size_t State::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:ommx.v1.State) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); + // map entries = 1; + total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_entries_size()); + for (const auto& entry : _internal_entries()) { + total_size += _pbi::MapEntryFuncs<::uint64_t, double, + _pbi::WireFormatLite::TYPE_UINT64, + _pbi::WireFormatLite::TYPE_DOUBLE>::ByteSizeLong(entry.first, entry.second); + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void State::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:ommx.v1.State) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.entries_.MergeFrom(from._impl_.entries_); + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void State::CopyFrom(const State& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:ommx.v1.State) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void State::InternalSwap(State* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + _impl_.entries_.InternalSwap(&other->_impl_.entries_); +} + +::google::protobuf::Metadata State::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + +class Solution::_Internal { + public: + using HasBits = + decltype(std::declval()._impl_._has_bits_); + static constexpr ::int32_t kHasBitsOffset = + 8 * PROTOBUF_FIELD_OFFSET(Solution, _impl_._has_bits_); +}; + +void Solution::clear_decision_variables() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.decision_variables_.Clear(); +} +void Solution::clear_evaluated_constraints() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.evaluated_constraints_.Clear(); +} +Solution::Solution(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:ommx.v1.Solution) +} +inline PROTOBUF_NDEBUG_INLINE Solution::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::ommx::v1::Solution& from_msg) + : _has_bits_{from._has_bits_}, + _cached_size_{0}, + decision_variables_{visibility, arena, from.decision_variables_}, + evaluated_constraints_{visibility, arena, from.evaluated_constraints_} {} + +Solution::Solution( + ::google::protobuf::Arena* arena, + const Solution& from) + : ::google::protobuf::Message(arena) { + Solution* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + ::uint32_t cached_has_bits = _impl_._has_bits_[0]; + _impl_.state_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::Message::CopyConstruct<::ommx::v1::State>( + arena, *from._impl_.state_) + : nullptr; + ::memcpy(reinterpret_cast(&_impl_) + + offsetof(Impl_, objective_), + reinterpret_cast(&from._impl_) + + offsetof(Impl_, objective_), + offsetof(Impl_, relaxation_) - + offsetof(Impl_, objective_) + + sizeof(Impl_::relaxation_)); + + // @@protoc_insertion_point(copy_constructor:ommx.v1.Solution) +} +inline PROTOBUF_NDEBUG_INLINE Solution::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : _cached_size_{0}, + decision_variables_{visibility, arena}, + evaluated_constraints_{visibility, arena} {} + +inline void Solution::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); + ::memset(reinterpret_cast(&_impl_) + + offsetof(Impl_, state_), + 0, + offsetof(Impl_, relaxation_) - + offsetof(Impl_, state_) + + sizeof(Impl_::relaxation_)); +} +Solution::~Solution() { + // @@protoc_insertion_point(destructor:ommx.v1.Solution) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void Solution::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + delete _impl_.state_; + _impl_.~Impl_(); +} + +const ::google::protobuf::MessageLite::ClassData* +Solution::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(Solution, _impl_._cached_size_), + false, + }, + &Solution::MergeImpl, + &Solution::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2fsolution_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<3, 7, 3, 0, 2> Solution::_table_ = { + { + PROTOBUF_FIELD_OFFSET(Solution, _impl_._has_bits_), + 0, // no _extensions_ + 7, 56, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967168, // skipmap + offsetof(decltype(_table_), field_entries), + 7, // num_field_entries + 3, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_Solution_default_instance_._instance, + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::ommx::v1::Solution>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + // .ommx.v1.State state = 1; + {::_pbi::TcParser::FastMtS1, + {10, 0, 0, PROTOBUF_FIELD_OFFSET(Solution, _impl_.state_)}}, + // double objective = 2; + {::_pbi::TcParser::FastF64S1, + {17, 63, 0, PROTOBUF_FIELD_OFFSET(Solution, _impl_.objective_)}}, + // repeated .ommx.v1.DecisionVariable decision_variables = 3; + {::_pbi::TcParser::FastMtR1, + {26, 63, 1, PROTOBUF_FIELD_OFFSET(Solution, _impl_.decision_variables_)}}, + // repeated .ommx.v1.EvaluatedConstraint evaluated_constraints = 4; + {::_pbi::TcParser::FastMtR1, + {34, 63, 2, PROTOBUF_FIELD_OFFSET(Solution, _impl_.evaluated_constraints_)}}, + // bool feasible = 5; + {::_pbi::TcParser::SingularVarintNoZag1(), + {40, 63, 0, PROTOBUF_FIELD_OFFSET(Solution, _impl_.feasible_)}}, + // .ommx.v1.Optimality optimality = 6; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Solution, _impl_.optimality_), 63>(), + {48, 63, 0, PROTOBUF_FIELD_OFFSET(Solution, _impl_.optimality_)}}, + // .ommx.v1.Relaxation relaxation = 7; + {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Solution, _impl_.relaxation_), 63>(), + {56, 63, 0, PROTOBUF_FIELD_OFFSET(Solution, _impl_.relaxation_)}}, + }}, {{ + 65535, 65535 + }}, {{ + // .ommx.v1.State state = 1; + {PROTOBUF_FIELD_OFFSET(Solution, _impl_.state_), _Internal::kHasBitsOffset + 0, 0, + (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, + // double objective = 2; + {PROTOBUF_FIELD_OFFSET(Solution, _impl_.objective_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, + // repeated .ommx.v1.DecisionVariable decision_variables = 3; + {PROTOBUF_FIELD_OFFSET(Solution, _impl_.decision_variables_), -1, 1, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // repeated .ommx.v1.EvaluatedConstraint evaluated_constraints = 4; + {PROTOBUF_FIELD_OFFSET(Solution, _impl_.evaluated_constraints_), -1, 2, + (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, + // bool feasible = 5; + {PROTOBUF_FIELD_OFFSET(Solution, _impl_.feasible_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kBool)}, + // .ommx.v1.Optimality optimality = 6; + {PROTOBUF_FIELD_OFFSET(Solution, _impl_.optimality_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, + // .ommx.v1.Relaxation relaxation = 7; + {PROTOBUF_FIELD_OFFSET(Solution, _impl_.relaxation_), -1, 0, + (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, + }}, {{ + {::_pbi::TcParser::GetTable<::ommx::v1::State>()}, + {::_pbi::TcParser::GetTable<::ommx::v1::DecisionVariable>()}, + {::_pbi::TcParser::GetTable<::ommx::v1::EvaluatedConstraint>()}, + }}, {{ + }}, +}; + +PROTOBUF_NOINLINE void Solution::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Solution) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.decision_variables_.Clear(); + _impl_.evaluated_constraints_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.state_ != nullptr); + _impl_.state_->Clear(); + } + ::memset(&_impl_.objective_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.relaxation_) - + reinterpret_cast(&_impl_.objective_)) + sizeof(_impl_.relaxation_)); + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +::uint8_t* Solution::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:ommx.v1.Solution) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + // .ommx.v1.State state = 1; + if (cached_has_bits & 0x00000001u) { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 1, *_impl_.state_, _impl_.state_->GetCachedSize(), target, stream); + } + + // double objective = 2; + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_objective = this->_internal_objective(); + ::uint64_t raw_objective; + memcpy(&raw_objective, &tmp_objective, sizeof(tmp_objective)); + if (raw_objective != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteDoubleToArray( + 2, this->_internal_objective(), target); + } + + // repeated .ommx.v1.DecisionVariable decision_variables = 3; + for (unsigned i = 0, n = static_cast( + this->_internal_decision_variables_size()); + i < n; i++) { + const auto& repfield = this->_internal_decision_variables().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, repfield, repfield.GetCachedSize(), + target, stream); + } + + // repeated .ommx.v1.EvaluatedConstraint evaluated_constraints = 4; + for (unsigned i = 0, n = static_cast( + this->_internal_evaluated_constraints_size()); + i < n; i++) { + const auto& repfield = this->_internal_evaluated_constraints().Get(i); + target = + ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, repfield, repfield.GetCachedSize(), + target, stream); + } + + // bool feasible = 5; + if (this->_internal_feasible() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray( + 5, this->_internal_feasible(), target); + } + + // .ommx.v1.Optimality optimality = 6; + if (this->_internal_optimality() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 6, this->_internal_optimality(), target); + } + + // .ommx.v1.Relaxation relaxation = 7; + if (this->_internal_relaxation() != 0) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 7, this->_internal_relaxation(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:ommx.v1.Solution) + return target; +} + +::size_t Solution::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:ommx.v1.Solution) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); + // repeated .ommx.v1.DecisionVariable decision_variables = 3; + total_size += 1UL * this->_internal_decision_variables_size(); + for (const auto& msg : this->_internal_decision_variables()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + // repeated .ommx.v1.EvaluatedConstraint evaluated_constraints = 4; + total_size += 1UL * this->_internal_evaluated_constraints_size(); + for (const auto& msg : this->_internal_evaluated_constraints()) { + total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); + } + // .ommx.v1.State state = 1; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.state_); + } + + // double objective = 2; + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_objective = this->_internal_objective(); + ::uint64_t raw_objective; + memcpy(&raw_objective, &tmp_objective, sizeof(tmp_objective)); + if (raw_objective != 0) { + total_size += 9; + } + + // bool feasible = 5; + if (this->_internal_feasible() != 0) { + total_size += 2; + } + + // .ommx.v1.Optimality optimality = 6; + if (this->_internal_optimality() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_optimality()); + } + + // .ommx.v1.Relaxation relaxation = 7; + if (this->_internal_relaxation() != 0) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_relaxation()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void Solution::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:ommx.v1.Solution) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_internal_mutable_decision_variables()->MergeFrom( + from._internal_decision_variables()); + _this->_internal_mutable_evaluated_constraints()->MergeFrom( + from._internal_evaluated_constraints()); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(from._impl_.state_ != nullptr); + if (_this->_impl_.state_ == nullptr) { + _this->_impl_.state_ = + ::google::protobuf::Message::CopyConstruct<::ommx::v1::State>(arena, *from._impl_.state_); + } else { + _this->_impl_.state_->MergeFrom(*from._impl_.state_); + } + } + static_assert(sizeof(::uint64_t) == sizeof(double), + "Code assumes ::uint64_t and double are the same size."); + double tmp_objective = from._internal_objective(); + ::uint64_t raw_objective; + memcpy(&raw_objective, &tmp_objective, sizeof(tmp_objective)); + if (raw_objective != 0) { + _this->_impl_.objective_ = from._impl_.objective_; + } + if (from._internal_feasible() != 0) { + _this->_impl_.feasible_ = from._impl_.feasible_; + } + if (from._internal_optimality() != 0) { + _this->_impl_.optimality_ = from._impl_.optimality_; + } + if (from._internal_relaxation() != 0) { + _this->_impl_.relaxation_ = from._impl_.relaxation_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void Solution::CopyFrom(const Solution& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:ommx.v1.Solution) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void Solution::InternalSwap(Solution* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.decision_variables_.InternalSwap(&other->_impl_.decision_variables_); + _impl_.evaluated_constraints_.InternalSwap(&other->_impl_.evaluated_constraints_); + ::google::protobuf::internal::memswap< + PROTOBUF_FIELD_OFFSET(Solution, _impl_.relaxation_) + + sizeof(Solution::_impl_.relaxation_) + - PROTOBUF_FIELD_OFFSET(Solution, _impl_.state_)>( + reinterpret_cast(&_impl_.state_), + reinterpret_cast(&other->_impl_.state_)); +} + +::google::protobuf::Metadata Solution::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + +class Infeasible::_Internal { + public: +}; + +Infeasible::Infeasible(::google::protobuf::Arena* arena) + : ::google::protobuf::internal::ZeroFieldsBase(arena) { + // @@protoc_insertion_point(arena_constructor:ommx.v1.Infeasible) +} +Infeasible::Infeasible( + ::google::protobuf::Arena* arena, + const Infeasible& from) + : ::google::protobuf::internal::ZeroFieldsBase(arena) { + Infeasible* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + + // @@protoc_insertion_point(copy_constructor:ommx.v1.Infeasible) +} + +const ::google::protobuf::MessageLite::ClassData* +Infeasible::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(Infeasible, _impl_._cached_size_), + false, + }, + &Infeasible::MergeImpl, + &Infeasible::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2fsolution_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 0, 0, 0, 2> Infeasible::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 0, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967295, // skipmap + offsetof(decltype(_table_), field_names), // no field_entries + 0, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_Infeasible_default_instance_._instance, + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::ommx::v1::Infeasible>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, + // no field_entries, or aux_entries + {{ + }}, +}; + + + + + + + + + +::google::protobuf::Metadata Infeasible::GetMetadata() const { + return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + +class Unbounded::_Internal { + public: +}; + +Unbounded::Unbounded(::google::protobuf::Arena* arena) + : ::google::protobuf::internal::ZeroFieldsBase(arena) { + // @@protoc_insertion_point(arena_constructor:ommx.v1.Unbounded) +} +Unbounded::Unbounded( + ::google::protobuf::Arena* arena, + const Unbounded& from) + : ::google::protobuf::internal::ZeroFieldsBase(arena) { + Unbounded* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + + // @@protoc_insertion_point(copy_constructor:ommx.v1.Unbounded) +} + +const ::google::protobuf::MessageLite::ClassData* +Unbounded::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(Unbounded, _impl_._cached_size_), + false, + }, + &Unbounded::MergeImpl, + &Unbounded::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2fsolution_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 0, 0, 0, 2> Unbounded::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 0, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967295, // skipmap + offsetof(decltype(_table_), field_names), // no field_entries + 0, // num_field_entries + 0, // num_aux_entries + offsetof(decltype(_table_), field_names), // no aux_entries + &_Unbounded_default_instance_._instance, + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::ommx::v1::Unbounded>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, + // no field_entries, or aux_entries + {{ + }}, +}; + + + + + + + + + +::google::protobuf::Metadata Unbounded::GetMetadata() const { + return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); +} +// =================================================================== + +class Result::_Internal { + public: + static constexpr ::int32_t kOneofCaseOffset = + PROTOBUF_FIELD_OFFSET(::ommx::v1::Result, _impl_._oneof_case_); +}; + +void Result::set_allocated_solution(::ommx::v1::Solution* solution) { + ::google::protobuf::Arena* message_arena = GetArena(); + clear_result(); + if (solution) { + ::google::protobuf::Arena* submessage_arena = solution->GetArena(); + if (message_arena != submessage_arena) { + solution = ::google::protobuf::internal::GetOwnedMessage(message_arena, solution, submessage_arena); + } + set_has_solution(); + _impl_.result_.solution_ = solution; + } + // @@protoc_insertion_point(field_set_allocated:ommx.v1.Result.solution) +} +void Result::set_allocated_infeasible(::ommx::v1::Infeasible* infeasible) { + ::google::protobuf::Arena* message_arena = GetArena(); + clear_result(); + if (infeasible) { + ::google::protobuf::Arena* submessage_arena = infeasible->GetArena(); + if (message_arena != submessage_arena) { + infeasible = ::google::protobuf::internal::GetOwnedMessage(message_arena, infeasible, submessage_arena); + } + set_has_infeasible(); + _impl_.result_.infeasible_ = infeasible; + } + // @@protoc_insertion_point(field_set_allocated:ommx.v1.Result.infeasible) +} +void Result::set_allocated_unbounded(::ommx::v1::Unbounded* unbounded) { + ::google::protobuf::Arena* message_arena = GetArena(); + clear_result(); + if (unbounded) { + ::google::protobuf::Arena* submessage_arena = unbounded->GetArena(); + if (message_arena != submessage_arena) { + unbounded = ::google::protobuf::internal::GetOwnedMessage(message_arena, unbounded, submessage_arena); + } + set_has_unbounded(); + _impl_.result_.unbounded_ = unbounded; + } + // @@protoc_insertion_point(field_set_allocated:ommx.v1.Result.unbounded) +} +Result::Result(::google::protobuf::Arena* arena) + : ::google::protobuf::Message(arena) { + SharedCtor(arena); + // @@protoc_insertion_point(arena_constructor:ommx.v1.Result) +} +inline PROTOBUF_NDEBUG_INLINE Result::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, + const Impl_& from, const ::ommx::v1::Result& from_msg) + : result_{}, + _cached_size_{0}, + _oneof_case_{from._oneof_case_[0]} {} + +Result::Result( + ::google::protobuf::Arena* arena, + const Result& from) + : ::google::protobuf::Message(arena) { + Result* const _this = this; + (void)_this; + _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( + from._internal_metadata_); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + switch (result_case()) { + case RESULT_NOT_SET: + break; + case kError: + new (&_impl_.result_.error_) decltype(_impl_.result_.error_){arena, from._impl_.result_.error_}; + break; + case kSolution: + _impl_.result_.solution_ = ::google::protobuf::Message::CopyConstruct<::ommx::v1::Solution>(arena, *from._impl_.result_.solution_); + break; + case kInfeasible: + _impl_.result_.infeasible_ = ::google::protobuf::Message::CopyConstruct<::ommx::v1::Infeasible>(arena, *from._impl_.result_.infeasible_); + break; + case kUnbounded: + _impl_.result_.unbounded_ = ::google::protobuf::Message::CopyConstruct<::ommx::v1::Unbounded>(arena, *from._impl_.result_.unbounded_); + break; + } + + // @@protoc_insertion_point(copy_constructor:ommx.v1.Result) +} +inline PROTOBUF_NDEBUG_INLINE Result::Impl_::Impl_( + ::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena) + : result_{}, + _cached_size_{0}, + _oneof_case_{} {} + +inline void Result::SharedCtor(::_pb::Arena* arena) { + new (&_impl_) Impl_(internal_visibility(), arena); +} +Result::~Result() { + // @@protoc_insertion_point(destructor:ommx.v1.Result) + _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>(); + SharedDtor(); +} +inline void Result::SharedDtor() { + ABSL_DCHECK(GetArena() == nullptr); + if (has_result()) { + clear_result(); + } + _impl_.~Impl_(); +} + +void Result::clear_result() { +// @@protoc_insertion_point(one_of_clear_start:ommx.v1.Result) + ::google::protobuf::internal::TSanWrite(&_impl_); + switch (result_case()) { + case kError: { + _impl_.result_.error_.Destroy(); + break; + } + case kSolution: { + if (GetArena() == nullptr) { + delete _impl_.result_.solution_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.result_.solution_); + } + break; + } + case kInfeasible: { + if (GetArena() == nullptr) { + delete _impl_.result_.infeasible_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.result_.infeasible_); + } + break; + } + case kUnbounded: { + if (GetArena() == nullptr) { + delete _impl_.result_.unbounded_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.result_.unbounded_); + } + break; + } + case RESULT_NOT_SET: { + break; + } + } + _impl_._oneof_case_[0] = RESULT_NOT_SET; +} + + +const ::google::protobuf::MessageLite::ClassData* +Result::GetClassData() const { + PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: + ClassDataFull _data_ = { + { + &_table_.header, + nullptr, // OnDemandRegisterArenaDtor + nullptr, // IsInitialized + PROTOBUF_FIELD_OFFSET(Result, _impl_._cached_size_), + false, + }, + &Result::MergeImpl, + &Result::kDescriptorMethods, + &descriptor_table_ommx_2fv1_2fsolution_2eproto, + nullptr, // tracker + }; + ::google::protobuf::internal::PrefetchToLocalCache(&_data_); + ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); + return _data_.base(); +} +PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 +const ::_pbi::TcParseTable<0, 4, 3, 28, 2> Result::_table_ = { + { + 0, // no _has_bits_ + 0, // no _extensions_ + 4, 0, // max_field_number, fast_idx_mask + offsetof(decltype(_table_), field_lookup_table), + 4294967280, // skipmap + offsetof(decltype(_table_), field_entries), + 4, // num_field_entries + 3, // num_aux_entries + offsetof(decltype(_table_), aux_entries), + &_Result_default_instance_._instance, + nullptr, // post_loop_handler + ::_pbi::TcParser::GenericFallback, // fallback + #ifdef PROTOBUF_PREFETCH_PARSE_TABLE + ::_pbi::TcParser::GetTable<::ommx::v1::Result>(), // to_prefetch + #endif // PROTOBUF_PREFETCH_PARSE_TABLE + }, {{ + {::_pbi::TcParser::MiniParse, {}}, + }}, {{ + 65535, 65535 + }}, {{ + // string error = 1; + {PROTOBUF_FIELD_OFFSET(Result, _impl_.result_.error_), _Internal::kOneofCaseOffset + 0, 0, + (0 | ::_fl::kFcOneof | ::_fl::kUtf8String | ::_fl::kRepAString)}, + // .ommx.v1.Solution solution = 2; + {PROTOBUF_FIELD_OFFSET(Result, _impl_.result_.solution_), _Internal::kOneofCaseOffset + 0, 0, + (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + // .ommx.v1.Infeasible infeasible = 3; + {PROTOBUF_FIELD_OFFSET(Result, _impl_.result_.infeasible_), _Internal::kOneofCaseOffset + 0, 1, + (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + // .ommx.v1.Unbounded unbounded = 4; + {PROTOBUF_FIELD_OFFSET(Result, _impl_.result_.unbounded_), _Internal::kOneofCaseOffset + 0, 2, + (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + }}, {{ + {::_pbi::TcParser::GetTable<::ommx::v1::Solution>()}, + {::_pbi::TcParser::GetTable<::ommx::v1::Infeasible>()}, + {::_pbi::TcParser::GetTable<::ommx::v1::Unbounded>()}, + }}, {{ + "\16\5\0\0\0\0\0\0" + "ommx.v1.Result" + "error" + }}, +}; + +PROTOBUF_NOINLINE void Result::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Result) + ::google::protobuf::internal::TSanWrite(&_impl_); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + clear_result(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +::uint8_t* Result::_InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:ommx.v1.Result) + ::uint32_t cached_has_bits = 0; + (void)cached_has_bits; + + switch (result_case()) { + case kError: { + const std::string& _s = this->_internal_error(); + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + _s.data(), static_cast(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "ommx.v1.Result.error"); + target = stream->WriteStringMaybeAliased(1, _s, target); + break; + } + case kSolution: { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 2, *_impl_.result_.solution_, _impl_.result_.solution_->GetCachedSize(), target, stream); + break; + } + case kInfeasible: { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 3, *_impl_.result_.infeasible_, _impl_.result_.infeasible_->GetCachedSize(), target, stream); + break; + } + case kUnbounded: { + target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( + 4, *_impl_.result_.unbounded_, _impl_.result_.unbounded_->GetCachedSize(), target, stream); + break; + } + default: + break; + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = + ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:ommx.v1.Result) + return target; +} + +::size_t Result::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:ommx.v1.Result) + ::size_t total_size = 0; + + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + switch (result_case()) { + // string error = 1; + case kError: { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->_internal_error()); + break; + } + // .ommx.v1.Solution solution = 2; + case kSolution: { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.result_.solution_); + break; + } + // .ommx.v1.Infeasible infeasible = 3; + case kInfeasible: { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.result_.infeasible_); + break; + } + // .ommx.v1.Unbounded unbounded = 4; + case kUnbounded: { + total_size += + 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.result_.unbounded_); + break; + } + case RESULT_NOT_SET: { + break; + } + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + + +void Result::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + ::google::protobuf::Arena* arena = _this->GetArena(); + // @@protoc_insertion_point(class_specific_merge_from_start:ommx.v1.Result) + ABSL_DCHECK_NE(&from, _this); + ::uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (const uint32_t oneof_from_case = from._impl_._oneof_case_[0]) { + const uint32_t oneof_to_case = _this->_impl_._oneof_case_[0]; + const bool oneof_needs_init = oneof_to_case != oneof_from_case; + if (oneof_needs_init) { + if (oneof_to_case != 0) { + _this->clear_result(); + } + _this->_impl_._oneof_case_[0] = oneof_from_case; + } + + switch (oneof_from_case) { + case kError: { + if (oneof_needs_init) { + _this->_impl_.result_.error_.InitDefault(); + } + _this->_impl_.result_.error_.Set(from._internal_error(), arena); + break; + } + case kSolution: { + if (oneof_needs_init) { + _this->_impl_.result_.solution_ = + ::google::protobuf::Message::CopyConstruct<::ommx::v1::Solution>(arena, *from._impl_.result_.solution_); + } else { + _this->_impl_.result_.solution_->MergeFrom(from._internal_solution()); + } + break; + } + case kInfeasible: { + if (oneof_needs_init) { + _this->_impl_.result_.infeasible_ = + ::google::protobuf::Message::CopyConstruct<::ommx::v1::Infeasible>(arena, *from._impl_.result_.infeasible_); + } else { + _this->_impl_.result_.infeasible_->MergeFrom(from._internal_infeasible()); + } + break; + } + case kUnbounded: { + if (oneof_needs_init) { + _this->_impl_.result_.unbounded_ = + ::google::protobuf::Message::CopyConstruct<::ommx::v1::Unbounded>(arena, *from._impl_.result_.unbounded_); + } else { + _this->_impl_.result_.unbounded_->MergeFrom(from._internal_unbounded()); + } + break; + } + case RESULT_NOT_SET: + break; + } + } + _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_); +} + +void Result::CopyFrom(const Result& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:ommx.v1.Result) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + + +void Result::InternalSwap(Result* PROTOBUF_RESTRICT other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_.result_, other->_impl_.result_); + swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]); +} + +::google::protobuf::Metadata Result::GetMetadata() const { + return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); +} +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace ommx +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google +// @@protoc_insertion_point(global_scope) +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type + _static_init2_ PROTOBUF_UNUSED = + (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2fsolution_2eproto), + ::std::false_type{}); +#include "google/protobuf/port_undef.inc" diff --git a/cpp/ommx/v1/solution.pb.h b/cpp/ommx/v1/solution.pb.h new file mode 100644 index 00000000..c615d767 --- /dev/null +++ b/cpp/ommx/v1/solution.pb.h @@ -0,0 +1,1870 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: ommx/v1/solution.proto +// Protobuf C++ Version: 5.27.3 + +#ifndef GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fsolution_2eproto_2epb_2eh +#define GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fsolution_2eproto_2epb_2eh + +#include +#include +#include +#include + +#include "google/protobuf/runtime_version.h" +#if PROTOBUF_VERSION != 5027003 +#error "Protobuf C++ gencode is built with an incompatible version of" +#error "Protobuf C++ headers/runtime. See" +#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" +#endif +#include "google/protobuf/io/coded_stream.h" +#include "google/protobuf/arena.h" +#include "google/protobuf/arenastring.h" +#include "google/protobuf/generated_message_bases.h" +#include "google/protobuf/generated_message_tctable_decl.h" +#include "google/protobuf/generated_message_util.h" +#include "google/protobuf/metadata_lite.h" +#include "google/protobuf/generated_message_reflection.h" +#include "google/protobuf/message.h" +#include "google/protobuf/repeated_field.h" // IWYU pragma: export +#include "google/protobuf/extension_set.h" // IWYU pragma: export +#include "google/protobuf/map.h" // IWYU pragma: export +#include "google/protobuf/map_entry.h" +#include "google/protobuf/map_field_inl.h" +#include "google/protobuf/generated_enum_reflection.h" +#include "google/protobuf/unknown_field_set.h" +#include "ommx/v1/constraint.pb.h" +#include "ommx/v1/decision_variables.pb.h" +// @@protoc_insertion_point(includes) + +// Must be included last. +#include "google/protobuf/port_def.inc" + +#define PROTOBUF_INTERNAL_EXPORT_ommx_2fv1_2fsolution_2eproto + +namespace google { +namespace protobuf { +namespace internal { +class AnyMetadata; +} // namespace internal +} // namespace protobuf +} // namespace google + +// Internal implementation detail -- do not use these members. +struct TableStruct_ommx_2fv1_2fsolution_2eproto { + static const ::uint32_t offsets[]; +}; +extern const ::google::protobuf::internal::DescriptorTable + descriptor_table_ommx_2fv1_2fsolution_2eproto; +namespace ommx { +namespace v1 { +class Infeasible; +struct InfeasibleDefaultTypeInternal; +extern InfeasibleDefaultTypeInternal _Infeasible_default_instance_; +class Result; +struct ResultDefaultTypeInternal; +extern ResultDefaultTypeInternal _Result_default_instance_; +class Solution; +struct SolutionDefaultTypeInternal; +extern SolutionDefaultTypeInternal _Solution_default_instance_; +class State; +struct StateDefaultTypeInternal; +extern StateDefaultTypeInternal _State_default_instance_; +class State_EntriesEntry_DoNotUse; +struct State_EntriesEntry_DoNotUseDefaultTypeInternal; +extern State_EntriesEntry_DoNotUseDefaultTypeInternal _State_EntriesEntry_DoNotUse_default_instance_; +class Unbounded; +struct UnboundedDefaultTypeInternal; +extern UnboundedDefaultTypeInternal _Unbounded_default_instance_; +} // namespace v1 +} // namespace ommx +namespace google { +namespace protobuf { +} // namespace protobuf +} // namespace google + +namespace ommx { +namespace v1 { +enum Optimality : int { + OPTIMALITY_UNSPECIFIED = 0, + OPTIMALITY_OPTIMAL = 1, + OPTIMALITY_NOT_OPTIMAL = 2, + Optimality_INT_MIN_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::min(), + Optimality_INT_MAX_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::max(), +}; + +bool Optimality_IsValid(int value); +extern const uint32_t Optimality_internal_data_[]; +constexpr Optimality Optimality_MIN = static_cast(0); +constexpr Optimality Optimality_MAX = static_cast(2); +constexpr int Optimality_ARRAYSIZE = 2 + 1; +const ::google::protobuf::EnumDescriptor* +Optimality_descriptor(); +template +const std::string& Optimality_Name(T value) { + static_assert(std::is_same::value || + std::is_integral::value, + "Incorrect type passed to Optimality_Name()."); + return Optimality_Name(static_cast(value)); +} +template <> +inline const std::string& Optimality_Name(Optimality value) { + return ::google::protobuf::internal::NameOfDenseEnum( + static_cast(value)); +} +inline bool Optimality_Parse(absl::string_view name, Optimality* value) { + return ::google::protobuf::internal::ParseNamedEnum( + Optimality_descriptor(), name, value); +} +enum Relaxation : int { + RELAXATION_UNSPECIFIED = 0, + RELAXATION_LP_RELAXED = 1, + Relaxation_INT_MIN_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::min(), + Relaxation_INT_MAX_SENTINEL_DO_NOT_USE_ = + std::numeric_limits<::int32_t>::max(), +}; + +bool Relaxation_IsValid(int value); +extern const uint32_t Relaxation_internal_data_[]; +constexpr Relaxation Relaxation_MIN = static_cast(0); +constexpr Relaxation Relaxation_MAX = static_cast(1); +constexpr int Relaxation_ARRAYSIZE = 1 + 1; +const ::google::protobuf::EnumDescriptor* +Relaxation_descriptor(); +template +const std::string& Relaxation_Name(T value) { + static_assert(std::is_same::value || + std::is_integral::value, + "Incorrect type passed to Relaxation_Name()."); + return Relaxation_Name(static_cast(value)); +} +template <> +inline const std::string& Relaxation_Name(Relaxation value) { + return ::google::protobuf::internal::NameOfDenseEnum( + static_cast(value)); +} +inline bool Relaxation_Parse(absl::string_view name, Relaxation* value) { + return ::google::protobuf::internal::ParseNamedEnum( + Relaxation_descriptor(), name, value); +} + +// =================================================================== + + +// ------------------------------------------------------------------- + +class Unbounded final : public ::google::protobuf::internal::ZeroFieldsBase +/* @@protoc_insertion_point(class_definition:ommx.v1.Unbounded) */ { + public: + inline Unbounded() : Unbounded(nullptr) {} + template + explicit PROTOBUF_CONSTEXPR Unbounded( + ::google::protobuf::internal::ConstantInitialized); + + inline Unbounded(const Unbounded& from) : Unbounded(nullptr, from) {} + inline Unbounded(Unbounded&& from) noexcept + : Unbounded(nullptr, std::move(from)) {} + inline Unbounded& operator=(const Unbounded& from) { + CopyFrom(from); + return *this; + } + inline Unbounded& operator=(Unbounded&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Unbounded& default_instance() { + return *internal_default_instance(); + } + static inline const Unbounded* internal_default_instance() { + return reinterpret_cast( + &_Unbounded_default_instance_); + } + static constexpr int kIndexInFileMessages = 4; + friend void swap(Unbounded& a, Unbounded& b) { a.Swap(&b); } + inline void Swap(Unbounded* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Unbounded* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Unbounded* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); + } + using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const Unbounded& from) { + ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const Unbounded& from) { + ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + + public: + bool IsInitialized() const { + return true; + } + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "ommx.v1.Unbounded"; } + + protected: + explicit Unbounded(::google::protobuf::Arena* arena); + Unbounded(::google::protobuf::Arena* arena, const Unbounded& from); + Unbounded(::google::protobuf::Arena* arena, Unbounded&& from) noexcept + : Unbounded(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ZeroFieldsBase::ClassData* GetClassData() const final; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + // @@protoc_insertion_point(class_scope:ommx.v1.Unbounded) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 0, 0, + 0, 2> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_Unbounded_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const Unbounded& from_msg); + PROTOBUF_TSAN_DECLARE_MEMBER + }; + friend struct ::TableStruct_ommx_2fv1_2fsolution_2eproto; +}; +// ------------------------------------------------------------------- + +class State_EntriesEntry_DoNotUse final + : public ::google::protobuf::internal::MapEntry< + State_EntriesEntry_DoNotUse, ::uint64_t, double, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT64, + ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE> { + public: + using SuperType = ::google::protobuf::internal::MapEntry< + State_EntriesEntry_DoNotUse, ::uint64_t, double, + ::google::protobuf::internal::WireFormatLite::TYPE_UINT64, + ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>; + State_EntriesEntry_DoNotUse(); + template + explicit PROTOBUF_CONSTEXPR State_EntriesEntry_DoNotUse( + ::google::protobuf::internal::ConstantInitialized); + explicit State_EntriesEntry_DoNotUse(::google::protobuf::Arena* arena); + static const State_EntriesEntry_DoNotUse* internal_default_instance() { + return reinterpret_cast( + &_State_EntriesEntry_DoNotUse_default_instance_); + } +const ::google::protobuf::Message::ClassData* GetClassData() const final; + friend struct ::TableStruct_ommx_2fv1_2fsolution_2eproto; +}; +// ------------------------------------------------------------------- + +class Infeasible final : public ::google::protobuf::internal::ZeroFieldsBase +/* @@protoc_insertion_point(class_definition:ommx.v1.Infeasible) */ { + public: + inline Infeasible() : Infeasible(nullptr) {} + template + explicit PROTOBUF_CONSTEXPR Infeasible( + ::google::protobuf::internal::ConstantInitialized); + + inline Infeasible(const Infeasible& from) : Infeasible(nullptr, from) {} + inline Infeasible(Infeasible&& from) noexcept + : Infeasible(nullptr, std::move(from)) {} + inline Infeasible& operator=(const Infeasible& from) { + CopyFrom(from); + return *this; + } + inline Infeasible& operator=(Infeasible&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Infeasible& default_instance() { + return *internal_default_instance(); + } + static inline const Infeasible* internal_default_instance() { + return reinterpret_cast( + &_Infeasible_default_instance_); + } + static constexpr int kIndexInFileMessages = 3; + friend void swap(Infeasible& a, Infeasible& b) { a.Swap(&b); } + inline void Swap(Infeasible* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Infeasible* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Infeasible* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::internal::ZeroFieldsBase::DefaultConstruct(arena); + } + using ::google::protobuf::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const Infeasible& from) { + ::google::protobuf::internal::ZeroFieldsBase::CopyImpl(*this, from); + } + using ::google::protobuf::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const Infeasible& from) { + ::google::protobuf::internal::ZeroFieldsBase::MergeImpl(*this, from); + } + + public: + bool IsInitialized() const { + return true; + } + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "ommx.v1.Infeasible"; } + + protected: + explicit Infeasible(::google::protobuf::Arena* arena); + Infeasible(::google::protobuf::Arena* arena, const Infeasible& from); + Infeasible(::google::protobuf::Arena* arena, Infeasible&& from) noexcept + : Infeasible(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::internal::ZeroFieldsBase::ClassData* GetClassData() const final; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + // @@protoc_insertion_point(class_scope:ommx.v1.Infeasible) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 0, 0, + 0, 2> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_Infeasible_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const Infeasible& from_msg); + PROTOBUF_TSAN_DECLARE_MEMBER + }; + friend struct ::TableStruct_ommx_2fv1_2fsolution_2eproto; +}; +// ------------------------------------------------------------------- + +class State final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:ommx.v1.State) */ { + public: + inline State() : State(nullptr) {} + ~State() override; + template + explicit PROTOBUF_CONSTEXPR State( + ::google::protobuf::internal::ConstantInitialized); + + inline State(const State& from) : State(nullptr, from) {} + inline State(State&& from) noexcept + : State(nullptr, std::move(from)) {} + inline State& operator=(const State& from) { + CopyFrom(from); + return *this; + } + inline State& operator=(State&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const State& default_instance() { + return *internal_default_instance(); + } + static inline const State* internal_default_instance() { + return reinterpret_cast( + &_State_default_instance_); + } + static constexpr int kIndexInFileMessages = 1; + friend void swap(State& a, State& b) { a.Swap(&b); } + inline void Swap(State* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(State* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + State* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const State& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const State& from) { State::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(State* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "ommx.v1.State"; } + + protected: + explicit State(::google::protobuf::Arena* arena); + State(::google::protobuf::Arena* arena, const State& from); + State(::google::protobuf::Arena* arena, State&& from) noexcept + : State(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::Message::ClassData* GetClassData() const final; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kEntriesFieldNumber = 1, + }; + // map entries = 1; + int entries_size() const; + private: + int _internal_entries_size() const; + + public: + void clear_entries() ; + const ::google::protobuf::Map<::uint64_t, double>& entries() const; + ::google::protobuf::Map<::uint64_t, double>* mutable_entries(); + + private: + const ::google::protobuf::Map<::uint64_t, double>& _internal_entries() const; + ::google::protobuf::Map<::uint64_t, double>* _internal_mutable_entries(); + + public: + // @@protoc_insertion_point(class_scope:ommx.v1.State) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 1, 1, + 0, 2> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_State_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const State& from_msg); + ::google::protobuf::internal::MapField + entries_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_ommx_2fv1_2fsolution_2eproto; +}; +// ------------------------------------------------------------------- + +class Solution final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:ommx.v1.Solution) */ { + public: + inline Solution() : Solution(nullptr) {} + ~Solution() override; + template + explicit PROTOBUF_CONSTEXPR Solution( + ::google::protobuf::internal::ConstantInitialized); + + inline Solution(const Solution& from) : Solution(nullptr, from) {} + inline Solution(Solution&& from) noexcept + : Solution(nullptr, std::move(from)) {} + inline Solution& operator=(const Solution& from) { + CopyFrom(from); + return *this; + } + inline Solution& operator=(Solution&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Solution& default_instance() { + return *internal_default_instance(); + } + static inline const Solution* internal_default_instance() { + return reinterpret_cast( + &_Solution_default_instance_); + } + static constexpr int kIndexInFileMessages = 2; + friend void swap(Solution& a, Solution& b) { a.Swap(&b); } + inline void Swap(Solution* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Solution* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Solution* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Solution& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const Solution& from) { Solution::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(Solution* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "ommx.v1.Solution"; } + + protected: + explicit Solution(::google::protobuf::Arena* arena); + Solution(::google::protobuf::Arena* arena, const Solution& from); + Solution(::google::protobuf::Arena* arena, Solution&& from) noexcept + : Solution(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::Message::ClassData* GetClassData() const final; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kDecisionVariablesFieldNumber = 3, + kEvaluatedConstraintsFieldNumber = 4, + kStateFieldNumber = 1, + kObjectiveFieldNumber = 2, + kFeasibleFieldNumber = 5, + kOptimalityFieldNumber = 6, + kRelaxationFieldNumber = 7, + }; + // repeated .ommx.v1.DecisionVariable decision_variables = 3; + int decision_variables_size() const; + private: + int _internal_decision_variables_size() const; + + public: + void clear_decision_variables() ; + ::ommx::v1::DecisionVariable* mutable_decision_variables(int index); + ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>* mutable_decision_variables(); + + private: + const ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>& _internal_decision_variables() const; + ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>* _internal_mutable_decision_variables(); + public: + const ::ommx::v1::DecisionVariable& decision_variables(int index) const; + ::ommx::v1::DecisionVariable* add_decision_variables(); + const ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>& decision_variables() const; + // repeated .ommx.v1.EvaluatedConstraint evaluated_constraints = 4; + int evaluated_constraints_size() const; + private: + int _internal_evaluated_constraints_size() const; + + public: + void clear_evaluated_constraints() ; + ::ommx::v1::EvaluatedConstraint* mutable_evaluated_constraints(int index); + ::google::protobuf::RepeatedPtrField<::ommx::v1::EvaluatedConstraint>* mutable_evaluated_constraints(); + + private: + const ::google::protobuf::RepeatedPtrField<::ommx::v1::EvaluatedConstraint>& _internal_evaluated_constraints() const; + ::google::protobuf::RepeatedPtrField<::ommx::v1::EvaluatedConstraint>* _internal_mutable_evaluated_constraints(); + public: + const ::ommx::v1::EvaluatedConstraint& evaluated_constraints(int index) const; + ::ommx::v1::EvaluatedConstraint* add_evaluated_constraints(); + const ::google::protobuf::RepeatedPtrField<::ommx::v1::EvaluatedConstraint>& evaluated_constraints() const; + // .ommx.v1.State state = 1; + bool has_state() const; + void clear_state() ; + const ::ommx::v1::State& state() const; + PROTOBUF_NODISCARD ::ommx::v1::State* release_state(); + ::ommx::v1::State* mutable_state(); + void set_allocated_state(::ommx::v1::State* value); + void unsafe_arena_set_allocated_state(::ommx::v1::State* value); + ::ommx::v1::State* unsafe_arena_release_state(); + + private: + const ::ommx::v1::State& _internal_state() const; + ::ommx::v1::State* _internal_mutable_state(); + + public: + // double objective = 2; + void clear_objective() ; + double objective() const; + void set_objective(double value); + + private: + double _internal_objective() const; + void _internal_set_objective(double value); + + public: + // bool feasible = 5; + void clear_feasible() ; + bool feasible() const; + void set_feasible(bool value); + + private: + bool _internal_feasible() const; + void _internal_set_feasible(bool value); + + public: + // .ommx.v1.Optimality optimality = 6; + void clear_optimality() ; + ::ommx::v1::Optimality optimality() const; + void set_optimality(::ommx::v1::Optimality value); + + private: + ::ommx::v1::Optimality _internal_optimality() const; + void _internal_set_optimality(::ommx::v1::Optimality value); + + public: + // .ommx.v1.Relaxation relaxation = 7; + void clear_relaxation() ; + ::ommx::v1::Relaxation relaxation() const; + void set_relaxation(::ommx::v1::Relaxation value); + + private: + ::ommx::v1::Relaxation _internal_relaxation() const; + void _internal_set_relaxation(::ommx::v1::Relaxation value); + + public: + // @@protoc_insertion_point(class_scope:ommx.v1.Solution) + private: + class _Internal; + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 3, 7, 3, + 0, 2> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_Solution_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const Solution& from_msg); + ::google::protobuf::internal::HasBits<1> _has_bits_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::google::protobuf::RepeatedPtrField< ::ommx::v1::DecisionVariable > decision_variables_; + ::google::protobuf::RepeatedPtrField< ::ommx::v1::EvaluatedConstraint > evaluated_constraints_; + ::ommx::v1::State* state_; + double objective_; + bool feasible_; + int optimality_; + int relaxation_; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_ommx_2fv1_2fsolution_2eproto; +}; +// ------------------------------------------------------------------- + +class Result final : public ::google::protobuf::Message +/* @@protoc_insertion_point(class_definition:ommx.v1.Result) */ { + public: + inline Result() : Result(nullptr) {} + ~Result() override; + template + explicit PROTOBUF_CONSTEXPR Result( + ::google::protobuf::internal::ConstantInitialized); + + inline Result(const Result& from) : Result(nullptr, from) {} + inline Result(Result&& from) noexcept + : Result(nullptr, std::move(from)) {} + inline Result& operator=(const Result& from) { + CopyFrom(from); + return *this; + } + inline Result& operator=(Result&& from) noexcept { + if (this == &from) return *this; + if (GetArena() == from.GetArena() +#ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetArena() != nullptr +#endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance); + } + inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>(); + } + + static const ::google::protobuf::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::google::protobuf::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::google::protobuf::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Result& default_instance() { + return *internal_default_instance(); + } + enum ResultCase { + kError = 1, + kSolution = 2, + kInfeasible = 3, + kUnbounded = 4, + RESULT_NOT_SET = 0, + }; + static inline const Result* internal_default_instance() { + return reinterpret_cast( + &_Result_default_instance_); + } + static constexpr int kIndexInFileMessages = 5; + friend void swap(Result& a, Result& b) { a.Swap(&b); } + inline void Swap(Result* other) { + if (other == this) return; +#ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() != nullptr && GetArena() == other->GetArena()) { +#else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetArena() == other->GetArena()) { +#endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::google::protobuf::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Result* other) { + if (other == this) return; + ABSL_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Result* New(::google::protobuf::Arena* arena = nullptr) const final { + return ::google::protobuf::Message::DefaultConstruct(arena); + } + using ::google::protobuf::Message::CopyFrom; + void CopyFrom(const Result& from); + using ::google::protobuf::Message::MergeFrom; + void MergeFrom(const Result& from) { Result::MergeImpl(*this, from); } + + private: + static void MergeImpl( + ::google::protobuf::MessageLite& to_msg, + const ::google::protobuf::MessageLite& from_msg); + + public: + bool IsInitialized() const { + return true; + } + ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + ::size_t ByteSizeLong() const final; + ::uint8_t* _InternalSerialize( + ::uint8_t* target, + ::google::protobuf::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::google::protobuf::Arena* arena); + void SharedDtor(); + void InternalSwap(Result* other); + private: + friend class ::google::protobuf::internal::AnyMetadata; + static ::absl::string_view FullMessageName() { return "ommx.v1.Result"; } + + protected: + explicit Result(::google::protobuf::Arena* arena); + Result(::google::protobuf::Arena* arena, const Result& from); + Result(::google::protobuf::Arena* arena, Result&& from) noexcept + : Result(arena) { + *this = ::std::move(from); + } + const ::google::protobuf::Message::ClassData* GetClassData() const final; + + public: + ::google::protobuf::Metadata GetMetadata() const; + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + enum : int { + kErrorFieldNumber = 1, + kSolutionFieldNumber = 2, + kInfeasibleFieldNumber = 3, + kUnboundedFieldNumber = 4, + }; + // string error = 1; + bool has_error() const; + void clear_error() ; + const std::string& error() const; + template + void set_error(Arg_&& arg, Args_... args); + std::string* mutable_error(); + PROTOBUF_NODISCARD std::string* release_error(); + void set_allocated_error(std::string* value); + + private: + const std::string& _internal_error() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_error( + const std::string& value); + std::string* _internal_mutable_error(); + + public: + // .ommx.v1.Solution solution = 2; + bool has_solution() const; + private: + bool _internal_has_solution() const; + + public: + void clear_solution() ; + const ::ommx::v1::Solution& solution() const; + PROTOBUF_NODISCARD ::ommx::v1::Solution* release_solution(); + ::ommx::v1::Solution* mutable_solution(); + void set_allocated_solution(::ommx::v1::Solution* value); + void unsafe_arena_set_allocated_solution(::ommx::v1::Solution* value); + ::ommx::v1::Solution* unsafe_arena_release_solution(); + + private: + const ::ommx::v1::Solution& _internal_solution() const; + ::ommx::v1::Solution* _internal_mutable_solution(); + + public: + // .ommx.v1.Infeasible infeasible = 3; + bool has_infeasible() const; + private: + bool _internal_has_infeasible() const; + + public: + void clear_infeasible() ; + const ::ommx::v1::Infeasible& infeasible() const; + PROTOBUF_NODISCARD ::ommx::v1::Infeasible* release_infeasible(); + ::ommx::v1::Infeasible* mutable_infeasible(); + void set_allocated_infeasible(::ommx::v1::Infeasible* value); + void unsafe_arena_set_allocated_infeasible(::ommx::v1::Infeasible* value); + ::ommx::v1::Infeasible* unsafe_arena_release_infeasible(); + + private: + const ::ommx::v1::Infeasible& _internal_infeasible() const; + ::ommx::v1::Infeasible* _internal_mutable_infeasible(); + + public: + // .ommx.v1.Unbounded unbounded = 4; + bool has_unbounded() const; + private: + bool _internal_has_unbounded() const; + + public: + void clear_unbounded() ; + const ::ommx::v1::Unbounded& unbounded() const; + PROTOBUF_NODISCARD ::ommx::v1::Unbounded* release_unbounded(); + ::ommx::v1::Unbounded* mutable_unbounded(); + void set_allocated_unbounded(::ommx::v1::Unbounded* value); + void unsafe_arena_set_allocated_unbounded(::ommx::v1::Unbounded* value); + ::ommx::v1::Unbounded* unsafe_arena_release_unbounded(); + + private: + const ::ommx::v1::Unbounded& _internal_unbounded() const; + ::ommx::v1::Unbounded* _internal_mutable_unbounded(); + + public: + void clear_result(); + ResultCase result_case() const; + // @@protoc_insertion_point(class_scope:ommx.v1.Result) + private: + class _Internal; + void set_has_error(); + void set_has_solution(); + void set_has_infeasible(); + void set_has_unbounded(); + inline bool has_result() const; + inline void clear_has_result(); + friend class ::google::protobuf::internal::TcParser; + static const ::google::protobuf::internal::TcParseTable< + 0, 4, 3, + 28, 2> + _table_; + + static constexpr const void* _raw_default_instance_ = + &_Result_default_instance_; + + friend class ::google::protobuf::MessageLite; + friend class ::google::protobuf::Arena; + template + friend class ::google::protobuf::Arena::InternalHelper; + using InternalArenaConstructable_ = void; + using DestructorSkippable_ = void; + struct Impl_ { + inline explicit constexpr Impl_( + ::google::protobuf::internal::ConstantInitialized) noexcept; + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena); + inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, + ::google::protobuf::Arena* arena, const Impl_& from, + const Result& from_msg); + union ResultUnion { + constexpr ResultUnion() : _constinit_{} {} + ::google::protobuf::internal::ConstantInitialized _constinit_; + ::google::protobuf::internal::ArenaStringPtr error_; + ::ommx::v1::Solution* solution_; + ::ommx::v1::Infeasible* infeasible_; + ::ommx::v1::Unbounded* unbounded_; + } result_; + mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::uint32_t _oneof_case_[1]; + PROTOBUF_TSAN_DECLARE_MEMBER + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_ommx_2fv1_2fsolution_2eproto; +}; + +// =================================================================== + + + + +// =================================================================== + + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// State + +// map entries = 1; +inline int State::_internal_entries_size() const { + return _internal_entries().size(); +} +inline int State::entries_size() const { + return _internal_entries_size(); +} +inline void State::clear_entries() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.entries_.Clear(); +} +inline const ::google::protobuf::Map<::uint64_t, double>& State::_internal_entries() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.entries_.GetMap(); +} +inline const ::google::protobuf::Map<::uint64_t, double>& State::entries() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_map:ommx.v1.State.entries) + return _internal_entries(); +} +inline ::google::protobuf::Map<::uint64_t, double>* State::_internal_mutable_entries() { + ::google::protobuf::internal::TSanWrite(&_impl_); + return _impl_.entries_.MutableMap(); +} +inline ::google::protobuf::Map<::uint64_t, double>* State::mutable_entries() ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_map:ommx.v1.State.entries) + return _internal_mutable_entries(); +} + +// ------------------------------------------------------------------- + +// Solution + +// .ommx.v1.State state = 1; +inline bool Solution::has_state() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || _impl_.state_ != nullptr); + return value; +} +inline void Solution::clear_state() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.state_ != nullptr) _impl_.state_->Clear(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const ::ommx::v1::State& Solution::_internal_state() const { + ::google::protobuf::internal::TSanRead(&_impl_); + const ::ommx::v1::State* p = _impl_.state_; + return p != nullptr ? *p : reinterpret_cast(::ommx::v1::_State_default_instance_); +} +inline const ::ommx::v1::State& Solution::state() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Solution.state) + return _internal_state(); +} +inline void Solution::unsafe_arena_set_allocated_state(::ommx::v1::State* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (GetArena() == nullptr) { + delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.state_); + } + _impl_.state_ = reinterpret_cast<::ommx::v1::State*>(value); + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ommx.v1.Solution.state) +} +inline ::ommx::v1::State* Solution::release_state() { + ::google::protobuf::internal::TSanWrite(&_impl_); + + _impl_._has_bits_[0] &= ~0x00000001u; + ::ommx::v1::State* released = _impl_.state_; + _impl_.state_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released); + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + if (GetArena() == nullptr) { + delete old; + } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArena() != nullptr) { + released = ::google::protobuf::internal::DuplicateIfNonNull(released); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return released; +} +inline ::ommx::v1::State* Solution::unsafe_arena_release_state() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:ommx.v1.Solution.state) + + _impl_._has_bits_[0] &= ~0x00000001u; + ::ommx::v1::State* temp = _impl_.state_; + _impl_.state_ = nullptr; + return temp; +} +inline ::ommx::v1::State* Solution::_internal_mutable_state() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (_impl_.state_ == nullptr) { + auto* p = ::google::protobuf::Message::DefaultConstruct<::ommx::v1::State>(GetArena()); + _impl_.state_ = reinterpret_cast<::ommx::v1::State*>(p); + } + return _impl_.state_; +} +inline ::ommx::v1::State* Solution::mutable_state() ABSL_ATTRIBUTE_LIFETIME_BOUND { + _impl_._has_bits_[0] |= 0x00000001u; + ::ommx::v1::State* _msg = _internal_mutable_state(); + // @@protoc_insertion_point(field_mutable:ommx.v1.Solution.state) + return _msg; +} +inline void Solution::set_allocated_state(::ommx::v1::State* value) { + ::google::protobuf::Arena* message_arena = GetArena(); + ::google::protobuf::internal::TSanWrite(&_impl_); + if (message_arena == nullptr) { + delete (_impl_.state_); + } + + if (value != nullptr) { + ::google::protobuf::Arena* submessage_arena = (value)->GetArena(); + if (message_arena != submessage_arena) { + value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + + _impl_.state_ = reinterpret_cast<::ommx::v1::State*>(value); + // @@protoc_insertion_point(field_set_allocated:ommx.v1.Solution.state) +} + +// double objective = 2; +inline void Solution::clear_objective() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.objective_ = 0; +} +inline double Solution::objective() const { + // @@protoc_insertion_point(field_get:ommx.v1.Solution.objective) + return _internal_objective(); +} +inline void Solution::set_objective(double value) { + _internal_set_objective(value); + // @@protoc_insertion_point(field_set:ommx.v1.Solution.objective) +} +inline double Solution::_internal_objective() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.objective_; +} +inline void Solution::_internal_set_objective(double value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.objective_ = value; +} + +// repeated .ommx.v1.DecisionVariable decision_variables = 3; +inline int Solution::_internal_decision_variables_size() const { + return _internal_decision_variables().size(); +} +inline int Solution::decision_variables_size() const { + return _internal_decision_variables_size(); +} +inline ::ommx::v1::DecisionVariable* Solution::mutable_decision_variables(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:ommx.v1.Solution.decision_variables) + return _internal_mutable_decision_variables()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>* Solution::mutable_decision_variables() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:ommx.v1.Solution.decision_variables) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_decision_variables(); +} +inline const ::ommx::v1::DecisionVariable& Solution::decision_variables(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Solution.decision_variables) + return _internal_decision_variables().Get(index); +} +inline ::ommx::v1::DecisionVariable* Solution::add_decision_variables() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::ommx::v1::DecisionVariable* _add = _internal_mutable_decision_variables()->Add(); + // @@protoc_insertion_point(field_add:ommx.v1.Solution.decision_variables) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>& Solution::decision_variables() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:ommx.v1.Solution.decision_variables) + return _internal_decision_variables(); +} +inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>& +Solution::_internal_decision_variables() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.decision_variables_; +} +inline ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>* +Solution::_internal_mutable_decision_variables() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.decision_variables_; +} + +// repeated .ommx.v1.EvaluatedConstraint evaluated_constraints = 4; +inline int Solution::_internal_evaluated_constraints_size() const { + return _internal_evaluated_constraints().size(); +} +inline int Solution::evaluated_constraints_size() const { + return _internal_evaluated_constraints_size(); +} +inline ::ommx::v1::EvaluatedConstraint* Solution::mutable_evaluated_constraints(int index) + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable:ommx.v1.Solution.evaluated_constraints) + return _internal_mutable_evaluated_constraints()->Mutable(index); +} +inline ::google::protobuf::RepeatedPtrField<::ommx::v1::EvaluatedConstraint>* Solution::mutable_evaluated_constraints() + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_mutable_list:ommx.v1.Solution.evaluated_constraints) + ::google::protobuf::internal::TSanWrite(&_impl_); + return _internal_mutable_evaluated_constraints(); +} +inline const ::ommx::v1::EvaluatedConstraint& Solution::evaluated_constraints(int index) const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Solution.evaluated_constraints) + return _internal_evaluated_constraints().Get(index); +} +inline ::ommx::v1::EvaluatedConstraint* Solution::add_evaluated_constraints() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::google::protobuf::internal::TSanWrite(&_impl_); + ::ommx::v1::EvaluatedConstraint* _add = _internal_mutable_evaluated_constraints()->Add(); + // @@protoc_insertion_point(field_add:ommx.v1.Solution.evaluated_constraints) + return _add; +} +inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::EvaluatedConstraint>& Solution::evaluated_constraints() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_list:ommx.v1.Solution.evaluated_constraints) + return _internal_evaluated_constraints(); +} +inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::EvaluatedConstraint>& +Solution::_internal_evaluated_constraints() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.evaluated_constraints_; +} +inline ::google::protobuf::RepeatedPtrField<::ommx::v1::EvaluatedConstraint>* +Solution::_internal_mutable_evaluated_constraints() { + ::google::protobuf::internal::TSanRead(&_impl_); + return &_impl_.evaluated_constraints_; +} + +// bool feasible = 5; +inline void Solution::clear_feasible() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.feasible_ = false; +} +inline bool Solution::feasible() const { + // @@protoc_insertion_point(field_get:ommx.v1.Solution.feasible) + return _internal_feasible(); +} +inline void Solution::set_feasible(bool value) { + _internal_set_feasible(value); + // @@protoc_insertion_point(field_set:ommx.v1.Solution.feasible) +} +inline bool Solution::_internal_feasible() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return _impl_.feasible_; +} +inline void Solution::_internal_set_feasible(bool value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.feasible_ = value; +} + +// .ommx.v1.Optimality optimality = 6; +inline void Solution::clear_optimality() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.optimality_ = 0; +} +inline ::ommx::v1::Optimality Solution::optimality() const { + // @@protoc_insertion_point(field_get:ommx.v1.Solution.optimality) + return _internal_optimality(); +} +inline void Solution::set_optimality(::ommx::v1::Optimality value) { + _internal_set_optimality(value); + // @@protoc_insertion_point(field_set:ommx.v1.Solution.optimality) +} +inline ::ommx::v1::Optimality Solution::_internal_optimality() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return static_cast<::ommx::v1::Optimality>(_impl_.optimality_); +} +inline void Solution::_internal_set_optimality(::ommx::v1::Optimality value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.optimality_ = value; +} + +// .ommx.v1.Relaxation relaxation = 7; +inline void Solution::clear_relaxation() { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.relaxation_ = 0; +} +inline ::ommx::v1::Relaxation Solution::relaxation() const { + // @@protoc_insertion_point(field_get:ommx.v1.Solution.relaxation) + return _internal_relaxation(); +} +inline void Solution::set_relaxation(::ommx::v1::Relaxation value) { + _internal_set_relaxation(value); + // @@protoc_insertion_point(field_set:ommx.v1.Solution.relaxation) +} +inline ::ommx::v1::Relaxation Solution::_internal_relaxation() const { + ::google::protobuf::internal::TSanRead(&_impl_); + return static_cast<::ommx::v1::Relaxation>(_impl_.relaxation_); +} +inline void Solution::_internal_set_relaxation(::ommx::v1::Relaxation value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + _impl_.relaxation_ = value; +} + +// ------------------------------------------------------------------- + +// Infeasible + +// ------------------------------------------------------------------- + +// Unbounded + +// ------------------------------------------------------------------- + +// Result + +// string error = 1; +inline bool Result::has_error() const { + return result_case() == kError; +} +inline void Result::set_has_error() { + _impl_._oneof_case_[0] = kError; +} +inline void Result::clear_error() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (result_case() == kError) { + _impl_.result_.error_.Destroy(); + clear_has_result(); + } +} +inline const std::string& Result::error() const + ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Result.error) + return _internal_error(); +} +template +inline PROTOBUF_ALWAYS_INLINE void Result::set_error(Arg_&& arg, + Args_... args) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (result_case() != kError) { + clear_result(); + + set_has_error(); + _impl_.result_.error_.InitDefault(); + } + _impl_.result_.error_.Set(static_cast(arg), args..., GetArena()); + // @@protoc_insertion_point(field_set:ommx.v1.Result.error) +} +inline std::string* Result::mutable_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { + std::string* _s = _internal_mutable_error(); + // @@protoc_insertion_point(field_mutable:ommx.v1.Result.error) + return _s; +} +inline const std::string& Result::_internal_error() const { + ::google::protobuf::internal::TSanRead(&_impl_); + if (result_case() != kError) { + return ::google::protobuf::internal::GetEmptyStringAlreadyInited(); + } + return _impl_.result_.error_.Get(); +} +inline void Result::_internal_set_error(const std::string& value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (result_case() != kError) { + clear_result(); + + set_has_error(); + _impl_.result_.error_.InitDefault(); + } + _impl_.result_.error_.Set(value, GetArena()); +} +inline std::string* Result::_internal_mutable_error() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (result_case() != kError) { + clear_result(); + + set_has_error(); + _impl_.result_.error_.InitDefault(); + } + return _impl_.result_.error_.Mutable( GetArena()); +} +inline std::string* Result::release_error() { + ::google::protobuf::internal::TSanWrite(&_impl_); + // @@protoc_insertion_point(field_release:ommx.v1.Result.error) + if (result_case() != kError) { + return nullptr; + } + clear_has_result(); + return _impl_.result_.error_.Release(); +} +inline void Result::set_allocated_error(std::string* value) { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (has_result()) { + clear_result(); + } + if (value != nullptr) { + set_has_error(); + _impl_.result_.error_.InitAllocated(value, GetArena()); + } + // @@protoc_insertion_point(field_set_allocated:ommx.v1.Result.error) +} + +// .ommx.v1.Solution solution = 2; +inline bool Result::has_solution() const { + return result_case() == kSolution; +} +inline bool Result::_internal_has_solution() const { + return result_case() == kSolution; +} +inline void Result::set_has_solution() { + _impl_._oneof_case_[0] = kSolution; +} +inline void Result::clear_solution() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (result_case() == kSolution) { + if (GetArena() == nullptr) { + delete _impl_.result_.solution_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.result_.solution_); + } + clear_has_result(); + } +} +inline ::ommx::v1::Solution* Result::release_solution() { + // @@protoc_insertion_point(field_release:ommx.v1.Result.solution) + if (result_case() == kSolution) { + clear_has_result(); + auto* temp = _impl_.result_.solution_; + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.result_.solution_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::ommx::v1::Solution& Result::_internal_solution() const { + return result_case() == kSolution ? *_impl_.result_.solution_ : reinterpret_cast<::ommx::v1::Solution&>(::ommx::v1::_Solution_default_instance_); +} +inline const ::ommx::v1::Solution& Result::solution() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Result.solution) + return _internal_solution(); +} +inline ::ommx::v1::Solution* Result::unsafe_arena_release_solution() { + // @@protoc_insertion_point(field_unsafe_arena_release:ommx.v1.Result.solution) + if (result_case() == kSolution) { + clear_has_result(); + auto* temp = _impl_.result_.solution_; + _impl_.result_.solution_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void Result::unsafe_arena_set_allocated_solution(::ommx::v1::Solution* value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_result(); + if (value) { + set_has_solution(); + _impl_.result_.solution_ = value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ommx.v1.Result.solution) +} +inline ::ommx::v1::Solution* Result::_internal_mutable_solution() { + if (result_case() != kSolution) { + clear_result(); + set_has_solution(); + _impl_.result_.solution_ = + ::google::protobuf::Message::DefaultConstruct<::ommx::v1::Solution>(GetArena()); + } + return _impl_.result_.solution_; +} +inline ::ommx::v1::Solution* Result::mutable_solution() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::ommx::v1::Solution* _msg = _internal_mutable_solution(); + // @@protoc_insertion_point(field_mutable:ommx.v1.Result.solution) + return _msg; +} + +// .ommx.v1.Infeasible infeasible = 3; +inline bool Result::has_infeasible() const { + return result_case() == kInfeasible; +} +inline bool Result::_internal_has_infeasible() const { + return result_case() == kInfeasible; +} +inline void Result::set_has_infeasible() { + _impl_._oneof_case_[0] = kInfeasible; +} +inline void Result::clear_infeasible() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (result_case() == kInfeasible) { + if (GetArena() == nullptr) { + delete _impl_.result_.infeasible_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.result_.infeasible_); + } + clear_has_result(); + } +} +inline ::ommx::v1::Infeasible* Result::release_infeasible() { + // @@protoc_insertion_point(field_release:ommx.v1.Result.infeasible) + if (result_case() == kInfeasible) { + clear_has_result(); + auto* temp = _impl_.result_.infeasible_; + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.result_.infeasible_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::ommx::v1::Infeasible& Result::_internal_infeasible() const { + return result_case() == kInfeasible ? *_impl_.result_.infeasible_ : reinterpret_cast<::ommx::v1::Infeasible&>(::ommx::v1::_Infeasible_default_instance_); +} +inline const ::ommx::v1::Infeasible& Result::infeasible() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Result.infeasible) + return _internal_infeasible(); +} +inline ::ommx::v1::Infeasible* Result::unsafe_arena_release_infeasible() { + // @@protoc_insertion_point(field_unsafe_arena_release:ommx.v1.Result.infeasible) + if (result_case() == kInfeasible) { + clear_has_result(); + auto* temp = _impl_.result_.infeasible_; + _impl_.result_.infeasible_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void Result::unsafe_arena_set_allocated_infeasible(::ommx::v1::Infeasible* value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_result(); + if (value) { + set_has_infeasible(); + _impl_.result_.infeasible_ = value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ommx.v1.Result.infeasible) +} +inline ::ommx::v1::Infeasible* Result::_internal_mutable_infeasible() { + if (result_case() != kInfeasible) { + clear_result(); + set_has_infeasible(); + _impl_.result_.infeasible_ = + ::google::protobuf::Message::DefaultConstruct<::ommx::v1::Infeasible>(GetArena()); + } + return _impl_.result_.infeasible_; +} +inline ::ommx::v1::Infeasible* Result::mutable_infeasible() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::ommx::v1::Infeasible* _msg = _internal_mutable_infeasible(); + // @@protoc_insertion_point(field_mutable:ommx.v1.Result.infeasible) + return _msg; +} + +// .ommx.v1.Unbounded unbounded = 4; +inline bool Result::has_unbounded() const { + return result_case() == kUnbounded; +} +inline bool Result::_internal_has_unbounded() const { + return result_case() == kUnbounded; +} +inline void Result::set_has_unbounded() { + _impl_._oneof_case_[0] = kUnbounded; +} +inline void Result::clear_unbounded() { + ::google::protobuf::internal::TSanWrite(&_impl_); + if (result_case() == kUnbounded) { + if (GetArena() == nullptr) { + delete _impl_.result_.unbounded_; + } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { + ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.result_.unbounded_); + } + clear_has_result(); + } +} +inline ::ommx::v1::Unbounded* Result::release_unbounded() { + // @@protoc_insertion_point(field_release:ommx.v1.Result.unbounded) + if (result_case() == kUnbounded) { + clear_has_result(); + auto* temp = _impl_.result_.unbounded_; + if (GetArena() != nullptr) { + temp = ::google::protobuf::internal::DuplicateIfNonNull(temp); + } + _impl_.result_.unbounded_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::ommx::v1::Unbounded& Result::_internal_unbounded() const { + return result_case() == kUnbounded ? *_impl_.result_.unbounded_ : reinterpret_cast<::ommx::v1::Unbounded&>(::ommx::v1::_Unbounded_default_instance_); +} +inline const ::ommx::v1::Unbounded& Result::unbounded() const ABSL_ATTRIBUTE_LIFETIME_BOUND { + // @@protoc_insertion_point(field_get:ommx.v1.Result.unbounded) + return _internal_unbounded(); +} +inline ::ommx::v1::Unbounded* Result::unsafe_arena_release_unbounded() { + // @@protoc_insertion_point(field_unsafe_arena_release:ommx.v1.Result.unbounded) + if (result_case() == kUnbounded) { + clear_has_result(); + auto* temp = _impl_.result_.unbounded_; + _impl_.result_.unbounded_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void Result::unsafe_arena_set_allocated_unbounded(::ommx::v1::Unbounded* value) { + // We rely on the oneof clear method to free the earlier contents + // of this oneof. We can directly use the pointer we're given to + // set the new value. + clear_result(); + if (value) { + set_has_unbounded(); + _impl_.result_.unbounded_ = value; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ommx.v1.Result.unbounded) +} +inline ::ommx::v1::Unbounded* Result::_internal_mutable_unbounded() { + if (result_case() != kUnbounded) { + clear_result(); + set_has_unbounded(); + _impl_.result_.unbounded_ = + ::google::protobuf::Message::DefaultConstruct<::ommx::v1::Unbounded>(GetArena()); + } + return _impl_.result_.unbounded_; +} +inline ::ommx::v1::Unbounded* Result::mutable_unbounded() ABSL_ATTRIBUTE_LIFETIME_BOUND { + ::ommx::v1::Unbounded* _msg = _internal_mutable_unbounded(); + // @@protoc_insertion_point(field_mutable:ommx.v1.Result.unbounded) + return _msg; +} + +inline bool Result::has_result() const { + return result_case() != RESULT_NOT_SET; +} +inline void Result::clear_has_result() { + _impl_._oneof_case_[0] = RESULT_NOT_SET; +} +inline Result::ResultCase Result::result_case() const { + return Result::ResultCase(_impl_._oneof_case_[0]); +} +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) +} // namespace v1 +} // namespace ommx + + +namespace google { +namespace protobuf { + +template <> +struct is_proto_enum<::ommx::v1::Optimality> : std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor<::ommx::v1::Optimality>() { + return ::ommx::v1::Optimality_descriptor(); +} +template <> +struct is_proto_enum<::ommx::v1::Relaxation> : std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor<::ommx::v1::Relaxation>() { + return ::ommx::v1::Relaxation_descriptor(); +} + +} // namespace protobuf +} // namespace google + +// @@protoc_insertion_point(global_scope) + +#include "google/protobuf/port_undef.inc" + +#endif // GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fsolution_2eproto_2epb_2eh From c318744ca10948d7303385d28dbea147d0f97151 Mon Sep 17 00:00:00 2001 From: Shitaro Date: Wed, 21 Aug 2024 19:16:11 +0900 Subject: [PATCH 2/7] cmake config --- cpp/CMakeLists.txt | 60 +++++++++++++++++++++++++++++++++++ cpp/cmake/ommxConfig.cmake.in | 7 ++++ 2 files changed, 67 insertions(+) create mode 100644 cpp/CMakeLists.txt create mode 100644 cpp/cmake/ommxConfig.cmake.in diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt new file mode 100644 index 00000000..d20f66e6 --- /dev/null +++ b/cpp/CMakeLists.txt @@ -0,0 +1,60 @@ +cmake_minimum_required(VERSION 3.14) + +# Set OMMX C++ SDK version +project(ommx VERSION 0.1.0) + +# Use C++17 +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +# Protobuf must be required +find_package(Protobuf REQUIRED) + +# Create a static library +file(GLOB SRC "ommx/v1/*.pb.cc") +add_library(ommx STATIC ${SRC}) + +target_include_directories(ommx PUBLIC + $ + $ +) + +target_link_libraries(ommx PUBLIC protobuf::libprotobuf) + +install(TARGETS ommx + EXPORT ommxTargets + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin + INCLUDES DESTINATION include +) + +install(DIRECTORY ommx + DESTINATION include + FILES_MATCHING PATTERN "*.h" +) + +install(EXPORT ommxTargets + FILE ommxTargets.cmake + NAMESPACE ommx:: + DESTINATION lib/cmake/ommx +) + +include(CMakePackageConfigHelpers) +write_basic_package_version_file( + "ommxConfigVersion.cmake" + VERSION ${PROJECT_VERSION} + COMPATIBILITY SameMajorVersion +) + +configure_package_config_file( + "${CMAKE_CURRENT_SOURCE_DIR}/cmake/ommxConfig.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/ommxConfig.cmake" + INSTALL_DESTINATION lib/cmake/ommx +) + +install(FILES + "${CMAKE_CURRENT_BINARY_DIR}/ommxConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/ommxConfigVersion.cmake" + DESTINATION lib/cmake/ommx +) \ No newline at end of file diff --git a/cpp/cmake/ommxConfig.cmake.in b/cpp/cmake/ommxConfig.cmake.in new file mode 100644 index 00000000..1eae1fd6 --- /dev/null +++ b/cpp/cmake/ommxConfig.cmake.in @@ -0,0 +1,7 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/ommxTargets.cmake") + +find_package(Protobuf REQUIRED) + +check_required_components(ommx) \ No newline at end of file From decd499bb00ba7ba8c8c09ca1dfcd1b892669615 Mon Sep 17 00:00:00 2001 From: Shitaro Date: Wed, 21 Aug 2024 19:35:21 +0900 Subject: [PATCH 3/7] use buf cli --- cpp/ommx/v1/constraint.pb.cc | 175 ++++++++++++++------------- cpp/ommx/v1/constraint.pb.h | 64 +++++----- cpp/ommx/v1/decision_variables.pb.cc | 103 ++++++++-------- cpp/ommx/v1/decision_variables.pb.h | 36 +++--- cpp/ommx/v1/function.pb.cc | 32 ++--- cpp/ommx/v1/function.pb.h | 16 +-- cpp/ommx/v1/instance.pb.cc | 105 ++++++++-------- cpp/ommx/v1/instance.pb.h | 36 +++--- cpp/ommx/v1/linear.pb.cc | 45 +++---- cpp/ommx/v1/linear.pb.h | 16 +-- cpp/ommx/v1/polynomial.pb.cc | 37 +++--- cpp/ommx/v1/polynomial.pb.h | 12 +- cpp/ommx/v1/quadratic.pb.cc | 45 +++---- cpp/ommx/v1/quadratic.pb.h | 16 +-- cpp/ommx/v1/solution.pb.cc | 124 ++++++++++--------- cpp/ommx/v1/solution.pb.h | 48 ++++---- proto/buf.gen.cpp.yaml | 6 + 17 files changed, 479 insertions(+), 437 deletions(-) create mode 100644 proto/buf.gen.cpp.yaml diff --git a/cpp/ommx/v1/constraint.pb.cc b/cpp/ommx/v1/constraint.pb.cc index 2c275b9c..2b27c011 100644 --- a/cpp/ommx/v1/constraint.pb.cc +++ b/cpp/ommx/v1/constraint.pb.cc @@ -210,27 +210,34 @@ static const ::_pb::Message* const file_default_instances[] = { const char descriptor_table_protodef_ommx_2fv1_2fconstraint_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( protodesc_cold) = { "\n\030ommx/v1/constraint.proto\022\007ommx.v1\032\026omm" - "x/v1/function.proto\"\250\002\n\nConstraint\022\n\n\002id" - "\030\001 \001(\004\022#\n\010equality\030\002 \001(\0162\021.ommx.v1.Equal" - "ity\022#\n\010function\030\003 \001(\0132\021.ommx.v1.Function" - "\022\022\n\nsubscripts\030\010 \003(\003\0227\n\nparameters\030\005 \003(\013" - "2#.ommx.v1.Constraint.ParametersEntry\022\021\n" - "\004name\030\006 \001(\tH\000\210\001\001\022\030\n\013description\030\007 \001(\tH\001\210" - "\001\001\0321\n\017ParametersEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" - "lue\030\002 \001(\t:\0028\001B\007\n\005_nameB\016\n\014_description\"\200" - "\003\n\023EvaluatedConstraint\022\n\n\002id\030\001 \001(\004\022#\n\010eq" - "uality\030\002 \001(\0162\021.ommx.v1.Equality\022\027\n\017evalu" - "ated_value\030\003 \001(\001\022\"\n\032used_decision_variab" - "le_ids\030\004 \003(\004\022\022\n\nsubscripts\030\t \003(\003\022@\n\npara" - "meters\030\005 \003(\0132,.ommx.v1.EvaluatedConstrai" - "nt.ParametersEntry\022\021\n\004name\030\006 \001(\tH\000\210\001\001\022\030\n" - "\013description\030\007 \001(\tH\001\210\001\001\022\032\n\rdual_variable" - "\030\010 \001(\001H\002\210\001\001\0321\n\017ParametersEntry\022\013\n\003key\030\001 " - "\001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\007\n\005_nameB\016\n\014_desc" - "riptionB\020\n\016_dual_variable*i\n\010Equality\022\030\n" - "\024EQUALITY_UNSPECIFIED\020\000\022\032\n\026EQUALITY_EQUA" - "L_TO_ZERO\020\001\022\'\n#EQUALITY_LESS_THAN_OR_EQU" - "AL_TO_ZERO\020\002b\006proto3" + "x/v1/function.proto\"\367\002\n\nConstraint\022\016\n\002id" + "\030\001 \001(\004R\002id\022-\n\010equality\030\002 \001(\0162\021.ommx.v1.E" + "qualityR\010equality\022-\n\010function\030\003 \001(\0132\021.om" + "mx.v1.FunctionR\010function\022\036\n\nsubscripts\030\010" + " \003(\003R\nsubscripts\022C\n\nparameters\030\005 \003(\0132#.o" + "mmx.v1.Constraint.ParametersEntryR\nparam" + "eters\022\027\n\004name\030\006 \001(\tH\000R\004name\210\001\001\022%\n\013descri" + "ption\030\007 \001(\tH\001R\013description\210\001\001\032=\n\017Paramet" + "ersEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005value\030\002 \001(" + "\tR\005value:\0028\001B\007\n\005_nameB\016\n\014_description\"\374\003" + "\n\023EvaluatedConstraint\022\016\n\002id\030\001 \001(\004R\002id\022-\n" + "\010equality\030\002 \001(\0162\021.ommx.v1.EqualityR\010equa" + "lity\022\'\n\017evaluated_value\030\003 \001(\001R\016evaluated" + "Value\022;\n\032used_decision_variable_ids\030\004 \003(" + "\004R\027usedDecisionVariableIds\022\036\n\nsubscripts" + "\030\t \003(\003R\nsubscripts\022L\n\nparameters\030\005 \003(\0132," + ".ommx.v1.EvaluatedConstraint.ParametersE" + "ntryR\nparameters\022\027\n\004name\030\006 \001(\tH\000R\004name\210\001" + "\001\022%\n\013description\030\007 \001(\tH\001R\013description\210\001\001" + "\022(\n\rdual_variable\030\010 \001(\001H\002R\014dualVariable\210" + "\001\001\032=\n\017ParametersEntry\022\020\n\003key\030\001 \001(\tR\003key\022" + "\024\n\005value\030\002 \001(\tR\005value:\0028\001B\007\n\005_nameB\016\n\014_d" + "escriptionB\020\n\016_dual_variable*i\n\010Equality" + "\022\030\n\024EQUALITY_UNSPECIFIED\020\000\022\032\n\026EQUALITY_E" + "QUAL_TO_ZERO\020\001\022\'\n#EQUALITY_LESS_THAN_OR_" + "EQUAL_TO_ZERO\020\002B[\n\013com.ommx.v1B\017Constrai" + "ntProtoP\001\242\002\003OXX\252\002\007Ommx.V1\312\002\007Ommx\\V1\342\002\023Om" + "mx\\V1\\GPBMetadata\352\002\010Ommx::V1b\006proto3" }; static const ::_pbi::DescriptorTable* const descriptor_table_ommx_2fv1_2fconstraint_2eproto_deps[1] = { @@ -240,7 +247,7 @@ static ::absl::once_flag descriptor_table_ommx_2fv1_2fconstraint_2eproto_once; PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fconstraint_2eproto = { false, false, - 860, + 1156, descriptor_table_protodef_ommx_2fv1_2fconstraint_2eproto, "ommx/v1/constraint.proto", &descriptor_table_ommx_2fv1_2fconstraint_2eproto_once, @@ -413,48 +420,48 @@ const ::_pbi::TcParseTable<3, 7, 2, 52, 2> Constraint::_table_ = { ::_pbi::TcParser::GetTable<::ommx::v1::Constraint>(), // to_prefetch #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ - // repeated int64 subscripts = 8; + // repeated int64 subscripts = 8 [json_name = "subscripts"]; {::_pbi::TcParser::FastV64P1, {66, 63, 0, PROTOBUF_FIELD_OFFSET(Constraint, _impl_.subscripts_)}}, - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Constraint, _impl_.id_), 63>(), {8, 63, 0, PROTOBUF_FIELD_OFFSET(Constraint, _impl_.id_)}}, - // .ommx.v1.Equality equality = 2; + // .ommx.v1.Equality equality = 2 [json_name = "equality"]; {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Constraint, _impl_.equality_), 63>(), {16, 63, 0, PROTOBUF_FIELD_OFFSET(Constraint, _impl_.equality_)}}, - // .ommx.v1.Function function = 3; + // .ommx.v1.Function function = 3 [json_name = "function"]; {::_pbi::TcParser::FastMtS1, {26, 2, 0, PROTOBUF_FIELD_OFFSET(Constraint, _impl_.function_)}}, {::_pbi::TcParser::MiniParse, {}}, {::_pbi::TcParser::MiniParse, {}}, - // optional string name = 6; + // optional string name = 6 [json_name = "name"]; {::_pbi::TcParser::FastUS1, {50, 0, 0, PROTOBUF_FIELD_OFFSET(Constraint, _impl_.name_)}}, - // optional string description = 7; + // optional string description = 7 [json_name = "description"]; {::_pbi::TcParser::FastUS1, {58, 1, 0, PROTOBUF_FIELD_OFFSET(Constraint, _impl_.description_)}}, }}, {{ 65535, 65535 }}, {{ - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; {PROTOBUF_FIELD_OFFSET(Constraint, _impl_.id_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, - // .ommx.v1.Equality equality = 2; + // .ommx.v1.Equality equality = 2 [json_name = "equality"]; {PROTOBUF_FIELD_OFFSET(Constraint, _impl_.equality_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, - // .ommx.v1.Function function = 3; + // .ommx.v1.Function function = 3 [json_name = "function"]; {PROTOBUF_FIELD_OFFSET(Constraint, _impl_.function_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, - // map parameters = 5; + // map parameters = 5 [json_name = "parameters"]; {PROTOBUF_FIELD_OFFSET(Constraint, _impl_.parameters_), -1, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMap)}, - // optional string name = 6; + // optional string name = 6 [json_name = "name"]; {PROTOBUF_FIELD_OFFSET(Constraint, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // optional string description = 7; + // optional string description = 7 [json_name = "description"]; {PROTOBUF_FIELD_OFFSET(Constraint, _impl_.description_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // repeated int64 subscripts = 8; + // repeated int64 subscripts = 8 [json_name = "subscripts"]; {PROTOBUF_FIELD_OFFSET(Constraint, _impl_.subscripts_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt64)}, }}, {{ @@ -508,14 +515,14 @@ ::uint8_t* Constraint::_InternalSerialize( ::uint32_t cached_has_bits = 0; (void)cached_has_bits; - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; if (this->_internal_id() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray( 1, this->_internal_id(), target); } - // .ommx.v1.Equality equality = 2; + // .ommx.v1.Equality equality = 2 [json_name = "equality"]; if (this->_internal_equality() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( @@ -523,13 +530,13 @@ ::uint8_t* Constraint::_InternalSerialize( } cached_has_bits = _impl_._has_bits_[0]; - // .ommx.v1.Function function = 3; + // .ommx.v1.Function function = 3 [json_name = "function"]; if (cached_has_bits & 0x00000004u) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 3, *_impl_.function_, _impl_.function_->GetCachedSize(), target, stream); } - // map parameters = 5; + // map parameters = 5 [json_name = "parameters"]; if (!_internal_parameters().empty()) { using MapType = ::google::protobuf::Map; using WireHelper = _pbi::MapEntryFuncs_internal_name(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -570,7 +577,7 @@ ::uint8_t* Constraint::_InternalSerialize( target = stream->WriteStringMaybeAliased(6, _s, target); } - // optional string description = 7; + // optional string description = 7 [json_name = "description"]; if (cached_has_bits & 0x00000002u) { const std::string& _s = this->_internal_description(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -578,7 +585,7 @@ ::uint8_t* Constraint::_InternalSerialize( target = stream->WriteStringMaybeAliased(7, _s, target); } - // repeated int64 subscripts = 8; + // repeated int64 subscripts = 8 [json_name = "subscripts"]; { int byte_size = _impl_._subscripts_cached_byte_size_.Get(); if (byte_size > 0) { @@ -605,14 +612,14 @@ ::size_t Constraint::ByteSizeLong() const { (void) cached_has_bits; ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); - // map parameters = 5; + // map parameters = 5 [json_name = "parameters"]; total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_parameters_size()); for (const auto& entry : _internal_parameters()) { total_size += _pbi::MapEntryFuncs::ByteSizeLong(entry.first, entry.second); } - // repeated int64 subscripts = 8; + // repeated int64 subscripts = 8 [json_name = "subscripts"]; { std::size_t data_size = ::_pbi::WireFormatLite::Int64Size( this->_internal_subscripts()) @@ -627,32 +634,32 @@ ::size_t Constraint::ByteSizeLong() const { } cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000007u) { - // optional string name = 6; + // optional string name = 6 [json_name = "name"]; if (cached_has_bits & 0x00000001u) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->_internal_name()); } - // optional string description = 7; + // optional string description = 7 [json_name = "description"]; if (cached_has_bits & 0x00000002u) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->_internal_description()); } - // .ommx.v1.Function function = 3; + // .ommx.v1.Function function = 3 [json_name = "function"]; if (cached_has_bits & 0x00000004u) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.function_); } } - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; if (this->_internal_id() != 0) { total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( this->_internal_id()); } - // .ommx.v1.Equality equality = 2; + // .ommx.v1.Equality equality = 2 [json_name = "equality"]; if (this->_internal_equality() != 0) { total_size += 1 + ::_pbi::WireFormatLite::EnumSize(this->_internal_equality()); @@ -874,29 +881,29 @@ const ::_pbi::TcParseTable<4, 9, 1, 69, 2> EvaluatedConstraint::_table_ = { #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ {::_pbi::TcParser::MiniParse, {}}, - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(EvaluatedConstraint, _impl_.id_), 63>(), {8, 63, 0, PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.id_)}}, - // .ommx.v1.Equality equality = 2; + // .ommx.v1.Equality equality = 2 [json_name = "equality"]; {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(EvaluatedConstraint, _impl_.equality_), 63>(), {16, 63, 0, PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.equality_)}}, - // double evaluated_value = 3; + // double evaluated_value = 3 [json_name = "evaluatedValue"]; {::_pbi::TcParser::FastF64S1, {25, 63, 0, PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.evaluated_value_)}}, - // repeated uint64 used_decision_variable_ids = 4; + // repeated uint64 used_decision_variable_ids = 4 [json_name = "usedDecisionVariableIds"]; {::_pbi::TcParser::FastV64P1, {34, 63, 0, PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.used_decision_variable_ids_)}}, {::_pbi::TcParser::MiniParse, {}}, - // optional string name = 6; + // optional string name = 6 [json_name = "name"]; {::_pbi::TcParser::FastUS1, {50, 0, 0, PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.name_)}}, - // optional string description = 7; + // optional string description = 7 [json_name = "description"]; {::_pbi::TcParser::FastUS1, {58, 1, 0, PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.description_)}}, - // optional double dual_variable = 8; + // optional double dual_variable = 8 [json_name = "dualVariable"]; {::_pbi::TcParser::FastF64S1, {65, 2, 0, PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.dual_variable_)}}, - // repeated int64 subscripts = 9; + // repeated int64 subscripts = 9 [json_name = "subscripts"]; {::_pbi::TcParser::FastV64P1, {74, 63, 0, PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.subscripts_)}}, {::_pbi::TcParser::MiniParse, {}}, @@ -908,31 +915,31 @@ const ::_pbi::TcParseTable<4, 9, 1, 69, 2> EvaluatedConstraint::_table_ = { }}, {{ 65535, 65535 }}, {{ - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; {PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.id_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, - // .ommx.v1.Equality equality = 2; + // .ommx.v1.Equality equality = 2 [json_name = "equality"]; {PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.equality_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, - // double evaluated_value = 3; + // double evaluated_value = 3 [json_name = "evaluatedValue"]; {PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.evaluated_value_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, - // repeated uint64 used_decision_variable_ids = 4; + // repeated uint64 used_decision_variable_ids = 4 [json_name = "usedDecisionVariableIds"]; {PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.used_decision_variable_ids_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt64)}, - // map parameters = 5; + // map parameters = 5 [json_name = "parameters"]; {PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.parameters_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMap)}, - // optional string name = 6; + // optional string name = 6 [json_name = "name"]; {PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // optional string description = 7; + // optional string description = 7 [json_name = "description"]; {PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.description_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // optional double dual_variable = 8; + // optional double dual_variable = 8 [json_name = "dualVariable"]; {PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.dual_variable_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kDouble)}, - // repeated int64 subscripts = 9; + // repeated int64 subscripts = 9 [json_name = "subscripts"]; {PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_.subscripts_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt64)}, }}, {{ @@ -984,21 +991,21 @@ ::uint8_t* EvaluatedConstraint::_InternalSerialize( ::uint32_t cached_has_bits = 0; (void)cached_has_bits; - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; if (this->_internal_id() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray( 1, this->_internal_id(), target); } - // .ommx.v1.Equality equality = 2; + // .ommx.v1.Equality equality = 2 [json_name = "equality"]; if (this->_internal_equality() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 2, this->_internal_equality(), target); } - // double evaluated_value = 3; + // double evaluated_value = 3 [json_name = "evaluatedValue"]; static_assert(sizeof(::uint64_t) == sizeof(double), "Code assumes ::uint64_t and double are the same size."); double tmp_evaluated_value = this->_internal_evaluated_value(); @@ -1010,7 +1017,7 @@ ::uint8_t* EvaluatedConstraint::_InternalSerialize( 3, this->_internal_evaluated_value(), target); } - // repeated uint64 used_decision_variable_ids = 4; + // repeated uint64 used_decision_variable_ids = 4 [json_name = "usedDecisionVariableIds"]; { int byte_size = _impl_._used_decision_variable_ids_cached_byte_size_.Get(); if (byte_size > 0) { @@ -1019,7 +1026,7 @@ ::uint8_t* EvaluatedConstraint::_InternalSerialize( } } - // map parameters = 5; + // map parameters = 5 [json_name = "parameters"]; if (!_internal_parameters().empty()) { using MapType = ::google::protobuf::Map; using WireHelper = _pbi::MapEntryFuncs_internal_name(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -1061,7 +1068,7 @@ ::uint8_t* EvaluatedConstraint::_InternalSerialize( target = stream->WriteStringMaybeAliased(6, _s, target); } - // optional string description = 7; + // optional string description = 7 [json_name = "description"]; if (cached_has_bits & 0x00000002u) { const std::string& _s = this->_internal_description(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -1069,14 +1076,14 @@ ::uint8_t* EvaluatedConstraint::_InternalSerialize( target = stream->WriteStringMaybeAliased(7, _s, target); } - // optional double dual_variable = 8; + // optional double dual_variable = 8 [json_name = "dualVariable"]; if (cached_has_bits & 0x00000004u) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteDoubleToArray( 8, this->_internal_dual_variable(), target); } - // repeated int64 subscripts = 9; + // repeated int64 subscripts = 9 [json_name = "subscripts"]; { int byte_size = _impl_._subscripts_cached_byte_size_.Get(); if (byte_size > 0) { @@ -1103,7 +1110,7 @@ ::size_t EvaluatedConstraint::ByteSizeLong() const { (void) cached_has_bits; ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); - // repeated uint64 used_decision_variable_ids = 4; + // repeated uint64 used_decision_variable_ids = 4 [json_name = "usedDecisionVariableIds"]; { std::size_t data_size = ::_pbi::WireFormatLite::UInt64Size( this->_internal_used_decision_variable_ids()) @@ -1116,14 +1123,14 @@ ::size_t EvaluatedConstraint::ByteSizeLong() const { ; total_size += tag_size + data_size; } - // map parameters = 5; + // map parameters = 5 [json_name = "parameters"]; total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_parameters_size()); for (const auto& entry : _internal_parameters()) { total_size += _pbi::MapEntryFuncs::ByteSizeLong(entry.first, entry.second); } - // repeated int64 subscripts = 9; + // repeated int64 subscripts = 9 [json_name = "subscripts"]; { std::size_t data_size = ::_pbi::WireFormatLite::Int64Size( this->_internal_subscripts()) @@ -1138,26 +1145,26 @@ ::size_t EvaluatedConstraint::ByteSizeLong() const { } cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000003u) { - // optional string name = 6; + // optional string name = 6 [json_name = "name"]; if (cached_has_bits & 0x00000001u) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->_internal_name()); } - // optional string description = 7; + // optional string description = 7 [json_name = "description"]; if (cached_has_bits & 0x00000002u) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->_internal_description()); } } - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; if (this->_internal_id() != 0) { total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( this->_internal_id()); } - // double evaluated_value = 3; + // double evaluated_value = 3 [json_name = "evaluatedValue"]; static_assert(sizeof(::uint64_t) == sizeof(double), "Code assumes ::uint64_t and double are the same size."); double tmp_evaluated_value = this->_internal_evaluated_value(); @@ -1167,12 +1174,12 @@ ::size_t EvaluatedConstraint::ByteSizeLong() const { total_size += 9; } - // optional double dual_variable = 8; + // optional double dual_variable = 8 [json_name = "dualVariable"]; if (cached_has_bits & 0x00000004u) { total_size += 9; } - // .ommx.v1.Equality equality = 2; + // .ommx.v1.Equality equality = 2 [json_name = "equality"]; if (this->_internal_equality() != 0) { total_size += 1 + ::_pbi::WireFormatLite::EnumSize(this->_internal_equality()); diff --git a/cpp/ommx/v1/constraint.pb.h b/cpp/ommx/v1/constraint.pb.h index 6654b972..491c145e 100644 --- a/cpp/ommx/v1/constraint.pb.h +++ b/cpp/ommx/v1/constraint.pb.h @@ -299,7 +299,7 @@ class EvaluatedConstraint final : public ::google::protobuf::Message kDualVariableFieldNumber = 8, kEqualityFieldNumber = 2, }; - // repeated uint64 used_decision_variable_ids = 4; + // repeated uint64 used_decision_variable_ids = 4 [json_name = "usedDecisionVariableIds"]; int used_decision_variable_ids_size() const; private: int _internal_used_decision_variable_ids_size() const; @@ -317,7 +317,7 @@ class EvaluatedConstraint final : public ::google::protobuf::Message ::google::protobuf::RepeatedField<::uint64_t>* _internal_mutable_used_decision_variable_ids(); public: - // map parameters = 5; + // map parameters = 5 [json_name = "parameters"]; int parameters_size() const; private: int _internal_parameters_size() const; @@ -332,7 +332,7 @@ class EvaluatedConstraint final : public ::google::protobuf::Message ::google::protobuf::Map* _internal_mutable_parameters(); public: - // repeated int64 subscripts = 9; + // repeated int64 subscripts = 9 [json_name = "subscripts"]; int subscripts_size() const; private: int _internal_subscripts_size() const; @@ -350,7 +350,7 @@ class EvaluatedConstraint final : public ::google::protobuf::Message ::google::protobuf::RepeatedField<::int64_t>* _internal_mutable_subscripts(); public: - // optional string name = 6; + // optional string name = 6 [json_name = "name"]; bool has_name() const; void clear_name() ; const std::string& name() const; @@ -367,7 +367,7 @@ class EvaluatedConstraint final : public ::google::protobuf::Message std::string* _internal_mutable_name(); public: - // optional string description = 7; + // optional string description = 7 [json_name = "description"]; bool has_description() const; void clear_description() ; const std::string& description() const; @@ -384,7 +384,7 @@ class EvaluatedConstraint final : public ::google::protobuf::Message std::string* _internal_mutable_description(); public: - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; void clear_id() ; ::uint64_t id() const; void set_id(::uint64_t value); @@ -394,7 +394,7 @@ class EvaluatedConstraint final : public ::google::protobuf::Message void _internal_set_id(::uint64_t value); public: - // double evaluated_value = 3; + // double evaluated_value = 3 [json_name = "evaluatedValue"]; void clear_evaluated_value() ; double evaluated_value() const; void set_evaluated_value(double value); @@ -404,7 +404,7 @@ class EvaluatedConstraint final : public ::google::protobuf::Message void _internal_set_evaluated_value(double value); public: - // optional double dual_variable = 8; + // optional double dual_variable = 8 [json_name = "dualVariable"]; bool has_dual_variable() const; void clear_dual_variable() ; double dual_variable() const; @@ -415,7 +415,7 @@ class EvaluatedConstraint final : public ::google::protobuf::Message void _internal_set_dual_variable(double value); public: - // .ommx.v1.Equality equality = 2; + // .ommx.v1.Equality equality = 2 [json_name = "equality"]; void clear_equality() ; ::ommx::v1::Equality equality() const; void set_equality(::ommx::v1::Equality value); @@ -606,7 +606,7 @@ class Constraint final : public ::google::protobuf::Message kIdFieldNumber = 1, kEqualityFieldNumber = 2, }; - // map parameters = 5; + // map parameters = 5 [json_name = "parameters"]; int parameters_size() const; private: int _internal_parameters_size() const; @@ -621,7 +621,7 @@ class Constraint final : public ::google::protobuf::Message ::google::protobuf::Map* _internal_mutable_parameters(); public: - // repeated int64 subscripts = 8; + // repeated int64 subscripts = 8 [json_name = "subscripts"]; int subscripts_size() const; private: int _internal_subscripts_size() const; @@ -639,7 +639,7 @@ class Constraint final : public ::google::protobuf::Message ::google::protobuf::RepeatedField<::int64_t>* _internal_mutable_subscripts(); public: - // optional string name = 6; + // optional string name = 6 [json_name = "name"]; bool has_name() const; void clear_name() ; const std::string& name() const; @@ -656,7 +656,7 @@ class Constraint final : public ::google::protobuf::Message std::string* _internal_mutable_name(); public: - // optional string description = 7; + // optional string description = 7 [json_name = "description"]; bool has_description() const; void clear_description() ; const std::string& description() const; @@ -673,7 +673,7 @@ class Constraint final : public ::google::protobuf::Message std::string* _internal_mutable_description(); public: - // .ommx.v1.Function function = 3; + // .ommx.v1.Function function = 3 [json_name = "function"]; bool has_function() const; void clear_function() ; const ::ommx::v1::Function& function() const; @@ -688,7 +688,7 @@ class Constraint final : public ::google::protobuf::Message ::ommx::v1::Function* _internal_mutable_function(); public: - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; void clear_id() ; ::uint64_t id() const; void set_id(::uint64_t value); @@ -698,7 +698,7 @@ class Constraint final : public ::google::protobuf::Message void _internal_set_id(::uint64_t value); public: - // .ommx.v1.Equality equality = 2; + // .ommx.v1.Equality equality = 2 [json_name = "equality"]; void clear_equality() ; ::ommx::v1::Equality equality() const; void set_equality(::ommx::v1::Equality value); @@ -771,7 +771,7 @@ class Constraint final : public ::google::protobuf::Message // Constraint -// uint64 id = 1; +// uint64 id = 1 [json_name = "id"]; inline void Constraint::clear_id() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.id_ = ::uint64_t{0u}; @@ -793,7 +793,7 @@ inline void Constraint::_internal_set_id(::uint64_t value) { _impl_.id_ = value; } -// .ommx.v1.Equality equality = 2; +// .ommx.v1.Equality equality = 2 [json_name = "equality"]; inline void Constraint::clear_equality() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.equality_ = 0; @@ -815,7 +815,7 @@ inline void Constraint::_internal_set_equality(::ommx::v1::Equality value) { _impl_.equality_ = value; } -// .ommx.v1.Function function = 3; +// .ommx.v1.Function function = 3 [json_name = "function"]; inline bool Constraint::has_function() const { bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; PROTOBUF_ASSUME(!value || _impl_.function_ != nullptr); @@ -906,7 +906,7 @@ inline void Constraint::set_allocated_function(::ommx::v1::Function* value) { // @@protoc_insertion_point(field_set_allocated:ommx.v1.Constraint.function) } -// repeated int64 subscripts = 8; +// repeated int64 subscripts = 8 [json_name = "subscripts"]; inline int Constraint::_internal_subscripts_size() const { return _internal_subscripts().size(); } @@ -951,7 +951,7 @@ inline ::google::protobuf::RepeatedField<::int64_t>* Constraint::_internal_mutab return &_impl_.subscripts_; } -// map parameters = 5; +// map parameters = 5 [json_name = "parameters"]; inline int Constraint::_internal_parameters_size() const { return _internal_parameters().size(); } @@ -979,7 +979,7 @@ inline ::google::protobuf::Map* Constraint::mutable_pa return _internal_mutable_parameters(); } -// optional string name = 6; +// optional string name = 6 [json_name = "name"]; inline bool Constraint::has_name() const { bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; return value; @@ -1050,7 +1050,7 @@ inline void Constraint::set_allocated_name(std::string* value) { // @@protoc_insertion_point(field_set_allocated:ommx.v1.Constraint.name) } -// optional string description = 7; +// optional string description = 7 [json_name = "description"]; inline bool Constraint::has_description() const { bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; return value; @@ -1127,7 +1127,7 @@ inline void Constraint::set_allocated_description(std::string* value) { // EvaluatedConstraint -// uint64 id = 1; +// uint64 id = 1 [json_name = "id"]; inline void EvaluatedConstraint::clear_id() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.id_ = ::uint64_t{0u}; @@ -1149,7 +1149,7 @@ inline void EvaluatedConstraint::_internal_set_id(::uint64_t value) { _impl_.id_ = value; } -// .ommx.v1.Equality equality = 2; +// .ommx.v1.Equality equality = 2 [json_name = "equality"]; inline void EvaluatedConstraint::clear_equality() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.equality_ = 0; @@ -1171,7 +1171,7 @@ inline void EvaluatedConstraint::_internal_set_equality(::ommx::v1::Equality val _impl_.equality_ = value; } -// double evaluated_value = 3; +// double evaluated_value = 3 [json_name = "evaluatedValue"]; inline void EvaluatedConstraint::clear_evaluated_value() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.evaluated_value_ = 0; @@ -1193,7 +1193,7 @@ inline void EvaluatedConstraint::_internal_set_evaluated_value(double value) { _impl_.evaluated_value_ = value; } -// repeated uint64 used_decision_variable_ids = 4; +// repeated uint64 used_decision_variable_ids = 4 [json_name = "usedDecisionVariableIds"]; inline int EvaluatedConstraint::_internal_used_decision_variable_ids_size() const { return _internal_used_decision_variable_ids().size(); } @@ -1238,7 +1238,7 @@ inline ::google::protobuf::RepeatedField<::uint64_t>* EvaluatedConstraint::_inte return &_impl_.used_decision_variable_ids_; } -// repeated int64 subscripts = 9; +// repeated int64 subscripts = 9 [json_name = "subscripts"]; inline int EvaluatedConstraint::_internal_subscripts_size() const { return _internal_subscripts().size(); } @@ -1283,7 +1283,7 @@ inline ::google::protobuf::RepeatedField<::int64_t>* EvaluatedConstraint::_inter return &_impl_.subscripts_; } -// map parameters = 5; +// map parameters = 5 [json_name = "parameters"]; inline int EvaluatedConstraint::_internal_parameters_size() const { return _internal_parameters().size(); } @@ -1311,7 +1311,7 @@ inline ::google::protobuf::Map* EvaluatedConstraint::m return _internal_mutable_parameters(); } -// optional string name = 6; +// optional string name = 6 [json_name = "name"]; inline bool EvaluatedConstraint::has_name() const { bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; return value; @@ -1382,7 +1382,7 @@ inline void EvaluatedConstraint::set_allocated_name(std::string* value) { // @@protoc_insertion_point(field_set_allocated:ommx.v1.EvaluatedConstraint.name) } -// optional string description = 7; +// optional string description = 7 [json_name = "description"]; inline bool EvaluatedConstraint::has_description() const { bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; return value; @@ -1453,7 +1453,7 @@ inline void EvaluatedConstraint::set_allocated_description(std::string* value) { // @@protoc_insertion_point(field_set_allocated:ommx.v1.EvaluatedConstraint.description) } -// optional double dual_variable = 8; +// optional double dual_variable = 8 [json_name = "dualVariable"]; inline bool EvaluatedConstraint::has_dual_variable() const { bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; return value; diff --git a/cpp/ommx/v1/decision_variables.pb.cc b/cpp/ommx/v1/decision_variables.pb.cc index 6a4261c8..a7b9b85e 100644 --- a/cpp/ommx/v1/decision_variables.pb.cc +++ b/cpp/ommx/v1/decision_variables.pb.cc @@ -155,25 +155,30 @@ static const ::_pb::Message* const file_default_instances[] = { const char descriptor_table_protodef_ommx_2fv1_2fdecision_5fvariables_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( protodesc_cold) = { "\n ommx/v1/decision_variables.proto\022\007ommx" - ".v1\"%\n\005Bound\022\r\n\005lower\030\001 \001(\001\022\r\n\005upper\030\002 \001" - "(\001\"\316\003\n\020DecisionVariable\022\n\n\002id\030\001 \001(\004\022,\n\004k" - "ind\030\002 \001(\0162\036.ommx.v1.DecisionVariable.Kin" - "d\022\"\n\005bound\030\003 \001(\0132\016.ommx.v1.BoundH\000\210\001\001\022\021\n" - "\004name\030\004 \001(\tH\001\210\001\001\022\022\n\nsubscripts\030\005 \003(\003\022=\n\n" - "parameters\030\006 \003(\0132).ommx.v1.DecisionVaria" - "ble.ParametersEntry\022\030\n\013description\030\007 \001(\t" - "H\002\210\001\001\0321\n\017ParametersEntry\022\013\n\003key\030\001 \001(\t\022\r\n" - "\005value\030\002 \001(\t:\0028\001\"\205\001\n\004Kind\022\024\n\020KIND_UNSPEC" - "IFIED\020\000\022\017\n\013KIND_BINARY\020\001\022\020\n\014KIND_INTEGER" - "\020\002\022\023\n\017KIND_CONTINUOUS\020\003\022\025\n\021KIND_SEMI_INT" - "EGER\020\004\022\030\n\024KIND_SEMI_CONTINUOUS\020\005B\010\n\006_bou" - "ndB\007\n\005_nameB\016\n\014_descriptionb\006proto3" + ".v1\"3\n\005Bound\022\024\n\005lower\030\001 \001(\001R\005lower\022\024\n\005up" + "per\030\002 \001(\001R\005upper\"\226\004\n\020DecisionVariable\022\016\n" + "\002id\030\001 \001(\004R\002id\0222\n\004kind\030\002 \001(\0162\036.ommx.v1.De" + "cisionVariable.KindR\004kind\022)\n\005bound\030\003 \001(\013" + "2\016.ommx.v1.BoundH\000R\005bound\210\001\001\022\027\n\004name\030\004 \001" + "(\tH\001R\004name\210\001\001\022\036\n\nsubscripts\030\005 \003(\003R\nsubsc" + "ripts\022I\n\nparameters\030\006 \003(\0132).ommx.v1.Deci" + "sionVariable.ParametersEntryR\nparameters" + "\022%\n\013description\030\007 \001(\tH\002R\013description\210\001\001\032" + "=\n\017ParametersEntry\022\020\n\003key\030\001 \001(\tR\003key\022\024\n\005" + "value\030\002 \001(\tR\005value:\0028\001\"\205\001\n\004Kind\022\024\n\020KIND_" + "UNSPECIFIED\020\000\022\017\n\013KIND_BINARY\020\001\022\020\n\014KIND_I" + "NTEGER\020\002\022\023\n\017KIND_CONTINUOUS\020\003\022\025\n\021KIND_SE" + "MI_INTEGER\020\004\022\030\n\024KIND_SEMI_CONTINUOUS\020\005B\010" + "\n\006_boundB\007\n\005_nameB\016\n\014_descriptionBb\n\013com" + ".ommx.v1B\026DecisionVariablesProtoP\001\242\002\003OXX" + "\252\002\007Ommx.V1\312\002\007Ommx\\V1\342\002\023Ommx\\V1\\GPBMetada" + "ta\352\002\010Ommx::V1b\006proto3" }; static ::absl::once_flag descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto_once; PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto = { false, false, - 555, + 741, descriptor_table_protodef_ommx_2fv1_2fdecision_5fvariables_2eproto, "ommx/v1/decision_variables.proto", &descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto_once, @@ -291,19 +296,19 @@ const ::_pbi::TcParseTable<1, 2, 0, 0, 2> Bound::_table_ = { ::_pbi::TcParser::GetTable<::ommx::v1::Bound>(), // to_prefetch #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ - // double upper = 2; + // double upper = 2 [json_name = "upper"]; {::_pbi::TcParser::FastF64S1, {17, 63, 0, PROTOBUF_FIELD_OFFSET(Bound, _impl_.upper_)}}, - // double lower = 1; + // double lower = 1 [json_name = "lower"]; {::_pbi::TcParser::FastF64S1, {9, 63, 0, PROTOBUF_FIELD_OFFSET(Bound, _impl_.lower_)}}, }}, {{ 65535, 65535 }}, {{ - // double lower = 1; + // double lower = 1 [json_name = "lower"]; {PROTOBUF_FIELD_OFFSET(Bound, _impl_.lower_), 0, 0, (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, - // double upper = 2; + // double upper = 2 [json_name = "upper"]; {PROTOBUF_FIELD_OFFSET(Bound, _impl_.upper_), 0, 0, (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, }}, @@ -332,7 +337,7 @@ ::uint8_t* Bound::_InternalSerialize( ::uint32_t cached_has_bits = 0; (void)cached_has_bits; - // double lower = 1; + // double lower = 1 [json_name = "lower"]; static_assert(sizeof(::uint64_t) == sizeof(double), "Code assumes ::uint64_t and double are the same size."); double tmp_lower = this->_internal_lower(); @@ -344,7 +349,7 @@ ::uint8_t* Bound::_InternalSerialize( 1, this->_internal_lower(), target); } - // double upper = 2; + // double upper = 2 [json_name = "upper"]; static_assert(sizeof(::uint64_t) == sizeof(double), "Code assumes ::uint64_t and double are the same size."); double tmp_upper = this->_internal_upper(); @@ -374,7 +379,7 @@ ::size_t Bound::ByteSizeLong() const { (void) cached_has_bits; ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); - // double lower = 1; + // double lower = 1 [json_name = "lower"]; static_assert(sizeof(::uint64_t) == sizeof(double), "Code assumes ::uint64_t and double are the same size."); double tmp_lower = this->_internal_lower(); @@ -384,7 +389,7 @@ ::size_t Bound::ByteSizeLong() const { total_size += 9; } - // double upper = 2; + // double upper = 2 [json_name = "upper"]; static_assert(sizeof(::uint64_t) == sizeof(double), "Code assumes ::uint64_t and double are the same size."); double tmp_upper = this->_internal_upper(); @@ -592,47 +597,47 @@ const ::_pbi::TcParseTable<3, 7, 2, 58, 2> DecisionVariable::_table_ = { #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ {::_pbi::TcParser::MiniParse, {}}, - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(DecisionVariable, _impl_.id_), 63>(), {8, 63, 0, PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.id_)}}, - // .ommx.v1.DecisionVariable.Kind kind = 2; + // .ommx.v1.DecisionVariable.Kind kind = 2 [json_name = "kind"]; {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(DecisionVariable, _impl_.kind_), 63>(), {16, 63, 0, PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.kind_)}}, - // optional .ommx.v1.Bound bound = 3; + // optional .ommx.v1.Bound bound = 3 [json_name = "bound"]; {::_pbi::TcParser::FastMtS1, {26, 2, 0, PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.bound_)}}, - // optional string name = 4; + // optional string name = 4 [json_name = "name"]; {::_pbi::TcParser::FastUS1, {34, 0, 0, PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.name_)}}, - // repeated int64 subscripts = 5; + // repeated int64 subscripts = 5 [json_name = "subscripts"]; {::_pbi::TcParser::FastV64P1, {42, 63, 0, PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.subscripts_)}}, {::_pbi::TcParser::MiniParse, {}}, - // optional string description = 7; + // optional string description = 7 [json_name = "description"]; {::_pbi::TcParser::FastUS1, {58, 1, 0, PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.description_)}}, }}, {{ 65535, 65535 }}, {{ - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; {PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.id_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, - // .ommx.v1.DecisionVariable.Kind kind = 2; + // .ommx.v1.DecisionVariable.Kind kind = 2 [json_name = "kind"]; {PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.kind_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, - // optional .ommx.v1.Bound bound = 3; + // optional .ommx.v1.Bound bound = 3 [json_name = "bound"]; {PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.bound_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, - // optional string name = 4; + // optional string name = 4 [json_name = "name"]; {PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // repeated int64 subscripts = 5; + // repeated int64 subscripts = 5 [json_name = "subscripts"]; {PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.subscripts_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedInt64)}, - // map parameters = 6; + // map parameters = 6 [json_name = "parameters"]; {PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.parameters_), -1, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMap)}, - // optional string description = 7; + // optional string description = 7 [json_name = "description"]; {PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_.description_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, }}, {{ @@ -686,14 +691,14 @@ ::uint8_t* DecisionVariable::_InternalSerialize( ::uint32_t cached_has_bits = 0; (void)cached_has_bits; - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; if (this->_internal_id() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray( 1, this->_internal_id(), target); } - // .ommx.v1.DecisionVariable.Kind kind = 2; + // .ommx.v1.DecisionVariable.Kind kind = 2 [json_name = "kind"]; if (this->_internal_kind() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( @@ -701,13 +706,13 @@ ::uint8_t* DecisionVariable::_InternalSerialize( } cached_has_bits = _impl_._has_bits_[0]; - // optional .ommx.v1.Bound bound = 3; + // optional .ommx.v1.Bound bound = 3 [json_name = "bound"]; if (cached_has_bits & 0x00000004u) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 3, *_impl_.bound_, _impl_.bound_->GetCachedSize(), target, stream); } - // optional string name = 4; + // optional string name = 4 [json_name = "name"]; if (cached_has_bits & 0x00000001u) { const std::string& _s = this->_internal_name(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -715,7 +720,7 @@ ::uint8_t* DecisionVariable::_InternalSerialize( target = stream->WriteStringMaybeAliased(4, _s, target); } - // repeated int64 subscripts = 5; + // repeated int64 subscripts = 5 [json_name = "subscripts"]; { int byte_size = _impl_._subscripts_cached_byte_size_.Get(); if (byte_size > 0) { @@ -724,7 +729,7 @@ ::uint8_t* DecisionVariable::_InternalSerialize( } } - // map parameters = 6; + // map parameters = 6 [json_name = "parameters"]; if (!_internal_parameters().empty()) { using MapType = ::google::protobuf::Map; using WireHelper = _pbi::MapEntryFuncs_internal_description(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -783,7 +788,7 @@ ::size_t DecisionVariable::ByteSizeLong() const { (void) cached_has_bits; ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); - // repeated int64 subscripts = 5; + // repeated int64 subscripts = 5 [json_name = "subscripts"]; { std::size_t data_size = ::_pbi::WireFormatLite::Int64Size( this->_internal_subscripts()) @@ -796,7 +801,7 @@ ::size_t DecisionVariable::ByteSizeLong() const { ; total_size += tag_size + data_size; } - // map parameters = 6; + // map parameters = 6 [json_name = "parameters"]; total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_parameters_size()); for (const auto& entry : _internal_parameters()) { total_size += _pbi::MapEntryFuncs_internal_name()); } - // optional string description = 7; + // optional string description = 7 [json_name = "description"]; if (cached_has_bits & 0x00000002u) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->_internal_description()); } - // optional .ommx.v1.Bound bound = 3; + // optional .ommx.v1.Bound bound = 3 [json_name = "bound"]; if (cached_has_bits & 0x00000004u) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.bound_); } } - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; if (this->_internal_id() != 0) { total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( this->_internal_id()); } - // .ommx.v1.DecisionVariable.Kind kind = 2; + // .ommx.v1.DecisionVariable.Kind kind = 2 [json_name = "kind"]; if (this->_internal_kind() != 0) { total_size += 1 + ::_pbi::WireFormatLite::EnumSize(this->_internal_kind()); diff --git a/cpp/ommx/v1/decision_variables.pb.h b/cpp/ommx/v1/decision_variables.pb.h index 0a8730de..bb6d32ee 100644 --- a/cpp/ommx/v1/decision_variables.pb.h +++ b/cpp/ommx/v1/decision_variables.pb.h @@ -267,7 +267,7 @@ class Bound final : public ::google::protobuf::Message kLowerFieldNumber = 1, kUpperFieldNumber = 2, }; - // double lower = 1; + // double lower = 1 [json_name = "lower"]; void clear_lower() ; double lower() const; void set_lower(double value); @@ -277,7 +277,7 @@ class Bound final : public ::google::protobuf::Message void _internal_set_lower(double value); public: - // double upper = 2; + // double upper = 2 [json_name = "upper"]; void clear_upper() ; double upper() const; void set_upper(double value); @@ -478,7 +478,7 @@ class DecisionVariable final : public ::google::protobuf::Message kIdFieldNumber = 1, kKindFieldNumber = 2, }; - // repeated int64 subscripts = 5; + // repeated int64 subscripts = 5 [json_name = "subscripts"]; int subscripts_size() const; private: int _internal_subscripts_size() const; @@ -496,7 +496,7 @@ class DecisionVariable final : public ::google::protobuf::Message ::google::protobuf::RepeatedField<::int64_t>* _internal_mutable_subscripts(); public: - // map parameters = 6; + // map parameters = 6 [json_name = "parameters"]; int parameters_size() const; private: int _internal_parameters_size() const; @@ -511,7 +511,7 @@ class DecisionVariable final : public ::google::protobuf::Message ::google::protobuf::Map* _internal_mutable_parameters(); public: - // optional string name = 4; + // optional string name = 4 [json_name = "name"]; bool has_name() const; void clear_name() ; const std::string& name() const; @@ -528,7 +528,7 @@ class DecisionVariable final : public ::google::protobuf::Message std::string* _internal_mutable_name(); public: - // optional string description = 7; + // optional string description = 7 [json_name = "description"]; bool has_description() const; void clear_description() ; const std::string& description() const; @@ -545,7 +545,7 @@ class DecisionVariable final : public ::google::protobuf::Message std::string* _internal_mutable_description(); public: - // optional .ommx.v1.Bound bound = 3; + // optional .ommx.v1.Bound bound = 3 [json_name = "bound"]; bool has_bound() const; void clear_bound() ; const ::ommx::v1::Bound& bound() const; @@ -560,7 +560,7 @@ class DecisionVariable final : public ::google::protobuf::Message ::ommx::v1::Bound* _internal_mutable_bound(); public: - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; void clear_id() ; ::uint64_t id() const; void set_id(::uint64_t value); @@ -570,7 +570,7 @@ class DecisionVariable final : public ::google::protobuf::Message void _internal_set_id(::uint64_t value); public: - // .ommx.v1.DecisionVariable.Kind kind = 2; + // .ommx.v1.DecisionVariable.Kind kind = 2 [json_name = "kind"]; void clear_kind() ; ::ommx::v1::DecisionVariable_Kind kind() const; void set_kind(::ommx::v1::DecisionVariable_Kind value); @@ -641,7 +641,7 @@ class DecisionVariable final : public ::google::protobuf::Message // Bound -// double lower = 1; +// double lower = 1 [json_name = "lower"]; inline void Bound::clear_lower() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.lower_ = 0; @@ -663,7 +663,7 @@ inline void Bound::_internal_set_lower(double value) { _impl_.lower_ = value; } -// double upper = 2; +// double upper = 2 [json_name = "upper"]; inline void Bound::clear_upper() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.upper_ = 0; @@ -691,7 +691,7 @@ inline void Bound::_internal_set_upper(double value) { // DecisionVariable -// uint64 id = 1; +// uint64 id = 1 [json_name = "id"]; inline void DecisionVariable::clear_id() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.id_ = ::uint64_t{0u}; @@ -713,7 +713,7 @@ inline void DecisionVariable::_internal_set_id(::uint64_t value) { _impl_.id_ = value; } -// .ommx.v1.DecisionVariable.Kind kind = 2; +// .ommx.v1.DecisionVariable.Kind kind = 2 [json_name = "kind"]; inline void DecisionVariable::clear_kind() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.kind_ = 0; @@ -735,7 +735,7 @@ inline void DecisionVariable::_internal_set_kind(::ommx::v1::DecisionVariable_Ki _impl_.kind_ = value; } -// optional .ommx.v1.Bound bound = 3; +// optional .ommx.v1.Bound bound = 3 [json_name = "bound"]; inline bool DecisionVariable::has_bound() const { bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; PROTOBUF_ASSUME(!value || _impl_.bound_ != nullptr); @@ -831,7 +831,7 @@ inline void DecisionVariable::set_allocated_bound(::ommx::v1::Bound* value) { // @@protoc_insertion_point(field_set_allocated:ommx.v1.DecisionVariable.bound) } -// optional string name = 4; +// optional string name = 4 [json_name = "name"]; inline bool DecisionVariable::has_name() const { bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; return value; @@ -902,7 +902,7 @@ inline void DecisionVariable::set_allocated_name(std::string* value) { // @@protoc_insertion_point(field_set_allocated:ommx.v1.DecisionVariable.name) } -// repeated int64 subscripts = 5; +// repeated int64 subscripts = 5 [json_name = "subscripts"]; inline int DecisionVariable::_internal_subscripts_size() const { return _internal_subscripts().size(); } @@ -947,7 +947,7 @@ inline ::google::protobuf::RepeatedField<::int64_t>* DecisionVariable::_internal return &_impl_.subscripts_; } -// map parameters = 6; +// map parameters = 6 [json_name = "parameters"]; inline int DecisionVariable::_internal_parameters_size() const { return _internal_parameters().size(); } @@ -975,7 +975,7 @@ inline ::google::protobuf::Map* DecisionVariable::muta return _internal_mutable_parameters(); } -// optional string description = 7; +// optional string description = 7 [json_name = "description"]; inline bool DecisionVariable::has_description() const { bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; return value; diff --git a/cpp/ommx/v1/function.pb.cc b/cpp/ommx/v1/function.pb.cc index fe4e04ac..cc33f1bc 100644 --- a/cpp/ommx/v1/function.pb.cc +++ b/cpp/ommx/v1/function.pb.cc @@ -80,11 +80,15 @@ const char descriptor_table_protodef_ommx_2fv1_2ffunction_2eproto[] ABSL_ATTRIBU protodesc_cold) = { "\n\026ommx/v1/function.proto\022\007ommx.v1\032\024ommx/" "v1/linear.proto\032\030ommx/v1/polynomial.prot" - "o\032\027ommx/v1/quadratic.proto\"\241\001\n\010Function\022" - "\022\n\010constant\030\001 \001(\001H\000\022!\n\006linear\030\002 \001(\0132\017.om" - "mx.v1.LinearH\000\022\'\n\tquadratic\030\003 \001(\0132\022.ommx" - ".v1.QuadraticH\000\022)\n\npolynomial\030\004 \001(\0132\023.om" - "mx.v1.PolynomialH\000B\n\n\010functionb\006proto3" + "o\032\027ommx/v1/quadratic.proto\"\312\001\n\010Function\022" + "\034\n\010constant\030\001 \001(\001H\000R\010constant\022)\n\006linear\030" + "\002 \001(\0132\017.ommx.v1.LinearH\000R\006linear\0222\n\tquad" + "ratic\030\003 \001(\0132\022.ommx.v1.QuadraticH\000R\tquadr" + "atic\0225\n\npolynomial\030\004 \001(\0132\023.ommx.v1.Polyn" + "omialH\000R\npolynomialB\n\n\010functionBY\n\013com.o" + "mmx.v1B\rFunctionProtoP\001\242\002\003OXX\252\002\007Ommx.V1\312" + "\002\007Ommx\\V1\342\002\023Ommx\\V1\\GPBMetadata\352\002\010Ommx::" + "V1b\006proto3" }; static const ::_pbi::DescriptorTable* const descriptor_table_ommx_2fv1_2ffunction_2eproto_deps[3] = { @@ -96,7 +100,7 @@ static ::absl::once_flag descriptor_table_ommx_2fv1_2ffunction_2eproto_once; PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2ffunction_2eproto = { false, false, - 278, + 410, descriptor_table_protodef_ommx_2fv1_2ffunction_2eproto, "ommx/v1/function.proto", &descriptor_table_ommx_2fv1_2ffunction_2eproto_once, @@ -337,16 +341,16 @@ const ::_pbi::TcParseTable<0, 4, 3, 0, 2> Function::_table_ = { }}, {{ 65535, 65535 }}, {{ - // double constant = 1; + // double constant = 1 [json_name = "constant"]; {PROTOBUF_FIELD_OFFSET(Function, _impl_.function_.constant_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kDouble)}, - // .ommx.v1.Linear linear = 2; + // .ommx.v1.Linear linear = 2 [json_name = "linear"]; {PROTOBUF_FIELD_OFFSET(Function, _impl_.function_.linear_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .ommx.v1.Quadratic quadratic = 3; + // .ommx.v1.Quadratic quadratic = 3 [json_name = "quadratic"]; {PROTOBUF_FIELD_OFFSET(Function, _impl_.function_.quadratic_), _Internal::kOneofCaseOffset + 0, 1, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .ommx.v1.Polynomial polynomial = 4; + // .ommx.v1.Polynomial polynomial = 4 [json_name = "polynomial"]; {PROTOBUF_FIELD_OFFSET(Function, _impl_.function_.polynomial_), _Internal::kOneofCaseOffset + 0, 2, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, }}, {{ @@ -418,24 +422,24 @@ ::size_t Function::ByteSizeLong() const { (void) cached_has_bits; switch (function_case()) { - // double constant = 1; + // double constant = 1 [json_name = "constant"]; case kConstant: { total_size += 9; break; } - // .ommx.v1.Linear linear = 2; + // .ommx.v1.Linear linear = 2 [json_name = "linear"]; case kLinear: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.function_.linear_); break; } - // .ommx.v1.Quadratic quadratic = 3; + // .ommx.v1.Quadratic quadratic = 3 [json_name = "quadratic"]; case kQuadratic: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.function_.quadratic_); break; } - // .ommx.v1.Polynomial polynomial = 4; + // .ommx.v1.Polynomial polynomial = 4 [json_name = "polynomial"]; case kPolynomial: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.function_.polynomial_); diff --git a/cpp/ommx/v1/function.pb.h b/cpp/ommx/v1/function.pb.h index 86193341..d9d3b5c1 100644 --- a/cpp/ommx/v1/function.pb.h +++ b/cpp/ommx/v1/function.pb.h @@ -208,7 +208,7 @@ class Function final : public ::google::protobuf::Message kQuadraticFieldNumber = 3, kPolynomialFieldNumber = 4, }; - // double constant = 1; + // double constant = 1 [json_name = "constant"]; bool has_constant() const; void clear_constant() ; double constant() const; @@ -219,7 +219,7 @@ class Function final : public ::google::protobuf::Message void _internal_set_constant(double value); public: - // .ommx.v1.Linear linear = 2; + // .ommx.v1.Linear linear = 2 [json_name = "linear"]; bool has_linear() const; private: bool _internal_has_linear() const; @@ -238,7 +238,7 @@ class Function final : public ::google::protobuf::Message ::ommx::v1::Linear* _internal_mutable_linear(); public: - // .ommx.v1.Quadratic quadratic = 3; + // .ommx.v1.Quadratic quadratic = 3 [json_name = "quadratic"]; bool has_quadratic() const; private: bool _internal_has_quadratic() const; @@ -257,7 +257,7 @@ class Function final : public ::google::protobuf::Message ::ommx::v1::Quadratic* _internal_mutable_quadratic(); public: - // .ommx.v1.Polynomial polynomial = 4; + // .ommx.v1.Polynomial polynomial = 4 [json_name = "polynomial"]; bool has_polynomial() const; private: bool _internal_has_polynomial() const; @@ -342,7 +342,7 @@ class Function final : public ::google::protobuf::Message // Function -// double constant = 1; +// double constant = 1 [json_name = "constant"]; inline bool Function::has_constant() const { return function_case() == kConstant; } @@ -375,7 +375,7 @@ inline double Function::_internal_constant() const { return 0; } -// .ommx.v1.Linear linear = 2; +// .ommx.v1.Linear linear = 2 [json_name = "linear"]; inline bool Function::has_linear() const { return function_case() == kLinear; } @@ -443,7 +443,7 @@ inline ::ommx::v1::Linear* Function::mutable_linear() ABSL_ATTRIBUTE_LIFETIME_BO return _msg; } -// .ommx.v1.Quadratic quadratic = 3; +// .ommx.v1.Quadratic quadratic = 3 [json_name = "quadratic"]; inline bool Function::has_quadratic() const { return function_case() == kQuadratic; } @@ -511,7 +511,7 @@ inline ::ommx::v1::Quadratic* Function::mutable_quadratic() ABSL_ATTRIBUTE_LIFET return _msg; } -// .ommx.v1.Polynomial polynomial = 4; +// .ommx.v1.Polynomial polynomial = 4 [json_name = "polynomial"]; inline bool Function::has_polynomial() const { return function_case() == kPolynomial; } diff --git a/cpp/ommx/v1/instance.pb.cc b/cpp/ommx/v1/instance.pb.cc index c663c5f0..60b44569 100644 --- a/cpp/ommx/v1/instance.pb.cc +++ b/cpp/ommx/v1/instance.pb.cc @@ -133,19 +133,24 @@ const char descriptor_table_protodef_ommx_2fv1_2finstance_2eproto[] ABSL_ATTRIBU protodesc_cold) = { "\n\026ommx/v1/instance.proto\022\007ommx.v1\032\030ommx/" "v1/constraint.proto\032 ommx/v1/decision_va" - "riables.proto\032\026ommx/v1/function.proto\"\304\003" - "\n\010Instance\0222\n\013description\030\001 \001(\0132\035.ommx.v" - "1.Instance.Description\0225\n\022decision_varia" - "bles\030\002 \003(\0132\031.ommx.v1.DecisionVariable\022$\n" - "\tobjective\030\003 \001(\0132\021.ommx.v1.Function\022(\n\013c" - "onstraints\030\004 \003(\0132\023.ommx.v1.Constraint\022&\n" - "\005sense\030\005 \001(\0162\027.ommx.v1.Instance.Sense\032\214\001" - "\n\013Description\022\021\n\004name\030\001 \001(\tH\000\210\001\001\022\030\n\013desc" - "ription\030\002 \001(\tH\001\210\001\001\022\017\n\007authors\030\003 \003(\t\022\027\n\nc" - "reated_by\030\004 \001(\tH\002\210\001\001B\007\n\005_nameB\016\n\014_descri" - "ptionB\r\n\013_created_by\"F\n\005Sense\022\025\n\021SENSE_U" - "NSPECIFIED\020\000\022\022\n\016SENSE_MINIMIZE\020\001\022\022\n\016SENS" - "E_MAXIMIZE\020\002b\006proto3" + "riables.proto\032\026ommx/v1/function.proto\"\252\004" + "\n\010Instance\022\?\n\013description\030\001 \001(\0132\035.ommx.v" + "1.Instance.DescriptionR\013description\022H\n\022d" + "ecision_variables\030\002 \003(\0132\031.ommx.v1.Decisi" + "onVariableR\021decisionVariables\022/\n\tobjecti" + "ve\030\003 \001(\0132\021.ommx.v1.FunctionR\tobjective\0225" + "\n\013constraints\030\004 \003(\0132\023.ommx.v1.Constraint" + "R\013constraints\022-\n\005sense\030\005 \001(\0162\027.ommx.v1.I" + "nstance.SenseR\005sense\032\263\001\n\013Description\022\027\n\004" + "name\030\001 \001(\tH\000R\004name\210\001\001\022%\n\013description\030\002 \001" + "(\tH\001R\013description\210\001\001\022\030\n\007authors\030\003 \003(\tR\007a" + "uthors\022\"\n\ncreated_by\030\004 \001(\tH\002R\tcreatedBy\210" + "\001\001B\007\n\005_nameB\016\n\014_descriptionB\r\n\013_created_" + "by\"F\n\005Sense\022\025\n\021SENSE_UNSPECIFIED\020\000\022\022\n\016SE" + "NSE_MINIMIZE\020\001\022\022\n\016SENSE_MAXIMIZE\020\002BY\n\013co" + "m.ommx.v1B\rInstanceProtoP\001\242\002\003OXX\252\002\007Ommx." + "V1\312\002\007Ommx\\V1\342\002\023Ommx\\V1\\GPBMetadata\352\002\010Omm" + "x::V1b\006proto3" }; static const ::_pbi::DescriptorTable* const descriptor_table_ommx_2fv1_2finstance_2eproto_deps[3] = { @@ -157,7 +162,7 @@ static ::absl::once_flag descriptor_table_ommx_2fv1_2finstance_2eproto_once; PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2finstance_2eproto = { false, false, - 580, + 773, descriptor_table_protodef_ommx_2fv1_2finstance_2eproto, "ommx/v1/instance.proto", &descriptor_table_ommx_2fv1_2finstance_2eproto_once, @@ -294,31 +299,31 @@ const ::_pbi::TcParseTable<2, 4, 0, 69, 2> Instance_Description::_table_ = { ::_pbi::TcParser::GetTable<::ommx::v1::Instance_Description>(), // to_prefetch #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ - // optional string created_by = 4; + // optional string created_by = 4 [json_name = "createdBy"]; {::_pbi::TcParser::FastUS1, {34, 2, 0, PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_.created_by_)}}, - // optional string name = 1; + // optional string name = 1 [json_name = "name"]; {::_pbi::TcParser::FastUS1, {10, 0, 0, PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_.name_)}}, - // optional string description = 2; + // optional string description = 2 [json_name = "description"]; {::_pbi::TcParser::FastUS1, {18, 1, 0, PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_.description_)}}, - // repeated string authors = 3; + // repeated string authors = 3 [json_name = "authors"]; {::_pbi::TcParser::FastUR1, {26, 63, 0, PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_.authors_)}}, }}, {{ 65535, 65535 }}, {{ - // optional string name = 1; + // optional string name = 1 [json_name = "name"]; {PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_.name_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // optional string description = 2; + // optional string description = 2 [json_name = "description"]; {PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_.description_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // repeated string authors = 3; + // repeated string authors = 3 [json_name = "authors"]; {PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_.authors_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)}, - // optional string created_by = 4; + // optional string created_by = 4 [json_name = "createdBy"]; {PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_.created_by_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kUtf8String | ::_fl::kRepAString)}, }}, @@ -365,7 +370,7 @@ ::uint8_t* Instance_Description::_InternalSerialize( (void)cached_has_bits; cached_has_bits = _impl_._has_bits_[0]; - // optional string name = 1; + // optional string name = 1 [json_name = "name"]; if (cached_has_bits & 0x00000001u) { const std::string& _s = this->_internal_name(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -373,7 +378,7 @@ ::uint8_t* Instance_Description::_InternalSerialize( target = stream->WriteStringMaybeAliased(1, _s, target); } - // optional string description = 2; + // optional string description = 2 [json_name = "description"]; if (cached_has_bits & 0x00000002u) { const std::string& _s = this->_internal_description(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -381,7 +386,7 @@ ::uint8_t* Instance_Description::_InternalSerialize( target = stream->WriteStringMaybeAliased(2, _s, target); } - // repeated string authors = 3; + // repeated string authors = 3 [json_name = "authors"]; for (int i = 0, n = this->_internal_authors_size(); i < n; ++i) { const auto& s = this->_internal_authors().Get(i); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -389,7 +394,7 @@ ::uint8_t* Instance_Description::_InternalSerialize( target = stream->WriteString(3, s, target); } - // optional string created_by = 4; + // optional string created_by = 4 [json_name = "createdBy"]; if (cached_has_bits & 0x00000004u) { const std::string& _s = this->_internal_created_by(); ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( @@ -415,7 +420,7 @@ ::size_t Instance_Description::ByteSizeLong() const { (void) cached_has_bits; ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); - // repeated string authors = 3; + // repeated string authors = 3 [json_name = "authors"]; total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_authors().size()); for (int i = 0, n = _internal_authors().size(); i < n; ++i) { total_size += ::google::protobuf::internal::WireFormatLite::StringSize( @@ -423,19 +428,19 @@ ::size_t Instance_Description::ByteSizeLong() const { } cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000007u) { - // optional string name = 1; + // optional string name = 1 [json_name = "name"]; if (cached_has_bits & 0x00000001u) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->_internal_name()); } - // optional string description = 2; + // optional string description = 2 [json_name = "description"]; if (cached_has_bits & 0x00000002u) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->_internal_description()); } - // optional string created_by = 4; + // optional string created_by = 4 [json_name = "createdBy"]; if (cached_has_bits & 0x00000004u) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->_internal_created_by()); @@ -618,19 +623,19 @@ const ::_pbi::TcParseTable<3, 5, 4, 0, 2> Instance::_table_ = { #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ {::_pbi::TcParser::MiniParse, {}}, - // .ommx.v1.Instance.Description description = 1; + // .ommx.v1.Instance.Description description = 1 [json_name = "description"]; {::_pbi::TcParser::FastMtS1, {10, 0, 0, PROTOBUF_FIELD_OFFSET(Instance, _impl_.description_)}}, - // repeated .ommx.v1.DecisionVariable decision_variables = 2; + // repeated .ommx.v1.DecisionVariable decision_variables = 2 [json_name = "decisionVariables"]; {::_pbi::TcParser::FastMtR1, {18, 63, 1, PROTOBUF_FIELD_OFFSET(Instance, _impl_.decision_variables_)}}, - // .ommx.v1.Function objective = 3; + // .ommx.v1.Function objective = 3 [json_name = "objective"]; {::_pbi::TcParser::FastMtS1, {26, 1, 2, PROTOBUF_FIELD_OFFSET(Instance, _impl_.objective_)}}, - // repeated .ommx.v1.Constraint constraints = 4; + // repeated .ommx.v1.Constraint constraints = 4 [json_name = "constraints"]; {::_pbi::TcParser::FastMtR1, {34, 63, 3, PROTOBUF_FIELD_OFFSET(Instance, _impl_.constraints_)}}, - // .ommx.v1.Instance.Sense sense = 5; + // .ommx.v1.Instance.Sense sense = 5 [json_name = "sense"]; {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Instance, _impl_.sense_), 63>(), {40, 63, 0, PROTOBUF_FIELD_OFFSET(Instance, _impl_.sense_)}}, {::_pbi::TcParser::MiniParse, {}}, @@ -638,19 +643,19 @@ const ::_pbi::TcParseTable<3, 5, 4, 0, 2> Instance::_table_ = { }}, {{ 65535, 65535 }}, {{ - // .ommx.v1.Instance.Description description = 1; + // .ommx.v1.Instance.Description description = 1 [json_name = "description"]; {PROTOBUF_FIELD_OFFSET(Instance, _impl_.description_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, - // repeated .ommx.v1.DecisionVariable decision_variables = 2; + // repeated .ommx.v1.DecisionVariable decision_variables = 2 [json_name = "decisionVariables"]; {PROTOBUF_FIELD_OFFSET(Instance, _impl_.decision_variables_), -1, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // .ommx.v1.Function objective = 3; + // .ommx.v1.Function objective = 3 [json_name = "objective"]; {PROTOBUF_FIELD_OFFSET(Instance, _impl_.objective_), _Internal::kHasBitsOffset + 1, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, - // repeated .ommx.v1.Constraint constraints = 4; + // repeated .ommx.v1.Constraint constraints = 4 [json_name = "constraints"]; {PROTOBUF_FIELD_OFFSET(Instance, _impl_.constraints_), -1, 3, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // .ommx.v1.Instance.Sense sense = 5; + // .ommx.v1.Instance.Sense sense = 5 [json_name = "sense"]; {PROTOBUF_FIELD_OFFSET(Instance, _impl_.sense_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, }}, {{ @@ -695,13 +700,13 @@ ::uint8_t* Instance::_InternalSerialize( (void)cached_has_bits; cached_has_bits = _impl_._has_bits_[0]; - // .ommx.v1.Instance.Description description = 1; + // .ommx.v1.Instance.Description description = 1 [json_name = "description"]; if (cached_has_bits & 0x00000001u) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 1, *_impl_.description_, _impl_.description_->GetCachedSize(), target, stream); } - // repeated .ommx.v1.DecisionVariable decision_variables = 2; + // repeated .ommx.v1.DecisionVariable decision_variables = 2 [json_name = "decisionVariables"]; for (unsigned i = 0, n = static_cast( this->_internal_decision_variables_size()); i < n; i++) { @@ -712,13 +717,13 @@ ::uint8_t* Instance::_InternalSerialize( target, stream); } - // .ommx.v1.Function objective = 3; + // .ommx.v1.Function objective = 3 [json_name = "objective"]; if (cached_has_bits & 0x00000002u) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 3, *_impl_.objective_, _impl_.objective_->GetCachedSize(), target, stream); } - // repeated .ommx.v1.Constraint constraints = 4; + // repeated .ommx.v1.Constraint constraints = 4 [json_name = "constraints"]; for (unsigned i = 0, n = static_cast( this->_internal_constraints_size()); i < n; i++) { @@ -729,7 +734,7 @@ ::uint8_t* Instance::_InternalSerialize( target, stream); } - // .ommx.v1.Instance.Sense sense = 5; + // .ommx.v1.Instance.Sense sense = 5 [json_name = "sense"]; if (this->_internal_sense() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( @@ -754,32 +759,32 @@ ::size_t Instance::ByteSizeLong() const { (void) cached_has_bits; ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); - // repeated .ommx.v1.DecisionVariable decision_variables = 2; + // repeated .ommx.v1.DecisionVariable decision_variables = 2 [json_name = "decisionVariables"]; total_size += 1UL * this->_internal_decision_variables_size(); for (const auto& msg : this->_internal_decision_variables()) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); } - // repeated .ommx.v1.Constraint constraints = 4; + // repeated .ommx.v1.Constraint constraints = 4 [json_name = "constraints"]; total_size += 1UL * this->_internal_constraints_size(); for (const auto& msg : this->_internal_constraints()) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); } cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000003u) { - // .ommx.v1.Instance.Description description = 1; + // .ommx.v1.Instance.Description description = 1 [json_name = "description"]; if (cached_has_bits & 0x00000001u) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.description_); } - // .ommx.v1.Function objective = 3; + // .ommx.v1.Function objective = 3 [json_name = "objective"]; if (cached_has_bits & 0x00000002u) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.objective_); } } - // .ommx.v1.Instance.Sense sense = 5; + // .ommx.v1.Instance.Sense sense = 5 [json_name = "sense"]; if (this->_internal_sense() != 0) { total_size += 1 + ::_pbi::WireFormatLite::EnumSize(this->_internal_sense()); diff --git a/cpp/ommx/v1/instance.pb.h b/cpp/ommx/v1/instance.pb.h index 5118cfe1..07f69bf4 100644 --- a/cpp/ommx/v1/instance.pb.h +++ b/cpp/ommx/v1/instance.pb.h @@ -239,7 +239,7 @@ class Instance_Description final : public ::google::protobuf::Message kDescriptionFieldNumber = 2, kCreatedByFieldNumber = 4, }; - // repeated string authors = 3; + // repeated string authors = 3 [json_name = "authors"]; int authors_size() const; private: int _internal_authors_size() const; @@ -267,7 +267,7 @@ class Instance_Description final : public ::google::protobuf::Message ::google::protobuf::RepeatedPtrField* _internal_mutable_authors(); public: - // optional string name = 1; + // optional string name = 1 [json_name = "name"]; bool has_name() const; void clear_name() ; const std::string& name() const; @@ -284,7 +284,7 @@ class Instance_Description final : public ::google::protobuf::Message std::string* _internal_mutable_name(); public: - // optional string description = 2; + // optional string description = 2 [json_name = "description"]; bool has_description() const; void clear_description() ; const std::string& description() const; @@ -301,7 +301,7 @@ class Instance_Description final : public ::google::protobuf::Message std::string* _internal_mutable_description(); public: - // optional string created_by = 4; + // optional string created_by = 4 [json_name = "createdBy"]; bool has_created_by() const; void clear_created_by() ; const std::string& created_by() const; @@ -508,7 +508,7 @@ class Instance final : public ::google::protobuf::Message kObjectiveFieldNumber = 3, kSenseFieldNumber = 5, }; - // repeated .ommx.v1.DecisionVariable decision_variables = 2; + // repeated .ommx.v1.DecisionVariable decision_variables = 2 [json_name = "decisionVariables"]; int decision_variables_size() const; private: int _internal_decision_variables_size() const; @@ -525,7 +525,7 @@ class Instance final : public ::google::protobuf::Message const ::ommx::v1::DecisionVariable& decision_variables(int index) const; ::ommx::v1::DecisionVariable* add_decision_variables(); const ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>& decision_variables() const; - // repeated .ommx.v1.Constraint constraints = 4; + // repeated .ommx.v1.Constraint constraints = 4 [json_name = "constraints"]; int constraints_size() const; private: int _internal_constraints_size() const; @@ -542,7 +542,7 @@ class Instance final : public ::google::protobuf::Message const ::ommx::v1::Constraint& constraints(int index) const; ::ommx::v1::Constraint* add_constraints(); const ::google::protobuf::RepeatedPtrField<::ommx::v1::Constraint>& constraints() const; - // .ommx.v1.Instance.Description description = 1; + // .ommx.v1.Instance.Description description = 1 [json_name = "description"]; bool has_description() const; void clear_description() ; const ::ommx::v1::Instance_Description& description() const; @@ -557,7 +557,7 @@ class Instance final : public ::google::protobuf::Message ::ommx::v1::Instance_Description* _internal_mutable_description(); public: - // .ommx.v1.Function objective = 3; + // .ommx.v1.Function objective = 3 [json_name = "objective"]; bool has_objective() const; void clear_objective() ; const ::ommx::v1::Function& objective() const; @@ -572,7 +572,7 @@ class Instance final : public ::google::protobuf::Message ::ommx::v1::Function* _internal_mutable_objective(); public: - // .ommx.v1.Instance.Sense sense = 5; + // .ommx.v1.Instance.Sense sense = 5 [json_name = "sense"]; void clear_sense() ; ::ommx::v1::Instance_Sense sense() const; void set_sense(::ommx::v1::Instance_Sense value); @@ -637,7 +637,7 @@ class Instance final : public ::google::protobuf::Message // Instance_Description -// optional string name = 1; +// optional string name = 1 [json_name = "name"]; inline bool Instance_Description::has_name() const { bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; return value; @@ -708,7 +708,7 @@ inline void Instance_Description::set_allocated_name(std::string* value) { // @@protoc_insertion_point(field_set_allocated:ommx.v1.Instance.Description.name) } -// optional string description = 2; +// optional string description = 2 [json_name = "description"]; inline bool Instance_Description::has_description() const { bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; return value; @@ -779,7 +779,7 @@ inline void Instance_Description::set_allocated_description(std::string* value) // @@protoc_insertion_point(field_set_allocated:ommx.v1.Instance.Description.description) } -// repeated string authors = 3; +// repeated string authors = 3 [json_name = "authors"]; inline int Instance_Description::_internal_authors_size() const { return _internal_authors().size(); } @@ -881,7 +881,7 @@ Instance_Description::_internal_mutable_authors() { return &_impl_.authors_; } -// optional string created_by = 4; +// optional string created_by = 4 [json_name = "createdBy"]; inline bool Instance_Description::has_created_by() const { bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; return value; @@ -956,7 +956,7 @@ inline void Instance_Description::set_allocated_created_by(std::string* value) { // Instance -// .ommx.v1.Instance.Description description = 1; +// .ommx.v1.Instance.Description description = 1 [json_name = "description"]; inline bool Instance::has_description() const { bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; PROTOBUF_ASSUME(!value || _impl_.description_ != nullptr); @@ -1052,7 +1052,7 @@ inline void Instance::set_allocated_description(::ommx::v1::Instance_Description // @@protoc_insertion_point(field_set_allocated:ommx.v1.Instance.description) } -// repeated .ommx.v1.DecisionVariable decision_variables = 2; +// repeated .ommx.v1.DecisionVariable decision_variables = 2 [json_name = "decisionVariables"]; inline int Instance::_internal_decision_variables_size() const { return _internal_decision_variables().size(); } @@ -1097,7 +1097,7 @@ Instance::_internal_mutable_decision_variables() { return &_impl_.decision_variables_; } -// .ommx.v1.Function objective = 3; +// .ommx.v1.Function objective = 3 [json_name = "objective"]; inline bool Instance::has_objective() const { bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; PROTOBUF_ASSUME(!value || _impl_.objective_ != nullptr); @@ -1188,7 +1188,7 @@ inline void Instance::set_allocated_objective(::ommx::v1::Function* value) { // @@protoc_insertion_point(field_set_allocated:ommx.v1.Instance.objective) } -// repeated .ommx.v1.Constraint constraints = 4; +// repeated .ommx.v1.Constraint constraints = 4 [json_name = "constraints"]; inline int Instance::_internal_constraints_size() const { return _internal_constraints().size(); } @@ -1233,7 +1233,7 @@ Instance::_internal_mutable_constraints() { return &_impl_.constraints_; } -// .ommx.v1.Instance.Sense sense = 5; +// .ommx.v1.Instance.Sense sense = 5 [json_name = "sense"]; inline void Instance::clear_sense() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.sense_ = 0; diff --git a/cpp/ommx/v1/linear.pb.cc b/cpp/ommx/v1/linear.pb.cc index 92ad087a..a84d20f8 100644 --- a/cpp/ommx/v1/linear.pb.cc +++ b/cpp/ommx/v1/linear.pb.cc @@ -107,16 +107,19 @@ static const ::_pb::Message* const file_default_instances[] = { }; const char descriptor_table_protodef_ommx_2fv1_2flinear_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( protodesc_cold) = { - "\n\024ommx/v1/linear.proto\022\007ommx.v1\"h\n\006Linea" - "r\022#\n\005terms\030\001 \003(\0132\024.ommx.v1.Linear.Term\022\020" - "\n\010constant\030\002 \001(\001\032\'\n\004Term\022\n\n\002id\030\001 \001(\004\022\023\n\013" - "coefficient\030\002 \001(\001b\006proto3" + "\n\024ommx/v1/linear.proto\022\007ommx.v1\"\212\001\n\006Line" + "ar\022*\n\005terms\030\001 \003(\0132\024.ommx.v1.Linear.TermR" + "\005terms\022\032\n\010constant\030\002 \001(\001R\010constant\0328\n\004Te" + "rm\022\016\n\002id\030\001 \001(\004R\002id\022 \n\013coefficient\030\002 \001(\001R" + "\013coefficientBW\n\013com.ommx.v1B\013LinearProto" + "P\001\242\002\003OXX\252\002\007Ommx.V1\312\002\007Ommx\\V1\342\002\023Ommx\\V1\\G" + "PBMetadata\352\002\010Ommx::V1b\006proto3" }; static ::absl::once_flag descriptor_table_ommx_2fv1_2flinear_2eproto_once; PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2flinear_2eproto = { false, false, - 145, + 269, descriptor_table_protodef_ommx_2fv1_2flinear_2eproto, "ommx/v1/linear.proto", &descriptor_table_ommx_2fv1_2flinear_2eproto_once, @@ -210,19 +213,19 @@ const ::_pbi::TcParseTable<1, 2, 0, 0, 2> Linear_Term::_table_ = { ::_pbi::TcParser::GetTable<::ommx::v1::Linear_Term>(), // to_prefetch #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ - // double coefficient = 2; + // double coefficient = 2 [json_name = "coefficient"]; {::_pbi::TcParser::FastF64S1, {17, 63, 0, PROTOBUF_FIELD_OFFSET(Linear_Term, _impl_.coefficient_)}}, - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Linear_Term, _impl_.id_), 63>(), {8, 63, 0, PROTOBUF_FIELD_OFFSET(Linear_Term, _impl_.id_)}}, }}, {{ 65535, 65535 }}, {{ - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; {PROTOBUF_FIELD_OFFSET(Linear_Term, _impl_.id_), 0, 0, (0 | ::_fl::kFcSingular | ::_fl::kUInt64)}, - // double coefficient = 2; + // double coefficient = 2 [json_name = "coefficient"]; {PROTOBUF_FIELD_OFFSET(Linear_Term, _impl_.coefficient_), 0, 0, (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, }}, @@ -251,14 +254,14 @@ ::uint8_t* Linear_Term::_InternalSerialize( ::uint32_t cached_has_bits = 0; (void)cached_has_bits; - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; if (this->_internal_id() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteUInt64ToArray( 1, this->_internal_id(), target); } - // double coefficient = 2; + // double coefficient = 2 [json_name = "coefficient"]; static_assert(sizeof(::uint64_t) == sizeof(double), "Code assumes ::uint64_t and double are the same size."); double tmp_coefficient = this->_internal_coefficient(); @@ -288,13 +291,13 @@ ::size_t Linear_Term::ByteSizeLong() const { (void) cached_has_bits; ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; if (this->_internal_id() != 0) { total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( this->_internal_id()); } - // double coefficient = 2; + // double coefficient = 2 [json_name = "coefficient"]; static_assert(sizeof(::uint64_t) == sizeof(double), "Code assumes ::uint64_t and double are the same size."); double tmp_coefficient = this->_internal_coefficient(); @@ -441,19 +444,19 @@ const ::_pbi::TcParseTable<1, 2, 1, 0, 2> Linear::_table_ = { ::_pbi::TcParser::GetTable<::ommx::v1::Linear>(), // to_prefetch #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ - // double constant = 2; + // double constant = 2 [json_name = "constant"]; {::_pbi::TcParser::FastF64S1, {17, 63, 0, PROTOBUF_FIELD_OFFSET(Linear, _impl_.constant_)}}, - // repeated .ommx.v1.Linear.Term terms = 1; + // repeated .ommx.v1.Linear.Term terms = 1 [json_name = "terms"]; {::_pbi::TcParser::FastMtR1, {10, 63, 0, PROTOBUF_FIELD_OFFSET(Linear, _impl_.terms_)}}, }}, {{ 65535, 65535 }}, {{ - // repeated .ommx.v1.Linear.Term terms = 1; + // repeated .ommx.v1.Linear.Term terms = 1 [json_name = "terms"]; {PROTOBUF_FIELD_OFFSET(Linear, _impl_.terms_), 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // double constant = 2; + // double constant = 2 [json_name = "constant"]; {PROTOBUF_FIELD_OFFSET(Linear, _impl_.constant_), 0, 0, (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, }}, {{ @@ -481,7 +484,7 @@ ::uint8_t* Linear::_InternalSerialize( ::uint32_t cached_has_bits = 0; (void)cached_has_bits; - // repeated .ommx.v1.Linear.Term terms = 1; + // repeated .ommx.v1.Linear.Term terms = 1 [json_name = "terms"]; for (unsigned i = 0, n = static_cast( this->_internal_terms_size()); i < n; i++) { @@ -492,7 +495,7 @@ ::uint8_t* Linear::_InternalSerialize( target, stream); } - // double constant = 2; + // double constant = 2 [json_name = "constant"]; static_assert(sizeof(::uint64_t) == sizeof(double), "Code assumes ::uint64_t and double are the same size."); double tmp_constant = this->_internal_constant(); @@ -522,12 +525,12 @@ ::size_t Linear::ByteSizeLong() const { (void) cached_has_bits; ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); - // repeated .ommx.v1.Linear.Term terms = 1; + // repeated .ommx.v1.Linear.Term terms = 1 [json_name = "terms"]; total_size += 1UL * this->_internal_terms_size(); for (const auto& msg : this->_internal_terms()) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); } - // double constant = 2; + // double constant = 2 [json_name = "constant"]; static_assert(sizeof(::uint64_t) == sizeof(double), "Code assumes ::uint64_t and double are the same size."); double tmp_constant = this->_internal_constant(); diff --git a/cpp/ommx/v1/linear.pb.h b/cpp/ommx/v1/linear.pb.h index a7388ceb..f551ce55 100644 --- a/cpp/ommx/v1/linear.pb.h +++ b/cpp/ommx/v1/linear.pb.h @@ -199,7 +199,7 @@ class Linear_Term final : public ::google::protobuf::Message kIdFieldNumber = 1, kCoefficientFieldNumber = 2, }; - // uint64 id = 1; + // uint64 id = 1 [json_name = "id"]; void clear_id() ; ::uint64_t id() const; void set_id(::uint64_t value); @@ -209,7 +209,7 @@ class Linear_Term final : public ::google::protobuf::Message void _internal_set_id(::uint64_t value); public: - // double coefficient = 2; + // double coefficient = 2 [json_name = "coefficient"]; void clear_coefficient() ; double coefficient() const; void set_coefficient(double value); @@ -383,7 +383,7 @@ class Linear final : public ::google::protobuf::Message kTermsFieldNumber = 1, kConstantFieldNumber = 2, }; - // repeated .ommx.v1.Linear.Term terms = 1; + // repeated .ommx.v1.Linear.Term terms = 1 [json_name = "terms"]; int terms_size() const; private: int _internal_terms_size() const; @@ -400,7 +400,7 @@ class Linear final : public ::google::protobuf::Message const ::ommx::v1::Linear_Term& terms(int index) const; ::ommx::v1::Linear_Term* add_terms(); const ::google::protobuf::RepeatedPtrField<::ommx::v1::Linear_Term>& terms() const; - // double constant = 2; + // double constant = 2 [json_name = "constant"]; void clear_constant() ; double constant() const; void set_constant(double value); @@ -461,7 +461,7 @@ class Linear final : public ::google::protobuf::Message // Linear_Term -// uint64 id = 1; +// uint64 id = 1 [json_name = "id"]; inline void Linear_Term::clear_id() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.id_ = ::uint64_t{0u}; @@ -483,7 +483,7 @@ inline void Linear_Term::_internal_set_id(::uint64_t value) { _impl_.id_ = value; } -// double coefficient = 2; +// double coefficient = 2 [json_name = "coefficient"]; inline void Linear_Term::clear_coefficient() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.coefficient_ = 0; @@ -509,7 +509,7 @@ inline void Linear_Term::_internal_set_coefficient(double value) { // Linear -// repeated .ommx.v1.Linear.Term terms = 1; +// repeated .ommx.v1.Linear.Term terms = 1 [json_name = "terms"]; inline int Linear::_internal_terms_size() const { return _internal_terms().size(); } @@ -558,7 +558,7 @@ Linear::_internal_mutable_terms() { return &_impl_.terms_; } -// double constant = 2; +// double constant = 2 [json_name = "constant"]; inline void Linear::clear_constant() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.constant_ = 0; diff --git a/cpp/ommx/v1/polynomial.pb.cc b/cpp/ommx/v1/polynomial.pb.cc index 66c748a9..c8b838c2 100644 --- a/cpp/ommx/v1/polynomial.pb.cc +++ b/cpp/ommx/v1/polynomial.pb.cc @@ -106,16 +106,19 @@ static const ::_pb::Message* const file_default_instances[] = { }; const char descriptor_table_protodef_ommx_2fv1_2fpolynomial_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( protodesc_cold) = { - "\n\030ommx/v1/polynomial.proto\022\007ommx.v1\",\n\010M" - "onomial\022\013\n\003ids\030\001 \003(\004\022\023\n\013coefficient\030\002 \001(" - "\001\".\n\nPolynomial\022 \n\005terms\030\001 \003(\0132\021.ommx.v1" - ".Monomialb\006proto3" + "\n\030ommx/v1/polynomial.proto\022\007ommx.v1\">\n\010M" + "onomial\022\020\n\003ids\030\001 \003(\004R\003ids\022 \n\013coefficient" + "\030\002 \001(\001R\013coefficient\"5\n\nPolynomial\022\'\n\005ter" + "ms\030\001 \003(\0132\021.ommx.v1.MonomialR\005termsB[\n\013co" + "m.ommx.v1B\017PolynomialProtoP\001\242\002\003OXX\252\002\007Omm" + "x.V1\312\002\007Ommx\\V1\342\002\023Ommx\\V1\\GPBMetadata\352\002\010O" + "mmx::V1b\006proto3" }; static ::absl::once_flag descriptor_table_ommx_2fv1_2fpolynomial_2eproto_once; PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fpolynomial_2eproto = { false, false, - 137, + 255, descriptor_table_protodef_ommx_2fv1_2fpolynomial_2eproto, "ommx/v1/polynomial.proto", &descriptor_table_ommx_2fv1_2fpolynomial_2eproto_once, @@ -221,19 +224,19 @@ const ::_pbi::TcParseTable<1, 2, 0, 0, 2> Monomial::_table_ = { ::_pbi::TcParser::GetTable<::ommx::v1::Monomial>(), // to_prefetch #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ - // double coefficient = 2; + // double coefficient = 2 [json_name = "coefficient"]; {::_pbi::TcParser::FastF64S1, {17, 63, 0, PROTOBUF_FIELD_OFFSET(Monomial, _impl_.coefficient_)}}, - // repeated uint64 ids = 1; + // repeated uint64 ids = 1 [json_name = "ids"]; {::_pbi::TcParser::FastV64P1, {10, 63, 0, PROTOBUF_FIELD_OFFSET(Monomial, _impl_.ids_)}}, }}, {{ 65535, 65535 }}, {{ - // repeated uint64 ids = 1; + // repeated uint64 ids = 1 [json_name = "ids"]; {PROTOBUF_FIELD_OFFSET(Monomial, _impl_.ids_), 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt64)}, - // double coefficient = 2; + // double coefficient = 2 [json_name = "coefficient"]; {PROTOBUF_FIELD_OFFSET(Monomial, _impl_.coefficient_), 0, 0, (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, }}, @@ -261,7 +264,7 @@ ::uint8_t* Monomial::_InternalSerialize( ::uint32_t cached_has_bits = 0; (void)cached_has_bits; - // repeated uint64 ids = 1; + // repeated uint64 ids = 1 [json_name = "ids"]; { int byte_size = _impl_._ids_cached_byte_size_.Get(); if (byte_size > 0) { @@ -270,7 +273,7 @@ ::uint8_t* Monomial::_InternalSerialize( } } - // double coefficient = 2; + // double coefficient = 2 [json_name = "coefficient"]; static_assert(sizeof(::uint64_t) == sizeof(double), "Code assumes ::uint64_t and double are the same size."); double tmp_coefficient = this->_internal_coefficient(); @@ -300,7 +303,7 @@ ::size_t Monomial::ByteSizeLong() const { (void) cached_has_bits; ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); - // repeated uint64 ids = 1; + // repeated uint64 ids = 1 [json_name = "ids"]; { std::size_t data_size = ::_pbi::WireFormatLite::UInt64Size( this->_internal_ids()) @@ -313,7 +316,7 @@ ::size_t Monomial::ByteSizeLong() const { ; total_size += tag_size + data_size; } - // double coefficient = 2; + // double coefficient = 2 [json_name = "coefficient"]; static_assert(sizeof(::uint64_t) == sizeof(double), "Code assumes ::uint64_t and double are the same size."); double tmp_coefficient = this->_internal_coefficient(); @@ -452,13 +455,13 @@ const ::_pbi::TcParseTable<0, 1, 1, 0, 2> Polynomial::_table_ = { ::_pbi::TcParser::GetTable<::ommx::v1::Polynomial>(), // to_prefetch #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ - // repeated .ommx.v1.Monomial terms = 1; + // repeated .ommx.v1.Monomial terms = 1 [json_name = "terms"]; {::_pbi::TcParser::FastMtR1, {10, 63, 0, PROTOBUF_FIELD_OFFSET(Polynomial, _impl_.terms_)}}, }}, {{ 65535, 65535 }}, {{ - // repeated .ommx.v1.Monomial terms = 1; + // repeated .ommx.v1.Monomial terms = 1 [json_name = "terms"]; {PROTOBUF_FIELD_OFFSET(Polynomial, _impl_.terms_), 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, }}, {{ @@ -485,7 +488,7 @@ ::uint8_t* Polynomial::_InternalSerialize( ::uint32_t cached_has_bits = 0; (void)cached_has_bits; - // repeated .ommx.v1.Monomial terms = 1; + // repeated .ommx.v1.Monomial terms = 1 [json_name = "terms"]; for (unsigned i = 0, n = static_cast( this->_internal_terms_size()); i < n; i++) { @@ -514,7 +517,7 @@ ::size_t Polynomial::ByteSizeLong() const { (void) cached_has_bits; ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); - // repeated .ommx.v1.Monomial terms = 1; + // repeated .ommx.v1.Monomial terms = 1 [json_name = "terms"]; total_size += 1UL * this->_internal_terms_size(); for (const auto& msg : this->_internal_terms()) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); diff --git a/cpp/ommx/v1/polynomial.pb.h b/cpp/ommx/v1/polynomial.pb.h index 75b17154..a5816477 100644 --- a/cpp/ommx/v1/polynomial.pb.h +++ b/cpp/ommx/v1/polynomial.pb.h @@ -199,7 +199,7 @@ class Monomial final : public ::google::protobuf::Message kIdsFieldNumber = 1, kCoefficientFieldNumber = 2, }; - // repeated uint64 ids = 1; + // repeated uint64 ids = 1 [json_name = "ids"]; int ids_size() const; private: int _internal_ids_size() const; @@ -217,7 +217,7 @@ class Monomial final : public ::google::protobuf::Message ::google::protobuf::RepeatedField<::uint64_t>* _internal_mutable_ids(); public: - // double coefficient = 2; + // double coefficient = 2 [json_name = "coefficient"]; void clear_coefficient() ; double coefficient() const; void set_coefficient(double value); @@ -390,7 +390,7 @@ class Polynomial final : public ::google::protobuf::Message enum : int { kTermsFieldNumber = 1, }; - // repeated .ommx.v1.Monomial terms = 1; + // repeated .ommx.v1.Monomial terms = 1 [json_name = "terms"]; int terms_size() const; private: int _internal_terms_size() const; @@ -457,7 +457,7 @@ class Polynomial final : public ::google::protobuf::Message // Monomial -// repeated uint64 ids = 1; +// repeated uint64 ids = 1 [json_name = "ids"]; inline int Monomial::_internal_ids_size() const { return _internal_ids().size(); } @@ -502,7 +502,7 @@ inline ::google::protobuf::RepeatedField<::uint64_t>* Monomial::_internal_mutabl return &_impl_.ids_; } -// double coefficient = 2; +// double coefficient = 2 [json_name = "coefficient"]; inline void Monomial::clear_coefficient() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.coefficient_ = 0; @@ -528,7 +528,7 @@ inline void Monomial::_internal_set_coefficient(double value) { // Polynomial -// repeated .ommx.v1.Monomial terms = 1; +// repeated .ommx.v1.Monomial terms = 1 [json_name = "terms"]; inline int Polynomial::_internal_terms_size() const { return _internal_terms().size(); } diff --git a/cpp/ommx/v1/quadratic.pb.cc b/cpp/ommx/v1/quadratic.pb.cc index 5b4dbf5a..2d6a10bf 100644 --- a/cpp/ommx/v1/quadratic.pb.cc +++ b/cpp/ommx/v1/quadratic.pb.cc @@ -86,10 +86,13 @@ static const ::_pb::Message* const file_default_instances[] = { const char descriptor_table_protodef_ommx_2fv1_2fquadratic_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE( protodesc_cold) = { "\n\027ommx/v1/quadratic.proto\022\007ommx.v1\032\024ommx" - "/v1/linear.proto\"k\n\tQuadratic\022\014\n\004rows\030\001 " - "\003(\004\022\017\n\007columns\030\002 \003(\004\022\016\n\006values\030\003 \003(\001\022$\n\006" - "linear\030\004 \001(\0132\017.ommx.v1.LinearH\000\210\001\001B\t\n\007_l" - "inearb\006proto3" + "/v1/linear.proto\"\212\001\n\tQuadratic\022\022\n\004rows\030\001" + " \003(\004R\004rows\022\030\n\007columns\030\002 \003(\004R\007columns\022\026\n\006" + "values\030\003 \003(\001R\006values\022,\n\006linear\030\004 \001(\0132\017.o" + "mmx.v1.LinearH\000R\006linear\210\001\001B\t\n\007_linearBZ\n" + "\013com.ommx.v1B\016QuadraticProtoP\001\242\002\003OXX\252\002\007O" + "mmx.V1\312\002\007Ommx\\V1\342\002\023Ommx\\V1\\GPBMetadata\352\002" + "\010Ommx::V1b\006proto3" }; static const ::_pbi::DescriptorTable* const descriptor_table_ommx_2fv1_2fquadratic_2eproto_deps[1] = { @@ -99,7 +102,7 @@ static ::absl::once_flag descriptor_table_ommx_2fv1_2fquadratic_2eproto_once; PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fquadratic_2eproto = { false, false, - 173, + 297, descriptor_table_protodef_ommx_2fv1_2fquadratic_2eproto, "ommx/v1/quadratic.proto", &descriptor_table_ommx_2fv1_2fquadratic_2eproto_once, @@ -225,31 +228,31 @@ const ::_pbi::TcParseTable<2, 4, 1, 0, 2> Quadratic::_table_ = { ::_pbi::TcParser::GetTable<::ommx::v1::Quadratic>(), // to_prefetch #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ - // optional .ommx.v1.Linear linear = 4; + // optional .ommx.v1.Linear linear = 4 [json_name = "linear"]; {::_pbi::TcParser::FastMtS1, {34, 0, 0, PROTOBUF_FIELD_OFFSET(Quadratic, _impl_.linear_)}}, - // repeated uint64 rows = 1; + // repeated uint64 rows = 1 [json_name = "rows"]; {::_pbi::TcParser::FastV64P1, {10, 63, 0, PROTOBUF_FIELD_OFFSET(Quadratic, _impl_.rows_)}}, - // repeated uint64 columns = 2; + // repeated uint64 columns = 2 [json_name = "columns"]; {::_pbi::TcParser::FastV64P1, {18, 63, 0, PROTOBUF_FIELD_OFFSET(Quadratic, _impl_.columns_)}}, - // repeated double values = 3; + // repeated double values = 3 [json_name = "values"]; {::_pbi::TcParser::FastF64P1, {26, 63, 0, PROTOBUF_FIELD_OFFSET(Quadratic, _impl_.values_)}}, }}, {{ 65535, 65535 }}, {{ - // repeated uint64 rows = 1; + // repeated uint64 rows = 1 [json_name = "rows"]; {PROTOBUF_FIELD_OFFSET(Quadratic, _impl_.rows_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt64)}, - // repeated uint64 columns = 2; + // repeated uint64 columns = 2 [json_name = "columns"]; {PROTOBUF_FIELD_OFFSET(Quadratic, _impl_.columns_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedUInt64)}, - // repeated double values = 3; + // repeated double values = 3 [json_name = "values"]; {PROTOBUF_FIELD_OFFSET(Quadratic, _impl_.values_), -1, 0, (0 | ::_fl::kFcRepeated | ::_fl::kPackedDouble)}, - // optional .ommx.v1.Linear linear = 4; + // optional .ommx.v1.Linear linear = 4 [json_name = "linear"]; {PROTOBUF_FIELD_OFFSET(Quadratic, _impl_.linear_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, }}, {{ @@ -284,7 +287,7 @@ ::uint8_t* Quadratic::_InternalSerialize( ::uint32_t cached_has_bits = 0; (void)cached_has_bits; - // repeated uint64 rows = 1; + // repeated uint64 rows = 1 [json_name = "rows"]; { int byte_size = _impl_._rows_cached_byte_size_.Get(); if (byte_size > 0) { @@ -293,7 +296,7 @@ ::uint8_t* Quadratic::_InternalSerialize( } } - // repeated uint64 columns = 2; + // repeated uint64 columns = 2 [json_name = "columns"]; { int byte_size = _impl_._columns_cached_byte_size_.Get(); if (byte_size > 0) { @@ -302,13 +305,13 @@ ::uint8_t* Quadratic::_InternalSerialize( } } - // repeated double values = 3; + // repeated double values = 3 [json_name = "values"]; if (this->_internal_values_size() > 0) { target = stream->WriteFixedPacked(3, _internal_values(), target); } cached_has_bits = _impl_._has_bits_[0]; - // optional .ommx.v1.Linear linear = 4; + // optional .ommx.v1.Linear linear = 4 [json_name = "linear"]; if (cached_has_bits & 0x00000001u) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 4, *_impl_.linear_, _impl_.linear_->GetCachedSize(), target, stream); @@ -332,7 +335,7 @@ ::size_t Quadratic::ByteSizeLong() const { (void) cached_has_bits; ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); - // repeated uint64 rows = 1; + // repeated uint64 rows = 1 [json_name = "rows"]; { std::size_t data_size = ::_pbi::WireFormatLite::UInt64Size( this->_internal_rows()) @@ -345,7 +348,7 @@ ::size_t Quadratic::ByteSizeLong() const { ; total_size += tag_size + data_size; } - // repeated uint64 columns = 2; + // repeated uint64 columns = 2 [json_name = "columns"]; { std::size_t data_size = ::_pbi::WireFormatLite::UInt64Size( this->_internal_columns()) @@ -358,7 +361,7 @@ ::size_t Quadratic::ByteSizeLong() const { ; total_size += tag_size + data_size; } - // repeated double values = 3; + // repeated double values = 3 [json_name = "values"]; { std::size_t data_size = std::size_t{8} * ::_pbi::FromIntSize(this->_internal_values_size()) @@ -370,7 +373,7 @@ ::size_t Quadratic::ByteSizeLong() const { ; total_size += tag_size + data_size; } - // optional .ommx.v1.Linear linear = 4; + // optional .ommx.v1.Linear linear = 4 [json_name = "linear"]; cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000001u) { total_size += diff --git a/cpp/ommx/v1/quadratic.pb.h b/cpp/ommx/v1/quadratic.pb.h index eb84f5f9..74a49a52 100644 --- a/cpp/ommx/v1/quadratic.pb.h +++ b/cpp/ommx/v1/quadratic.pb.h @@ -199,7 +199,7 @@ class Quadratic final : public ::google::protobuf::Message kValuesFieldNumber = 3, kLinearFieldNumber = 4, }; - // repeated uint64 rows = 1; + // repeated uint64 rows = 1 [json_name = "rows"]; int rows_size() const; private: int _internal_rows_size() const; @@ -217,7 +217,7 @@ class Quadratic final : public ::google::protobuf::Message ::google::protobuf::RepeatedField<::uint64_t>* _internal_mutable_rows(); public: - // repeated uint64 columns = 2; + // repeated uint64 columns = 2 [json_name = "columns"]; int columns_size() const; private: int _internal_columns_size() const; @@ -235,7 +235,7 @@ class Quadratic final : public ::google::protobuf::Message ::google::protobuf::RepeatedField<::uint64_t>* _internal_mutable_columns(); public: - // repeated double values = 3; + // repeated double values = 3 [json_name = "values"]; int values_size() const; private: int _internal_values_size() const; @@ -253,7 +253,7 @@ class Quadratic final : public ::google::protobuf::Message ::google::protobuf::RepeatedField* _internal_mutable_values(); public: - // optional .ommx.v1.Linear linear = 4; + // optional .ommx.v1.Linear linear = 4 [json_name = "linear"]; bool has_linear() const; void clear_linear() ; const ::ommx::v1::Linear& linear() const; @@ -324,7 +324,7 @@ class Quadratic final : public ::google::protobuf::Message // Quadratic -// repeated uint64 rows = 1; +// repeated uint64 rows = 1 [json_name = "rows"]; inline int Quadratic::_internal_rows_size() const { return _internal_rows().size(); } @@ -369,7 +369,7 @@ inline ::google::protobuf::RepeatedField<::uint64_t>* Quadratic::_internal_mutab return &_impl_.rows_; } -// repeated uint64 columns = 2; +// repeated uint64 columns = 2 [json_name = "columns"]; inline int Quadratic::_internal_columns_size() const { return _internal_columns().size(); } @@ -414,7 +414,7 @@ inline ::google::protobuf::RepeatedField<::uint64_t>* Quadratic::_internal_mutab return &_impl_.columns_; } -// repeated double values = 3; +// repeated double values = 3 [json_name = "values"]; inline int Quadratic::_internal_values_size() const { return _internal_values().size(); } @@ -459,7 +459,7 @@ inline ::google::protobuf::RepeatedField* Quadratic::_internal_mutable_v return &_impl_.values_; } -// optional .ommx.v1.Linear linear = 4; +// optional .ommx.v1.Linear linear = 4 [json_name = "linear"]; inline bool Quadratic::has_linear() const { bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; PROTOBUF_ASSUME(!value || _impl_.linear_ != nullptr); diff --git a/cpp/ommx/v1/solution.pb.cc b/cpp/ommx/v1/solution.pb.cc index 9d01a9e9..b908d02c 100644 --- a/cpp/ommx/v1/solution.pb.cc +++ b/cpp/ommx/v1/solution.pb.cc @@ -228,25 +228,31 @@ const char descriptor_table_protodef_ommx_2fv1_2fsolution_2eproto[] ABSL_ATTRIBU protodesc_cold) = { "\n\026ommx/v1/solution.proto\022\007ommx.v1\032\030ommx/" "v1/constraint.proto\032 ommx/v1/decision_va" - "riables.proto\"e\n\005State\022,\n\007entries\030\001 \003(\0132" - "\033.ommx.v1.State.EntriesEntry\032.\n\014EntriesE" - "ntry\022\013\n\003key\030\001 \001(\004\022\r\n\005value\030\002 \001(\001:\0028\001\"\224\002\n" - "\010Solution\022\035\n\005state\030\001 \001(\0132\016.ommx.v1.State" - "\022\021\n\tobjective\030\002 \001(\001\0225\n\022decision_variable" - "s\030\003 \003(\0132\031.ommx.v1.DecisionVariable\022;\n\025ev" - "aluated_constraints\030\004 \003(\0132\034.ommx.v1.Eval" - "uatedConstraint\022\020\n\010feasible\030\005 \001(\010\022\'\n\nopt" - "imality\030\006 \001(\0162\023.ommx.v1.Optimality\022\'\n\nre" - "laxation\030\007 \001(\0162\023.ommx.v1.Relaxation\"\014\n\nI" - "nfeasible\"\013\n\tUnbounded\"\236\001\n\006Result\022\017\n\005err" - "or\030\001 \001(\tH\000\022%\n\010solution\030\002 \001(\0132\021.ommx.v1.S" - "olutionH\000\022)\n\ninfeasible\030\003 \001(\0132\023.ommx.v1." - "InfeasibleH\000\022\'\n\tunbounded\030\004 \001(\0132\022.ommx.v" - "1.UnboundedH\000B\010\n\006result*\\\n\nOptimality\022\032\n" - "\026OPTIMALITY_UNSPECIFIED\020\000\022\026\n\022OPTIMALITY_" - "OPTIMAL\020\001\022\032\n\026OPTIMALITY_NOT_OPTIMAL\020\002*C\n" - "\nRelaxation\022\032\n\026RELAXATION_UNSPECIFIED\020\000\022" - "\031\n\025RELAXATION_LP_RELAXED\020\001b\006proto3" + "riables.proto\"z\n\005State\0225\n\007entries\030\001 \003(\0132" + "\033.ommx.v1.State.EntriesEntryR\007entries\032:\n" + "\014EntriesEntry\022\020\n\003key\030\001 \001(\004R\003key\022\024\n\005value" + "\030\002 \001(\001R\005value:\0028\001\"\361\002\n\010Solution\022$\n\005state\030" + "\001 \001(\0132\016.ommx.v1.StateR\005state\022\034\n\tobjectiv" + "e\030\002 \001(\001R\tobjective\022H\n\022decision_variables" + "\030\003 \003(\0132\031.ommx.v1.DecisionVariableR\021decis" + "ionVariables\022Q\n\025evaluated_constraints\030\004 " + "\003(\0132\034.ommx.v1.EvaluatedConstraintR\024evalu" + "atedConstraints\022\032\n\010feasible\030\005 \001(\010R\010feasi" + "ble\0223\n\noptimality\030\006 \001(\0162\023.ommx.v1.Optima" + "lityR\noptimality\0223\n\nrelaxation\030\007 \001(\0162\023.o" + "mmx.v1.RelaxationR\nrelaxation\"\014\n\nInfeasi" + "ble\"\013\n\tUnbounded\"\306\001\n\006Result\022\026\n\005error\030\001 \001" + "(\tH\000R\005error\022/\n\010solution\030\002 \001(\0132\021.ommx.v1." + "SolutionH\000R\010solution\0225\n\ninfeasible\030\003 \001(\013" + "2\023.ommx.v1.InfeasibleH\000R\ninfeasible\0222\n\tu" + "nbounded\030\004 \001(\0132\022.ommx.v1.UnboundedH\000R\tun" + "boundedB\010\n\006result*\\\n\nOptimality\022\032\n\026OPTIM" + "ALITY_UNSPECIFIED\020\000\022\026\n\022OPTIMALITY_OPTIMA" + "L\020\001\022\032\n\026OPTIMALITY_NOT_OPTIMAL\020\002*C\n\nRelax" + "ation\022\032\n\026RELAXATION_UNSPECIFIED\020\000\022\031\n\025REL" + "AXATION_LP_RELAXED\020\001BY\n\013com.ommx.v1B\rSol" + "utionProtoP\001\242\002\003OXX\252\002\007Ommx.V1\312\002\007Ommx\\V1\342\002" + "\023Ommx\\V1\\GPBMetadata\352\002\010Ommx::V1b\006proto3" }; static const ::_pbi::DescriptorTable* const descriptor_table_ommx_2fv1_2fsolution_2eproto_deps[2] = { @@ -257,7 +263,7 @@ static ::absl::once_flag descriptor_table_ommx_2fv1_2fsolution_2eproto_once; PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fsolution_2eproto = { false, false, - 834, + 1079, descriptor_table_protodef_ommx_2fv1_2fsolution_2eproto, "ommx/v1/solution.proto", &descriptor_table_ommx_2fv1_2fsolution_2eproto_once, @@ -405,7 +411,7 @@ const ::_pbi::TcParseTable<0, 1, 1, 0, 2> State::_table_ = { }}, {{ 65535, 65535 }}, {{ - // map entries = 1; + // map entries = 1 [json_name = "entries"]; {PROTOBUF_FIELD_OFFSET(State, _impl_.entries_), 0, 0, (0 | ::_fl::kFcRepeated | ::_fl::kMap)}, }}, {{ @@ -435,7 +441,7 @@ ::uint8_t* State::_InternalSerialize( ::uint32_t cached_has_bits = 0; (void)cached_has_bits; - // map entries = 1; + // map entries = 1 [json_name = "entries"]; if (!_internal_entries().empty()) { using MapType = ::google::protobuf::Map<::uint64_t, double>; using WireHelper = _pbi::MapEntryFuncs<::uint64_t, double, @@ -474,7 +480,7 @@ ::size_t State::ByteSizeLong() const { (void) cached_has_bits; ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); - // map entries = 1; + // map entries = 1 [json_name = "entries"]; total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_entries_size()); for (const auto& entry : _internal_entries()) { total_size += _pbi::MapEntryFuncs<::uint64_t, double, @@ -635,49 +641,49 @@ const ::_pbi::TcParseTable<3, 7, 3, 0, 2> Solution::_table_ = { #endif // PROTOBUF_PREFETCH_PARSE_TABLE }, {{ {::_pbi::TcParser::MiniParse, {}}, - // .ommx.v1.State state = 1; + // .ommx.v1.State state = 1 [json_name = "state"]; {::_pbi::TcParser::FastMtS1, {10, 0, 0, PROTOBUF_FIELD_OFFSET(Solution, _impl_.state_)}}, - // double objective = 2; + // double objective = 2 [json_name = "objective"]; {::_pbi::TcParser::FastF64S1, {17, 63, 0, PROTOBUF_FIELD_OFFSET(Solution, _impl_.objective_)}}, - // repeated .ommx.v1.DecisionVariable decision_variables = 3; + // repeated .ommx.v1.DecisionVariable decision_variables = 3 [json_name = "decisionVariables"]; {::_pbi::TcParser::FastMtR1, {26, 63, 1, PROTOBUF_FIELD_OFFSET(Solution, _impl_.decision_variables_)}}, - // repeated .ommx.v1.EvaluatedConstraint evaluated_constraints = 4; + // repeated .ommx.v1.EvaluatedConstraint evaluated_constraints = 4 [json_name = "evaluatedConstraints"]; {::_pbi::TcParser::FastMtR1, {34, 63, 2, PROTOBUF_FIELD_OFFSET(Solution, _impl_.evaluated_constraints_)}}, - // bool feasible = 5; + // bool feasible = 5 [json_name = "feasible"]; {::_pbi::TcParser::SingularVarintNoZag1(), {40, 63, 0, PROTOBUF_FIELD_OFFSET(Solution, _impl_.feasible_)}}, - // .ommx.v1.Optimality optimality = 6; + // .ommx.v1.Optimality optimality = 6 [json_name = "optimality"]; {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Solution, _impl_.optimality_), 63>(), {48, 63, 0, PROTOBUF_FIELD_OFFSET(Solution, _impl_.optimality_)}}, - // .ommx.v1.Relaxation relaxation = 7; + // .ommx.v1.Relaxation relaxation = 7 [json_name = "relaxation"]; {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Solution, _impl_.relaxation_), 63>(), {56, 63, 0, PROTOBUF_FIELD_OFFSET(Solution, _impl_.relaxation_)}}, }}, {{ 65535, 65535 }}, {{ - // .ommx.v1.State state = 1; + // .ommx.v1.State state = 1 [json_name = "state"]; {PROTOBUF_FIELD_OFFSET(Solution, _impl_.state_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)}, - // double objective = 2; + // double objective = 2 [json_name = "objective"]; {PROTOBUF_FIELD_OFFSET(Solution, _impl_.objective_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kDouble)}, - // repeated .ommx.v1.DecisionVariable decision_variables = 3; + // repeated .ommx.v1.DecisionVariable decision_variables = 3 [json_name = "decisionVariables"]; {PROTOBUF_FIELD_OFFSET(Solution, _impl_.decision_variables_), -1, 1, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // repeated .ommx.v1.EvaluatedConstraint evaluated_constraints = 4; + // repeated .ommx.v1.EvaluatedConstraint evaluated_constraints = 4 [json_name = "evaluatedConstraints"]; {PROTOBUF_FIELD_OFFSET(Solution, _impl_.evaluated_constraints_), -1, 2, (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)}, - // bool feasible = 5; + // bool feasible = 5 [json_name = "feasible"]; {PROTOBUF_FIELD_OFFSET(Solution, _impl_.feasible_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kBool)}, - // .ommx.v1.Optimality optimality = 6; + // .ommx.v1.Optimality optimality = 6 [json_name = "optimality"]; {PROTOBUF_FIELD_OFFSET(Solution, _impl_.optimality_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, - // .ommx.v1.Relaxation relaxation = 7; + // .ommx.v1.Relaxation relaxation = 7 [json_name = "relaxation"]; {PROTOBUF_FIELD_OFFSET(Solution, _impl_.relaxation_), -1, 0, (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)}, }}, {{ @@ -717,13 +723,13 @@ ::uint8_t* Solution::_InternalSerialize( (void)cached_has_bits; cached_has_bits = _impl_._has_bits_[0]; - // .ommx.v1.State state = 1; + // .ommx.v1.State state = 1 [json_name = "state"]; if (cached_has_bits & 0x00000001u) { target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage( 1, *_impl_.state_, _impl_.state_->GetCachedSize(), target, stream); } - // double objective = 2; + // double objective = 2 [json_name = "objective"]; static_assert(sizeof(::uint64_t) == sizeof(double), "Code assumes ::uint64_t and double are the same size."); double tmp_objective = this->_internal_objective(); @@ -735,7 +741,7 @@ ::uint8_t* Solution::_InternalSerialize( 2, this->_internal_objective(), target); } - // repeated .ommx.v1.DecisionVariable decision_variables = 3; + // repeated .ommx.v1.DecisionVariable decision_variables = 3 [json_name = "decisionVariables"]; for (unsigned i = 0, n = static_cast( this->_internal_decision_variables_size()); i < n; i++) { @@ -746,7 +752,7 @@ ::uint8_t* Solution::_InternalSerialize( target, stream); } - // repeated .ommx.v1.EvaluatedConstraint evaluated_constraints = 4; + // repeated .ommx.v1.EvaluatedConstraint evaluated_constraints = 4 [json_name = "evaluatedConstraints"]; for (unsigned i = 0, n = static_cast( this->_internal_evaluated_constraints_size()); i < n; i++) { @@ -757,21 +763,21 @@ ::uint8_t* Solution::_InternalSerialize( target, stream); } - // bool feasible = 5; + // bool feasible = 5 [json_name = "feasible"]; if (this->_internal_feasible() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteBoolToArray( 5, this->_internal_feasible(), target); } - // .ommx.v1.Optimality optimality = 6; + // .ommx.v1.Optimality optimality = 6 [json_name = "optimality"]; if (this->_internal_optimality() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( 6, this->_internal_optimality(), target); } - // .ommx.v1.Relaxation relaxation = 7; + // .ommx.v1.Relaxation relaxation = 7 [json_name = "relaxation"]; if (this->_internal_relaxation() != 0) { target = stream->EnsureSpace(target); target = ::_pbi::WireFormatLite::WriteEnumToArray( @@ -796,24 +802,24 @@ ::size_t Solution::ByteSizeLong() const { (void) cached_has_bits; ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); - // repeated .ommx.v1.DecisionVariable decision_variables = 3; + // repeated .ommx.v1.DecisionVariable decision_variables = 3 [json_name = "decisionVariables"]; total_size += 1UL * this->_internal_decision_variables_size(); for (const auto& msg : this->_internal_decision_variables()) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); } - // repeated .ommx.v1.EvaluatedConstraint evaluated_constraints = 4; + // repeated .ommx.v1.EvaluatedConstraint evaluated_constraints = 4 [json_name = "evaluatedConstraints"]; total_size += 1UL * this->_internal_evaluated_constraints_size(); for (const auto& msg : this->_internal_evaluated_constraints()) { total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg); } - // .ommx.v1.State state = 1; + // .ommx.v1.State state = 1 [json_name = "state"]; cached_has_bits = _impl_._has_bits_[0]; if (cached_has_bits & 0x00000001u) { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.state_); } - // double objective = 2; + // double objective = 2 [json_name = "objective"]; static_assert(sizeof(::uint64_t) == sizeof(double), "Code assumes ::uint64_t and double are the same size."); double tmp_objective = this->_internal_objective(); @@ -823,18 +829,18 @@ ::size_t Solution::ByteSizeLong() const { total_size += 9; } - // bool feasible = 5; + // bool feasible = 5 [json_name = "feasible"]; if (this->_internal_feasible() != 0) { total_size += 2; } - // .ommx.v1.Optimality optimality = 6; + // .ommx.v1.Optimality optimality = 6 [json_name = "optimality"]; if (this->_internal_optimality() != 0) { total_size += 1 + ::_pbi::WireFormatLite::EnumSize(this->_internal_optimality()); } - // .ommx.v1.Relaxation relaxation = 7; + // .ommx.v1.Relaxation relaxation = 7 [json_name = "relaxation"]; if (this->_internal_relaxation() != 0) { total_size += 1 + ::_pbi::WireFormatLite::EnumSize(this->_internal_relaxation()); @@ -1268,16 +1274,16 @@ const ::_pbi::TcParseTable<0, 4, 3, 28, 2> Result::_table_ = { }}, {{ 65535, 65535 }}, {{ - // string error = 1; + // string error = 1 [json_name = "error"]; {PROTOBUF_FIELD_OFFSET(Result, _impl_.result_.error_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kUtf8String | ::_fl::kRepAString)}, - // .ommx.v1.Solution solution = 2; + // .ommx.v1.Solution solution = 2 [json_name = "solution"]; {PROTOBUF_FIELD_OFFSET(Result, _impl_.result_.solution_), _Internal::kOneofCaseOffset + 0, 0, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .ommx.v1.Infeasible infeasible = 3; + // .ommx.v1.Infeasible infeasible = 3 [json_name = "infeasible"]; {PROTOBUF_FIELD_OFFSET(Result, _impl_.result_.infeasible_), _Internal::kOneofCaseOffset + 0, 1, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, - // .ommx.v1.Unbounded unbounded = 4; + // .ommx.v1.Unbounded unbounded = 4 [json_name = "unbounded"]; {PROTOBUF_FIELD_OFFSET(Result, _impl_.result_.unbounded_), _Internal::kOneofCaseOffset + 0, 2, (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, }}, {{ @@ -1353,25 +1359,25 @@ ::size_t Result::ByteSizeLong() const { (void) cached_has_bits; switch (result_case()) { - // string error = 1; + // string error = 1 [json_name = "error"]; case kError: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( this->_internal_error()); break; } - // .ommx.v1.Solution solution = 2; + // .ommx.v1.Solution solution = 2 [json_name = "solution"]; case kSolution: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.result_.solution_); break; } - // .ommx.v1.Infeasible infeasible = 3; + // .ommx.v1.Infeasible infeasible = 3 [json_name = "infeasible"]; case kInfeasible: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.result_.infeasible_); break; } - // .ommx.v1.Unbounded unbounded = 4; + // .ommx.v1.Unbounded unbounded = 4 [json_name = "unbounded"]; case kUnbounded: { total_size += 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.result_.unbounded_); diff --git a/cpp/ommx/v1/solution.pb.h b/cpp/ommx/v1/solution.pb.h index c615d767..894e2a93 100644 --- a/cpp/ommx/v1/solution.pb.h +++ b/cpp/ommx/v1/solution.pb.h @@ -592,7 +592,7 @@ class State final : public ::google::protobuf::Message enum : int { kEntriesFieldNumber = 1, }; - // map entries = 1; + // map entries = 1 [json_name = "entries"]; int entries_size() const; private: int _internal_entries_size() const; @@ -777,7 +777,7 @@ class Solution final : public ::google::protobuf::Message kOptimalityFieldNumber = 6, kRelaxationFieldNumber = 7, }; - // repeated .ommx.v1.DecisionVariable decision_variables = 3; + // repeated .ommx.v1.DecisionVariable decision_variables = 3 [json_name = "decisionVariables"]; int decision_variables_size() const; private: int _internal_decision_variables_size() const; @@ -794,7 +794,7 @@ class Solution final : public ::google::protobuf::Message const ::ommx::v1::DecisionVariable& decision_variables(int index) const; ::ommx::v1::DecisionVariable* add_decision_variables(); const ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>& decision_variables() const; - // repeated .ommx.v1.EvaluatedConstraint evaluated_constraints = 4; + // repeated .ommx.v1.EvaluatedConstraint evaluated_constraints = 4 [json_name = "evaluatedConstraints"]; int evaluated_constraints_size() const; private: int _internal_evaluated_constraints_size() const; @@ -811,7 +811,7 @@ class Solution final : public ::google::protobuf::Message const ::ommx::v1::EvaluatedConstraint& evaluated_constraints(int index) const; ::ommx::v1::EvaluatedConstraint* add_evaluated_constraints(); const ::google::protobuf::RepeatedPtrField<::ommx::v1::EvaluatedConstraint>& evaluated_constraints() const; - // .ommx.v1.State state = 1; + // .ommx.v1.State state = 1 [json_name = "state"]; bool has_state() const; void clear_state() ; const ::ommx::v1::State& state() const; @@ -826,7 +826,7 @@ class Solution final : public ::google::protobuf::Message ::ommx::v1::State* _internal_mutable_state(); public: - // double objective = 2; + // double objective = 2 [json_name = "objective"]; void clear_objective() ; double objective() const; void set_objective(double value); @@ -836,7 +836,7 @@ class Solution final : public ::google::protobuf::Message void _internal_set_objective(double value); public: - // bool feasible = 5; + // bool feasible = 5 [json_name = "feasible"]; void clear_feasible() ; bool feasible() const; void set_feasible(bool value); @@ -846,7 +846,7 @@ class Solution final : public ::google::protobuf::Message void _internal_set_feasible(bool value); public: - // .ommx.v1.Optimality optimality = 6; + // .ommx.v1.Optimality optimality = 6 [json_name = "optimality"]; void clear_optimality() ; ::ommx::v1::Optimality optimality() const; void set_optimality(::ommx::v1::Optimality value); @@ -856,7 +856,7 @@ class Solution final : public ::google::protobuf::Message void _internal_set_optimality(::ommx::v1::Optimality value); public: - // .ommx.v1.Relaxation relaxation = 7; + // .ommx.v1.Relaxation relaxation = 7 [json_name = "relaxation"]; void clear_relaxation() ; ::ommx::v1::Relaxation relaxation() const; void set_relaxation(::ommx::v1::Relaxation value); @@ -1044,7 +1044,7 @@ class Result final : public ::google::protobuf::Message kInfeasibleFieldNumber = 3, kUnboundedFieldNumber = 4, }; - // string error = 1; + // string error = 1 [json_name = "error"]; bool has_error() const; void clear_error() ; const std::string& error() const; @@ -1061,7 +1061,7 @@ class Result final : public ::google::protobuf::Message std::string* _internal_mutable_error(); public: - // .ommx.v1.Solution solution = 2; + // .ommx.v1.Solution solution = 2 [json_name = "solution"]; bool has_solution() const; private: bool _internal_has_solution() const; @@ -1080,7 +1080,7 @@ class Result final : public ::google::protobuf::Message ::ommx::v1::Solution* _internal_mutable_solution(); public: - // .ommx.v1.Infeasible infeasible = 3; + // .ommx.v1.Infeasible infeasible = 3 [json_name = "infeasible"]; bool has_infeasible() const; private: bool _internal_has_infeasible() const; @@ -1099,7 +1099,7 @@ class Result final : public ::google::protobuf::Message ::ommx::v1::Infeasible* _internal_mutable_infeasible(); public: - // .ommx.v1.Unbounded unbounded = 4; + // .ommx.v1.Unbounded unbounded = 4 [json_name = "unbounded"]; bool has_unbounded() const; private: bool _internal_has_unbounded() const; @@ -1186,7 +1186,7 @@ class Result final : public ::google::protobuf::Message // State -// map entries = 1; +// map entries = 1 [json_name = "entries"]; inline int State::_internal_entries_size() const { return _internal_entries().size(); } @@ -1218,7 +1218,7 @@ inline ::google::protobuf::Map<::uint64_t, double>* State::mutable_entries() ABS // Solution -// .ommx.v1.State state = 1; +// .ommx.v1.State state = 1 [json_name = "state"]; inline bool Solution::has_state() const { bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; PROTOBUF_ASSUME(!value || _impl_.state_ != nullptr); @@ -1314,7 +1314,7 @@ inline void Solution::set_allocated_state(::ommx::v1::State* value) { // @@protoc_insertion_point(field_set_allocated:ommx.v1.Solution.state) } -// double objective = 2; +// double objective = 2 [json_name = "objective"]; inline void Solution::clear_objective() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.objective_ = 0; @@ -1336,7 +1336,7 @@ inline void Solution::_internal_set_objective(double value) { _impl_.objective_ = value; } -// repeated .ommx.v1.DecisionVariable decision_variables = 3; +// repeated .ommx.v1.DecisionVariable decision_variables = 3 [json_name = "decisionVariables"]; inline int Solution::_internal_decision_variables_size() const { return _internal_decision_variables().size(); } @@ -1381,7 +1381,7 @@ Solution::_internal_mutable_decision_variables() { return &_impl_.decision_variables_; } -// repeated .ommx.v1.EvaluatedConstraint evaluated_constraints = 4; +// repeated .ommx.v1.EvaluatedConstraint evaluated_constraints = 4 [json_name = "evaluatedConstraints"]; inline int Solution::_internal_evaluated_constraints_size() const { return _internal_evaluated_constraints().size(); } @@ -1426,7 +1426,7 @@ Solution::_internal_mutable_evaluated_constraints() { return &_impl_.evaluated_constraints_; } -// bool feasible = 5; +// bool feasible = 5 [json_name = "feasible"]; inline void Solution::clear_feasible() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.feasible_ = false; @@ -1448,7 +1448,7 @@ inline void Solution::_internal_set_feasible(bool value) { _impl_.feasible_ = value; } -// .ommx.v1.Optimality optimality = 6; +// .ommx.v1.Optimality optimality = 6 [json_name = "optimality"]; inline void Solution::clear_optimality() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.optimality_ = 0; @@ -1470,7 +1470,7 @@ inline void Solution::_internal_set_optimality(::ommx::v1::Optimality value) { _impl_.optimality_ = value; } -// .ommx.v1.Relaxation relaxation = 7; +// .ommx.v1.Relaxation relaxation = 7 [json_name = "relaxation"]; inline void Solution::clear_relaxation() { ::google::protobuf::internal::TSanWrite(&_impl_); _impl_.relaxation_ = 0; @@ -1504,7 +1504,7 @@ inline void Solution::_internal_set_relaxation(::ommx::v1::Relaxation value) { // Result -// string error = 1; +// string error = 1 [json_name = "error"]; inline bool Result::has_error() const { return result_case() == kError; } @@ -1589,7 +1589,7 @@ inline void Result::set_allocated_error(std::string* value) { // @@protoc_insertion_point(field_set_allocated:ommx.v1.Result.error) } -// .ommx.v1.Solution solution = 2; +// .ommx.v1.Solution solution = 2 [json_name = "solution"]; inline bool Result::has_solution() const { return result_case() == kSolution; } @@ -1668,7 +1668,7 @@ inline ::ommx::v1::Solution* Result::mutable_solution() ABSL_ATTRIBUTE_LIFETIME_ return _msg; } -// .ommx.v1.Infeasible infeasible = 3; +// .ommx.v1.Infeasible infeasible = 3 [json_name = "infeasible"]; inline bool Result::has_infeasible() const { return result_case() == kInfeasible; } @@ -1747,7 +1747,7 @@ inline ::ommx::v1::Infeasible* Result::mutable_infeasible() ABSL_ATTRIBUTE_LIFET return _msg; } -// .ommx.v1.Unbounded unbounded = 4; +// .ommx.v1.Unbounded unbounded = 4 [json_name = "unbounded"]; inline bool Result::has_unbounded() const { return result_case() == kUnbounded; } diff --git a/proto/buf.gen.cpp.yaml b/proto/buf.gen.cpp.yaml new file mode 100644 index 00000000..0b1bb969 --- /dev/null +++ b/proto/buf.gen.cpp.yaml @@ -0,0 +1,6 @@ +version: v1 +managed: + enabled: true +plugins: + - name: cpp + out: ../cpp From 14719cb043f05d74b18681b69b395ec5b67d81bd Mon Sep 17 00:00:00 2001 From: Shitaro Date: Wed, 21 Aug 2024 20:02:13 +0900 Subject: [PATCH 4/7] add action --- .github/workflows/cpp.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/cpp.yml diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml new file mode 100644 index 00000000..ddd02d68 --- /dev/null +++ b/.github/workflows/cpp.yml @@ -0,0 +1,36 @@ +name: C++ + +on: + push: + branches: + - main + pull_request: + workflow_dispatch: + +jobs: + protogen: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup protobuf compiler + uses: arduino/setup-protoc@v3 + with: + version: "26.1" + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup buf + uses: bufbuild/buf-setup-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Regenerate c++ codes from proto files + run: | + buf generate --template buf.gen.cpp.yaml + working-directory: proto + + - name: Check updated + run: | + git add -N cpp/ommx/ # To check newly generated files + git diff --exit-code From 797cbad77341c849aefef2d317fe553a35e54654 Mon Sep 17 00:00:00 2001 From: shitaro Date: Wed, 21 Aug 2024 20:08:32 +0900 Subject: [PATCH 5/7] re-generate c++ codes from protobuf with protoc 26.1 --- cpp/ommx/v1/constraint.pb.cc | 267 ++++++++++---------- cpp/ommx/v1/constraint.pb.h | 206 +++++++-------- cpp/ommx/v1/decision_variables.pb.cc | 200 ++++++++------- cpp/ommx/v1/decision_variables.pb.h | 134 +++++----- cpp/ommx/v1/function.pb.cc | 104 ++++---- cpp/ommx/v1/function.pb.h | 28 +-- cpp/ommx/v1/instance.pb.cc | 203 ++++++++------- cpp/ommx/v1/instance.pb.h | 154 ++++++------ cpp/ommx/v1/linear.pb.cc | 135 +++++----- cpp/ommx/v1/linear.pb.h | 72 +++--- cpp/ommx/v1/polynomial.pb.cc | 135 +++++----- cpp/ommx/v1/polynomial.pb.h | 70 +++--- cpp/ommx/v1/quadratic.pb.cc | 106 ++++---- cpp/ommx/v1/quadratic.pb.h | 68 +++-- cpp/ommx/v1/solution.pb.cc | 359 ++++++++++----------------- cpp/ommx/v1/solution.pb.h | 188 ++++++-------- 16 files changed, 1182 insertions(+), 1247 deletions(-) diff --git a/cpp/ommx/v1/constraint.pb.cc b/cpp/ommx/v1/constraint.pb.cc index 2b27c011..d33169f4 100644 --- a/cpp/ommx/v1/constraint.pb.cc +++ b/cpp/ommx/v1/constraint.pb.cc @@ -1,20 +1,18 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE // source: ommx/v1/constraint.proto -// Protobuf C++ Version: 5.27.3 +// Protobuf C++ Version: 5.26.1 #include "ommx/v1/constraint.pb.h" #include -#include #include "google/protobuf/io/coded_stream.h" -#include "google/protobuf/generated_message_tctable_impl.h" #include "google/protobuf/extension_set.h" #include "google/protobuf/wire_format_lite.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/generated_message_reflection.h" #include "google/protobuf/reflection_ops.h" #include "google/protobuf/wire_format.h" +#include "google/protobuf/generated_message_tctable_impl.h" // @@protoc_insertion_point(includes) // Must be included last. @@ -114,6 +112,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ConstraintDefaultTypeInternal _Constraint_default_instance_; } // namespace v1 } // namespace ommx +static ::_pb::Metadata file_level_metadata_ommx_2fv1_2fconstraint_2eproto[4]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_ommx_2fv1_2fconstraint_2eproto[1]; static constexpr const ::_pb::ServiceDescriptor** file_level_service_descriptors_ommx_2fv1_2fconstraint_2eproto = nullptr; @@ -244,7 +243,7 @@ static const ::_pbi::DescriptorTable* const descriptor_table_ommx_2fv1_2fconstra &::descriptor_table_ommx_2fv1_2ffunction_2eproto, }; static ::absl::once_flag descriptor_table_ommx_2fv1_2fconstraint_2eproto_once; -PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fconstraint_2eproto = { +const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fconstraint_2eproto = { false, false, 1156, @@ -257,9 +256,25 @@ PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fco schemas, file_default_instances, TableStruct_ommx_2fv1_2fconstraint_2eproto::offsets, + file_level_metadata_ommx_2fv1_2fconstraint_2eproto, file_level_enum_descriptors_ommx_2fv1_2fconstraint_2eproto, file_level_service_descriptors_ommx_2fv1_2fconstraint_2eproto, }; + +// This function exists to be marked as weak. +// It can significantly speed up compilation by breaking up LLVM's SCC +// in the .pb.cc translation units. Large translation units see a +// reduction of more than 35% of walltime for optimized builds. Without +// the weak attribute all the messages in the file, including all the +// vtables and everything they use become part of the same SCC through +// a cycle like: +// GetMetadata -> descriptor table -> default instances -> +// vtables -> GetMetadata +// By adding a weak function here we break the connection from the +// individual vtables back into the descriptor table. +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_ommx_2fv1_2fconstraint_2eproto_getter() { + return &descriptor_table_ommx_2fv1_2fconstraint_2eproto; +} namespace ommx { namespace v1 { const ::google::protobuf::EnumDescriptor* Equality_descriptor() { @@ -274,39 +289,24 @@ bool Equality_IsValid(int value) { // =================================================================== Constraint_ParametersEntry_DoNotUse::Constraint_ParametersEntry_DoNotUse() {} -Constraint_ParametersEntry_DoNotUse::Constraint_ParametersEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {} -const ::google::protobuf::MessageLite::ClassData* -Constraint_ParametersEntry_DoNotUse::GetClassData() const { - PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: - ClassDataFull _data_ = { - { - nullptr, // tc_table - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - PROTOBUF_FIELD_OFFSET(Constraint_ParametersEntry_DoNotUse, _cached_size_), - false, - }, - &Constraint_ParametersEntry_DoNotUse::MergeImpl, - &Constraint_ParametersEntry_DoNotUse::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2fconstraint_2eproto, - nullptr, // tracker - }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); +Constraint_ParametersEntry_DoNotUse::Constraint_ParametersEntry_DoNotUse(::google::protobuf::Arena* arena) + : SuperType(arena) {} +::google::protobuf::Metadata Constraint_ParametersEntry_DoNotUse::GetMetadata() const { + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2fconstraint_2eproto_getter, + &descriptor_table_ommx_2fv1_2fconstraint_2eproto_once, + file_level_metadata_ommx_2fv1_2fconstraint_2eproto[0]); } // =================================================================== class Constraint::_Internal { public: - using HasBits = - decltype(std::declval()._impl_._has_bits_); + using HasBits = decltype(std::declval()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(Constraint, _impl_._has_bits_); + 8 * PROTOBUF_FIELD_OFFSET(Constraint, _impl_._has_bits_); }; void Constraint::clear_function() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (_impl_.function_ != nullptr) _impl_.function_->Clear(); _impl_._has_bits_[0] &= ~0x00000004u; } @@ -317,7 +317,7 @@ Constraint::Constraint(::google::protobuf::Arena* arena) } inline PROTOBUF_NDEBUG_INLINE Constraint::Impl_::Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, - const Impl_& from, const ::ommx::v1::Constraint& from_msg) + const Impl_& from) : _has_bits_{from._has_bits_}, _cached_size_{0}, parameters_{visibility, arena, from.parameters_}, @@ -334,7 +334,7 @@ Constraint::Constraint( (void)_this; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; _impl_.function_ = (cached_has_bits & 0x00000004u) ? ::google::protobuf::Message::CopyConstruct<::ommx::v1::Function>( arena, *from._impl_.function_) @@ -386,21 +386,51 @@ Constraint::GetClassData() const { PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: ClassDataFull _data_ = { { - &_table_.header, nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized PROTOBUF_FIELD_OFFSET(Constraint, _impl_._cached_size_), false, }, &Constraint::MergeImpl, &Constraint::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2fconstraint_2eproto, - nullptr, // tracker }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); + return &_data_; } +PROTOBUF_NOINLINE void Constraint::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Constraint) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.parameters_.Clear(); + _impl_.subscripts_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.description_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + ABSL_DCHECK(_impl_.function_ != nullptr); + _impl_.function_->Clear(); + } + } + ::memset(&_impl_.id_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.equality_) - + reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.equality_)); + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Constraint::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::TcParseTable<3, 7, 2, 52, 2> Constraint::_table_ = { { @@ -414,7 +444,6 @@ const ::_pbi::TcParseTable<3, 7, 2, 52, 2> Constraint::_table_ = { 2, // num_aux_entries offsetof(decltype(_table_), aux_entries), &_Constraint_default_instance_._instance, - nullptr, // post_loop_handler ::_pbi::TcParser::GenericFallback, // fallback #ifdef PROTOBUF_PREFETCH_PARSE_TABLE ::_pbi::TcParser::GetTable<::ommx::v1::Constraint>(), // to_prefetch @@ -479,35 +508,6 @@ const ::_pbi::TcParseTable<3, 7, 2, 52, 2> Constraint::_table_ = { }}, }; -PROTOBUF_NOINLINE void Constraint::Clear() { -// @@protoc_insertion_point(message_clear_start:ommx.v1.Constraint) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.parameters_.Clear(); - _impl_.subscripts_.Clear(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000007u) { - if (cached_has_bits & 0x00000001u) { - _impl_.name_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000002u) { - _impl_.description_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000004u) { - ABSL_DCHECK(_impl_.function_ != nullptr); - _impl_.function_->Clear(); - } - } - ::memset(&_impl_.id_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.equality_) - - reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.equality_)); - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - ::uint8_t* Constraint::_InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const { @@ -611,7 +611,6 @@ ::size_t Constraint::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); // map parameters = 5 [json_name = "parameters"]; total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_parameters_size()); for (const auto& entry : _internal_parameters()) { @@ -715,6 +714,9 @@ void Constraint::CopyFrom(const Constraint& from) { MergeFrom(from); } +PROTOBUF_NOINLINE bool Constraint::IsInitialized() const { + return true; +} void Constraint::InternalSwap(Constraint* PROTOBUF_RESTRICT other) { using std::swap; @@ -735,40 +737,27 @@ void Constraint::InternalSwap(Constraint* PROTOBUF_RESTRICT other) { } ::google::protobuf::Metadata Constraint::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2fconstraint_2eproto_getter, + &descriptor_table_ommx_2fv1_2fconstraint_2eproto_once, + file_level_metadata_ommx_2fv1_2fconstraint_2eproto[1]); } // =================================================================== EvaluatedConstraint_ParametersEntry_DoNotUse::EvaluatedConstraint_ParametersEntry_DoNotUse() {} -EvaluatedConstraint_ParametersEntry_DoNotUse::EvaluatedConstraint_ParametersEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {} -const ::google::protobuf::MessageLite::ClassData* -EvaluatedConstraint_ParametersEntry_DoNotUse::GetClassData() const { - PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: - ClassDataFull _data_ = { - { - nullptr, // tc_table - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - PROTOBUF_FIELD_OFFSET(EvaluatedConstraint_ParametersEntry_DoNotUse, _cached_size_), - false, - }, - &EvaluatedConstraint_ParametersEntry_DoNotUse::MergeImpl, - &EvaluatedConstraint_ParametersEntry_DoNotUse::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2fconstraint_2eproto, - nullptr, // tracker - }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); +EvaluatedConstraint_ParametersEntry_DoNotUse::EvaluatedConstraint_ParametersEntry_DoNotUse(::google::protobuf::Arena* arena) + : SuperType(arena) {} +::google::protobuf::Metadata EvaluatedConstraint_ParametersEntry_DoNotUse::GetMetadata() const { + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2fconstraint_2eproto_getter, + &descriptor_table_ommx_2fv1_2fconstraint_2eproto_once, + file_level_metadata_ommx_2fv1_2fconstraint_2eproto[2]); } // =================================================================== class EvaluatedConstraint::_Internal { public: - using HasBits = - decltype(std::declval()._impl_._has_bits_); + using HasBits = decltype(std::declval()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_._has_bits_); + 8 * PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_._has_bits_); }; EvaluatedConstraint::EvaluatedConstraint(::google::protobuf::Arena* arena) @@ -778,7 +767,7 @@ EvaluatedConstraint::EvaluatedConstraint(::google::protobuf::Arena* arena) } inline PROTOBUF_NDEBUG_INLINE EvaluatedConstraint::Impl_::Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, - const Impl_& from, const ::ommx::v1::EvaluatedConstraint& from_msg) + const Impl_& from) : _has_bits_{from._has_bits_}, _cached_size_{0}, used_decision_variable_ids_{visibility, arena, from.used_decision_variable_ids_}, @@ -797,7 +786,7 @@ EvaluatedConstraint::EvaluatedConstraint( (void)_this; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); ::memcpy(reinterpret_cast(&_impl_) + offsetof(Impl_, id_), reinterpret_cast(&from._impl_) + @@ -846,21 +835,50 @@ EvaluatedConstraint::GetClassData() const { PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: ClassDataFull _data_ = { { - &_table_.header, nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized PROTOBUF_FIELD_OFFSET(EvaluatedConstraint, _impl_._cached_size_), false, }, &EvaluatedConstraint::MergeImpl, &EvaluatedConstraint::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2fconstraint_2eproto, - nullptr, // tracker }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); + return &_data_; } +PROTOBUF_NOINLINE void EvaluatedConstraint::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.EvaluatedConstraint) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.used_decision_variable_ids_.Clear(); + _impl_.parameters_.Clear(); + _impl_.subscripts_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.description_.ClearNonDefaultToEmpty(); + } + } + ::memset(&_impl_.id_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.evaluated_value_) - + reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.evaluated_value_)); + _impl_.dual_variable_ = 0; + _impl_.equality_ = 0; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* EvaluatedConstraint::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::TcParseTable<4, 9, 1, 69, 2> EvaluatedConstraint::_table_ = { { @@ -874,7 +892,6 @@ const ::_pbi::TcParseTable<4, 9, 1, 69, 2> EvaluatedConstraint::_table_ = { 1, // num_aux_entries offsetof(decltype(_table_), aux_entries), &_EvaluatedConstraint_default_instance_._instance, - nullptr, // post_loop_handler ::_pbi::TcParser::GenericFallback, // fallback #ifdef PROTOBUF_PREFETCH_PARSE_TABLE ::_pbi::TcParser::GetTable<::ommx::v1::EvaluatedConstraint>(), // to_prefetch @@ -956,34 +973,6 @@ const ::_pbi::TcParseTable<4, 9, 1, 69, 2> EvaluatedConstraint::_table_ = { }}, }; -PROTOBUF_NOINLINE void EvaluatedConstraint::Clear() { -// @@protoc_insertion_point(message_clear_start:ommx.v1.EvaluatedConstraint) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.used_decision_variable_ids_.Clear(); - _impl_.parameters_.Clear(); - _impl_.subscripts_.Clear(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - if (cached_has_bits & 0x00000001u) { - _impl_.name_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000002u) { - _impl_.description_.ClearNonDefaultToEmpty(); - } - } - ::memset(&_impl_.id_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.evaluated_value_) - - reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.evaluated_value_)); - _impl_.dual_variable_ = 0; - _impl_.equality_ = 0; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - ::uint8_t* EvaluatedConstraint::_InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const { @@ -1109,7 +1098,6 @@ ::size_t EvaluatedConstraint::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); // repeated uint64 used_decision_variable_ids = 4 [json_name = "usedDecisionVariableIds"]; { std::size_t data_size = ::_pbi::WireFormatLite::UInt64Size( @@ -1237,6 +1225,9 @@ void EvaluatedConstraint::CopyFrom(const EvaluatedConstraint& from) { MergeFrom(from); } +PROTOBUF_NOINLINE bool EvaluatedConstraint::IsInitialized() const { + return true; +} void EvaluatedConstraint::InternalSwap(EvaluatedConstraint* PROTOBUF_RESTRICT other) { using std::swap; @@ -1258,7 +1249,9 @@ void EvaluatedConstraint::InternalSwap(EvaluatedConstraint* PROTOBUF_RESTRICT ot } ::google::protobuf::Metadata EvaluatedConstraint::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2fconstraint_2eproto_getter, + &descriptor_table_ommx_2fv1_2fconstraint_2eproto_once, + file_level_metadata_ommx_2fv1_2fconstraint_2eproto[3]); } // @@protoc_insertion_point(namespace_scope) } // namespace v1 @@ -1268,8 +1261,8 @@ namespace protobuf { } // namespace protobuf } // namespace google // @@protoc_insertion_point(global_scope) -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type - _static_init2_ PROTOBUF_UNUSED = - (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2fconstraint_2eproto), - ::std::false_type{}); +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 +static ::std::false_type _static_init_ PROTOBUF_UNUSED = + (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2fconstraint_2eproto), + ::std::false_type{}); #include "google/protobuf/port_undef.inc" diff --git a/cpp/ommx/v1/constraint.pb.h b/cpp/ommx/v1/constraint.pb.h index 491c145e..8da00a87 100644 --- a/cpp/ommx/v1/constraint.pb.h +++ b/cpp/ommx/v1/constraint.pb.h @@ -1,7 +1,6 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE // source: ommx/v1/constraint.proto -// Protobuf C++ Version: 5.27.3 +// Protobuf C++ Version: 5.26.1 #ifndef GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fconstraint_2eproto_2epb_2eh #define GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fconstraint_2eproto_2epb_2eh @@ -11,12 +10,13 @@ #include #include -#include "google/protobuf/runtime_version.h" -#if PROTOBUF_VERSION != 5027003 +#include "google/protobuf/port_def.inc" +#if PROTOBUF_VERSION != 5026001 #error "Protobuf C++ gencode is built with an incompatible version of" #error "Protobuf C++ headers/runtime. See" #error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" #endif +#include "google/protobuf/port_undef.inc" #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/arena.h" #include "google/protobuf/arenastring.h" @@ -136,7 +136,13 @@ class EvaluatedConstraint_ParametersEntry_DoNotUse final return reinterpret_cast( &_EvaluatedConstraint_ParametersEntry_DoNotUse_default_instance_); } -const ::google::protobuf::Message::ClassData* GetClassData() const final; + static bool ValidateKey(std::string* s) { + return ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::google::protobuf::internal::WireFormatLite::PARSE, "ommx.v1.EvaluatedConstraint.ParametersEntry.key"); + } + static bool ValidateValue(std::string* s) { + return ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::google::protobuf::internal::WireFormatLite::PARSE, "ommx.v1.EvaluatedConstraint.ParametersEntry.value"); + } + ::google::protobuf::Metadata GetMetadata() const final; friend struct ::TableStruct_ommx_2fv1_2fconstraint_2eproto; }; // ------------------------------------------------------------------- @@ -160,7 +166,13 @@ class Constraint_ParametersEntry_DoNotUse final return reinterpret_cast( &_Constraint_ParametersEntry_DoNotUse_default_instance_); } -const ::google::protobuf::Message::ClassData* GetClassData() const final; + static bool ValidateKey(std::string* s) { + return ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::google::protobuf::internal::WireFormatLite::PARSE, "ommx.v1.Constraint.ParametersEntry.key"); + } + static bool ValidateValue(std::string* s) { + return ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::google::protobuf::internal::WireFormatLite::PARSE, "ommx.v1.Constraint.ParametersEntry.value"); + } + ::google::protobuf::Metadata GetMetadata() const final; friend struct ::TableStruct_ommx_2fv1_2fconstraint_2eproto; }; // ------------------------------------------------------------------- @@ -256,11 +268,11 @@ class EvaluatedConstraint final : public ::google::protobuf::Message const ::google::protobuf::MessageLite& from_msg); public: - bool IsInitialized() const { - return true; - } ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; ::uint8_t* _InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; @@ -281,10 +293,11 @@ class EvaluatedConstraint final : public ::google::protobuf::Message : EvaluatedConstraint(arena) { *this = ::std::move(from); } - const ::google::protobuf::Message::ClassData* GetClassData() const final; + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- @@ -433,10 +446,6 @@ class EvaluatedConstraint final : public ::google::protobuf::Message 4, 9, 1, 69, 2> _table_; - - static constexpr const void* _raw_default_instance_ = - &_EvaluatedConstraint_default_instance_; - friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; template @@ -449,8 +458,7 @@ class EvaluatedConstraint final : public ::google::protobuf::Message inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena); inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* arena, const Impl_& from, - const EvaluatedConstraint& from_msg); + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::RepeatedField<::uint64_t> used_decision_variable_ids_; @@ -565,11 +573,11 @@ class Constraint final : public ::google::protobuf::Message const ::google::protobuf::MessageLite& from_msg); public: - bool IsInitialized() const { - return true; - } ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; ::uint8_t* _InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; @@ -590,10 +598,11 @@ class Constraint final : public ::google::protobuf::Message : Constraint(arena) { *this = ::std::move(from); } - const ::google::protobuf::Message::ClassData* GetClassData() const final; + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- @@ -716,10 +725,6 @@ class Constraint final : public ::google::protobuf::Message 3, 7, 2, 52, 2> _table_; - - static constexpr const void* _raw_default_instance_ = - &_Constraint_default_instance_; - friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; template @@ -732,8 +737,7 @@ class Constraint final : public ::google::protobuf::Message inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena); inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* arena, const Impl_& from, - const Constraint& from_msg); + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::internal::MapField(_impl_.equality_); } inline void Constraint::_internal_set_equality(::ommx::v1::Equality value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.equality_ = value; } @@ -822,7 +826,7 @@ inline bool Constraint::has_function() const { return value; } inline const ::ommx::v1::Function& Constraint::_internal_function() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::ommx::v1::Function* p = _impl_.function_; return p != nullptr ? *p : reinterpret_cast(::ommx::v1::_Function_default_instance_); } @@ -831,7 +835,7 @@ inline const ::ommx::v1::Function& Constraint::function() const ABSL_ATTRIBUTE_L return _internal_function(); } inline void Constraint::unsafe_arena_set_allocated_function(::ommx::v1::Function* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (GetArena() == nullptr) { delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.function_); } @@ -844,7 +848,7 @@ inline void Constraint::unsafe_arena_set_allocated_function(::ommx::v1::Function // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ommx.v1.Constraint.function) } inline ::ommx::v1::Function* Constraint::release_function() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] &= ~0x00000004u; ::ommx::v1::Function* released = _impl_.function_; @@ -863,7 +867,7 @@ inline ::ommx::v1::Function* Constraint::release_function() { return released; } inline ::ommx::v1::Function* Constraint::unsafe_arena_release_function() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:ommx.v1.Constraint.function) _impl_._has_bits_[0] &= ~0x00000004u; @@ -872,7 +876,7 @@ inline ::ommx::v1::Function* Constraint::unsafe_arena_release_function() { return temp; } inline ::ommx::v1::Function* Constraint::_internal_mutable_function() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (_impl_.function_ == nullptr) { auto* p = ::google::protobuf::Message::DefaultConstruct<::ommx::v1::Function>(GetArena()); _impl_.function_ = reinterpret_cast<::ommx::v1::Function*>(p); @@ -887,7 +891,7 @@ inline ::ommx::v1::Function* Constraint::mutable_function() ABSL_ATTRIBUTE_LIFET } inline void Constraint::set_allocated_function(::ommx::v1::Function* value) { ::google::protobuf::Arena* message_arena = GetArena(); - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.function_); } @@ -914,7 +918,7 @@ inline int Constraint::subscripts_size() const { return _internal_subscripts_size(); } inline void Constraint::clear_subscripts() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.subscripts_.Clear(); } inline ::int64_t Constraint::subscripts(int index) const { @@ -926,7 +930,7 @@ inline void Constraint::set_subscripts(int index, ::int64_t value) { // @@protoc_insertion_point(field_set:ommx.v1.Constraint.subscripts) } inline void Constraint::add_subscripts(::int64_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _internal_mutable_subscripts()->Add(value); // @@protoc_insertion_point(field_add:ommx.v1.Constraint.subscripts) } @@ -938,16 +942,16 @@ inline const ::google::protobuf::RepeatedField<::int64_t>& Constraint::subscript inline ::google::protobuf::RepeatedField<::int64_t>* Constraint::mutable_subscripts() ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:ommx.v1.Constraint.subscripts) - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _internal_mutable_subscripts(); } inline const ::google::protobuf::RepeatedField<::int64_t>& Constraint::_internal_subscripts() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.subscripts_; } inline ::google::protobuf::RepeatedField<::int64_t>* Constraint::_internal_mutable_subscripts() { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return &_impl_.subscripts_; } @@ -959,11 +963,11 @@ inline int Constraint::parameters_size() const { return _internal_parameters_size(); } inline void Constraint::clear_parameters() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.parameters_.Clear(); } inline const ::google::protobuf::Map& Constraint::_internal_parameters() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.parameters_.GetMap(); } inline const ::google::protobuf::Map& Constraint::parameters() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -971,7 +975,7 @@ inline const ::google::protobuf::Map& Constraint::para return _internal_parameters(); } inline ::google::protobuf::Map* Constraint::_internal_mutable_parameters() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _impl_.parameters_.MutableMap(); } inline ::google::protobuf::Map* Constraint::mutable_parameters() ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -985,7 +989,7 @@ inline bool Constraint::has_name() const { return value; } inline void Constraint::clear_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.name_.ClearToEmpty(); _impl_._has_bits_[0] &= ~0x00000001u; } @@ -997,7 +1001,7 @@ inline const std::string& Constraint::name() const template inline PROTOBUF_ALWAYS_INLINE void Constraint::set_name(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000001u; _impl_.name_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:ommx.v1.Constraint.name) @@ -1008,21 +1012,21 @@ inline std::string* Constraint::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOUND { return _s; } inline const std::string& Constraint::_internal_name() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.name_.Get(); } inline void Constraint::_internal_set_name(const std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000001u; _impl_.name_.Set(value, GetArena()); } inline std::string* Constraint::_internal_mutable_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000001u; return _impl_.name_.Mutable( GetArena()); } inline std::string* Constraint::release_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:ommx.v1.Constraint.name) if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { return nullptr; @@ -1035,7 +1039,7 @@ inline std::string* Constraint::release_name() { return released; } inline void Constraint::set_allocated_name(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (value != nullptr) { _impl_._has_bits_[0] |= 0x00000001u; } else { @@ -1056,7 +1060,7 @@ inline bool Constraint::has_description() const { return value; } inline void Constraint::clear_description() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.description_.ClearToEmpty(); _impl_._has_bits_[0] &= ~0x00000002u; } @@ -1068,7 +1072,7 @@ inline const std::string& Constraint::description() const template inline PROTOBUF_ALWAYS_INLINE void Constraint::set_description(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000002u; _impl_.description_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:ommx.v1.Constraint.description) @@ -1079,21 +1083,21 @@ inline std::string* Constraint::mutable_description() ABSL_ATTRIBUTE_LIFETIME_BO return _s; } inline const std::string& Constraint::_internal_description() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.description_.Get(); } inline void Constraint::_internal_set_description(const std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000002u; _impl_.description_.Set(value, GetArena()); } inline std::string* Constraint::_internal_mutable_description() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000002u; return _impl_.description_.Mutable( GetArena()); } inline std::string* Constraint::release_description() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:ommx.v1.Constraint.description) if ((_impl_._has_bits_[0] & 0x00000002u) == 0) { return nullptr; @@ -1106,7 +1110,7 @@ inline std::string* Constraint::release_description() { return released; } inline void Constraint::set_allocated_description(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (value != nullptr) { _impl_._has_bits_[0] |= 0x00000002u; } else { @@ -1129,7 +1133,7 @@ inline void Constraint::set_allocated_description(std::string* value) { // uint64 id = 1 [json_name = "id"]; inline void EvaluatedConstraint::clear_id() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.id_ = ::uint64_t{0u}; } inline ::uint64_t EvaluatedConstraint::id() const { @@ -1141,17 +1145,17 @@ inline void EvaluatedConstraint::set_id(::uint64_t value) { // @@protoc_insertion_point(field_set:ommx.v1.EvaluatedConstraint.id) } inline ::uint64_t EvaluatedConstraint::_internal_id() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.id_; } inline void EvaluatedConstraint::_internal_set_id(::uint64_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.id_ = value; } // .ommx.v1.Equality equality = 2 [json_name = "equality"]; inline void EvaluatedConstraint::clear_equality() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.equality_ = 0; } inline ::ommx::v1::Equality EvaluatedConstraint::equality() const { @@ -1163,17 +1167,17 @@ inline void EvaluatedConstraint::set_equality(::ommx::v1::Equality value) { // @@protoc_insertion_point(field_set:ommx.v1.EvaluatedConstraint.equality) } inline ::ommx::v1::Equality EvaluatedConstraint::_internal_equality() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return static_cast<::ommx::v1::Equality>(_impl_.equality_); } inline void EvaluatedConstraint::_internal_set_equality(::ommx::v1::Equality value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.equality_ = value; } // double evaluated_value = 3 [json_name = "evaluatedValue"]; inline void EvaluatedConstraint::clear_evaluated_value() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.evaluated_value_ = 0; } inline double EvaluatedConstraint::evaluated_value() const { @@ -1185,11 +1189,11 @@ inline void EvaluatedConstraint::set_evaluated_value(double value) { // @@protoc_insertion_point(field_set:ommx.v1.EvaluatedConstraint.evaluated_value) } inline double EvaluatedConstraint::_internal_evaluated_value() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.evaluated_value_; } inline void EvaluatedConstraint::_internal_set_evaluated_value(double value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.evaluated_value_ = value; } @@ -1201,7 +1205,7 @@ inline int EvaluatedConstraint::used_decision_variable_ids_size() const { return _internal_used_decision_variable_ids_size(); } inline void EvaluatedConstraint::clear_used_decision_variable_ids() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.used_decision_variable_ids_.Clear(); } inline ::uint64_t EvaluatedConstraint::used_decision_variable_ids(int index) const { @@ -1213,7 +1217,7 @@ inline void EvaluatedConstraint::set_used_decision_variable_ids(int index, ::uin // @@protoc_insertion_point(field_set:ommx.v1.EvaluatedConstraint.used_decision_variable_ids) } inline void EvaluatedConstraint::add_used_decision_variable_ids(::uint64_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _internal_mutable_used_decision_variable_ids()->Add(value); // @@protoc_insertion_point(field_add:ommx.v1.EvaluatedConstraint.used_decision_variable_ids) } @@ -1225,16 +1229,16 @@ inline const ::google::protobuf::RepeatedField<::uint64_t>& EvaluatedConstraint: inline ::google::protobuf::RepeatedField<::uint64_t>* EvaluatedConstraint::mutable_used_decision_variable_ids() ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:ommx.v1.EvaluatedConstraint.used_decision_variable_ids) - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _internal_mutable_used_decision_variable_ids(); } inline const ::google::protobuf::RepeatedField<::uint64_t>& EvaluatedConstraint::_internal_used_decision_variable_ids() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.used_decision_variable_ids_; } inline ::google::protobuf::RepeatedField<::uint64_t>* EvaluatedConstraint::_internal_mutable_used_decision_variable_ids() { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return &_impl_.used_decision_variable_ids_; } @@ -1246,7 +1250,7 @@ inline int EvaluatedConstraint::subscripts_size() const { return _internal_subscripts_size(); } inline void EvaluatedConstraint::clear_subscripts() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.subscripts_.Clear(); } inline ::int64_t EvaluatedConstraint::subscripts(int index) const { @@ -1258,7 +1262,7 @@ inline void EvaluatedConstraint::set_subscripts(int index, ::int64_t value) { // @@protoc_insertion_point(field_set:ommx.v1.EvaluatedConstraint.subscripts) } inline void EvaluatedConstraint::add_subscripts(::int64_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _internal_mutable_subscripts()->Add(value); // @@protoc_insertion_point(field_add:ommx.v1.EvaluatedConstraint.subscripts) } @@ -1270,16 +1274,16 @@ inline const ::google::protobuf::RepeatedField<::int64_t>& EvaluatedConstraint:: inline ::google::protobuf::RepeatedField<::int64_t>* EvaluatedConstraint::mutable_subscripts() ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:ommx.v1.EvaluatedConstraint.subscripts) - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _internal_mutable_subscripts(); } inline const ::google::protobuf::RepeatedField<::int64_t>& EvaluatedConstraint::_internal_subscripts() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.subscripts_; } inline ::google::protobuf::RepeatedField<::int64_t>* EvaluatedConstraint::_internal_mutable_subscripts() { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return &_impl_.subscripts_; } @@ -1291,11 +1295,11 @@ inline int EvaluatedConstraint::parameters_size() const { return _internal_parameters_size(); } inline void EvaluatedConstraint::clear_parameters() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.parameters_.Clear(); } inline const ::google::protobuf::Map& EvaluatedConstraint::_internal_parameters() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.parameters_.GetMap(); } inline const ::google::protobuf::Map& EvaluatedConstraint::parameters() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -1303,7 +1307,7 @@ inline const ::google::protobuf::Map& EvaluatedConstra return _internal_parameters(); } inline ::google::protobuf::Map* EvaluatedConstraint::_internal_mutable_parameters() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _impl_.parameters_.MutableMap(); } inline ::google::protobuf::Map* EvaluatedConstraint::mutable_parameters() ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -1317,7 +1321,7 @@ inline bool EvaluatedConstraint::has_name() const { return value; } inline void EvaluatedConstraint::clear_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.name_.ClearToEmpty(); _impl_._has_bits_[0] &= ~0x00000001u; } @@ -1329,7 +1333,7 @@ inline const std::string& EvaluatedConstraint::name() const template inline PROTOBUF_ALWAYS_INLINE void EvaluatedConstraint::set_name(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000001u; _impl_.name_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:ommx.v1.EvaluatedConstraint.name) @@ -1340,21 +1344,21 @@ inline std::string* EvaluatedConstraint::mutable_name() ABSL_ATTRIBUTE_LIFETIME_ return _s; } inline const std::string& EvaluatedConstraint::_internal_name() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.name_.Get(); } inline void EvaluatedConstraint::_internal_set_name(const std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000001u; _impl_.name_.Set(value, GetArena()); } inline std::string* EvaluatedConstraint::_internal_mutable_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000001u; return _impl_.name_.Mutable( GetArena()); } inline std::string* EvaluatedConstraint::release_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:ommx.v1.EvaluatedConstraint.name) if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { return nullptr; @@ -1367,7 +1371,7 @@ inline std::string* EvaluatedConstraint::release_name() { return released; } inline void EvaluatedConstraint::set_allocated_name(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (value != nullptr) { _impl_._has_bits_[0] |= 0x00000001u; } else { @@ -1388,7 +1392,7 @@ inline bool EvaluatedConstraint::has_description() const { return value; } inline void EvaluatedConstraint::clear_description() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.description_.ClearToEmpty(); _impl_._has_bits_[0] &= ~0x00000002u; } @@ -1400,7 +1404,7 @@ inline const std::string& EvaluatedConstraint::description() const template inline PROTOBUF_ALWAYS_INLINE void EvaluatedConstraint::set_description(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000002u; _impl_.description_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:ommx.v1.EvaluatedConstraint.description) @@ -1411,21 +1415,21 @@ inline std::string* EvaluatedConstraint::mutable_description() ABSL_ATTRIBUTE_LI return _s; } inline const std::string& EvaluatedConstraint::_internal_description() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.description_.Get(); } inline void EvaluatedConstraint::_internal_set_description(const std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000002u; _impl_.description_.Set(value, GetArena()); } inline std::string* EvaluatedConstraint::_internal_mutable_description() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000002u; return _impl_.description_.Mutable( GetArena()); } inline std::string* EvaluatedConstraint::release_description() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:ommx.v1.EvaluatedConstraint.description) if ((_impl_._has_bits_[0] & 0x00000002u) == 0) { return nullptr; @@ -1438,7 +1442,7 @@ inline std::string* EvaluatedConstraint::release_description() { return released; } inline void EvaluatedConstraint::set_allocated_description(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (value != nullptr) { _impl_._has_bits_[0] |= 0x00000002u; } else { @@ -1459,7 +1463,7 @@ inline bool EvaluatedConstraint::has_dual_variable() const { return value; } inline void EvaluatedConstraint::clear_dual_variable() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.dual_variable_ = 0; _impl_._has_bits_[0] &= ~0x00000004u; } @@ -1473,11 +1477,11 @@ inline void EvaluatedConstraint::set_dual_variable(double value) { // @@protoc_insertion_point(field_set:ommx.v1.EvaluatedConstraint.dual_variable) } inline double EvaluatedConstraint::_internal_dual_variable() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.dual_variable_; } inline void EvaluatedConstraint::_internal_set_dual_variable(double value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.dual_variable_ = value; } diff --git a/cpp/ommx/v1/decision_variables.pb.cc b/cpp/ommx/v1/decision_variables.pb.cc index a7b9b85e..4ac6fe67 100644 --- a/cpp/ommx/v1/decision_variables.pb.cc +++ b/cpp/ommx/v1/decision_variables.pb.cc @@ -1,20 +1,18 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE // source: ommx/v1/decision_variables.proto -// Protobuf C++ Version: 5.27.3 +// Protobuf C++ Version: 5.26.1 #include "ommx/v1/decision_variables.pb.h" #include -#include #include "google/protobuf/io/coded_stream.h" -#include "google/protobuf/generated_message_tctable_impl.h" #include "google/protobuf/extension_set.h" #include "google/protobuf/wire_format_lite.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/generated_message_reflection.h" #include "google/protobuf/reflection_ops.h" #include "google/protobuf/wire_format.h" +#include "google/protobuf/generated_message_tctable_impl.h" // @@protoc_insertion_point(includes) // Must be included last. @@ -89,6 +87,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DecisionVariableDefaultTypeInternal _DecisionVariable_default_instance_; } // namespace v1 } // namespace ommx +static ::_pb::Metadata file_level_metadata_ommx_2fv1_2fdecision_5fvariables_2eproto[3]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_ommx_2fv1_2fdecision_5fvariables_2eproto[1]; static constexpr const ::_pb::ServiceDescriptor** file_level_service_descriptors_ommx_2fv1_2fdecision_5fvariables_2eproto = nullptr; @@ -175,7 +174,7 @@ const char descriptor_table_protodef_ommx_2fv1_2fdecision_5fvariables_2eproto[] "ta\352\002\010Ommx::V1b\006proto3" }; static ::absl::once_flag descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto_once; -PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto = { +const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto = { false, false, 741, @@ -188,9 +187,25 @@ PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fde schemas, file_default_instances, TableStruct_ommx_2fv1_2fdecision_5fvariables_2eproto::offsets, + file_level_metadata_ommx_2fv1_2fdecision_5fvariables_2eproto, file_level_enum_descriptors_ommx_2fv1_2fdecision_5fvariables_2eproto, file_level_service_descriptors_ommx_2fv1_2fdecision_5fvariables_2eproto, }; + +// This function exists to be marked as weak. +// It can significantly speed up compilation by breaking up LLVM's SCC +// in the .pb.cc translation units. Large translation units see a +// reduction of more than 35% of walltime for optimized builds. Without +// the weak attribute all the messages in the file, including all the +// vtables and everything they use become part of the same SCC through +// a cycle like: +// GetMetadata -> descriptor table -> default instances -> +// vtables -> GetMetadata +// By adding a weak function here we break the connection from the +// individual vtables back into the descriptor table. +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto_getter() { + return &descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto; +} namespace ommx { namespace v1 { const ::google::protobuf::EnumDescriptor* DecisionVariable_Kind_descriptor() { @@ -262,21 +277,35 @@ Bound::GetClassData() const { PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: ClassDataFull _data_ = { { - &_table_.header, nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized PROTOBUF_FIELD_OFFSET(Bound, _impl_._cached_size_), false, }, &Bound::MergeImpl, &Bound::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto, - nullptr, // tracker }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); + return &_data_; } +PROTOBUF_NOINLINE void Bound::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Bound) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&_impl_.lower_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.upper_) - + reinterpret_cast(&_impl_.lower_)) + sizeof(_impl_.upper_)); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Bound::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::TcParseTable<1, 2, 0, 0, 2> Bound::_table_ = { { @@ -290,7 +319,6 @@ const ::_pbi::TcParseTable<1, 2, 0, 0, 2> Bound::_table_ = { 0, // num_aux_entries offsetof(decltype(_table_), field_names), // no aux_entries &_Bound_default_instance_._instance, - nullptr, // post_loop_handler ::_pbi::TcParser::GenericFallback, // fallback #ifdef PROTOBUF_PREFETCH_PARSE_TABLE ::_pbi::TcParser::GetTable<::ommx::v1::Bound>(), // to_prefetch @@ -317,19 +345,6 @@ const ::_pbi::TcParseTable<1, 2, 0, 0, 2> Bound::_table_ = { }}, }; -PROTOBUF_NOINLINE void Bound::Clear() { -// @@protoc_insertion_point(message_clear_start:ommx.v1.Bound) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - ::memset(&_impl_.lower_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.upper_) - - reinterpret_cast(&_impl_.lower_)) + sizeof(_impl_.upper_)); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - ::uint8_t* Bound::_InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const { @@ -378,7 +393,6 @@ ::size_t Bound::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); // double lower = 1 [json_name = "lower"]; static_assert(sizeof(::uint64_t) == sizeof(double), "Code assumes ::uint64_t and double are the same size."); @@ -437,6 +451,9 @@ void Bound::CopyFrom(const Bound& from) { MergeFrom(from); } +PROTOBUF_NOINLINE bool Bound::IsInitialized() const { + return true; +} void Bound::InternalSwap(Bound* PROTOBUF_RESTRICT other) { using std::swap; @@ -450,40 +467,27 @@ void Bound::InternalSwap(Bound* PROTOBUF_RESTRICT other) { } ::google::protobuf::Metadata Bound::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto_getter, + &descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto_once, + file_level_metadata_ommx_2fv1_2fdecision_5fvariables_2eproto[0]); } // =================================================================== DecisionVariable_ParametersEntry_DoNotUse::DecisionVariable_ParametersEntry_DoNotUse() {} -DecisionVariable_ParametersEntry_DoNotUse::DecisionVariable_ParametersEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {} -const ::google::protobuf::MessageLite::ClassData* -DecisionVariable_ParametersEntry_DoNotUse::GetClassData() const { - PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: - ClassDataFull _data_ = { - { - nullptr, // tc_table - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - PROTOBUF_FIELD_OFFSET(DecisionVariable_ParametersEntry_DoNotUse, _cached_size_), - false, - }, - &DecisionVariable_ParametersEntry_DoNotUse::MergeImpl, - &DecisionVariable_ParametersEntry_DoNotUse::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto, - nullptr, // tracker - }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); +DecisionVariable_ParametersEntry_DoNotUse::DecisionVariable_ParametersEntry_DoNotUse(::google::protobuf::Arena* arena) + : SuperType(arena) {} +::google::protobuf::Metadata DecisionVariable_ParametersEntry_DoNotUse::GetMetadata() const { + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto_getter, + &descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto_once, + file_level_metadata_ommx_2fv1_2fdecision_5fvariables_2eproto[1]); } // =================================================================== class DecisionVariable::_Internal { public: - using HasBits = - decltype(std::declval()._impl_._has_bits_); + using HasBits = decltype(std::declval()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_._has_bits_); + 8 * PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_._has_bits_); }; DecisionVariable::DecisionVariable(::google::protobuf::Arena* arena) @@ -493,7 +497,7 @@ DecisionVariable::DecisionVariable(::google::protobuf::Arena* arena) } inline PROTOBUF_NDEBUG_INLINE DecisionVariable::Impl_::Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, - const Impl_& from, const ::ommx::v1::DecisionVariable& from_msg) + const Impl_& from) : _has_bits_{from._has_bits_}, _cached_size_{0}, subscripts_{visibility, arena, from.subscripts_}, @@ -510,7 +514,7 @@ DecisionVariable::DecisionVariable( (void)_this; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; _impl_.bound_ = (cached_has_bits & 0x00000004u) ? ::google::protobuf::Message::CopyConstruct<::ommx::v1::Bound>( arena, *from._impl_.bound_) @@ -562,21 +566,51 @@ DecisionVariable::GetClassData() const { PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: ClassDataFull _data_ = { { - &_table_.header, nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized PROTOBUF_FIELD_OFFSET(DecisionVariable, _impl_._cached_size_), false, }, &DecisionVariable::MergeImpl, &DecisionVariable::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto, - nullptr, // tracker }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); + return &_data_; +} +PROTOBUF_NOINLINE void DecisionVariable::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.DecisionVariable) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.subscripts_.Clear(); + _impl_.parameters_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.description_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + ABSL_DCHECK(_impl_.bound_ != nullptr); + _impl_.bound_->Clear(); + } + } + ::memset(&_impl_.id_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.kind_) - + reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.kind_)); + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* DecisionVariable::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; } + + PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::TcParseTable<3, 7, 2, 58, 2> DecisionVariable::_table_ = { { @@ -590,7 +624,6 @@ const ::_pbi::TcParseTable<3, 7, 2, 58, 2> DecisionVariable::_table_ = { 2, // num_aux_entries offsetof(decltype(_table_), aux_entries), &_DecisionVariable_default_instance_._instance, - nullptr, // post_loop_handler ::_pbi::TcParser::GenericFallback, // fallback #ifdef PROTOBUF_PREFETCH_PARSE_TABLE ::_pbi::TcParser::GetTable<::ommx::v1::DecisionVariable>(), // to_prefetch @@ -655,35 +688,6 @@ const ::_pbi::TcParseTable<3, 7, 2, 58, 2> DecisionVariable::_table_ = { }}, }; -PROTOBUF_NOINLINE void DecisionVariable::Clear() { -// @@protoc_insertion_point(message_clear_start:ommx.v1.DecisionVariable) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.subscripts_.Clear(); - _impl_.parameters_.Clear(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000007u) { - if (cached_has_bits & 0x00000001u) { - _impl_.name_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000002u) { - _impl_.description_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000004u) { - ABSL_DCHECK(_impl_.bound_ != nullptr); - _impl_.bound_->Clear(); - } - } - ::memset(&_impl_.id_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.kind_) - - reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.kind_)); - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - ::uint8_t* DecisionVariable::_InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const { @@ -787,7 +791,6 @@ ::size_t DecisionVariable::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); // repeated int64 subscripts = 5 [json_name = "subscripts"]; { std::size_t data_size = ::_pbi::WireFormatLite::Int64Size( @@ -891,6 +894,9 @@ void DecisionVariable::CopyFrom(const DecisionVariable& from) { MergeFrom(from); } +PROTOBUF_NOINLINE bool DecisionVariable::IsInitialized() const { + return true; +} void DecisionVariable::InternalSwap(DecisionVariable* PROTOBUF_RESTRICT other) { using std::swap; @@ -911,7 +917,9 @@ void DecisionVariable::InternalSwap(DecisionVariable* PROTOBUF_RESTRICT other) { } ::google::protobuf::Metadata DecisionVariable::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto_getter, + &descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto_once, + file_level_metadata_ommx_2fv1_2fdecision_5fvariables_2eproto[2]); } // @@protoc_insertion_point(namespace_scope) } // namespace v1 @@ -921,8 +929,8 @@ namespace protobuf { } // namespace protobuf } // namespace google // @@protoc_insertion_point(global_scope) -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type - _static_init2_ PROTOBUF_UNUSED = - (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto), - ::std::false_type{}); +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 +static ::std::false_type _static_init_ PROTOBUF_UNUSED = + (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto), + ::std::false_type{}); #include "google/protobuf/port_undef.inc" diff --git a/cpp/ommx/v1/decision_variables.pb.h b/cpp/ommx/v1/decision_variables.pb.h index bb6d32ee..3f103693 100644 --- a/cpp/ommx/v1/decision_variables.pb.h +++ b/cpp/ommx/v1/decision_variables.pb.h @@ -1,7 +1,6 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE // source: ommx/v1/decision_variables.proto -// Protobuf C++ Version: 5.27.3 +// Protobuf C++ Version: 5.26.1 #ifndef GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fdecision_5fvariables_2eproto_2epb_2eh #define GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fdecision_5fvariables_2eproto_2epb_2eh @@ -11,12 +10,13 @@ #include #include -#include "google/protobuf/runtime_version.h" -#if PROTOBUF_VERSION != 5027003 +#include "google/protobuf/port_def.inc" +#if PROTOBUF_VERSION != 5026001 #error "Protobuf C++ gencode is built with an incompatible version of" #error "Protobuf C++ headers/runtime. See" #error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" #endif +#include "google/protobuf/port_undef.inc" #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/arena.h" #include "google/protobuf/arenastring.h" @@ -135,7 +135,13 @@ class DecisionVariable_ParametersEntry_DoNotUse final return reinterpret_cast( &_DecisionVariable_ParametersEntry_DoNotUse_default_instance_); } -const ::google::protobuf::Message::ClassData* GetClassData() const final; + static bool ValidateKey(std::string* s) { + return ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::google::protobuf::internal::WireFormatLite::PARSE, "ommx.v1.DecisionVariable.ParametersEntry.key"); + } + static bool ValidateValue(std::string* s) { + return ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::google::protobuf::internal::WireFormatLite::PARSE, "ommx.v1.DecisionVariable.ParametersEntry.value"); + } + ::google::protobuf::Metadata GetMetadata() const final; friend struct ::TableStruct_ommx_2fv1_2fdecision_5fvariables_2eproto; }; // ------------------------------------------------------------------- @@ -231,11 +237,11 @@ class Bound final : public ::google::protobuf::Message const ::google::protobuf::MessageLite& from_msg); public: - bool IsInitialized() const { - return true; - } ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; ::uint8_t* _InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; @@ -256,10 +262,11 @@ class Bound final : public ::google::protobuf::Message : Bound(arena) { *this = ::std::move(from); } - const ::google::protobuf::Message::ClassData* GetClassData() const final; + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- @@ -295,10 +302,6 @@ class Bound final : public ::google::protobuf::Message 1, 2, 0, 0, 2> _table_; - - static constexpr const void* _raw_default_instance_ = - &_Bound_default_instance_; - friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; template @@ -311,8 +314,7 @@ class Bound final : public ::google::protobuf::Message inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena); inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* arena, const Impl_& from, - const Bound& from_msg); + ::google::protobuf::Arena* arena, const Impl_& from); double lower_; double upper_; mutable ::google::protobuf::internal::CachedSize _cached_size_; @@ -414,11 +416,11 @@ class DecisionVariable final : public ::google::protobuf::Message const ::google::protobuf::MessageLite& from_msg); public: - bool IsInitialized() const { - return true; - } ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; ::uint8_t* _InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; @@ -439,10 +441,11 @@ class DecisionVariable final : public ::google::protobuf::Message : DecisionVariable(arena) { *this = ::std::move(from); } - const ::google::protobuf::Message::ClassData* GetClassData() const final; + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- using Kind = DecisionVariable_Kind; static constexpr Kind KIND_UNSPECIFIED = DecisionVariable_Kind_KIND_UNSPECIFIED; @@ -588,10 +591,6 @@ class DecisionVariable final : public ::google::protobuf::Message 3, 7, 2, 58, 2> _table_; - - static constexpr const void* _raw_default_instance_ = - &_DecisionVariable_default_instance_; - friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; template @@ -604,8 +603,7 @@ class DecisionVariable final : public ::google::protobuf::Message inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena); inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* arena, const Impl_& from, - const DecisionVariable& from_msg); + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::RepeatedField<::int64_t> subscripts_; @@ -643,7 +641,7 @@ class DecisionVariable final : public ::google::protobuf::Message // double lower = 1 [json_name = "lower"]; inline void Bound::clear_lower() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.lower_ = 0; } inline double Bound::lower() const { @@ -655,17 +653,17 @@ inline void Bound::set_lower(double value) { // @@protoc_insertion_point(field_set:ommx.v1.Bound.lower) } inline double Bound::_internal_lower() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.lower_; } inline void Bound::_internal_set_lower(double value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.lower_ = value; } // double upper = 2 [json_name = "upper"]; inline void Bound::clear_upper() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.upper_ = 0; } inline double Bound::upper() const { @@ -677,11 +675,11 @@ inline void Bound::set_upper(double value) { // @@protoc_insertion_point(field_set:ommx.v1.Bound.upper) } inline double Bound::_internal_upper() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.upper_; } inline void Bound::_internal_set_upper(double value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.upper_ = value; } @@ -693,7 +691,7 @@ inline void Bound::_internal_set_upper(double value) { // uint64 id = 1 [json_name = "id"]; inline void DecisionVariable::clear_id() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.id_ = ::uint64_t{0u}; } inline ::uint64_t DecisionVariable::id() const { @@ -705,17 +703,17 @@ inline void DecisionVariable::set_id(::uint64_t value) { // @@protoc_insertion_point(field_set:ommx.v1.DecisionVariable.id) } inline ::uint64_t DecisionVariable::_internal_id() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.id_; } inline void DecisionVariable::_internal_set_id(::uint64_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.id_ = value; } // .ommx.v1.DecisionVariable.Kind kind = 2 [json_name = "kind"]; inline void DecisionVariable::clear_kind() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.kind_ = 0; } inline ::ommx::v1::DecisionVariable_Kind DecisionVariable::kind() const { @@ -727,11 +725,11 @@ inline void DecisionVariable::set_kind(::ommx::v1::DecisionVariable_Kind value) // @@protoc_insertion_point(field_set:ommx.v1.DecisionVariable.kind) } inline ::ommx::v1::DecisionVariable_Kind DecisionVariable::_internal_kind() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return static_cast<::ommx::v1::DecisionVariable_Kind>(_impl_.kind_); } inline void DecisionVariable::_internal_set_kind(::ommx::v1::DecisionVariable_Kind value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.kind_ = value; } @@ -742,12 +740,12 @@ inline bool DecisionVariable::has_bound() const { return value; } inline void DecisionVariable::clear_bound() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (_impl_.bound_ != nullptr) _impl_.bound_->Clear(); _impl_._has_bits_[0] &= ~0x00000004u; } inline const ::ommx::v1::Bound& DecisionVariable::_internal_bound() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::ommx::v1::Bound* p = _impl_.bound_; return p != nullptr ? *p : reinterpret_cast(::ommx::v1::_Bound_default_instance_); } @@ -756,7 +754,7 @@ inline const ::ommx::v1::Bound& DecisionVariable::bound() const ABSL_ATTRIBUTE_L return _internal_bound(); } inline void DecisionVariable::unsafe_arena_set_allocated_bound(::ommx::v1::Bound* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (GetArena() == nullptr) { delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.bound_); } @@ -769,7 +767,7 @@ inline void DecisionVariable::unsafe_arena_set_allocated_bound(::ommx::v1::Bound // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ommx.v1.DecisionVariable.bound) } inline ::ommx::v1::Bound* DecisionVariable::release_bound() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] &= ~0x00000004u; ::ommx::v1::Bound* released = _impl_.bound_; @@ -788,7 +786,7 @@ inline ::ommx::v1::Bound* DecisionVariable::release_bound() { return released; } inline ::ommx::v1::Bound* DecisionVariable::unsafe_arena_release_bound() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:ommx.v1.DecisionVariable.bound) _impl_._has_bits_[0] &= ~0x00000004u; @@ -797,7 +795,7 @@ inline ::ommx::v1::Bound* DecisionVariable::unsafe_arena_release_bound() { return temp; } inline ::ommx::v1::Bound* DecisionVariable::_internal_mutable_bound() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (_impl_.bound_ == nullptr) { auto* p = ::google::protobuf::Message::DefaultConstruct<::ommx::v1::Bound>(GetArena()); _impl_.bound_ = reinterpret_cast<::ommx::v1::Bound*>(p); @@ -812,7 +810,7 @@ inline ::ommx::v1::Bound* DecisionVariable::mutable_bound() ABSL_ATTRIBUTE_LIFET } inline void DecisionVariable::set_allocated_bound(::ommx::v1::Bound* value) { ::google::protobuf::Arena* message_arena = GetArena(); - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { delete (_impl_.bound_); } @@ -837,7 +835,7 @@ inline bool DecisionVariable::has_name() const { return value; } inline void DecisionVariable::clear_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.name_.ClearToEmpty(); _impl_._has_bits_[0] &= ~0x00000001u; } @@ -849,7 +847,7 @@ inline const std::string& DecisionVariable::name() const template inline PROTOBUF_ALWAYS_INLINE void DecisionVariable::set_name(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000001u; _impl_.name_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:ommx.v1.DecisionVariable.name) @@ -860,21 +858,21 @@ inline std::string* DecisionVariable::mutable_name() ABSL_ATTRIBUTE_LIFETIME_BOU return _s; } inline const std::string& DecisionVariable::_internal_name() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.name_.Get(); } inline void DecisionVariable::_internal_set_name(const std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000001u; _impl_.name_.Set(value, GetArena()); } inline std::string* DecisionVariable::_internal_mutable_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000001u; return _impl_.name_.Mutable( GetArena()); } inline std::string* DecisionVariable::release_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:ommx.v1.DecisionVariable.name) if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { return nullptr; @@ -887,7 +885,7 @@ inline std::string* DecisionVariable::release_name() { return released; } inline void DecisionVariable::set_allocated_name(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (value != nullptr) { _impl_._has_bits_[0] |= 0x00000001u; } else { @@ -910,7 +908,7 @@ inline int DecisionVariable::subscripts_size() const { return _internal_subscripts_size(); } inline void DecisionVariable::clear_subscripts() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.subscripts_.Clear(); } inline ::int64_t DecisionVariable::subscripts(int index) const { @@ -922,7 +920,7 @@ inline void DecisionVariable::set_subscripts(int index, ::int64_t value) { // @@protoc_insertion_point(field_set:ommx.v1.DecisionVariable.subscripts) } inline void DecisionVariable::add_subscripts(::int64_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _internal_mutable_subscripts()->Add(value); // @@protoc_insertion_point(field_add:ommx.v1.DecisionVariable.subscripts) } @@ -934,16 +932,16 @@ inline const ::google::protobuf::RepeatedField<::int64_t>& DecisionVariable::sub inline ::google::protobuf::RepeatedField<::int64_t>* DecisionVariable::mutable_subscripts() ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:ommx.v1.DecisionVariable.subscripts) - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _internal_mutable_subscripts(); } inline const ::google::protobuf::RepeatedField<::int64_t>& DecisionVariable::_internal_subscripts() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.subscripts_; } inline ::google::protobuf::RepeatedField<::int64_t>* DecisionVariable::_internal_mutable_subscripts() { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return &_impl_.subscripts_; } @@ -955,11 +953,11 @@ inline int DecisionVariable::parameters_size() const { return _internal_parameters_size(); } inline void DecisionVariable::clear_parameters() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.parameters_.Clear(); } inline const ::google::protobuf::Map& DecisionVariable::_internal_parameters() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.parameters_.GetMap(); } inline const ::google::protobuf::Map& DecisionVariable::parameters() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -967,7 +965,7 @@ inline const ::google::protobuf::Map& DecisionVariable return _internal_parameters(); } inline ::google::protobuf::Map* DecisionVariable::_internal_mutable_parameters() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _impl_.parameters_.MutableMap(); } inline ::google::protobuf::Map* DecisionVariable::mutable_parameters() ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -981,7 +979,7 @@ inline bool DecisionVariable::has_description() const { return value; } inline void DecisionVariable::clear_description() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.description_.ClearToEmpty(); _impl_._has_bits_[0] &= ~0x00000002u; } @@ -993,7 +991,7 @@ inline const std::string& DecisionVariable::description() const template inline PROTOBUF_ALWAYS_INLINE void DecisionVariable::set_description(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000002u; _impl_.description_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:ommx.v1.DecisionVariable.description) @@ -1004,21 +1002,21 @@ inline std::string* DecisionVariable::mutable_description() ABSL_ATTRIBUTE_LIFET return _s; } inline const std::string& DecisionVariable::_internal_description() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.description_.Get(); } inline void DecisionVariable::_internal_set_description(const std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000002u; _impl_.description_.Set(value, GetArena()); } inline std::string* DecisionVariable::_internal_mutable_description() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000002u; return _impl_.description_.Mutable( GetArena()); } inline std::string* DecisionVariable::release_description() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:ommx.v1.DecisionVariable.description) if ((_impl_._has_bits_[0] & 0x00000002u) == 0) { return nullptr; @@ -1031,7 +1029,7 @@ inline std::string* DecisionVariable::release_description() { return released; } inline void DecisionVariable::set_allocated_description(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (value != nullptr) { _impl_._has_bits_[0] |= 0x00000002u; } else { diff --git a/cpp/ommx/v1/function.pb.cc b/cpp/ommx/v1/function.pb.cc index cc33f1bc..0770cfb8 100644 --- a/cpp/ommx/v1/function.pb.cc +++ b/cpp/ommx/v1/function.pb.cc @@ -1,20 +1,18 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE // source: ommx/v1/function.proto -// Protobuf C++ Version: 5.27.3 +// Protobuf C++ Version: 5.26.1 #include "ommx/v1/function.pb.h" #include -#include #include "google/protobuf/io/coded_stream.h" -#include "google/protobuf/generated_message_tctable_impl.h" #include "google/protobuf/extension_set.h" #include "google/protobuf/wire_format_lite.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/generated_message_reflection.h" #include "google/protobuf/reflection_ops.h" #include "google/protobuf/wire_format.h" +#include "google/protobuf/generated_message_tctable_impl.h" // @@protoc_insertion_point(includes) // Must be included last. @@ -47,6 +45,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FunctionDefaultTypeInternal _Function_default_instance_; } // namespace v1 } // namespace ommx +static ::_pb::Metadata file_level_metadata_ommx_2fv1_2ffunction_2eproto[1]; static constexpr const ::_pb::EnumDescriptor** file_level_enum_descriptors_ommx_2fv1_2ffunction_2eproto = nullptr; static constexpr const ::_pb::ServiceDescriptor** @@ -97,7 +96,7 @@ static const ::_pbi::DescriptorTable* const descriptor_table_ommx_2fv1_2ffunctio &::descriptor_table_ommx_2fv1_2fquadratic_2eproto, }; static ::absl::once_flag descriptor_table_ommx_2fv1_2ffunction_2eproto_once; -PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2ffunction_2eproto = { +const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2ffunction_2eproto = { false, false, 410, @@ -110,9 +109,25 @@ PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2ffu schemas, file_default_instances, TableStruct_ommx_2fv1_2ffunction_2eproto::offsets, + file_level_metadata_ommx_2fv1_2ffunction_2eproto, file_level_enum_descriptors_ommx_2fv1_2ffunction_2eproto, file_level_service_descriptors_ommx_2fv1_2ffunction_2eproto, }; + +// This function exists to be marked as weak. +// It can significantly speed up compilation by breaking up LLVM's SCC +// in the .pb.cc translation units. Large translation units see a +// reduction of more than 35% of walltime for optimized builds. Without +// the weak attribute all the messages in the file, including all the +// vtables and everything they use become part of the same SCC through +// a cycle like: +// GetMetadata -> descriptor table -> default instances -> +// vtables -> GetMetadata +// By adding a weak function here we break the connection from the +// individual vtables back into the descriptor table. +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_ommx_2fv1_2ffunction_2eproto_getter() { + return &descriptor_table_ommx_2fv1_2ffunction_2eproto; +} namespace ommx { namespace v1 { // =================================================================== @@ -120,7 +135,7 @@ namespace v1 { class Function::_Internal { public: static constexpr ::int32_t kOneofCaseOffset = - PROTOBUF_FIELD_OFFSET(::ommx::v1::Function, _impl_._oneof_case_); + PROTOBUF_FIELD_OFFSET(::ommx::v1::Function, _impl_._oneof_case_); }; void Function::set_allocated_linear(::ommx::v1::Linear* linear) { @@ -137,12 +152,10 @@ void Function::set_allocated_linear(::ommx::v1::Linear* linear) { // @@protoc_insertion_point(field_set_allocated:ommx.v1.Function.linear) } void Function::clear_linear() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (function_case() == kLinear) { if (GetArena() == nullptr) { delete _impl_.function_.linear_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.function_.linear_); } clear_has_function(); } @@ -161,12 +174,10 @@ void Function::set_allocated_quadratic(::ommx::v1::Quadratic* quadratic) { // @@protoc_insertion_point(field_set_allocated:ommx.v1.Function.quadratic) } void Function::clear_quadratic() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (function_case() == kQuadratic) { if (GetArena() == nullptr) { delete _impl_.function_.quadratic_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.function_.quadratic_); } clear_has_function(); } @@ -185,12 +196,10 @@ void Function::set_allocated_polynomial(::ommx::v1::Polynomial* polynomial) { // @@protoc_insertion_point(field_set_allocated:ommx.v1.Function.polynomial) } void Function::clear_polynomial() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (function_case() == kPolynomial) { if (GetArena() == nullptr) { delete _impl_.function_.polynomial_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.function_.polynomial_); } clear_has_function(); } @@ -202,7 +211,7 @@ Function::Function(::google::protobuf::Arena* arena) } inline PROTOBUF_NDEBUG_INLINE Function::Impl_::Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, - const Impl_& from, const ::ommx::v1::Function& from_msg) + const Impl_& from) : function_{}, _cached_size_{0}, _oneof_case_{from._oneof_case_[0]} {} @@ -215,7 +224,7 @@ Function::Function( (void)_this; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); switch (function_case()) { case FUNCTION_NOT_SET: break; @@ -260,7 +269,7 @@ inline void Function::SharedDtor() { void Function::clear_function() { // @@protoc_insertion_point(one_of_clear_start:ommx.v1.Function) - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); switch (function_case()) { case kConstant: { // No need to clear @@ -269,24 +278,18 @@ void Function::clear_function() { case kLinear: { if (GetArena() == nullptr) { delete _impl_.function_.linear_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.function_.linear_); } break; } case kQuadratic: { if (GetArena() == nullptr) { delete _impl_.function_.quadratic_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.function_.quadratic_); } break; } case kPolynomial: { if (GetArena() == nullptr) { delete _impl_.function_.polynomial_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.function_.polynomial_); } break; } @@ -303,21 +306,33 @@ Function::GetClassData() const { PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: ClassDataFull _data_ = { { - &_table_.header, nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized PROTOBUF_FIELD_OFFSET(Function, _impl_._cached_size_), false, }, &Function::MergeImpl, &Function::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2ffunction_2eproto, - nullptr, // tracker }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); + return &_data_; +} +PROTOBUF_NOINLINE void Function::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Function) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + clear_function(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Function::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; } + + PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::TcParseTable<0, 4, 3, 0, 2> Function::_table_ = { { @@ -331,7 +346,6 @@ const ::_pbi::TcParseTable<0, 4, 3, 0, 2> Function::_table_ = { 3, // num_aux_entries offsetof(decltype(_table_), aux_entries), &_Function_default_instance_._instance, - nullptr, // post_loop_handler ::_pbi::TcParser::GenericFallback, // fallback #ifdef PROTOBUF_PREFETCH_PARSE_TABLE ::_pbi::TcParser::GetTable<::ommx::v1::Function>(), // to_prefetch @@ -361,17 +375,6 @@ const ::_pbi::TcParseTable<0, 4, 3, 0, 2> Function::_table_ = { }}, }; -PROTOBUF_NOINLINE void Function::Clear() { -// @@protoc_insertion_point(message_clear_start:ommx.v1.Function) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - clear_function(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - ::uint8_t* Function::_InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const { @@ -518,6 +521,9 @@ void Function::CopyFrom(const Function& from) { MergeFrom(from); } +PROTOBUF_NOINLINE bool Function::IsInitialized() const { + return true; +} void Function::InternalSwap(Function* PROTOBUF_RESTRICT other) { using std::swap; @@ -527,7 +533,9 @@ void Function::InternalSwap(Function* PROTOBUF_RESTRICT other) { } ::google::protobuf::Metadata Function::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2ffunction_2eproto_getter, + &descriptor_table_ommx_2fv1_2ffunction_2eproto_once, + file_level_metadata_ommx_2fv1_2ffunction_2eproto[0]); } // @@protoc_insertion_point(namespace_scope) } // namespace v1 @@ -537,8 +545,8 @@ namespace protobuf { } // namespace protobuf } // namespace google // @@protoc_insertion_point(global_scope) -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type - _static_init2_ PROTOBUF_UNUSED = - (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2ffunction_2eproto), - ::std::false_type{}); +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 +static ::std::false_type _static_init_ PROTOBUF_UNUSED = + (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2ffunction_2eproto), + ::std::false_type{}); #include "google/protobuf/port_undef.inc" diff --git a/cpp/ommx/v1/function.pb.h b/cpp/ommx/v1/function.pb.h index d9d3b5c1..ba2e46f6 100644 --- a/cpp/ommx/v1/function.pb.h +++ b/cpp/ommx/v1/function.pb.h @@ -1,7 +1,6 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE // source: ommx/v1/function.proto -// Protobuf C++ Version: 5.27.3 +// Protobuf C++ Version: 5.26.1 #ifndef GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2ffunction_2eproto_2epb_2eh #define GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2ffunction_2eproto_2epb_2eh @@ -11,12 +10,13 @@ #include #include -#include "google/protobuf/runtime_version.h" -#if PROTOBUF_VERSION != 5027003 +#include "google/protobuf/port_def.inc" +#if PROTOBUF_VERSION != 5026001 #error "Protobuf C++ gencode is built with an incompatible version of" #error "Protobuf C++ headers/runtime. See" #error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" #endif +#include "google/protobuf/port_undef.inc" #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/arena.h" #include "google/protobuf/arenastring.h" @@ -170,11 +170,11 @@ class Function final : public ::google::protobuf::Message const ::google::protobuf::MessageLite& from_msg); public: - bool IsInitialized() const { - return true; - } ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; ::uint8_t* _InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; @@ -195,10 +195,11 @@ class Function final : public ::google::protobuf::Message : Function(arena) { *this = ::std::move(from); } - const ::google::protobuf::Message::ClassData* GetClassData() const final; + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- @@ -292,10 +293,6 @@ class Function final : public ::google::protobuf::Message 0, 4, 3, 0, 2> _table_; - - static constexpr const void* _raw_default_instance_ = - &_Function_default_instance_; - friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; template @@ -308,8 +305,7 @@ class Function final : public ::google::protobuf::Message inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena); inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* arena, const Impl_& from, - const Function& from_msg); + ::google::protobuf::Arena* arena, const Impl_& from); union FunctionUnion { constexpr FunctionUnion() : _constinit_{} {} ::google::protobuf::internal::ConstantInitialized _constinit_; @@ -350,7 +346,7 @@ inline void Function::set_has_constant() { _impl_._oneof_case_[0] = kConstant; } inline void Function::clear_constant() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (function_case() == kConstant) { _impl_.function_.constant_ = 0; clear_has_function(); diff --git a/cpp/ommx/v1/instance.pb.cc b/cpp/ommx/v1/instance.pb.cc index 60b44569..7ec7de1d 100644 --- a/cpp/ommx/v1/instance.pb.cc +++ b/cpp/ommx/v1/instance.pb.cc @@ -1,20 +1,18 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE // source: ommx/v1/instance.proto -// Protobuf C++ Version: 5.27.3 +// Protobuf C++ Version: 5.26.1 #include "ommx/v1/instance.pb.h" #include -#include #include "google/protobuf/io/coded_stream.h" -#include "google/protobuf/generated_message_tctable_impl.h" #include "google/protobuf/extension_set.h" #include "google/protobuf/wire_format_lite.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/generated_message_reflection.h" #include "google/protobuf/reflection_ops.h" #include "google/protobuf/wire_format.h" +#include "google/protobuf/generated_message_tctable_impl.h" // @@protoc_insertion_point(includes) // Must be included last. @@ -78,6 +76,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InstanceDefaultTypeInternal _Instance_default_instance_; } // namespace v1 } // namespace ommx +static ::_pb::Metadata file_level_metadata_ommx_2fv1_2finstance_2eproto[2]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_ommx_2fv1_2finstance_2eproto[1]; static constexpr const ::_pb::ServiceDescriptor** file_level_service_descriptors_ommx_2fv1_2finstance_2eproto = nullptr; @@ -159,7 +158,7 @@ static const ::_pbi::DescriptorTable* const descriptor_table_ommx_2fv1_2finstanc &::descriptor_table_ommx_2fv1_2ffunction_2eproto, }; static ::absl::once_flag descriptor_table_ommx_2fv1_2finstance_2eproto_once; -PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2finstance_2eproto = { +const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2finstance_2eproto = { false, false, 773, @@ -172,9 +171,25 @@ PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fin schemas, file_default_instances, TableStruct_ommx_2fv1_2finstance_2eproto::offsets, + file_level_metadata_ommx_2fv1_2finstance_2eproto, file_level_enum_descriptors_ommx_2fv1_2finstance_2eproto, file_level_service_descriptors_ommx_2fv1_2finstance_2eproto, }; + +// This function exists to be marked as weak. +// It can significantly speed up compilation by breaking up LLVM's SCC +// in the .pb.cc translation units. Large translation units see a +// reduction of more than 35% of walltime for optimized builds. Without +// the weak attribute all the messages in the file, including all the +// vtables and everything they use become part of the same SCC through +// a cycle like: +// GetMetadata -> descriptor table -> default instances -> +// vtables -> GetMetadata +// By adding a weak function here we break the connection from the +// individual vtables back into the descriptor table. +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_ommx_2fv1_2finstance_2eproto_getter() { + return &descriptor_table_ommx_2fv1_2finstance_2eproto; +} namespace ommx { namespace v1 { const ::google::protobuf::EnumDescriptor* Instance_Sense_descriptor() { @@ -202,10 +217,9 @@ constexpr int Instance::Sense_ARRAYSIZE; class Instance_Description::_Internal { public: - using HasBits = - decltype(std::declval()._impl_._has_bits_); + using HasBits = decltype(std::declval()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_._has_bits_); + 8 * PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_._has_bits_); }; Instance_Description::Instance_Description(::google::protobuf::Arena* arena) @@ -215,7 +229,7 @@ Instance_Description::Instance_Description(::google::protobuf::Arena* arena) } inline PROTOBUF_NDEBUG_INLINE Instance_Description::Impl_::Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, - const Impl_& from, const ::ommx::v1::Instance_Description& from_msg) + const Impl_& from) : _has_bits_{from._has_bits_}, _cached_size_{0}, authors_{visibility, arena, from.authors_}, @@ -231,7 +245,7 @@ Instance_Description::Instance_Description( (void)_this; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); // @@protoc_insertion_point(copy_constructor:ommx.v1.Instance.Description) } @@ -265,21 +279,46 @@ Instance_Description::GetClassData() const { PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: ClassDataFull _data_ = { { - &_table_.header, nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized PROTOBUF_FIELD_OFFSET(Instance_Description, _impl_._cached_size_), false, }, &Instance_Description::MergeImpl, &Instance_Description::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2finstance_2eproto, - nullptr, // tracker }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); + return &_data_; } +PROTOBUF_NOINLINE void Instance_Description::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Instance.Description) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.authors_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.description_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + _impl_.created_by_.ClearNonDefaultToEmpty(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Instance_Description::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::TcParseTable<2, 4, 0, 69, 2> Instance_Description::_table_ = { { @@ -293,7 +332,6 @@ const ::_pbi::TcParseTable<2, 4, 0, 69, 2> Instance_Description::_table_ = { 0, // num_aux_entries offsetof(decltype(_table_), field_names), // no aux_entries &_Instance_Description_default_instance_._instance, - nullptr, // post_loop_handler ::_pbi::TcParser::GenericFallback, // fallback #ifdef PROTOBUF_PREFETCH_PARSE_TABLE ::_pbi::TcParser::GetTable<::ommx::v1::Instance_Description>(), // to_prefetch @@ -338,30 +376,6 @@ const ::_pbi::TcParseTable<2, 4, 0, 69, 2> Instance_Description::_table_ = { }}, }; -PROTOBUF_NOINLINE void Instance_Description::Clear() { -// @@protoc_insertion_point(message_clear_start:ommx.v1.Instance.Description) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.authors_.Clear(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000007u) { - if (cached_has_bits & 0x00000001u) { - _impl_.name_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000002u) { - _impl_.description_.ClearNonDefaultToEmpty(); - } - if (cached_has_bits & 0x00000004u) { - _impl_.created_by_.ClearNonDefaultToEmpty(); - } - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - ::uint8_t* Instance_Description::_InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const { @@ -419,7 +433,6 @@ ::size_t Instance_Description::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); // repeated string authors = 3 [json_name = "authors"]; total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_authors().size()); for (int i = 0, n = _internal_authors().size(); i < n; ++i) { @@ -483,6 +496,9 @@ void Instance_Description::CopyFrom(const Instance_Description& from) { MergeFrom(from); } +PROTOBUF_NOINLINE bool Instance_Description::IsInitialized() const { + return true; +} void Instance_Description::InternalSwap(Instance_Description* PROTOBUF_RESTRICT other) { using std::swap; @@ -497,29 +513,30 @@ void Instance_Description::InternalSwap(Instance_Description* PROTOBUF_RESTRICT } ::google::protobuf::Metadata Instance_Description::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2finstance_2eproto_getter, + &descriptor_table_ommx_2fv1_2finstance_2eproto_once, + file_level_metadata_ommx_2fv1_2finstance_2eproto[0]); } // =================================================================== class Instance::_Internal { public: - using HasBits = - decltype(std::declval()._impl_._has_bits_); + using HasBits = decltype(std::declval()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(Instance, _impl_._has_bits_); + 8 * PROTOBUF_FIELD_OFFSET(Instance, _impl_._has_bits_); }; void Instance::clear_decision_variables() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.decision_variables_.Clear(); } void Instance::clear_objective() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (_impl_.objective_ != nullptr) _impl_.objective_->Clear(); _impl_._has_bits_[0] &= ~0x00000002u; } void Instance::clear_constraints() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.constraints_.Clear(); } Instance::Instance(::google::protobuf::Arena* arena) @@ -529,7 +546,7 @@ Instance::Instance(::google::protobuf::Arena* arena) } inline PROTOBUF_NDEBUG_INLINE Instance::Impl_::Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, - const Impl_& from, const ::ommx::v1::Instance& from_msg) + const Impl_& from) : _has_bits_{from._has_bits_}, _cached_size_{0}, decision_variables_{visibility, arena, from.decision_variables_}, @@ -543,7 +560,7 @@ Instance::Instance( (void)_this; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; _impl_.description_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::Message::CopyConstruct<::ommx::v1::Instance_Description>( arena, *from._impl_.description_) @@ -588,21 +605,47 @@ Instance::GetClassData() const { PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: ClassDataFull _data_ = { { - &_table_.header, nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized PROTOBUF_FIELD_OFFSET(Instance, _impl_._cached_size_), false, }, &Instance::MergeImpl, &Instance::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2finstance_2eproto, - nullptr, // tracker }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); + return &_data_; } +PROTOBUF_NOINLINE void Instance::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Instance) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.decision_variables_.Clear(); + _impl_.constraints_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.description_ != nullptr); + _impl_.description_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + ABSL_DCHECK(_impl_.objective_ != nullptr); + _impl_.objective_->Clear(); + } + } + _impl_.sense_ = 0; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Instance::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::TcParseTable<3, 5, 4, 0, 2> Instance::_table_ = { { @@ -616,7 +659,6 @@ const ::_pbi::TcParseTable<3, 5, 4, 0, 2> Instance::_table_ = { 4, // num_aux_entries offsetof(decltype(_table_), aux_entries), &_Instance_default_instance_._instance, - nullptr, // post_loop_handler ::_pbi::TcParser::GenericFallback, // fallback #ifdef PROTOBUF_PREFETCH_PARSE_TABLE ::_pbi::TcParser::GetTable<::ommx::v1::Instance>(), // to_prefetch @@ -667,31 +709,6 @@ const ::_pbi::TcParseTable<3, 5, 4, 0, 2> Instance::_table_ = { }}, }; -PROTOBUF_NOINLINE void Instance::Clear() { -// @@protoc_insertion_point(message_clear_start:ommx.v1.Instance) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.decision_variables_.Clear(); - _impl_.constraints_.Clear(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000003u) { - if (cached_has_bits & 0x00000001u) { - ABSL_DCHECK(_impl_.description_ != nullptr); - _impl_.description_->Clear(); - } - if (cached_has_bits & 0x00000002u) { - ABSL_DCHECK(_impl_.objective_ != nullptr); - _impl_.objective_->Clear(); - } - } - _impl_.sense_ = 0; - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - ::uint8_t* Instance::_InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const { @@ -758,7 +775,6 @@ ::size_t Instance::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); // repeated .ommx.v1.DecisionVariable decision_variables = 2 [json_name = "decisionVariables"]; total_size += 1UL * this->_internal_decision_variables_size(); for (const auto& msg : this->_internal_decision_variables()) { @@ -842,6 +858,9 @@ void Instance::CopyFrom(const Instance& from) { MergeFrom(from); } +PROTOBUF_NOINLINE bool Instance::IsInitialized() const { + return true; +} void Instance::InternalSwap(Instance* PROTOBUF_RESTRICT other) { using std::swap; @@ -858,7 +877,9 @@ void Instance::InternalSwap(Instance* PROTOBUF_RESTRICT other) { } ::google::protobuf::Metadata Instance::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2finstance_2eproto_getter, + &descriptor_table_ommx_2fv1_2finstance_2eproto_once, + file_level_metadata_ommx_2fv1_2finstance_2eproto[1]); } // @@protoc_insertion_point(namespace_scope) } // namespace v1 @@ -868,8 +889,8 @@ namespace protobuf { } // namespace protobuf } // namespace google // @@protoc_insertion_point(global_scope) -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type - _static_init2_ PROTOBUF_UNUSED = - (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2finstance_2eproto), - ::std::false_type{}); +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 +static ::std::false_type _static_init_ PROTOBUF_UNUSED = + (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2finstance_2eproto), + ::std::false_type{}); #include "google/protobuf/port_undef.inc" diff --git a/cpp/ommx/v1/instance.pb.h b/cpp/ommx/v1/instance.pb.h index 07f69bf4..523dadc2 100644 --- a/cpp/ommx/v1/instance.pb.h +++ b/cpp/ommx/v1/instance.pb.h @@ -1,7 +1,6 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE // source: ommx/v1/instance.proto -// Protobuf C++ Version: 5.27.3 +// Protobuf C++ Version: 5.26.1 #ifndef GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2finstance_2eproto_2epb_2eh #define GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2finstance_2eproto_2epb_2eh @@ -11,12 +10,13 @@ #include #include -#include "google/protobuf/runtime_version.h" -#if PROTOBUF_VERSION != 5027003 +#include "google/protobuf/port_def.inc" +#if PROTOBUF_VERSION != 5026001 #error "Protobuf C++ gencode is built with an incompatible version of" #error "Protobuf C++ headers/runtime. See" #error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" #endif +#include "google/protobuf/port_undef.inc" #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/arena.h" #include "google/protobuf/arenastring.h" @@ -201,11 +201,11 @@ class Instance_Description final : public ::google::protobuf::Message const ::google::protobuf::MessageLite& from_msg); public: - bool IsInitialized() const { - return true; - } ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; ::uint8_t* _InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; @@ -226,10 +226,11 @@ class Instance_Description final : public ::google::protobuf::Message : Instance_Description(arena) { *this = ::std::move(from); } - const ::google::protobuf::Message::ClassData* GetClassData() const final; + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- @@ -326,10 +327,6 @@ class Instance_Description final : public ::google::protobuf::Message 2, 4, 0, 69, 2> _table_; - - static constexpr const void* _raw_default_instance_ = - &_Instance_Description_default_instance_; - friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; template @@ -342,8 +339,7 @@ class Instance_Description final : public ::google::protobuf::Message inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena); inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* arena, const Impl_& from, - const Instance_Description& from_msg); + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::RepeatedPtrField authors_; @@ -448,11 +444,11 @@ class Instance final : public ::google::protobuf::Message const ::google::protobuf::MessageLite& from_msg); public: - bool IsInitialized() const { - return true; - } ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; ::uint8_t* _InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; @@ -473,10 +469,11 @@ class Instance final : public ::google::protobuf::Message : Instance(arena) { *this = ::std::move(from); } - const ::google::protobuf::Message::ClassData* GetClassData() const final; + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- using Description = Instance_Description; using Sense = Instance_Sense; @@ -590,10 +587,6 @@ class Instance final : public ::google::protobuf::Message 3, 5, 4, 0, 2> _table_; - - static constexpr const void* _raw_default_instance_ = - &_Instance_default_instance_; - friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; template @@ -606,8 +599,7 @@ class Instance final : public ::google::protobuf::Message inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena); inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* arena, const Impl_& from, - const Instance& from_msg); + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::RepeatedPtrField< ::ommx::v1::DecisionVariable > decision_variables_; @@ -643,7 +635,7 @@ inline bool Instance_Description::has_name() const { return value; } inline void Instance_Description::clear_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.name_.ClearToEmpty(); _impl_._has_bits_[0] &= ~0x00000001u; } @@ -655,7 +647,7 @@ inline const std::string& Instance_Description::name() const template inline PROTOBUF_ALWAYS_INLINE void Instance_Description::set_name(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000001u; _impl_.name_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:ommx.v1.Instance.Description.name) @@ -666,21 +658,21 @@ inline std::string* Instance_Description::mutable_name() ABSL_ATTRIBUTE_LIFETIME return _s; } inline const std::string& Instance_Description::_internal_name() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.name_.Get(); } inline void Instance_Description::_internal_set_name(const std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000001u; _impl_.name_.Set(value, GetArena()); } inline std::string* Instance_Description::_internal_mutable_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000001u; return _impl_.name_.Mutable( GetArena()); } inline std::string* Instance_Description::release_name() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:ommx.v1.Instance.Description.name) if ((_impl_._has_bits_[0] & 0x00000001u) == 0) { return nullptr; @@ -693,7 +685,7 @@ inline std::string* Instance_Description::release_name() { return released; } inline void Instance_Description::set_allocated_name(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (value != nullptr) { _impl_._has_bits_[0] |= 0x00000001u; } else { @@ -714,7 +706,7 @@ inline bool Instance_Description::has_description() const { return value; } inline void Instance_Description::clear_description() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.description_.ClearToEmpty(); _impl_._has_bits_[0] &= ~0x00000002u; } @@ -726,7 +718,7 @@ inline const std::string& Instance_Description::description() const template inline PROTOBUF_ALWAYS_INLINE void Instance_Description::set_description(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000002u; _impl_.description_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:ommx.v1.Instance.Description.description) @@ -737,21 +729,21 @@ inline std::string* Instance_Description::mutable_description() ABSL_ATTRIBUTE_L return _s; } inline const std::string& Instance_Description::_internal_description() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.description_.Get(); } inline void Instance_Description::_internal_set_description(const std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000002u; _impl_.description_.Set(value, GetArena()); } inline std::string* Instance_Description::_internal_mutable_description() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000002u; return _impl_.description_.Mutable( GetArena()); } inline std::string* Instance_Description::release_description() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:ommx.v1.Instance.Description.description) if ((_impl_._has_bits_[0] & 0x00000002u) == 0) { return nullptr; @@ -764,7 +756,7 @@ inline std::string* Instance_Description::release_description() { return released; } inline void Instance_Description::set_allocated_description(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (value != nullptr) { _impl_._has_bits_[0] |= 0x00000002u; } else { @@ -787,12 +779,12 @@ inline int Instance_Description::authors_size() const { return _internal_authors_size(); } inline void Instance_Description::clear_authors() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.authors_.Clear(); } inline std::string* Instance_Description::add_authors() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); std::string* _s = _internal_mutable_authors()->Add(); // @@protoc_insertion_point(field_add_mutable:ommx.v1.Instance.Description.authors) return _s; @@ -832,29 +824,29 @@ inline void Instance_Description::set_authors(int index, absl::string_view value // @@protoc_insertion_point(field_set_string_piece:ommx.v1.Instance.Description.authors) } inline void Instance_Description::add_authors(const std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _internal_mutable_authors()->Add()->assign(value); // @@protoc_insertion_point(field_add:ommx.v1.Instance.Description.authors) } inline void Instance_Description::add_authors(std::string&& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _internal_mutable_authors()->Add(std::move(value)); // @@protoc_insertion_point(field_add:ommx.v1.Instance.Description.authors) } inline void Instance_Description::add_authors(const char* value) { ABSL_DCHECK(value != nullptr); - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _internal_mutable_authors()->Add()->assign(value); // @@protoc_insertion_point(field_add_char:ommx.v1.Instance.Description.authors) } inline void Instance_Description::add_authors(const char* value, std::size_t size) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _internal_mutable_authors()->Add()->assign( reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:ommx.v1.Instance.Description.authors) } inline void Instance_Description::add_authors(absl::string_view value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _internal_mutable_authors()->Add()->assign(value.data(), value.size()); // @@protoc_insertion_point(field_add_string_piece:ommx.v1.Instance.Description.authors) @@ -867,17 +859,17 @@ Instance_Description::authors() const ABSL_ATTRIBUTE_LIFETIME_BOUND { inline ::google::protobuf::RepeatedPtrField* Instance_Description::mutable_authors() ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:ommx.v1.Instance.Description.authors) - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _internal_mutable_authors(); } inline const ::google::protobuf::RepeatedPtrField& Instance_Description::_internal_authors() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.authors_; } inline ::google::protobuf::RepeatedPtrField* Instance_Description::_internal_mutable_authors() { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return &_impl_.authors_; } @@ -887,7 +879,7 @@ inline bool Instance_Description::has_created_by() const { return value; } inline void Instance_Description::clear_created_by() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.created_by_.ClearToEmpty(); _impl_._has_bits_[0] &= ~0x00000004u; } @@ -899,7 +891,7 @@ inline const std::string& Instance_Description::created_by() const template inline PROTOBUF_ALWAYS_INLINE void Instance_Description::set_created_by(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000004u; _impl_.created_by_.Set(static_cast(arg), args..., GetArena()); // @@protoc_insertion_point(field_set:ommx.v1.Instance.Description.created_by) @@ -910,21 +902,21 @@ inline std::string* Instance_Description::mutable_created_by() ABSL_ATTRIBUTE_LI return _s; } inline const std::string& Instance_Description::_internal_created_by() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.created_by_.Get(); } inline void Instance_Description::_internal_set_created_by(const std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000004u; _impl_.created_by_.Set(value, GetArena()); } inline std::string* Instance_Description::_internal_mutable_created_by() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] |= 0x00000004u; return _impl_.created_by_.Mutable( GetArena()); } inline std::string* Instance_Description::release_created_by() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:ommx.v1.Instance.Description.created_by) if ((_impl_._has_bits_[0] & 0x00000004u) == 0) { return nullptr; @@ -937,7 +929,7 @@ inline std::string* Instance_Description::release_created_by() { return released; } inline void Instance_Description::set_allocated_created_by(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (value != nullptr) { _impl_._has_bits_[0] |= 0x00000004u; } else { @@ -963,12 +955,12 @@ inline bool Instance::has_description() const { return value; } inline void Instance::clear_description() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (_impl_.description_ != nullptr) _impl_.description_->Clear(); _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::ommx::v1::Instance_Description& Instance::_internal_description() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::ommx::v1::Instance_Description* p = _impl_.description_; return p != nullptr ? *p : reinterpret_cast(::ommx::v1::_Instance_Description_default_instance_); } @@ -977,7 +969,7 @@ inline const ::ommx::v1::Instance_Description& Instance::description() const ABS return _internal_description(); } inline void Instance::unsafe_arena_set_allocated_description(::ommx::v1::Instance_Description* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (GetArena() == nullptr) { delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.description_); } @@ -990,7 +982,7 @@ inline void Instance::unsafe_arena_set_allocated_description(::ommx::v1::Instanc // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ommx.v1.Instance.description) } inline ::ommx::v1::Instance_Description* Instance::release_description() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] &= ~0x00000001u; ::ommx::v1::Instance_Description* released = _impl_.description_; @@ -1009,7 +1001,7 @@ inline ::ommx::v1::Instance_Description* Instance::release_description() { return released; } inline ::ommx::v1::Instance_Description* Instance::unsafe_arena_release_description() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:ommx.v1.Instance.description) _impl_._has_bits_[0] &= ~0x00000001u; @@ -1018,7 +1010,7 @@ inline ::ommx::v1::Instance_Description* Instance::unsafe_arena_release_descript return temp; } inline ::ommx::v1::Instance_Description* Instance::_internal_mutable_description() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (_impl_.description_ == nullptr) { auto* p = ::google::protobuf::Message::DefaultConstruct<::ommx::v1::Instance_Description>(GetArena()); _impl_.description_ = reinterpret_cast<::ommx::v1::Instance_Description*>(p); @@ -1033,7 +1025,7 @@ inline ::ommx::v1::Instance_Description* Instance::mutable_description() ABSL_AT } inline void Instance::set_allocated_description(::ommx::v1::Instance_Description* value) { ::google::protobuf::Arena* message_arena = GetArena(); - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { delete (_impl_.description_); } @@ -1067,7 +1059,7 @@ inline ::ommx::v1::DecisionVariable* Instance::mutable_decision_variables(int in inline ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>* Instance::mutable_decision_variables() ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:ommx.v1.Instance.decision_variables) - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _internal_mutable_decision_variables(); } inline const ::ommx::v1::DecisionVariable& Instance::decision_variables(int index) const @@ -1076,7 +1068,7 @@ inline const ::ommx::v1::DecisionVariable& Instance::decision_variables(int inde return _internal_decision_variables().Get(index); } inline ::ommx::v1::DecisionVariable* Instance::add_decision_variables() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ::ommx::v1::DecisionVariable* _add = _internal_mutable_decision_variables()->Add(); // @@protoc_insertion_point(field_add:ommx.v1.Instance.decision_variables) return _add; @@ -1088,12 +1080,12 @@ inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>& } inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>& Instance::_internal_decision_variables() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.decision_variables_; } inline ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>* Instance::_internal_mutable_decision_variables() { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return &_impl_.decision_variables_; } @@ -1104,7 +1096,7 @@ inline bool Instance::has_objective() const { return value; } inline const ::ommx::v1::Function& Instance::_internal_objective() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::ommx::v1::Function* p = _impl_.objective_; return p != nullptr ? *p : reinterpret_cast(::ommx::v1::_Function_default_instance_); } @@ -1113,7 +1105,7 @@ inline const ::ommx::v1::Function& Instance::objective() const ABSL_ATTRIBUTE_LI return _internal_objective(); } inline void Instance::unsafe_arena_set_allocated_objective(::ommx::v1::Function* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (GetArena() == nullptr) { delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.objective_); } @@ -1126,7 +1118,7 @@ inline void Instance::unsafe_arena_set_allocated_objective(::ommx::v1::Function* // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ommx.v1.Instance.objective) } inline ::ommx::v1::Function* Instance::release_objective() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] &= ~0x00000002u; ::ommx::v1::Function* released = _impl_.objective_; @@ -1145,7 +1137,7 @@ inline ::ommx::v1::Function* Instance::release_objective() { return released; } inline ::ommx::v1::Function* Instance::unsafe_arena_release_objective() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:ommx.v1.Instance.objective) _impl_._has_bits_[0] &= ~0x00000002u; @@ -1154,7 +1146,7 @@ inline ::ommx::v1::Function* Instance::unsafe_arena_release_objective() { return temp; } inline ::ommx::v1::Function* Instance::_internal_mutable_objective() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (_impl_.objective_ == nullptr) { auto* p = ::google::protobuf::Message::DefaultConstruct<::ommx::v1::Function>(GetArena()); _impl_.objective_ = reinterpret_cast<::ommx::v1::Function*>(p); @@ -1169,7 +1161,7 @@ inline ::ommx::v1::Function* Instance::mutable_objective() ABSL_ATTRIBUTE_LIFETI } inline void Instance::set_allocated_objective(::ommx::v1::Function* value) { ::google::protobuf::Arena* message_arena = GetArena(); - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.objective_); } @@ -1203,7 +1195,7 @@ inline ::ommx::v1::Constraint* Instance::mutable_constraints(int index) inline ::google::protobuf::RepeatedPtrField<::ommx::v1::Constraint>* Instance::mutable_constraints() ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:ommx.v1.Instance.constraints) - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _internal_mutable_constraints(); } inline const ::ommx::v1::Constraint& Instance::constraints(int index) const @@ -1212,7 +1204,7 @@ inline const ::ommx::v1::Constraint& Instance::constraints(int index) const return _internal_constraints().Get(index); } inline ::ommx::v1::Constraint* Instance::add_constraints() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ::ommx::v1::Constraint* _add = _internal_mutable_constraints()->Add(); // @@protoc_insertion_point(field_add:ommx.v1.Instance.constraints) return _add; @@ -1224,18 +1216,18 @@ inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::Constraint>& Insta } inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::Constraint>& Instance::_internal_constraints() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.constraints_; } inline ::google::protobuf::RepeatedPtrField<::ommx::v1::Constraint>* Instance::_internal_mutable_constraints() { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return &_impl_.constraints_; } // .ommx.v1.Instance.Sense sense = 5 [json_name = "sense"]; inline void Instance::clear_sense() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.sense_ = 0; } inline ::ommx::v1::Instance_Sense Instance::sense() const { @@ -1247,11 +1239,11 @@ inline void Instance::set_sense(::ommx::v1::Instance_Sense value) { // @@protoc_insertion_point(field_set:ommx.v1.Instance.sense) } inline ::ommx::v1::Instance_Sense Instance::_internal_sense() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return static_cast<::ommx::v1::Instance_Sense>(_impl_.sense_); } inline void Instance::_internal_set_sense(::ommx::v1::Instance_Sense value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.sense_ = value; } diff --git a/cpp/ommx/v1/linear.pb.cc b/cpp/ommx/v1/linear.pb.cc index a84d20f8..25efcc79 100644 --- a/cpp/ommx/v1/linear.pb.cc +++ b/cpp/ommx/v1/linear.pb.cc @@ -1,20 +1,18 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE // source: ommx/v1/linear.proto -// Protobuf C++ Version: 5.27.3 +// Protobuf C++ Version: 5.26.1 #include "ommx/v1/linear.pb.h" #include -#include #include "google/protobuf/io/coded_stream.h" -#include "google/protobuf/generated_message_tctable_impl.h" #include "google/protobuf/extension_set.h" #include "google/protobuf/wire_format_lite.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/generated_message_reflection.h" #include "google/protobuf/reflection_ops.h" #include "google/protobuf/wire_format.h" +#include "google/protobuf/generated_message_tctable_impl.h" // @@protoc_insertion_point(includes) // Must be included last. @@ -67,6 +65,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 LinearDefaultTypeInternal _Linear_default_instance_; } // namespace v1 } // namespace ommx +static ::_pb::Metadata file_level_metadata_ommx_2fv1_2flinear_2eproto[2]; static constexpr const ::_pb::EnumDescriptor** file_level_enum_descriptors_ommx_2fv1_2flinear_2eproto = nullptr; static constexpr const ::_pb::ServiceDescriptor** @@ -116,7 +115,7 @@ const char descriptor_table_protodef_ommx_2fv1_2flinear_2eproto[] ABSL_ATTRIBUTE "PBMetadata\352\002\010Ommx::V1b\006proto3" }; static ::absl::once_flag descriptor_table_ommx_2fv1_2flinear_2eproto_once; -PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2flinear_2eproto = { +const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2flinear_2eproto = { false, false, 269, @@ -129,9 +128,25 @@ PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fli schemas, file_default_instances, TableStruct_ommx_2fv1_2flinear_2eproto::offsets, + file_level_metadata_ommx_2fv1_2flinear_2eproto, file_level_enum_descriptors_ommx_2fv1_2flinear_2eproto, file_level_service_descriptors_ommx_2fv1_2flinear_2eproto, }; + +// This function exists to be marked as weak. +// It can significantly speed up compilation by breaking up LLVM's SCC +// in the .pb.cc translation units. Large translation units see a +// reduction of more than 35% of walltime for optimized builds. Without +// the weak attribute all the messages in the file, including all the +// vtables and everything they use become part of the same SCC through +// a cycle like: +// GetMetadata -> descriptor table -> default instances -> +// vtables -> GetMetadata +// By adding a weak function here we break the connection from the +// individual vtables back into the descriptor table. +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_ommx_2fv1_2flinear_2eproto_getter() { + return &descriptor_table_ommx_2fv1_2flinear_2eproto; +} namespace ommx { namespace v1 { // =================================================================== @@ -179,21 +194,35 @@ Linear_Term::GetClassData() const { PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: ClassDataFull _data_ = { { - &_table_.header, nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized PROTOBUF_FIELD_OFFSET(Linear_Term, _impl_._cached_size_), false, }, &Linear_Term::MergeImpl, &Linear_Term::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2flinear_2eproto, - nullptr, // tracker }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); + return &_data_; +} +PROTOBUF_NOINLINE void Linear_Term::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Linear.Term) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&_impl_.id_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.coefficient_) - + reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.coefficient_)); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } + +const char* Linear_Term::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::TcParseTable<1, 2, 0, 0, 2> Linear_Term::_table_ = { { @@ -207,7 +236,6 @@ const ::_pbi::TcParseTable<1, 2, 0, 0, 2> Linear_Term::_table_ = { 0, // num_aux_entries offsetof(decltype(_table_), field_names), // no aux_entries &_Linear_Term_default_instance_._instance, - nullptr, // post_loop_handler ::_pbi::TcParser::GenericFallback, // fallback #ifdef PROTOBUF_PREFETCH_PARSE_TABLE ::_pbi::TcParser::GetTable<::ommx::v1::Linear_Term>(), // to_prefetch @@ -234,19 +262,6 @@ const ::_pbi::TcParseTable<1, 2, 0, 0, 2> Linear_Term::_table_ = { }}, }; -PROTOBUF_NOINLINE void Linear_Term::Clear() { -// @@protoc_insertion_point(message_clear_start:ommx.v1.Linear.Term) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - ::memset(&_impl_.id_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.coefficient_) - - reinterpret_cast(&_impl_.id_)) + sizeof(_impl_.coefficient_)); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - ::uint8_t* Linear_Term::_InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const { @@ -290,7 +305,6 @@ ::size_t Linear_Term::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); // uint64 id = 1 [json_name = "id"]; if (this->_internal_id() != 0) { total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne( @@ -340,6 +354,9 @@ void Linear_Term::CopyFrom(const Linear_Term& from) { MergeFrom(from); } +PROTOBUF_NOINLINE bool Linear_Term::IsInitialized() const { + return true; +} void Linear_Term::InternalSwap(Linear_Term* PROTOBUF_RESTRICT other) { using std::swap; @@ -353,7 +370,9 @@ void Linear_Term::InternalSwap(Linear_Term* PROTOBUF_RESTRICT other) { } ::google::protobuf::Metadata Linear_Term::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2flinear_2eproto_getter, + &descriptor_table_ommx_2fv1_2flinear_2eproto_once, + file_level_metadata_ommx_2fv1_2flinear_2eproto[0]); } // =================================================================== @@ -368,7 +387,7 @@ Linear::Linear(::google::protobuf::Arena* arena) } inline PROTOBUF_NDEBUG_INLINE Linear::Impl_::Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, - const Impl_& from, const ::ommx::v1::Linear& from_msg) + const Impl_& from) : terms_{visibility, arena, from.terms_}, _cached_size_{0} {} @@ -380,7 +399,7 @@ Linear::Linear( (void)_this; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); _impl_.constant_ = from._impl_.constant_; // @@protoc_insertion_point(copy_constructor:ommx.v1.Linear) @@ -410,21 +429,34 @@ Linear::GetClassData() const { PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: ClassDataFull _data_ = { { - &_table_.header, nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized PROTOBUF_FIELD_OFFSET(Linear, _impl_._cached_size_), false, }, &Linear::MergeImpl, &Linear::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2flinear_2eproto, - nullptr, // tracker }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); + return &_data_; +} +PROTOBUF_NOINLINE void Linear::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Linear) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.terms_.Clear(); + _impl_.constant_ = 0; + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Linear::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; } + + PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::TcParseTable<1, 2, 1, 0, 2> Linear::_table_ = { { @@ -438,7 +470,6 @@ const ::_pbi::TcParseTable<1, 2, 1, 0, 2> Linear::_table_ = { 1, // num_aux_entries offsetof(decltype(_table_), aux_entries), &_Linear_default_instance_._instance, - nullptr, // post_loop_handler ::_pbi::TcParser::GenericFallback, // fallback #ifdef PROTOBUF_PREFETCH_PARSE_TABLE ::_pbi::TcParser::GetTable<::ommx::v1::Linear>(), // to_prefetch @@ -465,18 +496,6 @@ const ::_pbi::TcParseTable<1, 2, 1, 0, 2> Linear::_table_ = { }}, }; -PROTOBUF_NOINLINE void Linear::Clear() { -// @@protoc_insertion_point(message_clear_start:ommx.v1.Linear) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.terms_.Clear(); - _impl_.constant_ = 0; - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - ::uint8_t* Linear::_InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const { @@ -524,7 +543,6 @@ ::size_t Linear::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); // repeated .ommx.v1.Linear.Term terms = 1 [json_name = "terms"]; total_size += 1UL * this->_internal_terms_size(); for (const auto& msg : this->_internal_terms()) { @@ -572,6 +590,9 @@ void Linear::CopyFrom(const Linear& from) { MergeFrom(from); } +PROTOBUF_NOINLINE bool Linear::IsInitialized() const { + return true; +} void Linear::InternalSwap(Linear* PROTOBUF_RESTRICT other) { using std::swap; @@ -581,7 +602,9 @@ void Linear::InternalSwap(Linear* PROTOBUF_RESTRICT other) { } ::google::protobuf::Metadata Linear::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2flinear_2eproto_getter, + &descriptor_table_ommx_2fv1_2flinear_2eproto_once, + file_level_metadata_ommx_2fv1_2flinear_2eproto[1]); } // @@protoc_insertion_point(namespace_scope) } // namespace v1 @@ -591,8 +614,8 @@ namespace protobuf { } // namespace protobuf } // namespace google // @@protoc_insertion_point(global_scope) -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type - _static_init2_ PROTOBUF_UNUSED = - (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2flinear_2eproto), - ::std::false_type{}); +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 +static ::std::false_type _static_init_ PROTOBUF_UNUSED = + (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2flinear_2eproto), + ::std::false_type{}); #include "google/protobuf/port_undef.inc" diff --git a/cpp/ommx/v1/linear.pb.h b/cpp/ommx/v1/linear.pb.h index f551ce55..f14c544e 100644 --- a/cpp/ommx/v1/linear.pb.h +++ b/cpp/ommx/v1/linear.pb.h @@ -1,7 +1,6 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE // source: ommx/v1/linear.proto -// Protobuf C++ Version: 5.27.3 +// Protobuf C++ Version: 5.26.1 #ifndef GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2flinear_2eproto_2epb_2eh #define GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2flinear_2eproto_2epb_2eh @@ -11,12 +10,13 @@ #include #include -#include "google/protobuf/runtime_version.h" -#if PROTOBUF_VERSION != 5027003 +#include "google/protobuf/port_def.inc" +#if PROTOBUF_VERSION != 5026001 #error "Protobuf C++ gencode is built with an incompatible version of" #error "Protobuf C++ headers/runtime. See" #error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" #endif +#include "google/protobuf/port_undef.inc" #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/arena.h" #include "google/protobuf/arenastring.h" @@ -163,11 +163,11 @@ class Linear_Term final : public ::google::protobuf::Message const ::google::protobuf::MessageLite& from_msg); public: - bool IsInitialized() const { - return true; - } ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; ::uint8_t* _InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; @@ -188,10 +188,11 @@ class Linear_Term final : public ::google::protobuf::Message : Linear_Term(arena) { *this = ::std::move(from); } - const ::google::protobuf::Message::ClassData* GetClassData() const final; + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- @@ -227,10 +228,6 @@ class Linear_Term final : public ::google::protobuf::Message 1, 2, 0, 0, 2> _table_; - - static constexpr const void* _raw_default_instance_ = - &_Linear_Term_default_instance_; - friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; template @@ -243,8 +240,7 @@ class Linear_Term final : public ::google::protobuf::Message inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena); inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* arena, const Impl_& from, - const Linear_Term& from_msg); + ::google::protobuf::Arena* arena, const Impl_& from); ::uint64_t id_; double coefficient_; mutable ::google::protobuf::internal::CachedSize _cached_size_; @@ -346,11 +342,11 @@ class Linear final : public ::google::protobuf::Message const ::google::protobuf::MessageLite& from_msg); public: - bool IsInitialized() const { - return true; - } ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; ::uint8_t* _InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; @@ -371,10 +367,11 @@ class Linear final : public ::google::protobuf::Message : Linear(arena) { *this = ::std::move(from); } - const ::google::protobuf::Message::ClassData* GetClassData() const final; + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- using Term = Linear_Term; @@ -418,10 +415,6 @@ class Linear final : public ::google::protobuf::Message 1, 2, 1, 0, 2> _table_; - - static constexpr const void* _raw_default_instance_ = - &_Linear_default_instance_; - friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; template @@ -434,8 +427,7 @@ class Linear final : public ::google::protobuf::Message inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena); inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* arena, const Impl_& from, - const Linear& from_msg); + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::RepeatedPtrField< ::ommx::v1::Linear_Term > terms_; double constant_; mutable ::google::protobuf::internal::CachedSize _cached_size_; @@ -463,7 +455,7 @@ class Linear final : public ::google::protobuf::Message // uint64 id = 1 [json_name = "id"]; inline void Linear_Term::clear_id() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.id_ = ::uint64_t{0u}; } inline ::uint64_t Linear_Term::id() const { @@ -475,17 +467,17 @@ inline void Linear_Term::set_id(::uint64_t value) { // @@protoc_insertion_point(field_set:ommx.v1.Linear.Term.id) } inline ::uint64_t Linear_Term::_internal_id() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.id_; } inline void Linear_Term::_internal_set_id(::uint64_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.id_ = value; } // double coefficient = 2 [json_name = "coefficient"]; inline void Linear_Term::clear_coefficient() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.coefficient_ = 0; } inline double Linear_Term::coefficient() const { @@ -497,11 +489,11 @@ inline void Linear_Term::set_coefficient(double value) { // @@protoc_insertion_point(field_set:ommx.v1.Linear.Term.coefficient) } inline double Linear_Term::_internal_coefficient() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.coefficient_; } inline void Linear_Term::_internal_set_coefficient(double value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.coefficient_ = value; } @@ -517,7 +509,7 @@ inline int Linear::terms_size() const { return _internal_terms_size(); } inline void Linear::clear_terms() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.terms_.Clear(); } inline ::ommx::v1::Linear_Term* Linear::mutable_terms(int index) @@ -528,7 +520,7 @@ inline ::ommx::v1::Linear_Term* Linear::mutable_terms(int index) inline ::google::protobuf::RepeatedPtrField<::ommx::v1::Linear_Term>* Linear::mutable_terms() ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:ommx.v1.Linear.terms) - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _internal_mutable_terms(); } inline const ::ommx::v1::Linear_Term& Linear::terms(int index) const @@ -537,7 +529,7 @@ inline const ::ommx::v1::Linear_Term& Linear::terms(int index) const return _internal_terms().Get(index); } inline ::ommx::v1::Linear_Term* Linear::add_terms() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ::ommx::v1::Linear_Term* _add = _internal_mutable_terms()->Add(); // @@protoc_insertion_point(field_add:ommx.v1.Linear.terms) return _add; @@ -549,18 +541,18 @@ inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::Linear_Term>& Line } inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::Linear_Term>& Linear::_internal_terms() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.terms_; } inline ::google::protobuf::RepeatedPtrField<::ommx::v1::Linear_Term>* Linear::_internal_mutable_terms() { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return &_impl_.terms_; } // double constant = 2 [json_name = "constant"]; inline void Linear::clear_constant() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.constant_ = 0; } inline double Linear::constant() const { @@ -572,11 +564,11 @@ inline void Linear::set_constant(double value) { // @@protoc_insertion_point(field_set:ommx.v1.Linear.constant) } inline double Linear::_internal_constant() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.constant_; } inline void Linear::_internal_set_constant(double value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.constant_ = value; } diff --git a/cpp/ommx/v1/polynomial.pb.cc b/cpp/ommx/v1/polynomial.pb.cc index c8b838c2..0aa73a1f 100644 --- a/cpp/ommx/v1/polynomial.pb.cc +++ b/cpp/ommx/v1/polynomial.pb.cc @@ -1,20 +1,18 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE // source: ommx/v1/polynomial.proto -// Protobuf C++ Version: 5.27.3 +// Protobuf C++ Version: 5.26.1 #include "ommx/v1/polynomial.pb.h" #include -#include #include "google/protobuf/io/coded_stream.h" -#include "google/protobuf/generated_message_tctable_impl.h" #include "google/protobuf/extension_set.h" #include "google/protobuf/wire_format_lite.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/generated_message_reflection.h" #include "google/protobuf/reflection_ops.h" #include "google/protobuf/wire_format.h" +#include "google/protobuf/generated_message_tctable_impl.h" // @@protoc_insertion_point(includes) // Must be included last. @@ -67,6 +65,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PolynomialDefaultTypeInternal _Polynomial_default_instance_; } // namespace v1 } // namespace ommx +static ::_pb::Metadata file_level_metadata_ommx_2fv1_2fpolynomial_2eproto[2]; static constexpr const ::_pb::EnumDescriptor** file_level_enum_descriptors_ommx_2fv1_2fpolynomial_2eproto = nullptr; static constexpr const ::_pb::ServiceDescriptor** @@ -115,7 +114,7 @@ const char descriptor_table_protodef_ommx_2fv1_2fpolynomial_2eproto[] ABSL_ATTRI "mmx::V1b\006proto3" }; static ::absl::once_flag descriptor_table_ommx_2fv1_2fpolynomial_2eproto_once; -PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fpolynomial_2eproto = { +const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fpolynomial_2eproto = { false, false, 255, @@ -128,9 +127,25 @@ PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fpo schemas, file_default_instances, TableStruct_ommx_2fv1_2fpolynomial_2eproto::offsets, + file_level_metadata_ommx_2fv1_2fpolynomial_2eproto, file_level_enum_descriptors_ommx_2fv1_2fpolynomial_2eproto, file_level_service_descriptors_ommx_2fv1_2fpolynomial_2eproto, }; + +// This function exists to be marked as weak. +// It can significantly speed up compilation by breaking up LLVM's SCC +// in the .pb.cc translation units. Large translation units see a +// reduction of more than 35% of walltime for optimized builds. Without +// the weak attribute all the messages in the file, including all the +// vtables and everything they use become part of the same SCC through +// a cycle like: +// GetMetadata -> descriptor table -> default instances -> +// vtables -> GetMetadata +// By adding a weak function here we break the connection from the +// individual vtables back into the descriptor table. +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_ommx_2fv1_2fpolynomial_2eproto_getter() { + return &descriptor_table_ommx_2fv1_2fpolynomial_2eproto; +} namespace ommx { namespace v1 { // =================================================================== @@ -146,7 +161,7 @@ Monomial::Monomial(::google::protobuf::Arena* arena) } inline PROTOBUF_NDEBUG_INLINE Monomial::Impl_::Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, - const Impl_& from, const ::ommx::v1::Monomial& from_msg) + const Impl_& from) : ids_{visibility, arena, from.ids_}, _ids_cached_byte_size_{0}, _cached_size_{0} {} @@ -159,7 +174,7 @@ Monomial::Monomial( (void)_this; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); _impl_.coefficient_ = from._impl_.coefficient_; // @@protoc_insertion_point(copy_constructor:ommx.v1.Monomial) @@ -190,21 +205,34 @@ Monomial::GetClassData() const { PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: ClassDataFull _data_ = { { - &_table_.header, nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized PROTOBUF_FIELD_OFFSET(Monomial, _impl_._cached_size_), false, }, &Monomial::MergeImpl, &Monomial::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2fpolynomial_2eproto, - nullptr, // tracker }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); + return &_data_; +} +PROTOBUF_NOINLINE void Monomial::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Monomial) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.ids_.Clear(); + _impl_.coefficient_ = 0; + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); } + +const char* Monomial::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::TcParseTable<1, 2, 0, 0, 2> Monomial::_table_ = { { @@ -218,7 +246,6 @@ const ::_pbi::TcParseTable<1, 2, 0, 0, 2> Monomial::_table_ = { 0, // num_aux_entries offsetof(decltype(_table_), field_names), // no aux_entries &_Monomial_default_instance_._instance, - nullptr, // post_loop_handler ::_pbi::TcParser::GenericFallback, // fallback #ifdef PROTOBUF_PREFETCH_PARSE_TABLE ::_pbi::TcParser::GetTable<::ommx::v1::Monomial>(), // to_prefetch @@ -245,18 +272,6 @@ const ::_pbi::TcParseTable<1, 2, 0, 0, 2> Monomial::_table_ = { }}, }; -PROTOBUF_NOINLINE void Monomial::Clear() { -// @@protoc_insertion_point(message_clear_start:ommx.v1.Monomial) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.ids_.Clear(); - _impl_.coefficient_ = 0; - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - ::uint8_t* Monomial::_InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const { @@ -302,7 +317,6 @@ ::size_t Monomial::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); // repeated uint64 ids = 1 [json_name = "ids"]; { std::size_t data_size = ::_pbi::WireFormatLite::UInt64Size( @@ -357,6 +371,9 @@ void Monomial::CopyFrom(const Monomial& from) { MergeFrom(from); } +PROTOBUF_NOINLINE bool Monomial::IsInitialized() const { + return true; +} void Monomial::InternalSwap(Monomial* PROTOBUF_RESTRICT other) { using std::swap; @@ -366,7 +383,9 @@ void Monomial::InternalSwap(Monomial* PROTOBUF_RESTRICT other) { } ::google::protobuf::Metadata Monomial::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2fpolynomial_2eproto_getter, + &descriptor_table_ommx_2fv1_2fpolynomial_2eproto_once, + file_level_metadata_ommx_2fv1_2fpolynomial_2eproto[0]); } // =================================================================== @@ -381,7 +400,7 @@ Polynomial::Polynomial(::google::protobuf::Arena* arena) } inline PROTOBUF_NDEBUG_INLINE Polynomial::Impl_::Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, - const Impl_& from, const ::ommx::v1::Polynomial& from_msg) + const Impl_& from) : terms_{visibility, arena, from.terms_}, _cached_size_{0} {} @@ -393,7 +412,7 @@ Polynomial::Polynomial( (void)_this; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); // @@protoc_insertion_point(copy_constructor:ommx.v1.Polynomial) } @@ -421,21 +440,33 @@ Polynomial::GetClassData() const { PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: ClassDataFull _data_ = { { - &_table_.header, nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized PROTOBUF_FIELD_OFFSET(Polynomial, _impl_._cached_size_), false, }, &Polynomial::MergeImpl, &Polynomial::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2fpolynomial_2eproto, - nullptr, // tracker }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); + return &_data_; +} +PROTOBUF_NOINLINE void Polynomial::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Polynomial) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.terms_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Polynomial::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; } + + PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::TcParseTable<0, 1, 1, 0, 2> Polynomial::_table_ = { { @@ -449,7 +480,6 @@ const ::_pbi::TcParseTable<0, 1, 1, 0, 2> Polynomial::_table_ = { 1, // num_aux_entries offsetof(decltype(_table_), aux_entries), &_Polynomial_default_instance_._instance, - nullptr, // post_loop_handler ::_pbi::TcParser::GenericFallback, // fallback #ifdef PROTOBUF_PREFETCH_PARSE_TABLE ::_pbi::TcParser::GetTable<::ommx::v1::Polynomial>(), // to_prefetch @@ -470,17 +500,6 @@ const ::_pbi::TcParseTable<0, 1, 1, 0, 2> Polynomial::_table_ = { }}, }; -PROTOBUF_NOINLINE void Polynomial::Clear() { -// @@protoc_insertion_point(message_clear_start:ommx.v1.Polynomial) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.terms_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - ::uint8_t* Polynomial::_InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const { @@ -516,7 +535,6 @@ ::size_t Polynomial::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); // repeated .ommx.v1.Monomial terms = 1 [json_name = "terms"]; total_size += 1UL * this->_internal_terms_size(); for (const auto& msg : this->_internal_terms()) { @@ -546,6 +564,9 @@ void Polynomial::CopyFrom(const Polynomial& from) { MergeFrom(from); } +PROTOBUF_NOINLINE bool Polynomial::IsInitialized() const { + return true; +} void Polynomial::InternalSwap(Polynomial* PROTOBUF_RESTRICT other) { using std::swap; @@ -554,7 +575,9 @@ void Polynomial::InternalSwap(Polynomial* PROTOBUF_RESTRICT other) { } ::google::protobuf::Metadata Polynomial::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2fpolynomial_2eproto_getter, + &descriptor_table_ommx_2fv1_2fpolynomial_2eproto_once, + file_level_metadata_ommx_2fv1_2fpolynomial_2eproto[1]); } // @@protoc_insertion_point(namespace_scope) } // namespace v1 @@ -564,8 +587,8 @@ namespace protobuf { } // namespace protobuf } // namespace google // @@protoc_insertion_point(global_scope) -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type - _static_init2_ PROTOBUF_UNUSED = - (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2fpolynomial_2eproto), - ::std::false_type{}); +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 +static ::std::false_type _static_init_ PROTOBUF_UNUSED = + (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2fpolynomial_2eproto), + ::std::false_type{}); #include "google/protobuf/port_undef.inc" diff --git a/cpp/ommx/v1/polynomial.pb.h b/cpp/ommx/v1/polynomial.pb.h index a5816477..0933ea5a 100644 --- a/cpp/ommx/v1/polynomial.pb.h +++ b/cpp/ommx/v1/polynomial.pb.h @@ -1,7 +1,6 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE // source: ommx/v1/polynomial.proto -// Protobuf C++ Version: 5.27.3 +// Protobuf C++ Version: 5.26.1 #ifndef GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fpolynomial_2eproto_2epb_2eh #define GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fpolynomial_2eproto_2epb_2eh @@ -11,12 +10,13 @@ #include #include -#include "google/protobuf/runtime_version.h" -#if PROTOBUF_VERSION != 5027003 +#include "google/protobuf/port_def.inc" +#if PROTOBUF_VERSION != 5026001 #error "Protobuf C++ gencode is built with an incompatible version of" #error "Protobuf C++ headers/runtime. See" #error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" #endif +#include "google/protobuf/port_undef.inc" #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/arena.h" #include "google/protobuf/arenastring.h" @@ -163,11 +163,11 @@ class Monomial final : public ::google::protobuf::Message const ::google::protobuf::MessageLite& from_msg); public: - bool IsInitialized() const { - return true; - } ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; ::uint8_t* _InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; @@ -188,10 +188,11 @@ class Monomial final : public ::google::protobuf::Message : Monomial(arena) { *this = ::std::move(from); } - const ::google::protobuf::Message::ClassData* GetClassData() const final; + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- @@ -235,10 +236,6 @@ class Monomial final : public ::google::protobuf::Message 1, 2, 0, 0, 2> _table_; - - static constexpr const void* _raw_default_instance_ = - &_Monomial_default_instance_; - friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; template @@ -251,8 +248,7 @@ class Monomial final : public ::google::protobuf::Message inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena); inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* arena, const Impl_& from, - const Monomial& from_msg); + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::RepeatedField<::uint64_t> ids_; mutable ::google::protobuf::internal::CachedSize _ids_cached_byte_size_; double coefficient_; @@ -355,11 +351,11 @@ class Polynomial final : public ::google::protobuf::Message const ::google::protobuf::MessageLite& from_msg); public: - bool IsInitialized() const { - return true; - } ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; ::uint8_t* _InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; @@ -380,10 +376,11 @@ class Polynomial final : public ::google::protobuf::Message : Polynomial(arena) { *this = ::std::move(from); } - const ::google::protobuf::Message::ClassData* GetClassData() const final; + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- @@ -415,10 +412,6 @@ class Polynomial final : public ::google::protobuf::Message 0, 1, 1, 0, 2> _table_; - - static constexpr const void* _raw_default_instance_ = - &_Polynomial_default_instance_; - friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; template @@ -431,8 +424,7 @@ class Polynomial final : public ::google::protobuf::Message inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena); inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* arena, const Impl_& from, - const Polynomial& from_msg); + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::RepeatedPtrField< ::ommx::v1::Monomial > terms_; mutable ::google::protobuf::internal::CachedSize _cached_size_; PROTOBUF_TSAN_DECLARE_MEMBER @@ -465,7 +457,7 @@ inline int Monomial::ids_size() const { return _internal_ids_size(); } inline void Monomial::clear_ids() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.ids_.Clear(); } inline ::uint64_t Monomial::ids(int index) const { @@ -477,7 +469,7 @@ inline void Monomial::set_ids(int index, ::uint64_t value) { // @@protoc_insertion_point(field_set:ommx.v1.Monomial.ids) } inline void Monomial::add_ids(::uint64_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _internal_mutable_ids()->Add(value); // @@protoc_insertion_point(field_add:ommx.v1.Monomial.ids) } @@ -489,22 +481,22 @@ inline const ::google::protobuf::RepeatedField<::uint64_t>& Monomial::ids() cons inline ::google::protobuf::RepeatedField<::uint64_t>* Monomial::mutable_ids() ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:ommx.v1.Monomial.ids) - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _internal_mutable_ids(); } inline const ::google::protobuf::RepeatedField<::uint64_t>& Monomial::_internal_ids() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.ids_; } inline ::google::protobuf::RepeatedField<::uint64_t>* Monomial::_internal_mutable_ids() { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return &_impl_.ids_; } // double coefficient = 2 [json_name = "coefficient"]; inline void Monomial::clear_coefficient() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.coefficient_ = 0; } inline double Monomial::coefficient() const { @@ -516,11 +508,11 @@ inline void Monomial::set_coefficient(double value) { // @@protoc_insertion_point(field_set:ommx.v1.Monomial.coefficient) } inline double Monomial::_internal_coefficient() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.coefficient_; } inline void Monomial::_internal_set_coefficient(double value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.coefficient_ = value; } @@ -536,7 +528,7 @@ inline int Polynomial::terms_size() const { return _internal_terms_size(); } inline void Polynomial::clear_terms() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.terms_.Clear(); } inline ::ommx::v1::Monomial* Polynomial::mutable_terms(int index) @@ -547,7 +539,7 @@ inline ::ommx::v1::Monomial* Polynomial::mutable_terms(int index) inline ::google::protobuf::RepeatedPtrField<::ommx::v1::Monomial>* Polynomial::mutable_terms() ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:ommx.v1.Polynomial.terms) - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _internal_mutable_terms(); } inline const ::ommx::v1::Monomial& Polynomial::terms(int index) const @@ -556,7 +548,7 @@ inline const ::ommx::v1::Monomial& Polynomial::terms(int index) const return _internal_terms().Get(index); } inline ::ommx::v1::Monomial* Polynomial::add_terms() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ::ommx::v1::Monomial* _add = _internal_mutable_terms()->Add(); // @@protoc_insertion_point(field_add:ommx.v1.Polynomial.terms) return _add; @@ -568,12 +560,12 @@ inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::Monomial>& Polynom } inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::Monomial>& Polynomial::_internal_terms() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.terms_; } inline ::google::protobuf::RepeatedPtrField<::ommx::v1::Monomial>* Polynomial::_internal_mutable_terms() { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return &_impl_.terms_; } diff --git a/cpp/ommx/v1/quadratic.pb.cc b/cpp/ommx/v1/quadratic.pb.cc index 2d6a10bf..c0fa8334 100644 --- a/cpp/ommx/v1/quadratic.pb.cc +++ b/cpp/ommx/v1/quadratic.pb.cc @@ -1,20 +1,18 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE // source: ommx/v1/quadratic.proto -// Protobuf C++ Version: 5.27.3 +// Protobuf C++ Version: 5.26.1 #include "ommx/v1/quadratic.pb.h" #include -#include #include "google/protobuf/io/coded_stream.h" -#include "google/protobuf/generated_message_tctable_impl.h" #include "google/protobuf/extension_set.h" #include "google/protobuf/wire_format_lite.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/generated_message_reflection.h" #include "google/protobuf/reflection_ops.h" #include "google/protobuf/wire_format.h" +#include "google/protobuf/generated_message_tctable_impl.h" // @@protoc_insertion_point(includes) // Must be included last. @@ -51,6 +49,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 QuadraticDefaultTypeInternal _Quadratic_default_instance_; } // namespace v1 } // namespace ommx +static ::_pb::Metadata file_level_metadata_ommx_2fv1_2fquadratic_2eproto[1]; static constexpr const ::_pb::EnumDescriptor** file_level_enum_descriptors_ommx_2fv1_2fquadratic_2eproto = nullptr; static constexpr const ::_pb::ServiceDescriptor** @@ -99,7 +98,7 @@ static const ::_pbi::DescriptorTable* const descriptor_table_ommx_2fv1_2fquadrat &::descriptor_table_ommx_2fv1_2flinear_2eproto, }; static ::absl::once_flag descriptor_table_ommx_2fv1_2fquadratic_2eproto_once; -PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fquadratic_2eproto = { +const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fquadratic_2eproto = { false, false, 297, @@ -112,23 +111,38 @@ PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fqu schemas, file_default_instances, TableStruct_ommx_2fv1_2fquadratic_2eproto::offsets, + file_level_metadata_ommx_2fv1_2fquadratic_2eproto, file_level_enum_descriptors_ommx_2fv1_2fquadratic_2eproto, file_level_service_descriptors_ommx_2fv1_2fquadratic_2eproto, }; + +// This function exists to be marked as weak. +// It can significantly speed up compilation by breaking up LLVM's SCC +// in the .pb.cc translation units. Large translation units see a +// reduction of more than 35% of walltime for optimized builds. Without +// the weak attribute all the messages in the file, including all the +// vtables and everything they use become part of the same SCC through +// a cycle like: +// GetMetadata -> descriptor table -> default instances -> +// vtables -> GetMetadata +// By adding a weak function here we break the connection from the +// individual vtables back into the descriptor table. +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_ommx_2fv1_2fquadratic_2eproto_getter() { + return &descriptor_table_ommx_2fv1_2fquadratic_2eproto; +} namespace ommx { namespace v1 { // =================================================================== class Quadratic::_Internal { public: - using HasBits = - decltype(std::declval()._impl_._has_bits_); + using HasBits = decltype(std::declval()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(Quadratic, _impl_._has_bits_); + 8 * PROTOBUF_FIELD_OFFSET(Quadratic, _impl_._has_bits_); }; void Quadratic::clear_linear() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (_impl_.linear_ != nullptr) _impl_.linear_->Clear(); _impl_._has_bits_[0] &= ~0x00000001u; } @@ -139,7 +153,7 @@ Quadratic::Quadratic(::google::protobuf::Arena* arena) } inline PROTOBUF_NDEBUG_INLINE Quadratic::Impl_::Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, - const Impl_& from, const ::ommx::v1::Quadratic& from_msg) + const Impl_& from) : _has_bits_{from._has_bits_}, _cached_size_{0}, rows_{visibility, arena, from.rows_}, @@ -156,7 +170,7 @@ Quadratic::Quadratic( (void)_this; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; _impl_.linear_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::Message::CopyConstruct<::ommx::v1::Linear>( arena, *from._impl_.linear_) @@ -194,21 +208,41 @@ Quadratic::GetClassData() const { PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: ClassDataFull _data_ = { { - &_table_.header, nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized PROTOBUF_FIELD_OFFSET(Quadratic, _impl_._cached_size_), false, }, &Quadratic::MergeImpl, &Quadratic::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2fquadratic_2eproto, - nullptr, // tracker }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); + return &_data_; +} +PROTOBUF_NOINLINE void Quadratic::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Quadratic) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.rows_.Clear(); + _impl_.columns_.Clear(); + _impl_.values_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.linear_ != nullptr); + _impl_.linear_->Clear(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Quadratic::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; } + + PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::TcParseTable<2, 4, 1, 0, 2> Quadratic::_table_ = { { @@ -222,7 +256,6 @@ const ::_pbi::TcParseTable<2, 4, 1, 0, 2> Quadratic::_table_ = { 1, // num_aux_entries offsetof(decltype(_table_), aux_entries), &_Quadratic_default_instance_._instance, - nullptr, // post_loop_handler ::_pbi::TcParser::GenericFallback, // fallback #ifdef PROTOBUF_PREFETCH_PARSE_TABLE ::_pbi::TcParser::GetTable<::ommx::v1::Quadratic>(), // to_prefetch @@ -261,25 +294,6 @@ const ::_pbi::TcParseTable<2, 4, 1, 0, 2> Quadratic::_table_ = { }}, }; -PROTOBUF_NOINLINE void Quadratic::Clear() { -// @@protoc_insertion_point(message_clear_start:ommx.v1.Quadratic) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.rows_.Clear(); - _impl_.columns_.Clear(); - _impl_.values_.Clear(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - ABSL_DCHECK(_impl_.linear_ != nullptr); - _impl_.linear_->Clear(); - } - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - ::uint8_t* Quadratic::_InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const { @@ -334,7 +348,6 @@ ::size_t Quadratic::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); // repeated uint64 rows = 1 [json_name = "rows"]; { std::size_t data_size = ::_pbi::WireFormatLite::UInt64Size( @@ -417,6 +430,9 @@ void Quadratic::CopyFrom(const Quadratic& from) { MergeFrom(from); } +PROTOBUF_NOINLINE bool Quadratic::IsInitialized() const { + return true; +} void Quadratic::InternalSwap(Quadratic* PROTOBUF_RESTRICT other) { using std::swap; @@ -429,7 +445,9 @@ void Quadratic::InternalSwap(Quadratic* PROTOBUF_RESTRICT other) { } ::google::protobuf::Metadata Quadratic::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2fquadratic_2eproto_getter, + &descriptor_table_ommx_2fv1_2fquadratic_2eproto_once, + file_level_metadata_ommx_2fv1_2fquadratic_2eproto[0]); } // @@protoc_insertion_point(namespace_scope) } // namespace v1 @@ -439,8 +457,8 @@ namespace protobuf { } // namespace protobuf } // namespace google // @@protoc_insertion_point(global_scope) -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type - _static_init2_ PROTOBUF_UNUSED = - (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2fquadratic_2eproto), - ::std::false_type{}); +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 +static ::std::false_type _static_init_ PROTOBUF_UNUSED = + (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2fquadratic_2eproto), + ::std::false_type{}); #include "google/protobuf/port_undef.inc" diff --git a/cpp/ommx/v1/quadratic.pb.h b/cpp/ommx/v1/quadratic.pb.h index 74a49a52..5010c263 100644 --- a/cpp/ommx/v1/quadratic.pb.h +++ b/cpp/ommx/v1/quadratic.pb.h @@ -1,7 +1,6 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE // source: ommx/v1/quadratic.proto -// Protobuf C++ Version: 5.27.3 +// Protobuf C++ Version: 5.26.1 #ifndef GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fquadratic_2eproto_2epb_2eh #define GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fquadratic_2eproto_2epb_2eh @@ -11,12 +10,13 @@ #include #include -#include "google/protobuf/runtime_version.h" -#if PROTOBUF_VERSION != 5027003 +#include "google/protobuf/port_def.inc" +#if PROTOBUF_VERSION != 5026001 #error "Protobuf C++ gencode is built with an incompatible version of" #error "Protobuf C++ headers/runtime. See" #error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" #endif +#include "google/protobuf/port_undef.inc" #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/arena.h" #include "google/protobuf/arenastring.h" @@ -161,11 +161,11 @@ class Quadratic final : public ::google::protobuf::Message const ::google::protobuf::MessageLite& from_msg); public: - bool IsInitialized() const { - return true; - } ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; ::uint8_t* _InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; @@ -186,10 +186,11 @@ class Quadratic final : public ::google::protobuf::Message : Quadratic(arena) { *this = ::std::move(from); } - const ::google::protobuf::Message::ClassData* GetClassData() const final; + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- @@ -276,10 +277,6 @@ class Quadratic final : public ::google::protobuf::Message 2, 4, 1, 0, 2> _table_; - - static constexpr const void* _raw_default_instance_ = - &_Quadratic_default_instance_; - friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; template @@ -292,8 +289,7 @@ class Quadratic final : public ::google::protobuf::Message inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena); inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* arena, const Impl_& from, - const Quadratic& from_msg); + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::RepeatedField<::uint64_t> rows_; @@ -332,7 +328,7 @@ inline int Quadratic::rows_size() const { return _internal_rows_size(); } inline void Quadratic::clear_rows() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.rows_.Clear(); } inline ::uint64_t Quadratic::rows(int index) const { @@ -344,7 +340,7 @@ inline void Quadratic::set_rows(int index, ::uint64_t value) { // @@protoc_insertion_point(field_set:ommx.v1.Quadratic.rows) } inline void Quadratic::add_rows(::uint64_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _internal_mutable_rows()->Add(value); // @@protoc_insertion_point(field_add:ommx.v1.Quadratic.rows) } @@ -356,16 +352,16 @@ inline const ::google::protobuf::RepeatedField<::uint64_t>& Quadratic::rows() co inline ::google::protobuf::RepeatedField<::uint64_t>* Quadratic::mutable_rows() ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:ommx.v1.Quadratic.rows) - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _internal_mutable_rows(); } inline const ::google::protobuf::RepeatedField<::uint64_t>& Quadratic::_internal_rows() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.rows_; } inline ::google::protobuf::RepeatedField<::uint64_t>* Quadratic::_internal_mutable_rows() { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return &_impl_.rows_; } @@ -377,7 +373,7 @@ inline int Quadratic::columns_size() const { return _internal_columns_size(); } inline void Quadratic::clear_columns() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.columns_.Clear(); } inline ::uint64_t Quadratic::columns(int index) const { @@ -389,7 +385,7 @@ inline void Quadratic::set_columns(int index, ::uint64_t value) { // @@protoc_insertion_point(field_set:ommx.v1.Quadratic.columns) } inline void Quadratic::add_columns(::uint64_t value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _internal_mutable_columns()->Add(value); // @@protoc_insertion_point(field_add:ommx.v1.Quadratic.columns) } @@ -401,16 +397,16 @@ inline const ::google::protobuf::RepeatedField<::uint64_t>& Quadratic::columns() inline ::google::protobuf::RepeatedField<::uint64_t>* Quadratic::mutable_columns() ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:ommx.v1.Quadratic.columns) - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _internal_mutable_columns(); } inline const ::google::protobuf::RepeatedField<::uint64_t>& Quadratic::_internal_columns() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.columns_; } inline ::google::protobuf::RepeatedField<::uint64_t>* Quadratic::_internal_mutable_columns() { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return &_impl_.columns_; } @@ -422,7 +418,7 @@ inline int Quadratic::values_size() const { return _internal_values_size(); } inline void Quadratic::clear_values() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.values_.Clear(); } inline double Quadratic::values(int index) const { @@ -434,7 +430,7 @@ inline void Quadratic::set_values(int index, double value) { // @@protoc_insertion_point(field_set:ommx.v1.Quadratic.values) } inline void Quadratic::add_values(double value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _internal_mutable_values()->Add(value); // @@protoc_insertion_point(field_add:ommx.v1.Quadratic.values) } @@ -446,16 +442,16 @@ inline const ::google::protobuf::RepeatedField& Quadratic::values() cons inline ::google::protobuf::RepeatedField* Quadratic::mutable_values() ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:ommx.v1.Quadratic.values) - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _internal_mutable_values(); } inline const ::google::protobuf::RepeatedField& Quadratic::_internal_values() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.values_; } inline ::google::protobuf::RepeatedField* Quadratic::_internal_mutable_values() { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return &_impl_.values_; } @@ -466,7 +462,7 @@ inline bool Quadratic::has_linear() const { return value; } inline const ::ommx::v1::Linear& Quadratic::_internal_linear() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::ommx::v1::Linear* p = _impl_.linear_; return p != nullptr ? *p : reinterpret_cast(::ommx::v1::_Linear_default_instance_); } @@ -475,7 +471,7 @@ inline const ::ommx::v1::Linear& Quadratic::linear() const ABSL_ATTRIBUTE_LIFETI return _internal_linear(); } inline void Quadratic::unsafe_arena_set_allocated_linear(::ommx::v1::Linear* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (GetArena() == nullptr) { delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.linear_); } @@ -488,7 +484,7 @@ inline void Quadratic::unsafe_arena_set_allocated_linear(::ommx::v1::Linear* val // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ommx.v1.Quadratic.linear) } inline ::ommx::v1::Linear* Quadratic::release_linear() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] &= ~0x00000001u; ::ommx::v1::Linear* released = _impl_.linear_; @@ -507,7 +503,7 @@ inline ::ommx::v1::Linear* Quadratic::release_linear() { return released; } inline ::ommx::v1::Linear* Quadratic::unsafe_arena_release_linear() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:ommx.v1.Quadratic.linear) _impl_._has_bits_[0] &= ~0x00000001u; @@ -516,7 +512,7 @@ inline ::ommx::v1::Linear* Quadratic::unsafe_arena_release_linear() { return temp; } inline ::ommx::v1::Linear* Quadratic::_internal_mutable_linear() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (_impl_.linear_ == nullptr) { auto* p = ::google::protobuf::Message::DefaultConstruct<::ommx::v1::Linear>(GetArena()); _impl_.linear_ = reinterpret_cast<::ommx::v1::Linear*>(p); @@ -531,7 +527,7 @@ inline ::ommx::v1::Linear* Quadratic::mutable_linear() ABSL_ATTRIBUTE_LIFETIME_B } inline void Quadratic::set_allocated_linear(::ommx::v1::Linear* value) { ::google::protobuf::Arena* message_arena = GetArena(); - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.linear_); } diff --git a/cpp/ommx/v1/solution.pb.cc b/cpp/ommx/v1/solution.pb.cc index b908d02c..aa0d456e 100644 --- a/cpp/ommx/v1/solution.pb.cc +++ b/cpp/ommx/v1/solution.pb.cc @@ -1,20 +1,18 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE // source: ommx/v1/solution.proto -// Protobuf C++ Version: 5.27.3 +// Protobuf C++ Version: 5.26.1 #include "ommx/v1/solution.pb.h" #include -#include #include "google/protobuf/io/coded_stream.h" -#include "google/protobuf/generated_message_tctable_impl.h" #include "google/protobuf/extension_set.h" #include "google/protobuf/wire_format_lite.h" #include "google/protobuf/descriptor.h" #include "google/protobuf/generated_message_reflection.h" #include "google/protobuf/reflection_ops.h" #include "google/protobuf/wire_format.h" +#include "google/protobuf/generated_message_tctable_impl.h" // @@protoc_insertion_point(includes) // Must be included last. @@ -127,6 +125,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ResultDefaultTypeInternal _Result_default_instance_; } // namespace v1 } // namespace ommx +static ::_pb::Metadata file_level_metadata_ommx_2fv1_2fsolution_2eproto[6]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_ommx_2fv1_2fsolution_2eproto[2]; static constexpr const ::_pb::ServiceDescriptor** file_level_service_descriptors_ommx_2fv1_2fsolution_2eproto = nullptr; @@ -260,7 +259,7 @@ static const ::_pbi::DescriptorTable* const descriptor_table_ommx_2fv1_2fsolutio &::descriptor_table_ommx_2fv1_2fdecision_5fvariables_2eproto, }; static ::absl::once_flag descriptor_table_ommx_2fv1_2fsolution_2eproto_once; -PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fsolution_2eproto = { +const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fsolution_2eproto = { false, false, 1079, @@ -273,9 +272,25 @@ PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_ommx_2fv1_2fso schemas, file_default_instances, TableStruct_ommx_2fv1_2fsolution_2eproto::offsets, + file_level_metadata_ommx_2fv1_2fsolution_2eproto, file_level_enum_descriptors_ommx_2fv1_2fsolution_2eproto, file_level_service_descriptors_ommx_2fv1_2fsolution_2eproto, }; + +// This function exists to be marked as weak. +// It can significantly speed up compilation by breaking up LLVM's SCC +// in the .pb.cc translation units. Large translation units see a +// reduction of more than 35% of walltime for optimized builds. Without +// the weak attribute all the messages in the file, including all the +// vtables and everything they use become part of the same SCC through +// a cycle like: +// GetMetadata -> descriptor table -> default instances -> +// vtables -> GetMetadata +// By adding a weak function here we break the connection from the +// individual vtables back into the descriptor table. +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_ommx_2fv1_2fsolution_2eproto_getter() { + return &descriptor_table_ommx_2fv1_2fsolution_2eproto; +} namespace ommx { namespace v1 { const ::google::protobuf::EnumDescriptor* Optimality_descriptor() { @@ -299,26 +314,12 @@ bool Relaxation_IsValid(int value) { // =================================================================== State_EntriesEntry_DoNotUse::State_EntriesEntry_DoNotUse() {} -State_EntriesEntry_DoNotUse::State_EntriesEntry_DoNotUse(::google::protobuf::Arena* arena) : SuperType(arena) {} -const ::google::protobuf::MessageLite::ClassData* -State_EntriesEntry_DoNotUse::GetClassData() const { - PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: - ClassDataFull _data_ = { - { - nullptr, // tc_table - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - PROTOBUF_FIELD_OFFSET(State_EntriesEntry_DoNotUse, _cached_size_), - false, - }, - &State_EntriesEntry_DoNotUse::MergeImpl, - &State_EntriesEntry_DoNotUse::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2fsolution_2eproto, - nullptr, // tracker - }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); +State_EntriesEntry_DoNotUse::State_EntriesEntry_DoNotUse(::google::protobuf::Arena* arena) + : SuperType(arena) {} +::google::protobuf::Metadata State_EntriesEntry_DoNotUse::GetMetadata() const { + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2fsolution_2eproto_getter, + &descriptor_table_ommx_2fv1_2fsolution_2eproto_once, + file_level_metadata_ommx_2fv1_2fsolution_2eproto[0]); } // =================================================================== @@ -333,7 +334,7 @@ State::State(::google::protobuf::Arena* arena) } inline PROTOBUF_NDEBUG_INLINE State::Impl_::Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, - const Impl_& from, const ::ommx::v1::State& from_msg) + const Impl_& from) : entries_{visibility, arena, from.entries_}, _cached_size_{0} {} @@ -345,7 +346,7 @@ State::State( (void)_this; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); // @@protoc_insertion_point(copy_constructor:ommx.v1.State) } @@ -373,21 +374,33 @@ State::GetClassData() const { PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: ClassDataFull _data_ = { { - &_table_.header, nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized PROTOBUF_FIELD_OFFSET(State, _impl_._cached_size_), false, }, &State::MergeImpl, &State::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2fsolution_2eproto, - nullptr, // tracker }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); + return &_data_; } +PROTOBUF_NOINLINE void State::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.State) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.entries_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* State::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::TcParseTable<0, 1, 1, 0, 2> State::_table_ = { { @@ -401,7 +414,6 @@ const ::_pbi::TcParseTable<0, 1, 1, 0, 2> State::_table_ = { 1, // num_aux_entries offsetof(decltype(_table_), aux_entries), &_State_default_instance_._instance, - nullptr, // post_loop_handler ::_pbi::TcParser::GenericFallback, // fallback #ifdef PROTOBUF_PREFETCH_PARSE_TABLE ::_pbi::TcParser::GetTable<::ommx::v1::State>(), // to_prefetch @@ -423,17 +435,6 @@ const ::_pbi::TcParseTable<0, 1, 1, 0, 2> State::_table_ = { }}, }; -PROTOBUF_NOINLINE void State::Clear() { -// @@protoc_insertion_point(message_clear_start:ommx.v1.State) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.entries_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - ::uint8_t* State::_InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const { @@ -479,7 +480,6 @@ ::size_t State::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); // map entries = 1 [json_name = "entries"]; total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_entries_size()); for (const auto& entry : _internal_entries()) { @@ -510,6 +510,9 @@ void State::CopyFrom(const State& from) { MergeFrom(from); } +PROTOBUF_NOINLINE bool State::IsInitialized() const { + return true; +} void State::InternalSwap(State* PROTOBUF_RESTRICT other) { using std::swap; @@ -518,24 +521,25 @@ void State::InternalSwap(State* PROTOBUF_RESTRICT other) { } ::google::protobuf::Metadata State::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2fsolution_2eproto_getter, + &descriptor_table_ommx_2fv1_2fsolution_2eproto_once, + file_level_metadata_ommx_2fv1_2fsolution_2eproto[1]); } // =================================================================== class Solution::_Internal { public: - using HasBits = - decltype(std::declval()._impl_._has_bits_); + using HasBits = decltype(std::declval()._impl_._has_bits_); static constexpr ::int32_t kHasBitsOffset = - 8 * PROTOBUF_FIELD_OFFSET(Solution, _impl_._has_bits_); + 8 * PROTOBUF_FIELD_OFFSET(Solution, _impl_._has_bits_); }; void Solution::clear_decision_variables() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.decision_variables_.Clear(); } void Solution::clear_evaluated_constraints() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.evaluated_constraints_.Clear(); } Solution::Solution(::google::protobuf::Arena* arena) @@ -545,7 +549,7 @@ Solution::Solution(::google::protobuf::Arena* arena) } inline PROTOBUF_NDEBUG_INLINE Solution::Impl_::Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, - const Impl_& from, const ::ommx::v1::Solution& from_msg) + const Impl_& from) : _has_bits_{from._has_bits_}, _cached_size_{0}, decision_variables_{visibility, arena, from.decision_variables_}, @@ -559,7 +563,7 @@ Solution::Solution( (void)_this; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); ::uint32_t cached_has_bits = _impl_._has_bits_[0]; _impl_.state_ = (cached_has_bits & 0x00000001u) ? ::google::protobuf::Message::CopyConstruct<::ommx::v1::State>( arena, *from._impl_.state_) @@ -606,21 +610,43 @@ Solution::GetClassData() const { PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: ClassDataFull _data_ = { { - &_table_.header, nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized PROTOBUF_FIELD_OFFSET(Solution, _impl_._cached_size_), false, }, &Solution::MergeImpl, &Solution::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2fsolution_2eproto, - nullptr, // tracker }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); + return &_data_; +} +PROTOBUF_NOINLINE void Solution::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Solution) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.decision_variables_.Clear(); + _impl_.evaluated_constraints_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + ABSL_DCHECK(_impl_.state_ != nullptr); + _impl_.state_->Clear(); + } + ::memset(&_impl_.objective_, 0, static_cast<::size_t>( + reinterpret_cast(&_impl_.relaxation_) - + reinterpret_cast(&_impl_.objective_)) + sizeof(_impl_.relaxation_)); + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Solution::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; } + + PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::TcParseTable<3, 7, 3, 0, 2> Solution::_table_ = { { @@ -634,7 +660,6 @@ const ::_pbi::TcParseTable<3, 7, 3, 0, 2> Solution::_table_ = { 3, // num_aux_entries offsetof(decltype(_table_), aux_entries), &_Solution_default_instance_._instance, - nullptr, // post_loop_handler ::_pbi::TcParser::GenericFallback, // fallback #ifdef PROTOBUF_PREFETCH_PARSE_TABLE ::_pbi::TcParser::GetTable<::ommx::v1::Solution>(), // to_prefetch @@ -694,27 +719,6 @@ const ::_pbi::TcParseTable<3, 7, 3, 0, 2> Solution::_table_ = { }}, }; -PROTOBUF_NOINLINE void Solution::Clear() { -// @@protoc_insertion_point(message_clear_start:ommx.v1.Solution) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - _impl_.decision_variables_.Clear(); - _impl_.evaluated_constraints_.Clear(); - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - ABSL_DCHECK(_impl_.state_ != nullptr); - _impl_.state_->Clear(); - } - ::memset(&_impl_.objective_, 0, static_cast<::size_t>( - reinterpret_cast(&_impl_.relaxation_) - - reinterpret_cast(&_impl_.objective_)) + sizeof(_impl_.relaxation_)); - _impl_._has_bits_.Clear(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - ::uint8_t* Solution::_InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const { @@ -801,7 +805,6 @@ ::size_t Solution::ByteSizeLong() const { // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - ::_pbi::Prefetch5LinesFrom7Lines(reinterpret_cast(this)); // repeated .ommx.v1.DecisionVariable decision_variables = 3 [json_name = "decisionVariables"]; total_size += 1UL * this->_internal_decision_variables_size(); for (const auto& msg : this->_internal_decision_variables()) { @@ -901,6 +904,9 @@ void Solution::CopyFrom(const Solution& from) { MergeFrom(from); } +PROTOBUF_NOINLINE bool Solution::IsInitialized() const { + return true; +} void Solution::InternalSwap(Solution* PROTOBUF_RESTRICT other) { using std::swap; @@ -917,7 +923,9 @@ void Solution::InternalSwap(Solution* PROTOBUF_RESTRICT other) { } ::google::protobuf::Metadata Solution::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2fsolution_2eproto_getter, + &descriptor_table_ommx_2fv1_2fsolution_2eproto_once, + file_level_metadata_ommx_2fv1_2fsolution_2eproto[2]); } // =================================================================== @@ -941,54 +949,6 @@ Infeasible::Infeasible( // @@protoc_insertion_point(copy_constructor:ommx.v1.Infeasible) } -const ::google::protobuf::MessageLite::ClassData* -Infeasible::GetClassData() const { - PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: - ClassDataFull _data_ = { - { - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - PROTOBUF_FIELD_OFFSET(Infeasible, _impl_._cached_size_), - false, - }, - &Infeasible::MergeImpl, - &Infeasible::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2fsolution_2eproto, - nullptr, // tracker - }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); -} -PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> Infeasible::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - &_Infeasible_default_instance_._instance, - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::ommx::v1::Infeasible>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, - // no field_entries, or aux_entries - {{ - }}, -}; - @@ -998,7 +958,9 @@ const ::_pbi::TcParseTable<0, 0, 0, 0, 2> Infeasible::_table_ = { ::google::protobuf::Metadata Infeasible::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2fsolution_2eproto_getter, + &descriptor_table_ommx_2fv1_2fsolution_2eproto_once, + file_level_metadata_ommx_2fv1_2fsolution_2eproto[3]); } // =================================================================== @@ -1022,54 +984,6 @@ Unbounded::Unbounded( // @@protoc_insertion_point(copy_constructor:ommx.v1.Unbounded) } -const ::google::protobuf::MessageLite::ClassData* -Unbounded::GetClassData() const { - PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: - ClassDataFull _data_ = { - { - &_table_.header, - nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized - PROTOBUF_FIELD_OFFSET(Unbounded, _impl_._cached_size_), - false, - }, - &Unbounded::MergeImpl, - &Unbounded::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2fsolution_2eproto, - nullptr, // tracker - }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); -} -PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 -const ::_pbi::TcParseTable<0, 0, 0, 0, 2> Unbounded::_table_ = { - { - 0, // no _has_bits_ - 0, // no _extensions_ - 0, 0, // max_field_number, fast_idx_mask - offsetof(decltype(_table_), field_lookup_table), - 4294967295, // skipmap - offsetof(decltype(_table_), field_names), // no field_entries - 0, // num_field_entries - 0, // num_aux_entries - offsetof(decltype(_table_), field_names), // no aux_entries - &_Unbounded_default_instance_._instance, - nullptr, // post_loop_handler - ::_pbi::TcParser::GenericFallback, // fallback - #ifdef PROTOBUF_PREFETCH_PARSE_TABLE - ::_pbi::TcParser::GetTable<::ommx::v1::Unbounded>(), // to_prefetch - #endif // PROTOBUF_PREFETCH_PARSE_TABLE - }, {{ - {::_pbi::TcParser::MiniParse, {}}, - }}, {{ - 65535, 65535 - }}, - // no field_entries, or aux_entries - {{ - }}, -}; - @@ -1079,14 +993,16 @@ const ::_pbi::TcParseTable<0, 0, 0, 0, 2> Unbounded::_table_ = { ::google::protobuf::Metadata Unbounded::GetMetadata() const { - return ::google::protobuf::internal::ZeroFieldsBase::GetMetadataImpl(GetClassData()->full()); + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2fsolution_2eproto_getter, + &descriptor_table_ommx_2fv1_2fsolution_2eproto_once, + file_level_metadata_ommx_2fv1_2fsolution_2eproto[4]); } // =================================================================== class Result::_Internal { public: static constexpr ::int32_t kOneofCaseOffset = - PROTOBUF_FIELD_OFFSET(::ommx::v1::Result, _impl_._oneof_case_); + PROTOBUF_FIELD_OFFSET(::ommx::v1::Result, _impl_._oneof_case_); }; void Result::set_allocated_solution(::ommx::v1::Solution* solution) { @@ -1135,7 +1051,7 @@ Result::Result(::google::protobuf::Arena* arena) } inline PROTOBUF_NDEBUG_INLINE Result::Impl_::Impl_( ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena, - const Impl_& from, const ::ommx::v1::Result& from_msg) + const Impl_& from) : result_{}, _cached_size_{0}, _oneof_case_{from._oneof_case_[0]} {} @@ -1148,7 +1064,7 @@ Result::Result( (void)_this; _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>( from._internal_metadata_); - new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from); + new (&_impl_) Impl_(internal_visibility(), arena, from._impl_); switch (result_case()) { case RESULT_NOT_SET: break; @@ -1193,7 +1109,7 @@ inline void Result::SharedDtor() { void Result::clear_result() { // @@protoc_insertion_point(one_of_clear_start:ommx.v1.Result) - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); switch (result_case()) { case kError: { _impl_.result_.error_.Destroy(); @@ -1202,24 +1118,18 @@ void Result::clear_result() { case kSolution: { if (GetArena() == nullptr) { delete _impl_.result_.solution_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.result_.solution_); } break; } case kInfeasible: { if (GetArena() == nullptr) { delete _impl_.result_.infeasible_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.result_.infeasible_); } break; } case kUnbounded: { if (GetArena() == nullptr) { delete _impl_.result_.unbounded_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.result_.unbounded_); } break; } @@ -1236,21 +1146,33 @@ Result::GetClassData() const { PROTOBUF_CONSTINIT static const ::google::protobuf::MessageLite:: ClassDataFull _data_ = { { - &_table_.header, nullptr, // OnDemandRegisterArenaDtor - nullptr, // IsInitialized PROTOBUF_FIELD_OFFSET(Result, _impl_._cached_size_), false, }, &Result::MergeImpl, &Result::kDescriptorMethods, - &descriptor_table_ommx_2fv1_2fsolution_2eproto, - nullptr, // tracker }; - ::google::protobuf::internal::PrefetchToLocalCache(&_data_); - ::google::protobuf::internal::PrefetchToLocalCache(_data_.tc_table); - return _data_.base(); + return &_data_; } +PROTOBUF_NOINLINE void Result::Clear() { +// @@protoc_insertion_point(message_clear_start:ommx.v1.Result) + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); + ::uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + clear_result(); + _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); +} + +const char* Result::_InternalParse( + const char* ptr, ::_pbi::ParseContext* ctx) { + ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header); + return ptr; +} + + PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 const ::_pbi::TcParseTable<0, 4, 3, 28, 2> Result::_table_ = { { @@ -1264,7 +1186,6 @@ const ::_pbi::TcParseTable<0, 4, 3, 28, 2> Result::_table_ = { 3, // num_aux_entries offsetof(decltype(_table_), aux_entries), &_Result_default_instance_._instance, - nullptr, // post_loop_handler ::_pbi::TcParser::GenericFallback, // fallback #ifdef PROTOBUF_PREFETCH_PARSE_TABLE ::_pbi::TcParser::GetTable<::ommx::v1::Result>(), // to_prefetch @@ -1282,14 +1203,14 @@ const ::_pbi::TcParseTable<0, 4, 3, 28, 2> Result::_table_ = { (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, // .ommx.v1.Infeasible infeasible = 3 [json_name = "infeasible"]; {PROTOBUF_FIELD_OFFSET(Result, _impl_.result_.infeasible_), _Internal::kOneofCaseOffset + 0, 1, - (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvDefault)}, // .ommx.v1.Unbounded unbounded = 4 [json_name = "unbounded"]; {PROTOBUF_FIELD_OFFSET(Result, _impl_.result_.unbounded_), _Internal::kOneofCaseOffset + 0, 2, - (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)}, + (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvDefault)}, }}, {{ {::_pbi::TcParser::GetTable<::ommx::v1::Solution>()}, - {::_pbi::TcParser::GetTable<::ommx::v1::Infeasible>()}, - {::_pbi::TcParser::GetTable<::ommx::v1::Unbounded>()}, + {::_pbi::FieldAuxDefaultMessage{}, &::ommx::v1::_Infeasible_default_instance_}, + {::_pbi::FieldAuxDefaultMessage{}, &::ommx::v1::_Unbounded_default_instance_}, }}, {{ "\16\5\0\0\0\0\0\0" "ommx.v1.Result" @@ -1297,17 +1218,6 @@ const ::_pbi::TcParseTable<0, 4, 3, 28, 2> Result::_table_ = { }}, }; -PROTOBUF_NOINLINE void Result::Clear() { -// @@protoc_insertion_point(message_clear_start:ommx.v1.Result) - ::google::protobuf::internal::TSanWrite(&_impl_); - ::uint32_t cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void) cached_has_bits; - - clear_result(); - _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>(); -} - ::uint8_t* Result::_InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const { @@ -1459,6 +1369,9 @@ void Result::CopyFrom(const Result& from) { MergeFrom(from); } +PROTOBUF_NOINLINE bool Result::IsInitialized() const { + return true; +} void Result::InternalSwap(Result* PROTOBUF_RESTRICT other) { using std::swap; @@ -1468,7 +1381,9 @@ void Result::InternalSwap(Result* PROTOBUF_RESTRICT other) { } ::google::protobuf::Metadata Result::GetMetadata() const { - return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full()); + return ::_pbi::AssignDescriptors(&descriptor_table_ommx_2fv1_2fsolution_2eproto_getter, + &descriptor_table_ommx_2fv1_2fsolution_2eproto_once, + file_level_metadata_ommx_2fv1_2fsolution_2eproto[5]); } // @@protoc_insertion_point(namespace_scope) } // namespace v1 @@ -1478,8 +1393,8 @@ namespace protobuf { } // namespace protobuf } // namespace google // @@protoc_insertion_point(global_scope) -PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type - _static_init2_ PROTOBUF_UNUSED = - (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2fsolution_2eproto), - ::std::false_type{}); +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 +static ::std::false_type _static_init_ PROTOBUF_UNUSED = + (::_pbi::AddDescriptors(&descriptor_table_ommx_2fv1_2fsolution_2eproto), + ::std::false_type{}); #include "google/protobuf/port_undef.inc" diff --git a/cpp/ommx/v1/solution.pb.h b/cpp/ommx/v1/solution.pb.h index 894e2a93..48534026 100644 --- a/cpp/ommx/v1/solution.pb.h +++ b/cpp/ommx/v1/solution.pb.h @@ -1,7 +1,6 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE // source: ommx/v1/solution.proto -// Protobuf C++ Version: 5.27.3 +// Protobuf C++ Version: 5.26.1 #ifndef GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fsolution_2eproto_2epb_2eh #define GOOGLE_PROTOBUF_INCLUDED_ommx_2fv1_2fsolution_2eproto_2epb_2eh @@ -11,12 +10,13 @@ #include #include -#include "google/protobuf/runtime_version.h" -#if PROTOBUF_VERSION != 5027003 +#include "google/protobuf/port_def.inc" +#if PROTOBUF_VERSION != 5026001 #error "Protobuf C++ gencode is built with an incompatible version of" #error "Protobuf C++ headers/runtime. See" #error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp" #endif +#include "google/protobuf/port_undef.inc" #include "google/protobuf/io/coded_stream.h" #include "google/protobuf/arena.h" #include "google/protobuf/arenastring.h" @@ -247,9 +247,6 @@ class Unbounded final : public ::google::protobuf::internal::ZeroFieldsBase } public: - bool IsInitialized() const { - return true; - } private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { return "ommx.v1.Unbounded"; } @@ -261,25 +258,15 @@ class Unbounded final : public ::google::protobuf::internal::ZeroFieldsBase : Unbounded(arena) { *this = ::std::move(from); } - const ::google::protobuf::internal::ZeroFieldsBase::ClassData* GetClassData() const final; public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // @@protoc_insertion_point(class_scope:ommx.v1.Unbounded) private: class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable< - 0, 0, 0, - 0, 2> - _table_; - - static constexpr const void* _raw_default_instance_ = - &_Unbounded_default_instance_; - friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; template @@ -292,8 +279,7 @@ class Unbounded final : public ::google::protobuf::internal::ZeroFieldsBase inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena); inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* arena, const Impl_& from, - const Unbounded& from_msg); + ::google::protobuf::Arena* arena, const Impl_& from); PROTOBUF_TSAN_DECLARE_MEMBER }; friend struct ::TableStruct_ommx_2fv1_2fsolution_2eproto; @@ -319,7 +305,9 @@ class State_EntriesEntry_DoNotUse final return reinterpret_cast( &_State_EntriesEntry_DoNotUse_default_instance_); } -const ::google::protobuf::Message::ClassData* GetClassData() const final; + static bool ValidateKey(void*) { return true; } + static bool ValidateValue(void*) { return true; } + ::google::protobuf::Metadata GetMetadata() const final; friend struct ::TableStruct_ommx_2fv1_2fsolution_2eproto; }; // ------------------------------------------------------------------- @@ -413,9 +401,6 @@ class Infeasible final : public ::google::protobuf::internal::ZeroFieldsBase } public: - bool IsInitialized() const { - return true; - } private: friend class ::google::protobuf::internal::AnyMetadata; static ::absl::string_view FullMessageName() { return "ommx.v1.Infeasible"; } @@ -427,25 +412,15 @@ class Infeasible final : public ::google::protobuf::internal::ZeroFieldsBase : Infeasible(arena) { *this = ::std::move(from); } - const ::google::protobuf::internal::ZeroFieldsBase::ClassData* GetClassData() const final; public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- // @@protoc_insertion_point(class_scope:ommx.v1.Infeasible) private: class _Internal; - friend class ::google::protobuf::internal::TcParser; - static const ::google::protobuf::internal::TcParseTable< - 0, 0, 0, - 0, 2> - _table_; - - static constexpr const void* _raw_default_instance_ = - &_Infeasible_default_instance_; - friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; template @@ -458,8 +433,7 @@ class Infeasible final : public ::google::protobuf::internal::ZeroFieldsBase inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena); inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* arena, const Impl_& from, - const Infeasible& from_msg); + ::google::protobuf::Arena* arena, const Impl_& from); PROTOBUF_TSAN_DECLARE_MEMBER }; friend struct ::TableStruct_ommx_2fv1_2fsolution_2eproto; @@ -557,11 +531,11 @@ class State final : public ::google::protobuf::Message const ::google::protobuf::MessageLite& from_msg); public: - bool IsInitialized() const { - return true; - } ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; ::uint8_t* _InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; @@ -582,10 +556,11 @@ class State final : public ::google::protobuf::Message : State(arena) { *this = ::std::move(from); } - const ::google::protobuf::Message::ClassData* GetClassData() const final; + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- @@ -615,10 +590,6 @@ class State final : public ::google::protobuf::Message 0, 1, 1, 0, 2> _table_; - - static constexpr const void* _raw_default_instance_ = - &_State_default_instance_; - friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; template @@ -631,8 +602,7 @@ class State final : public ::google::protobuf::Message inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena); inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* arena, const Impl_& from, - const State& from_msg); + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::internal::MapField @@ -736,11 +706,11 @@ class Solution final : public ::google::protobuf::Message const ::google::protobuf::MessageLite& from_msg); public: - bool IsInitialized() const { - return true; - } ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; ::uint8_t* _InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; @@ -761,10 +731,11 @@ class Solution final : public ::google::protobuf::Message : Solution(arena) { *this = ::std::move(from); } - const ::google::protobuf::Message::ClassData* GetClassData() const final; + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- @@ -874,10 +845,6 @@ class Solution final : public ::google::protobuf::Message 3, 7, 3, 0, 2> _table_; - - static constexpr const void* _raw_default_instance_ = - &_Solution_default_instance_; - friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; template @@ -890,8 +857,7 @@ class Solution final : public ::google::protobuf::Message inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena); inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* arena, const Impl_& from, - const Solution& from_msg); + ::google::protobuf::Arena* arena, const Impl_& from); ::google::protobuf::internal::HasBits<1> _has_bits_; mutable ::google::protobuf::internal::CachedSize _cached_size_; ::google::protobuf::RepeatedPtrField< ::ommx::v1::DecisionVariable > decision_variables_; @@ -1006,11 +972,11 @@ class Result final : public ::google::protobuf::Message const ::google::protobuf::MessageLite& from_msg); public: - bool IsInitialized() const { - return true; - } ABSL_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + ::size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::google::protobuf::internal::ParseContext* ctx) final; ::uint8_t* _InternalSerialize( ::uint8_t* target, ::google::protobuf::io::EpsCopyOutputStream* stream) const final; @@ -1031,10 +997,11 @@ class Result final : public ::google::protobuf::Message : Result(arena) { *this = ::std::move(from); } - const ::google::protobuf::Message::ClassData* GetClassData() const final; + const ::google::protobuf::MessageLite::ClassData* GetClassData() + const final; public: - ::google::protobuf::Metadata GetMetadata() const; + ::google::protobuf::Metadata GetMetadata() const final; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- @@ -1134,10 +1101,6 @@ class Result final : public ::google::protobuf::Message 0, 4, 3, 28, 2> _table_; - - static constexpr const void* _raw_default_instance_ = - &_Result_default_instance_; - friend class ::google::protobuf::MessageLite; friend class ::google::protobuf::Arena; template @@ -1150,8 +1113,7 @@ class Result final : public ::google::protobuf::Message inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena); inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility, - ::google::protobuf::Arena* arena, const Impl_& from, - const Result& from_msg); + ::google::protobuf::Arena* arena, const Impl_& from); union ResultUnion { constexpr ResultUnion() : _constinit_{} {} ::google::protobuf::internal::ConstantInitialized _constinit_; @@ -1194,11 +1156,11 @@ inline int State::entries_size() const { return _internal_entries_size(); } inline void State::clear_entries() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.entries_.Clear(); } inline const ::google::protobuf::Map<::uint64_t, double>& State::_internal_entries() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.entries_.GetMap(); } inline const ::google::protobuf::Map<::uint64_t, double>& State::entries() const ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -1206,7 +1168,7 @@ inline const ::google::protobuf::Map<::uint64_t, double>& State::entries() const return _internal_entries(); } inline ::google::protobuf::Map<::uint64_t, double>* State::_internal_mutable_entries() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _impl_.entries_.MutableMap(); } inline ::google::protobuf::Map<::uint64_t, double>* State::mutable_entries() ABSL_ATTRIBUTE_LIFETIME_BOUND { @@ -1225,12 +1187,12 @@ inline bool Solution::has_state() const { return value; } inline void Solution::clear_state() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (_impl_.state_ != nullptr) _impl_.state_->Clear(); _impl_._has_bits_[0] &= ~0x00000001u; } inline const ::ommx::v1::State& Solution::_internal_state() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); const ::ommx::v1::State* p = _impl_.state_; return p != nullptr ? *p : reinterpret_cast(::ommx::v1::_State_default_instance_); } @@ -1239,7 +1201,7 @@ inline const ::ommx::v1::State& Solution::state() const ABSL_ATTRIBUTE_LIFETIME_ return _internal_state(); } inline void Solution::unsafe_arena_set_allocated_state(::ommx::v1::State* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (GetArena() == nullptr) { delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.state_); } @@ -1252,7 +1214,7 @@ inline void Solution::unsafe_arena_set_allocated_state(::ommx::v1::State* value) // @@protoc_insertion_point(field_unsafe_arena_set_allocated:ommx.v1.Solution.state) } inline ::ommx::v1::State* Solution::release_state() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_._has_bits_[0] &= ~0x00000001u; ::ommx::v1::State* released = _impl_.state_; @@ -1271,7 +1233,7 @@ inline ::ommx::v1::State* Solution::release_state() { return released; } inline ::ommx::v1::State* Solution::unsafe_arena_release_state() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:ommx.v1.Solution.state) _impl_._has_bits_[0] &= ~0x00000001u; @@ -1280,7 +1242,7 @@ inline ::ommx::v1::State* Solution::unsafe_arena_release_state() { return temp; } inline ::ommx::v1::State* Solution::_internal_mutable_state() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (_impl_.state_ == nullptr) { auto* p = ::google::protobuf::Message::DefaultConstruct<::ommx::v1::State>(GetArena()); _impl_.state_ = reinterpret_cast<::ommx::v1::State*>(p); @@ -1295,7 +1257,7 @@ inline ::ommx::v1::State* Solution::mutable_state() ABSL_ATTRIBUTE_LIFETIME_BOUN } inline void Solution::set_allocated_state(::ommx::v1::State* value) { ::google::protobuf::Arena* message_arena = GetArena(); - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (message_arena == nullptr) { delete (_impl_.state_); } @@ -1316,7 +1278,7 @@ inline void Solution::set_allocated_state(::ommx::v1::State* value) { // double objective = 2 [json_name = "objective"]; inline void Solution::clear_objective() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.objective_ = 0; } inline double Solution::objective() const { @@ -1328,11 +1290,11 @@ inline void Solution::set_objective(double value) { // @@protoc_insertion_point(field_set:ommx.v1.Solution.objective) } inline double Solution::_internal_objective() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.objective_; } inline void Solution::_internal_set_objective(double value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.objective_ = value; } @@ -1351,7 +1313,7 @@ inline ::ommx::v1::DecisionVariable* Solution::mutable_decision_variables(int in inline ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>* Solution::mutable_decision_variables() ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:ommx.v1.Solution.decision_variables) - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _internal_mutable_decision_variables(); } inline const ::ommx::v1::DecisionVariable& Solution::decision_variables(int index) const @@ -1360,7 +1322,7 @@ inline const ::ommx::v1::DecisionVariable& Solution::decision_variables(int inde return _internal_decision_variables().Get(index); } inline ::ommx::v1::DecisionVariable* Solution::add_decision_variables() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ::ommx::v1::DecisionVariable* _add = _internal_mutable_decision_variables()->Add(); // @@protoc_insertion_point(field_add:ommx.v1.Solution.decision_variables) return _add; @@ -1372,12 +1334,12 @@ inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>& } inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>& Solution::_internal_decision_variables() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.decision_variables_; } inline ::google::protobuf::RepeatedPtrField<::ommx::v1::DecisionVariable>* Solution::_internal_mutable_decision_variables() { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return &_impl_.decision_variables_; } @@ -1396,7 +1358,7 @@ inline ::ommx::v1::EvaluatedConstraint* Solution::mutable_evaluated_constraints( inline ::google::protobuf::RepeatedPtrField<::ommx::v1::EvaluatedConstraint>* Solution::mutable_evaluated_constraints() ABSL_ATTRIBUTE_LIFETIME_BOUND { // @@protoc_insertion_point(field_mutable_list:ommx.v1.Solution.evaluated_constraints) - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); return _internal_mutable_evaluated_constraints(); } inline const ::ommx::v1::EvaluatedConstraint& Solution::evaluated_constraints(int index) const @@ -1405,7 +1367,7 @@ inline const ::ommx::v1::EvaluatedConstraint& Solution::evaluated_constraints(in return _internal_evaluated_constraints().Get(index); } inline ::ommx::v1::EvaluatedConstraint* Solution::add_evaluated_constraints() ABSL_ATTRIBUTE_LIFETIME_BOUND { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); ::ommx::v1::EvaluatedConstraint* _add = _internal_mutable_evaluated_constraints()->Add(); // @@protoc_insertion_point(field_add:ommx.v1.Solution.evaluated_constraints) return _add; @@ -1417,18 +1379,18 @@ inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::EvaluatedConstrain } inline const ::google::protobuf::RepeatedPtrField<::ommx::v1::EvaluatedConstraint>& Solution::_internal_evaluated_constraints() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.evaluated_constraints_; } inline ::google::protobuf::RepeatedPtrField<::ommx::v1::EvaluatedConstraint>* Solution::_internal_mutable_evaluated_constraints() { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return &_impl_.evaluated_constraints_; } // bool feasible = 5 [json_name = "feasible"]; inline void Solution::clear_feasible() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.feasible_ = false; } inline bool Solution::feasible() const { @@ -1440,17 +1402,17 @@ inline void Solution::set_feasible(bool value) { // @@protoc_insertion_point(field_set:ommx.v1.Solution.feasible) } inline bool Solution::_internal_feasible() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return _impl_.feasible_; } inline void Solution::_internal_set_feasible(bool value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.feasible_ = value; } // .ommx.v1.Optimality optimality = 6 [json_name = "optimality"]; inline void Solution::clear_optimality() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.optimality_ = 0; } inline ::ommx::v1::Optimality Solution::optimality() const { @@ -1462,17 +1424,17 @@ inline void Solution::set_optimality(::ommx::v1::Optimality value) { // @@protoc_insertion_point(field_set:ommx.v1.Solution.optimality) } inline ::ommx::v1::Optimality Solution::_internal_optimality() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return static_cast<::ommx::v1::Optimality>(_impl_.optimality_); } inline void Solution::_internal_set_optimality(::ommx::v1::Optimality value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.optimality_ = value; } // .ommx.v1.Relaxation relaxation = 7 [json_name = "relaxation"]; inline void Solution::clear_relaxation() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.relaxation_ = 0; } inline ::ommx::v1::Relaxation Solution::relaxation() const { @@ -1484,11 +1446,11 @@ inline void Solution::set_relaxation(::ommx::v1::Relaxation value) { // @@protoc_insertion_point(field_set:ommx.v1.Solution.relaxation) } inline ::ommx::v1::Relaxation Solution::_internal_relaxation() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); return static_cast<::ommx::v1::Relaxation>(_impl_.relaxation_); } inline void Solution::_internal_set_relaxation(::ommx::v1::Relaxation value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); _impl_.relaxation_ = value; } @@ -1512,7 +1474,7 @@ inline void Result::set_has_error() { _impl_._oneof_case_[0] = kError; } inline void Result::clear_error() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (result_case() == kError) { _impl_.result_.error_.Destroy(); clear_has_result(); @@ -1526,7 +1488,7 @@ inline const std::string& Result::error() const template inline PROTOBUF_ALWAYS_INLINE void Result::set_error(Arg_&& arg, Args_... args) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (result_case() != kError) { clear_result(); @@ -1542,14 +1504,14 @@ inline std::string* Result::mutable_error() ABSL_ATTRIBUTE_LIFETIME_BOUND { return _s; } inline const std::string& Result::_internal_error() const { - ::google::protobuf::internal::TSanRead(&_impl_); + PROTOBUF_TSAN_READ(&_impl_._tsan_detect_race); if (result_case() != kError) { return ::google::protobuf::internal::GetEmptyStringAlreadyInited(); } return _impl_.result_.error_.Get(); } inline void Result::_internal_set_error(const std::string& value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (result_case() != kError) { clear_result(); @@ -1559,7 +1521,7 @@ inline void Result::_internal_set_error(const std::string& value) { _impl_.result_.error_.Set(value, GetArena()); } inline std::string* Result::_internal_mutable_error() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (result_case() != kError) { clear_result(); @@ -1569,7 +1531,7 @@ inline std::string* Result::_internal_mutable_error() { return _impl_.result_.error_.Mutable( GetArena()); } inline std::string* Result::release_error() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); // @@protoc_insertion_point(field_release:ommx.v1.Result.error) if (result_case() != kError) { return nullptr; @@ -1578,7 +1540,7 @@ inline std::string* Result::release_error() { return _impl_.result_.error_.Release(); } inline void Result::set_allocated_error(std::string* value) { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (has_result()) { clear_result(); } @@ -1600,12 +1562,10 @@ inline void Result::set_has_solution() { _impl_._oneof_case_[0] = kSolution; } inline void Result::clear_solution() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (result_case() == kSolution) { if (GetArena() == nullptr) { delete _impl_.result_.solution_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.result_.solution_); } clear_has_result(); } @@ -1679,12 +1639,10 @@ inline void Result::set_has_infeasible() { _impl_._oneof_case_[0] = kInfeasible; } inline void Result::clear_infeasible() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (result_case() == kInfeasible) { if (GetArena() == nullptr) { delete _impl_.result_.infeasible_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.result_.infeasible_); } clear_has_result(); } @@ -1758,12 +1716,10 @@ inline void Result::set_has_unbounded() { _impl_._oneof_case_[0] = kUnbounded; } inline void Result::clear_unbounded() { - ::google::protobuf::internal::TSanWrite(&_impl_); + PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race); if (result_case() == kUnbounded) { if (GetArena() == nullptr) { delete _impl_.result_.unbounded_; - } else if (::google::protobuf::internal::DebugHardenClearOneofMessageOnArena()) { - ::google::protobuf::internal::MaybePoisonAfterClear(_impl_.result_.unbounded_); } clear_has_result(); } From 9914dfa19677b22230e7f49f3c1b583b73e4bbd0 Mon Sep 17 00:00:00 2001 From: shitaro Date: Wed, 21 Aug 2024 21:39:35 +0900 Subject: [PATCH 6/7] change directory --- .github/workflows/cpp.yml | 2 +- cpp/{ => src}/ommx/v1/constraint.pb.cc | 0 cpp/{ => src}/ommx/v1/constraint.pb.h | 0 cpp/{ => src}/ommx/v1/decision_variables.pb.cc | 0 cpp/{ => src}/ommx/v1/decision_variables.pb.h | 0 cpp/{ => src}/ommx/v1/function.pb.cc | 0 cpp/{ => src}/ommx/v1/function.pb.h | 0 cpp/{ => src}/ommx/v1/instance.pb.cc | 0 cpp/{ => src}/ommx/v1/instance.pb.h | 0 cpp/{ => src}/ommx/v1/linear.pb.cc | 0 cpp/{ => src}/ommx/v1/linear.pb.h | 0 cpp/{ => src}/ommx/v1/polynomial.pb.cc | 0 cpp/{ => src}/ommx/v1/polynomial.pb.h | 0 cpp/{ => src}/ommx/v1/quadratic.pb.cc | 0 cpp/{ => src}/ommx/v1/quadratic.pb.h | 0 cpp/{ => src}/ommx/v1/solution.pb.cc | 0 cpp/{ => src}/ommx/v1/solution.pb.h | 0 17 files changed, 1 insertion(+), 1 deletion(-) rename cpp/{ => src}/ommx/v1/constraint.pb.cc (100%) rename cpp/{ => src}/ommx/v1/constraint.pb.h (100%) rename cpp/{ => src}/ommx/v1/decision_variables.pb.cc (100%) rename cpp/{ => src}/ommx/v1/decision_variables.pb.h (100%) rename cpp/{ => src}/ommx/v1/function.pb.cc (100%) rename cpp/{ => src}/ommx/v1/function.pb.h (100%) rename cpp/{ => src}/ommx/v1/instance.pb.cc (100%) rename cpp/{ => src}/ommx/v1/instance.pb.h (100%) rename cpp/{ => src}/ommx/v1/linear.pb.cc (100%) rename cpp/{ => src}/ommx/v1/linear.pb.h (100%) rename cpp/{ => src}/ommx/v1/polynomial.pb.cc (100%) rename cpp/{ => src}/ommx/v1/polynomial.pb.h (100%) rename cpp/{ => src}/ommx/v1/quadratic.pb.cc (100%) rename cpp/{ => src}/ommx/v1/quadratic.pb.h (100%) rename cpp/{ => src}/ommx/v1/solution.pb.cc (100%) rename cpp/{ => src}/ommx/v1/solution.pb.h (100%) diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml index ddd02d68..ec70e1a8 100644 --- a/.github/workflows/cpp.yml +++ b/.github/workflows/cpp.yml @@ -32,5 +32,5 @@ jobs: - name: Check updated run: | - git add -N cpp/ommx/ # To check newly generated files + git add -N cpp/src/ommx/ # To check newly generated files git diff --exit-code diff --git a/cpp/ommx/v1/constraint.pb.cc b/cpp/src/ommx/v1/constraint.pb.cc similarity index 100% rename from cpp/ommx/v1/constraint.pb.cc rename to cpp/src/ommx/v1/constraint.pb.cc diff --git a/cpp/ommx/v1/constraint.pb.h b/cpp/src/ommx/v1/constraint.pb.h similarity index 100% rename from cpp/ommx/v1/constraint.pb.h rename to cpp/src/ommx/v1/constraint.pb.h diff --git a/cpp/ommx/v1/decision_variables.pb.cc b/cpp/src/ommx/v1/decision_variables.pb.cc similarity index 100% rename from cpp/ommx/v1/decision_variables.pb.cc rename to cpp/src/ommx/v1/decision_variables.pb.cc diff --git a/cpp/ommx/v1/decision_variables.pb.h b/cpp/src/ommx/v1/decision_variables.pb.h similarity index 100% rename from cpp/ommx/v1/decision_variables.pb.h rename to cpp/src/ommx/v1/decision_variables.pb.h diff --git a/cpp/ommx/v1/function.pb.cc b/cpp/src/ommx/v1/function.pb.cc similarity index 100% rename from cpp/ommx/v1/function.pb.cc rename to cpp/src/ommx/v1/function.pb.cc diff --git a/cpp/ommx/v1/function.pb.h b/cpp/src/ommx/v1/function.pb.h similarity index 100% rename from cpp/ommx/v1/function.pb.h rename to cpp/src/ommx/v1/function.pb.h diff --git a/cpp/ommx/v1/instance.pb.cc b/cpp/src/ommx/v1/instance.pb.cc similarity index 100% rename from cpp/ommx/v1/instance.pb.cc rename to cpp/src/ommx/v1/instance.pb.cc diff --git a/cpp/ommx/v1/instance.pb.h b/cpp/src/ommx/v1/instance.pb.h similarity index 100% rename from cpp/ommx/v1/instance.pb.h rename to cpp/src/ommx/v1/instance.pb.h diff --git a/cpp/ommx/v1/linear.pb.cc b/cpp/src/ommx/v1/linear.pb.cc similarity index 100% rename from cpp/ommx/v1/linear.pb.cc rename to cpp/src/ommx/v1/linear.pb.cc diff --git a/cpp/ommx/v1/linear.pb.h b/cpp/src/ommx/v1/linear.pb.h similarity index 100% rename from cpp/ommx/v1/linear.pb.h rename to cpp/src/ommx/v1/linear.pb.h diff --git a/cpp/ommx/v1/polynomial.pb.cc b/cpp/src/ommx/v1/polynomial.pb.cc similarity index 100% rename from cpp/ommx/v1/polynomial.pb.cc rename to cpp/src/ommx/v1/polynomial.pb.cc diff --git a/cpp/ommx/v1/polynomial.pb.h b/cpp/src/ommx/v1/polynomial.pb.h similarity index 100% rename from cpp/ommx/v1/polynomial.pb.h rename to cpp/src/ommx/v1/polynomial.pb.h diff --git a/cpp/ommx/v1/quadratic.pb.cc b/cpp/src/ommx/v1/quadratic.pb.cc similarity index 100% rename from cpp/ommx/v1/quadratic.pb.cc rename to cpp/src/ommx/v1/quadratic.pb.cc diff --git a/cpp/ommx/v1/quadratic.pb.h b/cpp/src/ommx/v1/quadratic.pb.h similarity index 100% rename from cpp/ommx/v1/quadratic.pb.h rename to cpp/src/ommx/v1/quadratic.pb.h diff --git a/cpp/ommx/v1/solution.pb.cc b/cpp/src/ommx/v1/solution.pb.cc similarity index 100% rename from cpp/ommx/v1/solution.pb.cc rename to cpp/src/ommx/v1/solution.pb.cc diff --git a/cpp/ommx/v1/solution.pb.h b/cpp/src/ommx/v1/solution.pb.h similarity index 100% rename from cpp/ommx/v1/solution.pb.h rename to cpp/src/ommx/v1/solution.pb.h From 9e7da52ff07fcd1a32ae15bec201681ee46924b0 Mon Sep 17 00:00:00 2001 From: shitaro Date: Thu, 22 Aug 2024 01:02:39 +0900 Subject: [PATCH 7/7] simplify cmake --- cpp/CMakeLists.txt | 46 +++-------------------------------- cpp/cmake/ommxConfig.cmake.in | 7 ------ 2 files changed, 3 insertions(+), 50 deletions(-) delete mode 100644 cpp/cmake/ommxConfig.cmake.in diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index d20f66e6..cfc146de 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -11,50 +11,10 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Protobuf REQUIRED) # Create a static library -file(GLOB SRC "ommx/v1/*.pb.cc") +file(GLOB SRC "src/ommx/v1/*.pb.cc") add_library(ommx STATIC ${SRC}) -target_include_directories(ommx PUBLIC - $ +target_include_directories(ommx PUBLIC + $/src $ -) - -target_link_libraries(ommx PUBLIC protobuf::libprotobuf) - -install(TARGETS ommx - EXPORT ommxTargets - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib - RUNTIME DESTINATION bin - INCLUDES DESTINATION include -) - -install(DIRECTORY ommx - DESTINATION include - FILES_MATCHING PATTERN "*.h" -) - -install(EXPORT ommxTargets - FILE ommxTargets.cmake - NAMESPACE ommx:: - DESTINATION lib/cmake/ommx -) - -include(CMakePackageConfigHelpers) -write_basic_package_version_file( - "ommxConfigVersion.cmake" - VERSION ${PROJECT_VERSION} - COMPATIBILITY SameMajorVersion -) - -configure_package_config_file( - "${CMAKE_CURRENT_SOURCE_DIR}/cmake/ommxConfig.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/ommxConfig.cmake" - INSTALL_DESTINATION lib/cmake/ommx -) - -install(FILES - "${CMAKE_CURRENT_BINARY_DIR}/ommxConfig.cmake" - "${CMAKE_CURRENT_BINARY_DIR}/ommxConfigVersion.cmake" - DESTINATION lib/cmake/ommx ) \ No newline at end of file diff --git a/cpp/cmake/ommxConfig.cmake.in b/cpp/cmake/ommxConfig.cmake.in deleted file mode 100644 index 1eae1fd6..00000000 --- a/cpp/cmake/ommxConfig.cmake.in +++ /dev/null @@ -1,7 +0,0 @@ -@PACKAGE_INIT@ - -include("${CMAKE_CURRENT_LIST_DIR}/ommxTargets.cmake") - -find_package(Protobuf REQUIRED) - -check_required_components(ommx) \ No newline at end of file