From ff0cdbc886993a366f93d396b0fc3bce22eb4ed9 Mon Sep 17 00:00:00 2001 From: Nathan Miller Date: Mon, 15 Jan 2024 14:42:36 -0800 Subject: [PATCH] add protobuf definitions for product model types --- OdbDesignLib/CMakeLists.txt | 7 + OdbDesignLib/ProtoBuf/component.pb.cc | 581 ++++++++++++++ OdbDesignLib/ProtoBuf/component.pb.h | 708 +++++++++++++++++ OdbDesignLib/ProtoBuf/design.pb.cc | 858 +++++++++++++++++++-- OdbDesignLib/ProtoBuf/design.pb.h | 880 ++++++++++++++++++++-- OdbDesignLib/ProtoBuf/net.pb.cc | 408 ++++++++++ OdbDesignLib/ProtoBuf/net.pb.h | 418 ++++++++++ OdbDesignLib/ProtoBuf/package.pb.cc | 522 +++++++++++++ OdbDesignLib/ProtoBuf/package.pb.h | 507 +++++++++++++ OdbDesignLib/ProtoBuf/part.pb.cc | 322 ++++++++ OdbDesignLib/ProtoBuf/part.pb.h | 317 ++++++++ OdbDesignLib/ProtoBuf/pin.pb.cc | 362 +++++++++ OdbDesignLib/ProtoBuf/pin.pb.h | 360 +++++++++ OdbDesignLib/ProtoBuf/pinconnection.pb.cc | 445 +++++++++++ OdbDesignLib/ProtoBuf/pinconnection.pb.h | 533 +++++++++++++ OdbDesignLib/ProtoBuf/via.pb.cc | 369 +++++++++ OdbDesignLib/ProtoBuf/via.pb.h | 361 +++++++++ OdbDesignLib/protoc/component.proto | 32 + OdbDesignLib/protoc/design.proto | 38 +- OdbDesignLib/protoc/net.proto | 24 + OdbDesignLib/protoc/package.proto | 25 + OdbDesignLib/protoc/part.proto | 16 + OdbDesignLib/protoc/pin.proto | 17 + OdbDesignLib/protoc/pinconnection.proto | 25 + OdbDesignLib/protoc/via.proto | 19 + 25 files changed, 8027 insertions(+), 127 deletions(-) create mode 100644 OdbDesignLib/ProtoBuf/component.pb.cc create mode 100644 OdbDesignLib/ProtoBuf/component.pb.h create mode 100644 OdbDesignLib/ProtoBuf/net.pb.cc create mode 100644 OdbDesignLib/ProtoBuf/net.pb.h create mode 100644 OdbDesignLib/ProtoBuf/package.pb.cc create mode 100644 OdbDesignLib/ProtoBuf/package.pb.h create mode 100644 OdbDesignLib/ProtoBuf/part.pb.cc create mode 100644 OdbDesignLib/ProtoBuf/part.pb.h create mode 100644 OdbDesignLib/ProtoBuf/pin.pb.cc create mode 100644 OdbDesignLib/ProtoBuf/pin.pb.h create mode 100644 OdbDesignLib/ProtoBuf/pinconnection.pb.cc create mode 100644 OdbDesignLib/ProtoBuf/pinconnection.pb.h create mode 100644 OdbDesignLib/ProtoBuf/via.pb.cc create mode 100644 OdbDesignLib/ProtoBuf/via.pb.h create mode 100644 OdbDesignLib/protoc/component.proto create mode 100644 OdbDesignLib/protoc/net.proto create mode 100644 OdbDesignLib/protoc/package.proto create mode 100644 OdbDesignLib/protoc/part.proto create mode 100644 OdbDesignLib/protoc/pin.proto create mode 100644 OdbDesignLib/protoc/pinconnection.proto create mode 100644 OdbDesignLib/protoc/via.proto diff --git a/OdbDesignLib/CMakeLists.txt b/OdbDesignLib/CMakeLists.txt index f0c24b20..49b3abd0 100644 --- a/OdbDesignLib/CMakeLists.txt +++ b/OdbDesignLib/CMakeLists.txt @@ -29,6 +29,13 @@ add_library(OdbDesign SHARED "ProtoBuf/symbolsdirectory.pb.h" "ProtoBuf/symbolsdirectory.pb.cc" "ProtoBuf/symbolname.pb.h" "ProtoBuf/symbolname.pb.cc" "ProtoBuf/stephdrfile.pb.h" "ProtoBuf/stephdrfile.pb.cc" + "ProtoBuf/pin.pb.h" "ProtoBuf/pin.pb.cc" + "ProtoBuf/pinconnection.pb.h" "ProtoBuf/pinconnection.pb.cc" + "ProtoBuf/part.pb.h" "ProtoBuf/part.pb.cc" + "ProtoBuf/component.pb.h" "ProtoBuf/component.pb.cc" + "ProtoBuf/net.pb.h" "ProtoBuf/net.pb.cc" + "ProtoBuf/via.pb.h" "ProtoBuf/via.pb.cc" + "ProtoBuf/package.pb.h" "ProtoBuf/package.pb.cc" "FileModel/parse_error.h" "FileModel/parse_info.h" "FileModel/parse_info.cpp" "FileModel/parse_error.cpp" "FileModel/invalid_odb_error.h" "FileModel/invalid_odb_error.cpp" "ProtoBuf/common.pb.h" "ProtoBuf/common.pb.cc" "ProtoBuf/componentsfile.pb.h" "ProtoBuf/componentsfile.pb.cc" "FileModel/Design/PropertyRecord.h" "FileModel/Design/PropertyRecord.cpp" "FileModel/Design/FeaturesFile.h" "FileModel/Design/FeaturesFile.cpp" "FileModel/Design/ContourPolygon.h" "FileModel/Design/ContourPolygon.cpp" "FileModel/Design/SymbolName.h" "FileModel/Design/SymbolName.cpp" "FileModel/Design/SymbolsDirectory.h" "FileModel/Design/SymbolsDirectory.cpp" "FileModel/Design/StepHdrFile.h" "FileModel/Design/StepHdrFile.cpp" "FileModel/Design/AttributeLookupTable.h" "FileModel/Design/AttributeLookupTable.cpp" ) diff --git a/OdbDesignLib/ProtoBuf/component.pb.cc b/OdbDesignLib/ProtoBuf/component.pb.cc new file mode 100644 index 00000000..2c748216 --- /dev/null +++ b/OdbDesignLib/ProtoBuf/component.pb.cc @@ -0,0 +1,581 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: component.proto + +#include "component.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { +PROTOBUF_CONSTEXPR Component::Component( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.refdes_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.partname_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.package_)*/nullptr + , /*decltype(_impl_.part_)*/nullptr + , /*decltype(_impl_.index_)*/0u + , /*decltype(_impl_.side_)*/0} {} +struct ComponentDefaultTypeInternal { + PROTOBUF_CONSTEXPR ComponentDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ComponentDefaultTypeInternal() {} + union { + Component _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ComponentDefaultTypeInternal _Component_default_instance_; +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +static ::_pb::Metadata file_level_metadata_component_2eproto[1]; +static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_component_2eproto = nullptr; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_component_2eproto = nullptr; + +const uint32_t TableStruct_component_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Component, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Component, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Component, _impl_.refdes_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Component, _impl_.partname_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Component, _impl_.package_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Component, _impl_.index_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Component, _impl_.side_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Component, _impl_.part_), + 0, + 1, + 2, + 4, + 5, + 3, +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 12, -1, sizeof(::Odb::Lib::Protobuf::ProductModel::Component)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::Odb::Lib::Protobuf::ProductModel::_Component_default_instance_._instance, +}; + +const char descriptor_table_protodef_component_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\017component.proto\022\035Odb.Lib.Protobuf.Prod" + "uctModel\032\013enums.proto\032\npart.proto\032\rpacka" + "ge.proto\"\261\002\n\tComponent\022\023\n\006refDes\030\001 \001(\tH\000" + "\210\001\001\022\025\n\010partName\030\002 \001(\tH\001\210\001\001\022<\n\007package\030\003 " + "\001(\0132&.Odb.Lib.Protobuf.ProductModel.Pack" + "ageH\002\210\001\001\022\022\n\005index\030\004 \001(\rH\003\210\001\001\022.\n\004side\030\005 \001" + "(\0162\033.Odb.Lib.Protobuf.BoardSideH\004\210\001\001\0226\n\004" + "part\030\006 \001(\0132#.Odb.Lib.Protobuf.ProductMod" + "el.PartH\005\210\001\001B\t\n\007_refDesB\013\n\t_partNameB\n\n\010" + "_packageB\010\n\006_indexB\007\n\005_sideB\007\n\005_partb\006pr" + "oto3" + ; +static const ::_pbi::DescriptorTable* const descriptor_table_component_2eproto_deps[3] = { + &::descriptor_table_enums_2eproto, + &::descriptor_table_package_2eproto, + &::descriptor_table_part_2eproto, +}; +static ::_pbi::once_flag descriptor_table_component_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_component_2eproto = { + false, false, 404, descriptor_table_protodef_component_2eproto, + "component.proto", + &descriptor_table_component_2eproto_once, descriptor_table_component_2eproto_deps, 3, 1, + schemas, file_default_instances, TableStruct_component_2eproto::offsets, + file_level_metadata_component_2eproto, file_level_enum_descriptors_component_2eproto, + file_level_service_descriptors_component_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_component_2eproto_getter() { + return &descriptor_table_component_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_component_2eproto(&descriptor_table_component_2eproto); +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { + +// =================================================================== + +class Component::_Internal { + public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static void set_has_refdes(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_partname(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::Odb::Lib::Protobuf::ProductModel::Package& package(const Component* msg); + static void set_has_package(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_index(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_side(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static const ::Odb::Lib::Protobuf::ProductModel::Part& part(const Component* msg); + static void set_has_part(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } +}; + +const ::Odb::Lib::Protobuf::ProductModel::Package& +Component::_Internal::package(const Component* msg) { + return *msg->_impl_.package_; +} +const ::Odb::Lib::Protobuf::ProductModel::Part& +Component::_Internal::part(const Component* msg) { + return *msg->_impl_.part_; +} +void Component::clear_package() { + if (_impl_.package_ != nullptr) _impl_.package_->Clear(); + _impl_._has_bits_[0] &= ~0x00000004u; +} +void Component::clear_part() { + if (_impl_.part_ != nullptr) _impl_.part_->Clear(); + _impl_._has_bits_[0] &= ~0x00000008u; +} +Component::Component(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:Odb.Lib.Protobuf.ProductModel.Component) +} +Component::Component(const Component& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + Component* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.refdes_){} + , decltype(_impl_.partname_){} + , decltype(_impl_.package_){nullptr} + , decltype(_impl_.part_){nullptr} + , decltype(_impl_.index_){} + , decltype(_impl_.side_){}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.refdes_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.refdes_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_refdes()) { + _this->_impl_.refdes_.Set(from._internal_refdes(), + _this->GetArenaForAllocation()); + } + _impl_.partname_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.partname_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_partname()) { + _this->_impl_.partname_.Set(from._internal_partname(), + _this->GetArenaForAllocation()); + } + if (from._internal_has_package()) { + _this->_impl_.package_ = new ::Odb::Lib::Protobuf::ProductModel::Package(*from._impl_.package_); + } + if (from._internal_has_part()) { + _this->_impl_.part_ = new ::Odb::Lib::Protobuf::ProductModel::Part(*from._impl_.part_); + } + ::memcpy(&_impl_.index_, &from._impl_.index_, + static_cast(reinterpret_cast(&_impl_.side_) - + reinterpret_cast(&_impl_.index_)) + sizeof(_impl_.side_)); + // @@protoc_insertion_point(copy_constructor:Odb.Lib.Protobuf.ProductModel.Component) +} + +inline void Component::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.refdes_){} + , decltype(_impl_.partname_){} + , decltype(_impl_.package_){nullptr} + , decltype(_impl_.part_){nullptr} + , decltype(_impl_.index_){0u} + , decltype(_impl_.side_){0} + }; + _impl_.refdes_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.refdes_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.partname_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.partname_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Component::~Component() { + // @@protoc_insertion_point(destructor:Odb.Lib.Protobuf.ProductModel.Component) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Component::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.refdes_.Destroy(); + _impl_.partname_.Destroy(); + if (this != internal_default_instance()) delete _impl_.package_; + if (this != internal_default_instance()) delete _impl_.part_; +} + +void Component::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Component::Clear() { +// @@protoc_insertion_point(message_clear_start:Odb.Lib.Protobuf.ProductModel.Component) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _impl_.refdes_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.partname_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(_impl_.package_ != nullptr); + _impl_.package_->Clear(); + } + if (cached_has_bits & 0x00000008u) { + GOOGLE_DCHECK(_impl_.part_ != nullptr); + _impl_.part_->Clear(); + } + } + if (cached_has_bits & 0x00000030u) { + ::memset(&_impl_.index_, 0, static_cast( + reinterpret_cast(&_impl_.side_) - + reinterpret_cast(&_impl_.index_)) + sizeof(_impl_.side_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Component::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string refDes = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_refdes(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "Odb.Lib.Protobuf.ProductModel.Component.refDes")); + } else + goto handle_unusual; + continue; + // optional string partName = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_partname(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "Odb.Lib.Protobuf.ProductModel.Component.partName")); + } else + goto handle_unusual; + continue; + // optional .Odb.Lib.Protobuf.ProductModel.Package package = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_package(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional uint32 index = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _Internal::set_has_index(&has_bits); + _impl_.index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .Odb.Lib.Protobuf.BoardSide side = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_side(static_cast<::Odb::Lib::Protobuf::BoardSide>(val)); + } else + goto handle_unusual; + continue; + // optional .Odb.Lib.Protobuf.ProductModel.Part part = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + ptr = ctx->ParseMessage(_internal_mutable_part(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Component::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Odb.Lib.Protobuf.ProductModel.Component) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // optional string refDes = 1; + if (_internal_has_refdes()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_refdes().data(), static_cast(this->_internal_refdes().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Odb.Lib.Protobuf.ProductModel.Component.refDes"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_refdes(), target); + } + + // optional string partName = 2; + if (_internal_has_partname()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_partname().data(), static_cast(this->_internal_partname().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Odb.Lib.Protobuf.ProductModel.Component.partName"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_partname(), target); + } + + // optional .Odb.Lib.Protobuf.ProductModel.Package package = 3; + if (_internal_has_package()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, _Internal::package(this), + _Internal::package(this).GetCachedSize(), target, stream); + } + + // optional uint32 index = 4; + if (_internal_has_index()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_index(), target); + } + + // optional .Odb.Lib.Protobuf.BoardSide side = 5; + if (_internal_has_side()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 5, this->_internal_side(), target); + } + + // optional .Odb.Lib.Protobuf.ProductModel.Part part = 6; + if (_internal_has_part()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(6, _Internal::part(this), + _Internal::part(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Odb.Lib.Protobuf.ProductModel.Component) + return target; +} + +size_t Component::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Odb.Lib.Protobuf.ProductModel.Component) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + // optional string refDes = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_refdes()); + } + + // optional string partName = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_partname()); + } + + // optional .Odb.Lib.Protobuf.ProductModel.Package package = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.package_); + } + + // optional .Odb.Lib.Protobuf.ProductModel.Part part = 6; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.part_); + } + + // optional uint32 index = 4; + if (cached_has_bits & 0x00000010u) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_index()); + } + + // optional .Odb.Lib.Protobuf.BoardSide side = 5; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_side()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Component::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + Component::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Component::GetClassData() const { return &_class_data_; } + + +void Component::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:Odb.Lib.Protobuf.ProductModel.Component) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_refdes(from._internal_refdes()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_partname(from._internal_partname()); + } + if (cached_has_bits & 0x00000004u) { + _this->_internal_mutable_package()->::Odb::Lib::Protobuf::ProductModel::Package::MergeFrom( + from._internal_package()); + } + if (cached_has_bits & 0x00000008u) { + _this->_internal_mutable_part()->::Odb::Lib::Protobuf::ProductModel::Part::MergeFrom( + from._internal_part()); + } + if (cached_has_bits & 0x00000010u) { + _this->_impl_.index_ = from._impl_.index_; + } + if (cached_has_bits & 0x00000020u) { + _this->_impl_.side_ = from._impl_.side_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Component::CopyFrom(const Component& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Odb.Lib.Protobuf.ProductModel.Component) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Component::IsInitialized() const { + return true; +} + +void Component::InternalSwap(Component* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.refdes_, lhs_arena, + &other->_impl_.refdes_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.partname_, lhs_arena, + &other->_impl_.partname_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(Component, _impl_.side_) + + sizeof(Component::_impl_.side_) + - PROTOBUF_FIELD_OFFSET(Component, _impl_.package_)>( + reinterpret_cast(&_impl_.package_), + reinterpret_cast(&other->_impl_.package_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Component::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_component_2eproto_getter, &descriptor_table_component_2eproto_once, + file_level_metadata_component_2eproto[0]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::Odb::Lib::Protobuf::ProductModel::Component* +Arena::CreateMaybeMessage< ::Odb::Lib::Protobuf::ProductModel::Component >(Arena* arena) { + return Arena::CreateMessageInternal< ::Odb::Lib::Protobuf::ProductModel::Component >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/OdbDesignLib/ProtoBuf/component.pb.h b/OdbDesignLib/ProtoBuf/component.pb.h new file mode 100644 index 00000000..46d2a6bd --- /dev/null +++ b/OdbDesignLib/ProtoBuf/component.pb.h @@ -0,0 +1,708 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: component.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_component_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_component_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "enums.pb.h" +#include "part.pb.h" +#include "package.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_component_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_component_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_component_2eproto; +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { +class Component; +struct ComponentDefaultTypeInternal; +extern ComponentDefaultTypeInternal _Component_default_instance_; +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +PROTOBUF_NAMESPACE_OPEN +template<> ::Odb::Lib::Protobuf::ProductModel::Component* Arena::CreateMaybeMessage<::Odb::Lib::Protobuf::ProductModel::Component>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { + +// =================================================================== + +class Component final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Odb.Lib.Protobuf.ProductModel.Component) */ { + public: + inline Component() : Component(nullptr) {} + ~Component() override; + explicit PROTOBUF_CONSTEXPR Component(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Component(const Component& from); + Component(Component&& from) noexcept + : Component() { + *this = ::std::move(from); + } + + inline Component& operator=(const Component& from) { + CopyFrom(from); + return *this; + } + inline Component& operator=(Component&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Component& default_instance() { + return *internal_default_instance(); + } + static inline const Component* internal_default_instance() { + return reinterpret_cast( + &_Component_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(Component& a, Component& b) { + a.Swap(&b); + } + inline void Swap(Component* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Component* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Component* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Component& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Component& from) { + Component::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Component* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Odb.Lib.Protobuf.ProductModel.Component"; + } + protected: + explicit Component(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kRefDesFieldNumber = 1, + kPartNameFieldNumber = 2, + kPackageFieldNumber = 3, + kPartFieldNumber = 6, + kIndexFieldNumber = 4, + kSideFieldNumber = 5, + }; + // optional string refDes = 1; + bool has_refdes() const; + private: + bool _internal_has_refdes() const; + public: + void clear_refdes(); + const std::string& refdes() const; + template + void set_refdes(ArgT0&& arg0, ArgT... args); + std::string* mutable_refdes(); + PROTOBUF_NODISCARD std::string* release_refdes(); + void set_allocated_refdes(std::string* refdes); + private: + const std::string& _internal_refdes() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_refdes(const std::string& value); + std::string* _internal_mutable_refdes(); + public: + + // optional string partName = 2; + bool has_partname() const; + private: + bool _internal_has_partname() const; + public: + void clear_partname(); + const std::string& partname() const; + template + void set_partname(ArgT0&& arg0, ArgT... args); + std::string* mutable_partname(); + PROTOBUF_NODISCARD std::string* release_partname(); + void set_allocated_partname(std::string* partname); + private: + const std::string& _internal_partname() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_partname(const std::string& value); + std::string* _internal_mutable_partname(); + public: + + // optional .Odb.Lib.Protobuf.ProductModel.Package package = 3; + bool has_package() const; + private: + bool _internal_has_package() const; + public: + void clear_package(); + const ::Odb::Lib::Protobuf::ProductModel::Package& package() const; + PROTOBUF_NODISCARD ::Odb::Lib::Protobuf::ProductModel::Package* release_package(); + ::Odb::Lib::Protobuf::ProductModel::Package* mutable_package(); + void set_allocated_package(::Odb::Lib::Protobuf::ProductModel::Package* package); + private: + const ::Odb::Lib::Protobuf::ProductModel::Package& _internal_package() const; + ::Odb::Lib::Protobuf::ProductModel::Package* _internal_mutable_package(); + public: + void unsafe_arena_set_allocated_package( + ::Odb::Lib::Protobuf::ProductModel::Package* package); + ::Odb::Lib::Protobuf::ProductModel::Package* unsafe_arena_release_package(); + + // optional .Odb.Lib.Protobuf.ProductModel.Part part = 6; + bool has_part() const; + private: + bool _internal_has_part() const; + public: + void clear_part(); + const ::Odb::Lib::Protobuf::ProductModel::Part& part() const; + PROTOBUF_NODISCARD ::Odb::Lib::Protobuf::ProductModel::Part* release_part(); + ::Odb::Lib::Protobuf::ProductModel::Part* mutable_part(); + void set_allocated_part(::Odb::Lib::Protobuf::ProductModel::Part* part); + private: + const ::Odb::Lib::Protobuf::ProductModel::Part& _internal_part() const; + ::Odb::Lib::Protobuf::ProductModel::Part* _internal_mutable_part(); + public: + void unsafe_arena_set_allocated_part( + ::Odb::Lib::Protobuf::ProductModel::Part* part); + ::Odb::Lib::Protobuf::ProductModel::Part* unsafe_arena_release_part(); + + // optional uint32 index = 4; + bool has_index() const; + private: + bool _internal_has_index() const; + public: + void clear_index(); + uint32_t index() const; + void set_index(uint32_t value); + private: + uint32_t _internal_index() const; + void _internal_set_index(uint32_t value); + public: + + // optional .Odb.Lib.Protobuf.BoardSide side = 5; + bool has_side() const; + private: + bool _internal_has_side() const; + public: + void clear_side(); + ::Odb::Lib::Protobuf::BoardSide side() const; + void set_side(::Odb::Lib::Protobuf::BoardSide value); + private: + ::Odb::Lib::Protobuf::BoardSide _internal_side() const; + void _internal_set_side(::Odb::Lib::Protobuf::BoardSide value); + public: + + // @@protoc_insertion_point(class_scope:Odb.Lib.Protobuf.ProductModel.Component) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr refdes_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr partname_; + ::Odb::Lib::Protobuf::ProductModel::Package* package_; + ::Odb::Lib::Protobuf::ProductModel::Part* part_; + uint32_t index_; + int side_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_component_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Component + +// optional string refDes = 1; +inline bool Component::_internal_has_refdes() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Component::has_refdes() const { + return _internal_has_refdes(); +} +inline void Component::clear_refdes() { + _impl_.refdes_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Component::refdes() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Component.refDes) + return _internal_refdes(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Component::set_refdes(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.refdes_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:Odb.Lib.Protobuf.ProductModel.Component.refDes) +} +inline std::string* Component::mutable_refdes() { + std::string* _s = _internal_mutable_refdes(); + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.Component.refDes) + return _s; +} +inline const std::string& Component::_internal_refdes() const { + return _impl_.refdes_.Get(); +} +inline void Component::_internal_set_refdes(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.refdes_.Set(value, GetArenaForAllocation()); +} +inline std::string* Component::_internal_mutable_refdes() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.refdes_.Mutable(GetArenaForAllocation()); +} +inline std::string* Component::release_refdes() { + // @@protoc_insertion_point(field_release:Odb.Lib.Protobuf.ProductModel.Component.refDes) + if (!_internal_has_refdes()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.refdes_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.refdes_.IsDefault()) { + _impl_.refdes_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Component::set_allocated_refdes(std::string* refdes) { + if (refdes != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.refdes_.SetAllocated(refdes, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.refdes_.IsDefault()) { + _impl_.refdes_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:Odb.Lib.Protobuf.ProductModel.Component.refDes) +} + +// optional string partName = 2; +inline bool Component::_internal_has_partname() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Component::has_partname() const { + return _internal_has_partname(); +} +inline void Component::clear_partname() { + _impl_.partname_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& Component::partname() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Component.partName) + return _internal_partname(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Component::set_partname(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.partname_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:Odb.Lib.Protobuf.ProductModel.Component.partName) +} +inline std::string* Component::mutable_partname() { + std::string* _s = _internal_mutable_partname(); + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.Component.partName) + return _s; +} +inline const std::string& Component::_internal_partname() const { + return _impl_.partname_.Get(); +} +inline void Component::_internal_set_partname(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.partname_.Set(value, GetArenaForAllocation()); +} +inline std::string* Component::_internal_mutable_partname() { + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.partname_.Mutable(GetArenaForAllocation()); +} +inline std::string* Component::release_partname() { + // @@protoc_insertion_point(field_release:Odb.Lib.Protobuf.ProductModel.Component.partName) + if (!_internal_has_partname()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* p = _impl_.partname_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.partname_.IsDefault()) { + _impl_.partname_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Component::set_allocated_partname(std::string* partname) { + if (partname != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.partname_.SetAllocated(partname, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.partname_.IsDefault()) { + _impl_.partname_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:Odb.Lib.Protobuf.ProductModel.Component.partName) +} + +// optional .Odb.Lib.Protobuf.ProductModel.Package package = 3; +inline bool Component::_internal_has_package() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || _impl_.package_ != nullptr); + return value; +} +inline bool Component::has_package() const { + return _internal_has_package(); +} +inline const ::Odb::Lib::Protobuf::ProductModel::Package& Component::_internal_package() const { + const ::Odb::Lib::Protobuf::ProductModel::Package* p = _impl_.package_; + return p != nullptr ? *p : reinterpret_cast( + ::Odb::Lib::Protobuf::ProductModel::_Package_default_instance_); +} +inline const ::Odb::Lib::Protobuf::ProductModel::Package& Component::package() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Component.package) + return _internal_package(); +} +inline void Component::unsafe_arena_set_allocated_package( + ::Odb::Lib::Protobuf::ProductModel::Package* package) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.package_); + } + _impl_.package_ = package; + if (package) { + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Odb.Lib.Protobuf.ProductModel.Component.package) +} +inline ::Odb::Lib::Protobuf::ProductModel::Package* Component::release_package() { + _impl_._has_bits_[0] &= ~0x00000004u; + ::Odb::Lib::Protobuf::ProductModel::Package* temp = _impl_.package_; + _impl_.package_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::Odb::Lib::Protobuf::ProductModel::Package* Component::unsafe_arena_release_package() { + // @@protoc_insertion_point(field_release:Odb.Lib.Protobuf.ProductModel.Component.package) + _impl_._has_bits_[0] &= ~0x00000004u; + ::Odb::Lib::Protobuf::ProductModel::Package* temp = _impl_.package_; + _impl_.package_ = nullptr; + return temp; +} +inline ::Odb::Lib::Protobuf::ProductModel::Package* Component::_internal_mutable_package() { + _impl_._has_bits_[0] |= 0x00000004u; + if (_impl_.package_ == nullptr) { + auto* p = CreateMaybeMessage<::Odb::Lib::Protobuf::ProductModel::Package>(GetArenaForAllocation()); + _impl_.package_ = p; + } + return _impl_.package_; +} +inline ::Odb::Lib::Protobuf::ProductModel::Package* Component::mutable_package() { + ::Odb::Lib::Protobuf::ProductModel::Package* _msg = _internal_mutable_package(); + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.Component.package) + return _msg; +} +inline void Component::set_allocated_package(::Odb::Lib::Protobuf::ProductModel::Package* package) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.package_); + } + if (package) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(package)); + if (message_arena != submessage_arena) { + package = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, package, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + _impl_.package_ = package; + // @@protoc_insertion_point(field_set_allocated:Odb.Lib.Protobuf.ProductModel.Component.package) +} + +// optional uint32 index = 4; +inline bool Component::_internal_has_index() const { + bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool Component::has_index() const { + return _internal_has_index(); +} +inline void Component::clear_index() { + _impl_.index_ = 0u; + _impl_._has_bits_[0] &= ~0x00000010u; +} +inline uint32_t Component::_internal_index() const { + return _impl_.index_; +} +inline uint32_t Component::index() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Component.index) + return _internal_index(); +} +inline void Component::_internal_set_index(uint32_t value) { + _impl_._has_bits_[0] |= 0x00000010u; + _impl_.index_ = value; +} +inline void Component::set_index(uint32_t value) { + _internal_set_index(value); + // @@protoc_insertion_point(field_set:Odb.Lib.Protobuf.ProductModel.Component.index) +} + +// optional .Odb.Lib.Protobuf.BoardSide side = 5; +inline bool Component::_internal_has_side() const { + bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool Component::has_side() const { + return _internal_has_side(); +} +inline void Component::clear_side() { + _impl_.side_ = 0; + _impl_._has_bits_[0] &= ~0x00000020u; +} +inline ::Odb::Lib::Protobuf::BoardSide Component::_internal_side() const { + return static_cast< ::Odb::Lib::Protobuf::BoardSide >(_impl_.side_); +} +inline ::Odb::Lib::Protobuf::BoardSide Component::side() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Component.side) + return _internal_side(); +} +inline void Component::_internal_set_side(::Odb::Lib::Protobuf::BoardSide value) { + _impl_._has_bits_[0] |= 0x00000020u; + _impl_.side_ = value; +} +inline void Component::set_side(::Odb::Lib::Protobuf::BoardSide value) { + _internal_set_side(value); + // @@protoc_insertion_point(field_set:Odb.Lib.Protobuf.ProductModel.Component.side) +} + +// optional .Odb.Lib.Protobuf.ProductModel.Part part = 6; +inline bool Component::_internal_has_part() const { + bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; + PROTOBUF_ASSUME(!value || _impl_.part_ != nullptr); + return value; +} +inline bool Component::has_part() const { + return _internal_has_part(); +} +inline const ::Odb::Lib::Protobuf::ProductModel::Part& Component::_internal_part() const { + const ::Odb::Lib::Protobuf::ProductModel::Part* p = _impl_.part_; + return p != nullptr ? *p : reinterpret_cast( + ::Odb::Lib::Protobuf::ProductModel::_Part_default_instance_); +} +inline const ::Odb::Lib::Protobuf::ProductModel::Part& Component::part() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Component.part) + return _internal_part(); +} +inline void Component::unsafe_arena_set_allocated_part( + ::Odb::Lib::Protobuf::ProductModel::Part* part) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.part_); + } + _impl_.part_ = part; + if (part) { + _impl_._has_bits_[0] |= 0x00000008u; + } else { + _impl_._has_bits_[0] &= ~0x00000008u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Odb.Lib.Protobuf.ProductModel.Component.part) +} +inline ::Odb::Lib::Protobuf::ProductModel::Part* Component::release_part() { + _impl_._has_bits_[0] &= ~0x00000008u; + ::Odb::Lib::Protobuf::ProductModel::Part* temp = _impl_.part_; + _impl_.part_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::Odb::Lib::Protobuf::ProductModel::Part* Component::unsafe_arena_release_part() { + // @@protoc_insertion_point(field_release:Odb.Lib.Protobuf.ProductModel.Component.part) + _impl_._has_bits_[0] &= ~0x00000008u; + ::Odb::Lib::Protobuf::ProductModel::Part* temp = _impl_.part_; + _impl_.part_ = nullptr; + return temp; +} +inline ::Odb::Lib::Protobuf::ProductModel::Part* Component::_internal_mutable_part() { + _impl_._has_bits_[0] |= 0x00000008u; + if (_impl_.part_ == nullptr) { + auto* p = CreateMaybeMessage<::Odb::Lib::Protobuf::ProductModel::Part>(GetArenaForAllocation()); + _impl_.part_ = p; + } + return _impl_.part_; +} +inline ::Odb::Lib::Protobuf::ProductModel::Part* Component::mutable_part() { + ::Odb::Lib::Protobuf::ProductModel::Part* _msg = _internal_mutable_part(); + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.Component.part) + return _msg; +} +inline void Component::set_allocated_part(::Odb::Lib::Protobuf::ProductModel::Part* part) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.part_); + } + if (part) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(part)); + if (message_arena != submessage_arena) { + part = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, part, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000008u; + } else { + _impl_._has_bits_[0] &= ~0x00000008u; + } + _impl_.part_ = part; + // @@protoc_insertion_point(field_set_allocated:Odb.Lib.Protobuf.ProductModel.Component.part) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_component_2eproto diff --git a/OdbDesignLib/ProtoBuf/design.pb.cc b/OdbDesignLib/ProtoBuf/design.pb.cc index 1a699676..477da8b3 100644 --- a/OdbDesignLib/ProtoBuf/design.pb.cc +++ b/OdbDesignLib/ProtoBuf/design.pb.cc @@ -23,11 +23,66 @@ namespace _pbi = _pb::internal; namespace Odb { namespace Lib { namespace Protobuf { +namespace ProductModel { +PROTOBUF_CONSTEXPR Design_NetsByNameEntry_DoNotUse::Design_NetsByNameEntry_DoNotUse( + ::_pbi::ConstantInitialized) {} +struct Design_NetsByNameEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR Design_NetsByNameEntry_DoNotUseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~Design_NetsByNameEntry_DoNotUseDefaultTypeInternal() {} + union { + Design_NetsByNameEntry_DoNotUse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Design_NetsByNameEntry_DoNotUseDefaultTypeInternal _Design_NetsByNameEntry_DoNotUse_default_instance_; +PROTOBUF_CONSTEXPR Design_PackagesByNameEntry_DoNotUse::Design_PackagesByNameEntry_DoNotUse( + ::_pbi::ConstantInitialized) {} +struct Design_PackagesByNameEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR Design_PackagesByNameEntry_DoNotUseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~Design_PackagesByNameEntry_DoNotUseDefaultTypeInternal() {} + union { + Design_PackagesByNameEntry_DoNotUse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Design_PackagesByNameEntry_DoNotUseDefaultTypeInternal _Design_PackagesByNameEntry_DoNotUse_default_instance_; +PROTOBUF_CONSTEXPR Design_ComponentsByNameEntry_DoNotUse::Design_ComponentsByNameEntry_DoNotUse( + ::_pbi::ConstantInitialized) {} +struct Design_ComponentsByNameEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR Design_ComponentsByNameEntry_DoNotUseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~Design_ComponentsByNameEntry_DoNotUseDefaultTypeInternal() {} + union { + Design_ComponentsByNameEntry_DoNotUse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Design_ComponentsByNameEntry_DoNotUseDefaultTypeInternal _Design_ComponentsByNameEntry_DoNotUse_default_instance_; +PROTOBUF_CONSTEXPR Design_PartsByNameEntry_DoNotUse::Design_PartsByNameEntry_DoNotUse( + ::_pbi::ConstantInitialized) {} +struct Design_PartsByNameEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR Design_PartsByNameEntry_DoNotUseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~Design_PartsByNameEntry_DoNotUseDefaultTypeInternal() {} + union { + Design_PartsByNameEntry_DoNotUse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Design_PartsByNameEntry_DoNotUseDefaultTypeInternal _Design_PartsByNameEntry_DoNotUse_default_instance_; PROTOBUF_CONSTEXPR Design::Design( ::_pbi::ConstantInitialized): _impl_{ /*decltype(_impl_._has_bits_)*/{} , /*decltype(_impl_._cached_size_)*/{} - , /*decltype(_impl_.filearchive_)*/nullptr} {} + , /*decltype(_impl_.nets_)*/{} + , /*decltype(_impl_.netsbyname_)*/{::_pbi::ConstantInitialized()} + , /*decltype(_impl_.packages_)*/{} + , /*decltype(_impl_.packagesbyname_)*/{::_pbi::ConstantInitialized()} + , /*decltype(_impl_.components_)*/{} + , /*decltype(_impl_.componentsbyname_)*/{::_pbi::ConstantInitialized()} + , /*decltype(_impl_.parts_)*/{} + , /*decltype(_impl_.partsbyname_)*/{::_pbi::ConstantInitialized()} + , /*decltype(_impl_.productmodel_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.filemodel_)*/nullptr} {} struct DesignDefaultTypeInternal { PROTOBUF_CONSTEXPR DesignDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {} @@ -37,45 +92,144 @@ struct DesignDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DesignDefaultTypeInternal _Design_default_instance_; +} // namespace ProductModel } // namespace Protobuf } // namespace Lib } // namespace Odb -static ::_pb::Metadata file_level_metadata_design_2eproto[1]; +static ::_pb::Metadata file_level_metadata_design_2eproto[5]; static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_design_2eproto = nullptr; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_design_2eproto = nullptr; const uint32_t TableStruct_design_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::Design, _impl_._has_bits_), - PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::Design, _internal_metadata_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design_NetsByNameEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design_NetsByNameEntry_DoNotUse, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ - PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::Design, _impl_.filearchive_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design_NetsByNameEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design_NetsByNameEntry_DoNotUse, value_), 0, + 1, + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design_PackagesByNameEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design_PackagesByNameEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design_PackagesByNameEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design_PackagesByNameEntry_DoNotUse, value_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design_ComponentsByNameEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design_ComponentsByNameEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design_ComponentsByNameEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design_ComponentsByNameEntry_DoNotUse, value_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design_PartsByNameEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design_PartsByNameEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design_PartsByNameEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design_PartsByNameEntry_DoNotUse, value_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design, _impl_.productmodel_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design, _impl_.filemodel_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design, _impl_.nets_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design, _impl_.netsbyname_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design, _impl_.packages_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design, _impl_.packagesbyname_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design, _impl_.components_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design, _impl_.componentsbyname_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design, _impl_.parts_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Design, _impl_.partsbyname_), + 0, + 1, + 2, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - { 0, 7, -1, sizeof(::Odb::Lib::Protobuf::Design)}, + { 0, 8, -1, sizeof(::Odb::Lib::Protobuf::ProductModel::Design_NetsByNameEntry_DoNotUse)}, + { 10, 18, -1, sizeof(::Odb::Lib::Protobuf::ProductModel::Design_PackagesByNameEntry_DoNotUse)}, + { 20, 28, -1, sizeof(::Odb::Lib::Protobuf::ProductModel::Design_ComponentsByNameEntry_DoNotUse)}, + { 30, 38, -1, sizeof(::Odb::Lib::Protobuf::ProductModel::Design_PartsByNameEntry_DoNotUse)}, + { 40, 57, -1, sizeof(::Odb::Lib::Protobuf::ProductModel::Design)}, }; static const ::_pb::Message* const file_default_instances[] = { - &::Odb::Lib::Protobuf::_Design_default_instance_._instance, + &::Odb::Lib::Protobuf::ProductModel::_Design_NetsByNameEntry_DoNotUse_default_instance_._instance, + &::Odb::Lib::Protobuf::ProductModel::_Design_PackagesByNameEntry_DoNotUse_default_instance_._instance, + &::Odb::Lib::Protobuf::ProductModel::_Design_ComponentsByNameEntry_DoNotUse_default_instance_._instance, + &::Odb::Lib::Protobuf::ProductModel::_Design_PartsByNameEntry_DoNotUse_default_instance_._instance, + &::Odb::Lib::Protobuf::ProductModel::_Design_default_instance_._instance, }; const char descriptor_table_protodef_design_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\014design.proto\022\020Odb.Lib.Protobuf\032\021filear" - "chive.proto\"Q\n\006Design\0227\n\013fileArchive\030\001 \001" - "(\0132\035.Odb.Lib.Protobuf.FileArchiveH\000\210\001\001B\016" - "\n\014_fileArchiveb\006proto3" + "\n\014design.proto\022\035Odb.Lib.Protobuf.Product" + "Model\032\021filearchive.proto\032\tnet.proto\032\rpac" + "kage.proto\032\017component.proto\032\npart.proto\"" + "\247\010\n\006Design\022\031\n\014productModel\030\001 \001(\tH\000\210\001\001\022\021\n" + "\004name\030\002 \001(\tH\001\210\001\001\0225\n\tfileModel\030\003 \001(\0132\035.Od" + "b.Lib.Protobuf.FileArchiveH\002\210\001\001\0220\n\004nets\030" + "\004 \003(\0132\".Odb.Lib.Protobuf.ProductModel.Ne" + "t\022I\n\nnetsByName\030\005 \003(\01325.Odb.Lib.Protobuf" + ".ProductModel.Design.NetsByNameEntry\0228\n\010" + "packages\030\006 \003(\0132&.Odb.Lib.Protobuf.Produc" + "tModel.Package\022Q\n\016packagesByName\030\007 \003(\01329" + ".Odb.Lib.Protobuf.ProductModel.Design.Pa" + "ckagesByNameEntry\022<\n\ncomponents\030\010 \003(\0132(." + "Odb.Lib.Protobuf.ProductModel.Component\022" + "U\n\020componentsByName\030\t \003(\0132;.Odb.Lib.Prot" + "obuf.ProductModel.Design.ComponentsByNam" + "eEntry\0222\n\005parts\030\n \003(\0132#.Odb.Lib.Protobuf" + ".ProductModel.Part\022K\n\013partsByName\030\013 \003(\0132" + "6.Odb.Lib.Protobuf.ProductModel.Design.P" + "artsByNameEntry\032U\n\017NetsByNameEntry\022\013\n\003ke" + "y\030\001 \001(\t\0221\n\005value\030\002 \001(\0132\".Odb.Lib.Protobu" + "f.ProductModel.Net:\0028\001\032]\n\023PackagesByName" + "Entry\022\013\n\003key\030\001 \001(\t\0225\n\005value\030\002 \001(\0132&.Odb." + "Lib.Protobuf.ProductModel.Package:\0028\001\032a\n" + "\025ComponentsByNameEntry\022\013\n\003key\030\001 \001(\t\0227\n\005v" + "alue\030\002 \001(\0132(.Odb.Lib.Protobuf.ProductMod" + "el.Component:\0028\001\032W\n\020PartsByNameEntry\022\013\n\003" + "key\030\001 \001(\t\0222\n\005value\030\002 \001(\0132#.Odb.Lib.Proto" + "buf.ProductModel.Part:\0028\001B\017\n\r_productMod" + "elB\007\n\005_nameB\014\n\n_fileModelb\006proto3" ; -static const ::_pbi::DescriptorTable* const descriptor_table_design_2eproto_deps[1] = { +static const ::_pbi::DescriptorTable* const descriptor_table_design_2eproto_deps[5] = { + &::descriptor_table_component_2eproto, &::descriptor_table_filearchive_2eproto, + &::descriptor_table_net_2eproto, + &::descriptor_table_package_2eproto, + &::descriptor_table_part_2eproto, }; static ::_pbi::once_flag descriptor_table_design_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_design_2eproto = { - false, false, 142, descriptor_table_protodef_design_2eproto, + false, false, 1193, descriptor_table_protodef_design_2eproto, "design.proto", - &descriptor_table_design_2eproto_once, descriptor_table_design_2eproto_deps, 1, 1, + &descriptor_table_design_2eproto_once, descriptor_table_design_2eproto_deps, 5, 5, schemas, file_default_instances, TableStruct_design_2eproto::offsets, file_level_metadata_design_2eproto, file_level_enum_descriptors_design_2eproto, file_level_service_descriptors_design_2eproto, @@ -89,31 +243,121 @@ PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_in namespace Odb { namespace Lib { namespace Protobuf { +namespace ProductModel { + +// =================================================================== + +Design_NetsByNameEntry_DoNotUse::Design_NetsByNameEntry_DoNotUse() {} +Design_NetsByNameEntry_DoNotUse::Design_NetsByNameEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void Design_NetsByNameEntry_DoNotUse::MergeFrom(const Design_NetsByNameEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata Design_NetsByNameEntry_DoNotUse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_design_2eproto_getter, &descriptor_table_design_2eproto_once, + file_level_metadata_design_2eproto[0]); +} + +// =================================================================== + +Design_PackagesByNameEntry_DoNotUse::Design_PackagesByNameEntry_DoNotUse() {} +Design_PackagesByNameEntry_DoNotUse::Design_PackagesByNameEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void Design_PackagesByNameEntry_DoNotUse::MergeFrom(const Design_PackagesByNameEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata Design_PackagesByNameEntry_DoNotUse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_design_2eproto_getter, &descriptor_table_design_2eproto_once, + file_level_metadata_design_2eproto[1]); +} + +// =================================================================== + +Design_ComponentsByNameEntry_DoNotUse::Design_ComponentsByNameEntry_DoNotUse() {} +Design_ComponentsByNameEntry_DoNotUse::Design_ComponentsByNameEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void Design_ComponentsByNameEntry_DoNotUse::MergeFrom(const Design_ComponentsByNameEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata Design_ComponentsByNameEntry_DoNotUse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_design_2eproto_getter, &descriptor_table_design_2eproto_once, + file_level_metadata_design_2eproto[2]); +} + +// =================================================================== + +Design_PartsByNameEntry_DoNotUse::Design_PartsByNameEntry_DoNotUse() {} +Design_PartsByNameEntry_DoNotUse::Design_PartsByNameEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void Design_PartsByNameEntry_DoNotUse::MergeFrom(const Design_PartsByNameEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata Design_PartsByNameEntry_DoNotUse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_design_2eproto_getter, &descriptor_table_design_2eproto_once, + file_level_metadata_design_2eproto[3]); +} // =================================================================== class Design::_Internal { public: using HasBits = decltype(std::declval()._impl_._has_bits_); - static const ::Odb::Lib::Protobuf::FileArchive& filearchive(const Design* msg); - static void set_has_filearchive(HasBits* has_bits) { + static void set_has_productmodel(HasBits* has_bits) { (*has_bits)[0] |= 1u; } + static void set_has_name(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::Odb::Lib::Protobuf::FileArchive& filemodel(const Design* msg); + static void set_has_filemodel(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } }; const ::Odb::Lib::Protobuf::FileArchive& -Design::_Internal::filearchive(const Design* msg) { - return *msg->_impl_.filearchive_; +Design::_Internal::filemodel(const Design* msg) { + return *msg->_impl_.filemodel_; } -void Design::clear_filearchive() { - if (_impl_.filearchive_ != nullptr) _impl_.filearchive_->Clear(); - _impl_._has_bits_[0] &= ~0x00000001u; +void Design::clear_filemodel() { + if (_impl_.filemodel_ != nullptr) _impl_.filemodel_->Clear(); + _impl_._has_bits_[0] &= ~0x00000004u; +} +void Design::clear_nets() { + _impl_.nets_.Clear(); +} +void Design::clear_netsbyname() { + _impl_.netsbyname_.Clear(); +} +void Design::clear_packages() { + _impl_.packages_.Clear(); +} +void Design::clear_packagesbyname() { + _impl_.packagesbyname_.Clear(); +} +void Design::clear_components() { + _impl_.components_.Clear(); +} +void Design::clear_componentsbyname() { + _impl_.componentsbyname_.Clear(); +} +void Design::clear_parts() { + _impl_.parts_.Clear(); +} +void Design::clear_partsbyname() { + _impl_.partsbyname_.Clear(); } Design::Design(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { SharedCtor(arena, is_message_owned); - // @@protoc_insertion_point(arena_constructor:Odb.Lib.Protobuf.Design) + if (arena != nullptr && !is_message_owned) { + arena->OwnCustomDestructor(this, &Design::ArenaDtor); + } + // @@protoc_insertion_point(arena_constructor:Odb.Lib.Protobuf.ProductModel.Design) } Design::Design(const Design& from) : ::PROTOBUF_NAMESPACE_ID::Message() { @@ -121,13 +365,43 @@ Design::Design(const Design& from) new (&_impl_) Impl_{ decltype(_impl_._has_bits_){from._impl_._has_bits_} , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.filearchive_){nullptr}}; + , decltype(_impl_.nets_){from._impl_.nets_} + , /*decltype(_impl_.netsbyname_)*/{} + , decltype(_impl_.packages_){from._impl_.packages_} + , /*decltype(_impl_.packagesbyname_)*/{} + , decltype(_impl_.components_){from._impl_.components_} + , /*decltype(_impl_.componentsbyname_)*/{} + , decltype(_impl_.parts_){from._impl_.parts_} + , /*decltype(_impl_.partsbyname_)*/{} + , decltype(_impl_.productmodel_){} + , decltype(_impl_.name_){} + , decltype(_impl_.filemodel_){nullptr}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - if (from._internal_has_filearchive()) { - _this->_impl_.filearchive_ = new ::Odb::Lib::Protobuf::FileArchive(*from._impl_.filearchive_); + _this->_impl_.netsbyname_.MergeFrom(from._impl_.netsbyname_); + _this->_impl_.packagesbyname_.MergeFrom(from._impl_.packagesbyname_); + _this->_impl_.componentsbyname_.MergeFrom(from._impl_.componentsbyname_); + _this->_impl_.partsbyname_.MergeFrom(from._impl_.partsbyname_); + _impl_.productmodel_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.productmodel_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_productmodel()) { + _this->_impl_.productmodel_.Set(from._internal_productmodel(), + _this->GetArenaForAllocation()); + } + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_name()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + if (from._internal_has_filemodel()) { + _this->_impl_.filemodel_ = new ::Odb::Lib::Protobuf::FileArchive(*from._impl_.filemodel_); } - // @@protoc_insertion_point(copy_constructor:Odb.Lib.Protobuf.Design) + // @@protoc_insertion_point(copy_constructor:Odb.Lib.Protobuf.ProductModel.Design) } inline void Design::SharedCtor( @@ -137,14 +411,33 @@ inline void Design::SharedCtor( new (&_impl_) Impl_{ decltype(_impl_._has_bits_){} , /*decltype(_impl_._cached_size_)*/{} - , decltype(_impl_.filearchive_){nullptr} + , decltype(_impl_.nets_){arena} + , /*decltype(_impl_.netsbyname_)*/{::_pbi::ArenaInitialized(), arena} + , decltype(_impl_.packages_){arena} + , /*decltype(_impl_.packagesbyname_)*/{::_pbi::ArenaInitialized(), arena} + , decltype(_impl_.components_){arena} + , /*decltype(_impl_.componentsbyname_)*/{::_pbi::ArenaInitialized(), arena} + , decltype(_impl_.parts_){arena} + , /*decltype(_impl_.partsbyname_)*/{::_pbi::ArenaInitialized(), arena} + , decltype(_impl_.productmodel_){} + , decltype(_impl_.name_){} + , decltype(_impl_.filemodel_){nullptr} }; + _impl_.productmodel_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.productmodel_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING } Design::~Design() { - // @@protoc_insertion_point(destructor:Odb.Lib.Protobuf.Design) + // @@protoc_insertion_point(destructor:Odb.Lib.Protobuf.ProductModel.Design) if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; + ArenaDtor(this); return; } SharedDtor(); @@ -152,23 +445,60 @@ Design::~Design() { inline void Design::SharedDtor() { GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); - if (this != internal_default_instance()) delete _impl_.filearchive_; + _impl_.nets_.~RepeatedPtrField(); + _impl_.netsbyname_.Destruct(); + _impl_.netsbyname_.~MapField(); + _impl_.packages_.~RepeatedPtrField(); + _impl_.packagesbyname_.Destruct(); + _impl_.packagesbyname_.~MapField(); + _impl_.components_.~RepeatedPtrField(); + _impl_.componentsbyname_.Destruct(); + _impl_.componentsbyname_.~MapField(); + _impl_.parts_.~RepeatedPtrField(); + _impl_.partsbyname_.Destruct(); + _impl_.partsbyname_.~MapField(); + _impl_.productmodel_.Destroy(); + _impl_.name_.Destroy(); + if (this != internal_default_instance()) delete _impl_.filemodel_; } +void Design::ArenaDtor(void* object) { + Design* _this = reinterpret_cast< Design* >(object); + _this->_impl_.netsbyname_.Destruct(); + _this->_impl_.packagesbyname_.Destruct(); + _this->_impl_.componentsbyname_.Destruct(); + _this->_impl_.partsbyname_.Destruct(); +} void Design::SetCachedSize(int size) const { _impl_._cached_size_.Set(size); } void Design::Clear() { -// @@protoc_insertion_point(message_clear_start:Odb.Lib.Protobuf.Design) +// @@protoc_insertion_point(message_clear_start:Odb.Lib.Protobuf.ProductModel.Design) uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; + _impl_.nets_.Clear(); + _impl_.netsbyname_.Clear(); + _impl_.packages_.Clear(); + _impl_.packagesbyname_.Clear(); + _impl_.components_.Clear(); + _impl_.componentsbyname_.Clear(); + _impl_.parts_.Clear(); + _impl_.partsbyname_.Clear(); cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - GOOGLE_DCHECK(_impl_.filearchive_ != nullptr); - _impl_.filearchive_->Clear(); + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _impl_.productmodel_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(_impl_.filemodel_ != nullptr); + _impl_.filemodel_->Clear(); + } } _impl_._has_bits_.Clear(); _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); @@ -181,11 +511,135 @@ const char* Design::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { uint32_t tag; ptr = ::_pbi::ReadTag(ptr, &tag); switch (tag >> 3) { - // optional .Odb.Lib.Protobuf.FileArchive fileArchive = 1; + // optional string productModel = 1; case 1: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { - ptr = ctx->ParseMessage(_internal_mutable_filearchive(), ptr); + auto str = _internal_mutable_productmodel(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "Odb.Lib.Protobuf.ProductModel.Design.productModel")); + } else + goto handle_unusual; + continue; + // optional string name = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "Odb.Lib.Protobuf.ProductModel.Design.name")); + } else + goto handle_unusual; + continue; + // optional .Odb.Lib.Protobuf.FileArchive fileModel = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_filemodel(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .Odb.Lib.Protobuf.ProductModel.Net nets = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_nets(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else + goto handle_unusual; + continue; + // map netsByName = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&_impl_.netsbyname_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .Odb.Lib.Protobuf.ProductModel.Package packages = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_packages(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); + } else + goto handle_unusual; + continue; + // map packagesByName = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&_impl_.packagesbyname_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .Odb.Lib.Protobuf.ProductModel.Component components = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_components(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr)); + } else + goto handle_unusual; + continue; + // map componentsByName = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&_impl_.componentsbyname_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .Odb.Lib.Protobuf.ProductModel.Part parts = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 82)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_parts(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<82>(ptr)); + } else + goto handle_unusual; + continue; + // map partsByName = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 90)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&_impl_.partsbyname_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<90>(ptr)); } else goto handle_unusual; continue; @@ -215,41 +669,277 @@ const char* Design::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { uint8_t* Design::_InternalSerialize( uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { - // @@protoc_insertion_point(serialize_to_array_start:Odb.Lib.Protobuf.Design) + // @@protoc_insertion_point(serialize_to_array_start:Odb.Lib.Protobuf.ProductModel.Design) uint32_t cached_has_bits = 0; (void) cached_has_bits; - // optional .Odb.Lib.Protobuf.FileArchive fileArchive = 1; - if (_internal_has_filearchive()) { + // optional string productModel = 1; + if (_internal_has_productmodel()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_productmodel().data(), static_cast(this->_internal_productmodel().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Odb.Lib.Protobuf.ProductModel.Design.productModel"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_productmodel(), target); + } + + // optional string name = 2; + if (_internal_has_name()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Odb.Lib.Protobuf.ProductModel.Design.name"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_name(), target); + } + + // optional .Odb.Lib.Protobuf.FileArchive fileModel = 3; + if (_internal_has_filemodel()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, _Internal::filemodel(this), + _Internal::filemodel(this).GetCachedSize(), target, stream); + } + + // repeated .Odb.Lib.Protobuf.ProductModel.Net nets = 4; + for (unsigned i = 0, + n = static_cast(this->_internal_nets_size()); i < n; i++) { + const auto& repfield = this->_internal_nets(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream); + } + + // map netsByName = 5; + if (!this->_internal_netsbyname().empty()) { + using MapType = ::_pb::Map; + using WireHelper = Design_NetsByNameEntry_DoNotUse::Funcs; + const auto& map_field = this->_internal_netsbyname(); + auto check_utf8 = [](const MapType::value_type& entry) { + (void)entry; + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + entry.first.data(), static_cast(entry.first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Odb.Lib.Protobuf.ProductModel.Design.NetsByNameEntry.key"); + }; + + if (stream->IsSerializationDeterministic() && map_field.size() > 1) { + for (const auto& entry : ::_pbi::MapSorterPtr(map_field)) { + target = WireHelper::InternalSerialize(5, entry.first, entry.second, target, stream); + check_utf8(entry); + } + } else { + for (const auto& entry : map_field) { + target = WireHelper::InternalSerialize(5, entry.first, entry.second, target, stream); + check_utf8(entry); + } + } + } + + // repeated .Odb.Lib.Protobuf.ProductModel.Package packages = 6; + for (unsigned i = 0, + n = static_cast(this->_internal_packages_size()); i < n; i++) { + const auto& repfield = this->_internal_packages(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(6, repfield, repfield.GetCachedSize(), target, stream); + } + + // map packagesByName = 7; + if (!this->_internal_packagesbyname().empty()) { + using MapType = ::_pb::Map; + using WireHelper = Design_PackagesByNameEntry_DoNotUse::Funcs; + const auto& map_field = this->_internal_packagesbyname(); + auto check_utf8 = [](const MapType::value_type& entry) { + (void)entry; + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + entry.first.data(), static_cast(entry.first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Odb.Lib.Protobuf.ProductModel.Design.PackagesByNameEntry.key"); + }; + + if (stream->IsSerializationDeterministic() && map_field.size() > 1) { + for (const auto& entry : ::_pbi::MapSorterPtr(map_field)) { + target = WireHelper::InternalSerialize(7, entry.first, entry.second, target, stream); + check_utf8(entry); + } + } else { + for (const auto& entry : map_field) { + target = WireHelper::InternalSerialize(7, entry.first, entry.second, target, stream); + check_utf8(entry); + } + } + } + + // repeated .Odb.Lib.Protobuf.ProductModel.Component components = 8; + for (unsigned i = 0, + n = static_cast(this->_internal_components_size()); i < n; i++) { + const auto& repfield = this->_internal_components(i); target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: - InternalWriteMessage(1, _Internal::filearchive(this), - _Internal::filearchive(this).GetCachedSize(), target, stream); + InternalWriteMessage(8, repfield, repfield.GetCachedSize(), target, stream); + } + + // map componentsByName = 9; + if (!this->_internal_componentsbyname().empty()) { + using MapType = ::_pb::Map; + using WireHelper = Design_ComponentsByNameEntry_DoNotUse::Funcs; + const auto& map_field = this->_internal_componentsbyname(); + auto check_utf8 = [](const MapType::value_type& entry) { + (void)entry; + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + entry.first.data(), static_cast(entry.first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Odb.Lib.Protobuf.ProductModel.Design.ComponentsByNameEntry.key"); + }; + + if (stream->IsSerializationDeterministic() && map_field.size() > 1) { + for (const auto& entry : ::_pbi::MapSorterPtr(map_field)) { + target = WireHelper::InternalSerialize(9, entry.first, entry.second, target, stream); + check_utf8(entry); + } + } else { + for (const auto& entry : map_field) { + target = WireHelper::InternalSerialize(9, entry.first, entry.second, target, stream); + check_utf8(entry); + } + } + } + + // repeated .Odb.Lib.Protobuf.ProductModel.Part parts = 10; + for (unsigned i = 0, + n = static_cast(this->_internal_parts_size()); i < n; i++) { + const auto& repfield = this->_internal_parts(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(10, repfield, repfield.GetCachedSize(), target, stream); + } + + // map partsByName = 11; + if (!this->_internal_partsbyname().empty()) { + using MapType = ::_pb::Map; + using WireHelper = Design_PartsByNameEntry_DoNotUse::Funcs; + const auto& map_field = this->_internal_partsbyname(); + auto check_utf8 = [](const MapType::value_type& entry) { + (void)entry; + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + entry.first.data(), static_cast(entry.first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Odb.Lib.Protobuf.ProductModel.Design.PartsByNameEntry.key"); + }; + + if (stream->IsSerializationDeterministic() && map_field.size() > 1) { + for (const auto& entry : ::_pbi::MapSorterPtr(map_field)) { + target = WireHelper::InternalSerialize(11, entry.first, entry.second, target, stream); + check_utf8(entry); + } + } else { + for (const auto& entry : map_field) { + target = WireHelper::InternalSerialize(11, entry.first, entry.second, target, stream); + check_utf8(entry); + } + } } if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); } - // @@protoc_insertion_point(serialize_to_array_end:Odb.Lib.Protobuf.Design) + // @@protoc_insertion_point(serialize_to_array_end:Odb.Lib.Protobuf.ProductModel.Design) return target; } size_t Design::ByteSizeLong() const { -// @@protoc_insertion_point(message_byte_size_start:Odb.Lib.Protobuf.Design) +// @@protoc_insertion_point(message_byte_size_start:Odb.Lib.Protobuf.ProductModel.Design) size_t total_size = 0; uint32_t cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - // optional .Odb.Lib.Protobuf.FileArchive fileArchive = 1; - cached_has_bits = _impl_._has_bits_[0]; - if (cached_has_bits & 0x00000001u) { - total_size += 1 + - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( - *_impl_.filearchive_); + // repeated .Odb.Lib.Protobuf.ProductModel.Net nets = 4; + total_size += 1UL * this->_internal_nets_size(); + for (const auto& msg : this->_impl_.nets_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // map netsByName = 5; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_netsbyname_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Net >::const_iterator + it = this->_internal_netsbyname().begin(); + it != this->_internal_netsbyname().end(); ++it) { + total_size += Design_NetsByNameEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + // repeated .Odb.Lib.Protobuf.ProductModel.Package packages = 6; + total_size += 1UL * this->_internal_packages_size(); + for (const auto& msg : this->_impl_.packages_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // map packagesByName = 7; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_packagesbyname_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Package >::const_iterator + it = this->_internal_packagesbyname().begin(); + it != this->_internal_packagesbyname().end(); ++it) { + total_size += Design_PackagesByNameEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + // repeated .Odb.Lib.Protobuf.ProductModel.Component components = 8; + total_size += 1UL * this->_internal_components_size(); + for (const auto& msg : this->_impl_.components_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } + // map componentsByName = 9; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_componentsbyname_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Component >::const_iterator + it = this->_internal_componentsbyname().begin(); + it != this->_internal_componentsbyname().end(); ++it) { + total_size += Design_ComponentsByNameEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + // repeated .Odb.Lib.Protobuf.ProductModel.Part parts = 10; + total_size += 1UL * this->_internal_parts_size(); + for (const auto& msg : this->_impl_.parts_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // map partsByName = 11; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_partsbyname_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Part >::const_iterator + it = this->_internal_partsbyname().begin(); + it != this->_internal_partsbyname().end(); ++it) { + total_size += Design_PartsByNameEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional string productModel = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_productmodel()); + } + + // optional string name = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // optional .Odb.Lib.Protobuf.FileArchive fileModel = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.filemodel_); + } + + } return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); } @@ -263,20 +953,37 @@ const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Design::GetClassData() const { void Design::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { auto* const _this = static_cast(&to_msg); auto& from = static_cast(from_msg); - // @@protoc_insertion_point(class_specific_merge_from_start:Odb.Lib.Protobuf.Design) + // @@protoc_insertion_point(class_specific_merge_from_start:Odb.Lib.Protobuf.ProductModel.Design) GOOGLE_DCHECK_NE(&from, _this); uint32_t cached_has_bits = 0; (void) cached_has_bits; - if (from._internal_has_filearchive()) { - _this->_internal_mutable_filearchive()->::Odb::Lib::Protobuf::FileArchive::MergeFrom( - from._internal_filearchive()); + _this->_impl_.nets_.MergeFrom(from._impl_.nets_); + _this->_impl_.netsbyname_.MergeFrom(from._impl_.netsbyname_); + _this->_impl_.packages_.MergeFrom(from._impl_.packages_); + _this->_impl_.packagesbyname_.MergeFrom(from._impl_.packagesbyname_); + _this->_impl_.components_.MergeFrom(from._impl_.components_); + _this->_impl_.componentsbyname_.MergeFrom(from._impl_.componentsbyname_); + _this->_impl_.parts_.MergeFrom(from._impl_.parts_); + _this->_impl_.partsbyname_.MergeFrom(from._impl_.partsbyname_); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_productmodel(from._internal_productmodel()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_name(from._internal_name()); + } + if (cached_has_bits & 0x00000004u) { + _this->_internal_mutable_filemodel()->::Odb::Lib::Protobuf::FileArchive::MergeFrom( + from._internal_filemodel()); + } } _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); } void Design::CopyFrom(const Design& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:Odb.Lib.Protobuf.Design) +// @@protoc_insertion_point(class_specific_copy_from_start:Odb.Lib.Protobuf.ProductModel.Design) if (&from == this) return; Clear(); MergeFrom(from); @@ -288,25 +995,60 @@ bool Design::IsInitialized() const { void Design::InternalSwap(Design* other) { using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); _internal_metadata_.InternalSwap(&other->_internal_metadata_); swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); - swap(_impl_.filearchive_, other->_impl_.filearchive_); + _impl_.nets_.InternalSwap(&other->_impl_.nets_); + _impl_.netsbyname_.InternalSwap(&other->_impl_.netsbyname_); + _impl_.packages_.InternalSwap(&other->_impl_.packages_); + _impl_.packagesbyname_.InternalSwap(&other->_impl_.packagesbyname_); + _impl_.components_.InternalSwap(&other->_impl_.components_); + _impl_.componentsbyname_.InternalSwap(&other->_impl_.componentsbyname_); + _impl_.parts_.InternalSwap(&other->_impl_.parts_); + _impl_.partsbyname_.InternalSwap(&other->_impl_.partsbyname_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.productmodel_, lhs_arena, + &other->_impl_.productmodel_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + swap(_impl_.filemodel_, other->_impl_.filemodel_); } ::PROTOBUF_NAMESPACE_ID::Metadata Design::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_design_2eproto_getter, &descriptor_table_design_2eproto_once, - file_level_metadata_design_2eproto[0]); + file_level_metadata_design_2eproto[4]); } // @@protoc_insertion_point(namespace_scope) +} // namespace ProductModel } // namespace Protobuf } // namespace Lib } // namespace Odb PROTOBUF_NAMESPACE_OPEN -template<> PROTOBUF_NOINLINE ::Odb::Lib::Protobuf::Design* -Arena::CreateMaybeMessage< ::Odb::Lib::Protobuf::Design >(Arena* arena) { - return Arena::CreateMessageInternal< ::Odb::Lib::Protobuf::Design >(arena); +template<> PROTOBUF_NOINLINE ::Odb::Lib::Protobuf::ProductModel::Design_NetsByNameEntry_DoNotUse* +Arena::CreateMaybeMessage< ::Odb::Lib::Protobuf::ProductModel::Design_NetsByNameEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::Odb::Lib::Protobuf::ProductModel::Design_NetsByNameEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::Odb::Lib::Protobuf::ProductModel::Design_PackagesByNameEntry_DoNotUse* +Arena::CreateMaybeMessage< ::Odb::Lib::Protobuf::ProductModel::Design_PackagesByNameEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::Odb::Lib::Protobuf::ProductModel::Design_PackagesByNameEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::Odb::Lib::Protobuf::ProductModel::Design_ComponentsByNameEntry_DoNotUse* +Arena::CreateMaybeMessage< ::Odb::Lib::Protobuf::ProductModel::Design_ComponentsByNameEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::Odb::Lib::Protobuf::ProductModel::Design_ComponentsByNameEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::Odb::Lib::Protobuf::ProductModel::Design_PartsByNameEntry_DoNotUse* +Arena::CreateMaybeMessage< ::Odb::Lib::Protobuf::ProductModel::Design_PartsByNameEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::Odb::Lib::Protobuf::ProductModel::Design_PartsByNameEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::Odb::Lib::Protobuf::ProductModel::Design* +Arena::CreateMaybeMessage< ::Odb::Lib::Protobuf::ProductModel::Design >(Arena* arena) { + return Arena::CreateMessageInternal< ::Odb::Lib::Protobuf::ProductModel::Design >(arena); } PROTOBUF_NAMESPACE_CLOSE diff --git a/OdbDesignLib/ProtoBuf/design.pb.h b/OdbDesignLib/ProtoBuf/design.pb.h index 45a1d1e2..880e65fb 100644 --- a/OdbDesignLib/ProtoBuf/design.pb.h +++ b/OdbDesignLib/ProtoBuf/design.pb.h @@ -29,8 +29,15 @@ #include #include // IWYU pragma: export #include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include #include #include "filearchive.pb.h" +#include "net.pb.h" +#include "package.pb.h" +#include "component.pb.h" +#include "part.pb.h" // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_design_2eproto @@ -48,23 +55,146 @@ extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table namespace Odb { namespace Lib { namespace Protobuf { +namespace ProductModel { class Design; struct DesignDefaultTypeInternal; extern DesignDefaultTypeInternal _Design_default_instance_; +class Design_ComponentsByNameEntry_DoNotUse; +struct Design_ComponentsByNameEntry_DoNotUseDefaultTypeInternal; +extern Design_ComponentsByNameEntry_DoNotUseDefaultTypeInternal _Design_ComponentsByNameEntry_DoNotUse_default_instance_; +class Design_NetsByNameEntry_DoNotUse; +struct Design_NetsByNameEntry_DoNotUseDefaultTypeInternal; +extern Design_NetsByNameEntry_DoNotUseDefaultTypeInternal _Design_NetsByNameEntry_DoNotUse_default_instance_; +class Design_PackagesByNameEntry_DoNotUse; +struct Design_PackagesByNameEntry_DoNotUseDefaultTypeInternal; +extern Design_PackagesByNameEntry_DoNotUseDefaultTypeInternal _Design_PackagesByNameEntry_DoNotUse_default_instance_; +class Design_PartsByNameEntry_DoNotUse; +struct Design_PartsByNameEntry_DoNotUseDefaultTypeInternal; +extern Design_PartsByNameEntry_DoNotUseDefaultTypeInternal _Design_PartsByNameEntry_DoNotUse_default_instance_; +} // namespace ProductModel } // namespace Protobuf } // namespace Lib } // namespace Odb PROTOBUF_NAMESPACE_OPEN -template<> ::Odb::Lib::Protobuf::Design* Arena::CreateMaybeMessage<::Odb::Lib::Protobuf::Design>(Arena*); +template<> ::Odb::Lib::Protobuf::ProductModel::Design* Arena::CreateMaybeMessage<::Odb::Lib::Protobuf::ProductModel::Design>(Arena*); +template<> ::Odb::Lib::Protobuf::ProductModel::Design_ComponentsByNameEntry_DoNotUse* Arena::CreateMaybeMessage<::Odb::Lib::Protobuf::ProductModel::Design_ComponentsByNameEntry_DoNotUse>(Arena*); +template<> ::Odb::Lib::Protobuf::ProductModel::Design_NetsByNameEntry_DoNotUse* Arena::CreateMaybeMessage<::Odb::Lib::Protobuf::ProductModel::Design_NetsByNameEntry_DoNotUse>(Arena*); +template<> ::Odb::Lib::Protobuf::ProductModel::Design_PackagesByNameEntry_DoNotUse* Arena::CreateMaybeMessage<::Odb::Lib::Protobuf::ProductModel::Design_PackagesByNameEntry_DoNotUse>(Arena*); +template<> ::Odb::Lib::Protobuf::ProductModel::Design_PartsByNameEntry_DoNotUse* Arena::CreateMaybeMessage<::Odb::Lib::Protobuf::ProductModel::Design_PartsByNameEntry_DoNotUse>(Arena*); PROTOBUF_NAMESPACE_CLOSE namespace Odb { namespace Lib { namespace Protobuf { +namespace ProductModel { // =================================================================== +class Design_NetsByNameEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + Design_NetsByNameEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR Design_NetsByNameEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit Design_NetsByNameEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const Design_NetsByNameEntry_DoNotUse& other); + static const Design_NetsByNameEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_Design_NetsByNameEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "Odb.Lib.Protobuf.ProductModel.Design.NetsByNameEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_design_2eproto; +}; + +// ------------------------------------------------------------------- + +class Design_PackagesByNameEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + Design_PackagesByNameEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR Design_PackagesByNameEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit Design_PackagesByNameEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const Design_PackagesByNameEntry_DoNotUse& other); + static const Design_PackagesByNameEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_Design_PackagesByNameEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "Odb.Lib.Protobuf.ProductModel.Design.PackagesByNameEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_design_2eproto; +}; + +// ------------------------------------------------------------------- + +class Design_ComponentsByNameEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + Design_ComponentsByNameEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR Design_ComponentsByNameEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit Design_ComponentsByNameEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const Design_ComponentsByNameEntry_DoNotUse& other); + static const Design_ComponentsByNameEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_Design_ComponentsByNameEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "Odb.Lib.Protobuf.ProductModel.Design.ComponentsByNameEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_design_2eproto; +}; + +// ------------------------------------------------------------------- + +class Design_PartsByNameEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + Design_PartsByNameEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR Design_PartsByNameEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit Design_PartsByNameEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const Design_PartsByNameEntry_DoNotUse& other); + static const Design_PartsByNameEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_Design_PartsByNameEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "Odb.Lib.Protobuf.ProductModel.Design.PartsByNameEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_design_2eproto; +}; + +// ------------------------------------------------------------------- + class Design final : - public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Odb.Lib.Protobuf.Design) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Odb.Lib.Protobuf.ProductModel.Design) */ { public: inline Design() : Design(nullptr) {} ~Design() override; @@ -111,7 +241,7 @@ class Design final : &_Design_default_instance_); } static constexpr int kIndexInFileMessages = - 0; + 4; friend void swap(Design& a, Design& b) { a.Swap(&b); @@ -167,11 +297,13 @@ class Design final : private: friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { - return "Odb.Lib.Protobuf.Design"; + return "Odb.Lib.Protobuf.ProductModel.Design"; } protected: explicit Design(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned = false); + private: + static void ArenaDtor(void* object); public: static const ClassData _class_data_; @@ -181,30 +313,217 @@ class Design final : // nested types ---------------------------------------------------- + // accessors ------------------------------------------------------- enum : int { - kFileArchiveFieldNumber = 1, + kNetsFieldNumber = 4, + kNetsByNameFieldNumber = 5, + kPackagesFieldNumber = 6, + kPackagesByNameFieldNumber = 7, + kComponentsFieldNumber = 8, + kComponentsByNameFieldNumber = 9, + kPartsFieldNumber = 10, + kPartsByNameFieldNumber = 11, + kProductModelFieldNumber = 1, + kNameFieldNumber = 2, + kFileModelFieldNumber = 3, }; - // optional .Odb.Lib.Protobuf.FileArchive fileArchive = 1; - bool has_filearchive() const; + // repeated .Odb.Lib.Protobuf.ProductModel.Net nets = 4; + int nets_size() const; + private: + int _internal_nets_size() const; + public: + void clear_nets(); + ::Odb::Lib::Protobuf::ProductModel::Net* mutable_nets(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Net >* + mutable_nets(); + private: + const ::Odb::Lib::Protobuf::ProductModel::Net& _internal_nets(int index) const; + ::Odb::Lib::Protobuf::ProductModel::Net* _internal_add_nets(); + public: + const ::Odb::Lib::Protobuf::ProductModel::Net& nets(int index) const; + ::Odb::Lib::Protobuf::ProductModel::Net* add_nets(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Net >& + nets() const; + + // map netsByName = 5; + int netsbyname_size() const; + private: + int _internal_netsbyname_size() const; + public: + void clear_netsbyname(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Net >& + _internal_netsbyname() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Net >* + _internal_mutable_netsbyname(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Net >& + netsbyname() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Net >* + mutable_netsbyname(); + + // repeated .Odb.Lib.Protobuf.ProductModel.Package packages = 6; + int packages_size() const; + private: + int _internal_packages_size() const; + public: + void clear_packages(); + ::Odb::Lib::Protobuf::ProductModel::Package* mutable_packages(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Package >* + mutable_packages(); + private: + const ::Odb::Lib::Protobuf::ProductModel::Package& _internal_packages(int index) const; + ::Odb::Lib::Protobuf::ProductModel::Package* _internal_add_packages(); + public: + const ::Odb::Lib::Protobuf::ProductModel::Package& packages(int index) const; + ::Odb::Lib::Protobuf::ProductModel::Package* add_packages(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Package >& + packages() const; + + // map packagesByName = 7; + int packagesbyname_size() const; + private: + int _internal_packagesbyname_size() const; + public: + void clear_packagesbyname(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Package >& + _internal_packagesbyname() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Package >* + _internal_mutable_packagesbyname(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Package >& + packagesbyname() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Package >* + mutable_packagesbyname(); + + // repeated .Odb.Lib.Protobuf.ProductModel.Component components = 8; + int components_size() const; + private: + int _internal_components_size() const; + public: + void clear_components(); + ::Odb::Lib::Protobuf::ProductModel::Component* mutable_components(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Component >* + mutable_components(); + private: + const ::Odb::Lib::Protobuf::ProductModel::Component& _internal_components(int index) const; + ::Odb::Lib::Protobuf::ProductModel::Component* _internal_add_components(); + public: + const ::Odb::Lib::Protobuf::ProductModel::Component& components(int index) const; + ::Odb::Lib::Protobuf::ProductModel::Component* add_components(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Component >& + components() const; + + // map componentsByName = 9; + int componentsbyname_size() const; private: - bool _internal_has_filearchive() const; + int _internal_componentsbyname_size() const; public: - void clear_filearchive(); - const ::Odb::Lib::Protobuf::FileArchive& filearchive() const; - PROTOBUF_NODISCARD ::Odb::Lib::Protobuf::FileArchive* release_filearchive(); - ::Odb::Lib::Protobuf::FileArchive* mutable_filearchive(); - void set_allocated_filearchive(::Odb::Lib::Protobuf::FileArchive* filearchive); + void clear_componentsbyname(); private: - const ::Odb::Lib::Protobuf::FileArchive& _internal_filearchive() const; - ::Odb::Lib::Protobuf::FileArchive* _internal_mutable_filearchive(); + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Component >& + _internal_componentsbyname() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Component >* + _internal_mutable_componentsbyname(); public: - void unsafe_arena_set_allocated_filearchive( - ::Odb::Lib::Protobuf::FileArchive* filearchive); - ::Odb::Lib::Protobuf::FileArchive* unsafe_arena_release_filearchive(); + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Component >& + componentsbyname() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Component >* + mutable_componentsbyname(); - // @@protoc_insertion_point(class_scope:Odb.Lib.Protobuf.Design) + // repeated .Odb.Lib.Protobuf.ProductModel.Part parts = 10; + int parts_size() const; + private: + int _internal_parts_size() const; + public: + void clear_parts(); + ::Odb::Lib::Protobuf::ProductModel::Part* mutable_parts(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Part >* + mutable_parts(); + private: + const ::Odb::Lib::Protobuf::ProductModel::Part& _internal_parts(int index) const; + ::Odb::Lib::Protobuf::ProductModel::Part* _internal_add_parts(); + public: + const ::Odb::Lib::Protobuf::ProductModel::Part& parts(int index) const; + ::Odb::Lib::Protobuf::ProductModel::Part* add_parts(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Part >& + parts() const; + + // map partsByName = 11; + int partsbyname_size() const; + private: + int _internal_partsbyname_size() const; + public: + void clear_partsbyname(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Part >& + _internal_partsbyname() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Part >* + _internal_mutable_partsbyname(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Part >& + partsbyname() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Part >* + mutable_partsbyname(); + + // optional string productModel = 1; + bool has_productmodel() const; + private: + bool _internal_has_productmodel() const; + public: + void clear_productmodel(); + const std::string& productmodel() const; + template + void set_productmodel(ArgT0&& arg0, ArgT... args); + std::string* mutable_productmodel(); + PROTOBUF_NODISCARD std::string* release_productmodel(); + void set_allocated_productmodel(std::string* productmodel); + private: + const std::string& _internal_productmodel() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_productmodel(const std::string& value); + std::string* _internal_mutable_productmodel(); + public: + + // optional string name = 2; + bool has_name() const; + private: + bool _internal_has_name() const; + public: + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + 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 .Odb.Lib.Protobuf.FileArchive fileModel = 3; + bool has_filemodel() const; + private: + bool _internal_has_filemodel() const; + public: + void clear_filemodel(); + const ::Odb::Lib::Protobuf::FileArchive& filemodel() const; + PROTOBUF_NODISCARD ::Odb::Lib::Protobuf::FileArchive* release_filemodel(); + ::Odb::Lib::Protobuf::FileArchive* mutable_filemodel(); + void set_allocated_filemodel(::Odb::Lib::Protobuf::FileArchive* filemodel); + private: + const ::Odb::Lib::Protobuf::FileArchive& _internal_filemodel() const; + ::Odb::Lib::Protobuf::FileArchive* _internal_mutable_filemodel(); + public: + void unsafe_arena_set_allocated_filemodel( + ::Odb::Lib::Protobuf::FileArchive* filemodel); + ::Odb::Lib::Protobuf::FileArchive* unsafe_arena_release_filemodel(); + + // @@protoc_insertion_point(class_scope:Odb.Lib.Protobuf.ProductModel.Design) private: class _Internal; @@ -214,7 +533,33 @@ class Design final : struct Impl_ { ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - ::Odb::Lib::Protobuf::FileArchive* filearchive_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Net > nets_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + Design_NetsByNameEntry_DoNotUse, + std::string, ::Odb::Lib::Protobuf::ProductModel::Net, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> netsbyname_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Package > packages_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + Design_PackagesByNameEntry_DoNotUse, + std::string, ::Odb::Lib::Protobuf::ProductModel::Package, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> packagesbyname_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Component > components_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + Design_ComponentsByNameEntry_DoNotUse, + std::string, ::Odb::Lib::Protobuf::ProductModel::Component, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> componentsbyname_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Part > parts_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + Design_PartsByNameEntry_DoNotUse, + std::string, ::Odb::Lib::Protobuf::ProductModel::Part, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> partsbyname_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr productmodel_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::Odb::Lib::Protobuf::FileArchive* filemodel_; }; union { Impl_ _impl_; }; friend struct ::TableStruct_design_2eproto; @@ -228,43 +573,187 @@ class Design final : #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + // Design -// optional .Odb.Lib.Protobuf.FileArchive fileArchive = 1; -inline bool Design::_internal_has_filearchive() const { +// optional string productModel = 1; +inline bool Design::_internal_has_productmodel() const { bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; - PROTOBUF_ASSUME(!value || _impl_.filearchive_ != nullptr); return value; } -inline bool Design::has_filearchive() const { - return _internal_has_filearchive(); +inline bool Design::has_productmodel() const { + return _internal_has_productmodel(); +} +inline void Design::clear_productmodel() { + _impl_.productmodel_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Design::productmodel() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Design.productModel) + return _internal_productmodel(); } -inline const ::Odb::Lib::Protobuf::FileArchive& Design::_internal_filearchive() const { - const ::Odb::Lib::Protobuf::FileArchive* p = _impl_.filearchive_; +template +inline PROTOBUF_ALWAYS_INLINE +void Design::set_productmodel(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.productmodel_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:Odb.Lib.Protobuf.ProductModel.Design.productModel) +} +inline std::string* Design::mutable_productmodel() { + std::string* _s = _internal_mutable_productmodel(); + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.Design.productModel) + return _s; +} +inline const std::string& Design::_internal_productmodel() const { + return _impl_.productmodel_.Get(); +} +inline void Design::_internal_set_productmodel(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.productmodel_.Set(value, GetArenaForAllocation()); +} +inline std::string* Design::_internal_mutable_productmodel() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.productmodel_.Mutable(GetArenaForAllocation()); +} +inline std::string* Design::release_productmodel() { + // @@protoc_insertion_point(field_release:Odb.Lib.Protobuf.ProductModel.Design.productModel) + if (!_internal_has_productmodel()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.productmodel_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.productmodel_.IsDefault()) { + _impl_.productmodel_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Design::set_allocated_productmodel(std::string* productmodel) { + if (productmodel != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.productmodel_.SetAllocated(productmodel, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.productmodel_.IsDefault()) { + _impl_.productmodel_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:Odb.Lib.Protobuf.ProductModel.Design.productModel) +} + +// optional string name = 2; +inline bool Design::_internal_has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Design::has_name() const { + return _internal_has_name(); +} +inline void Design::clear_name() { + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& Design::name() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Design.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Design::set_name(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:Odb.Lib.Protobuf.ProductModel.Design.name) +} +inline std::string* Design::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.Design.name) + return _s; +} +inline const std::string& Design::_internal_name() const { + return _impl_.name_.Get(); +} +inline void Design::_internal_set_name(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* Design::_internal_mutable_name() { + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* Design::release_name() { + // @@protoc_insertion_point(field_release:Odb.Lib.Protobuf.ProductModel.Design.name) + if (!_internal_has_name()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* p = _impl_.name_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Design::set_allocated_name(std::string* name) { + if (name != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:Odb.Lib.Protobuf.ProductModel.Design.name) +} + +// optional .Odb.Lib.Protobuf.FileArchive fileModel = 3; +inline bool Design::_internal_has_filemodel() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || _impl_.filemodel_ != nullptr); + return value; +} +inline bool Design::has_filemodel() const { + return _internal_has_filemodel(); +} +inline const ::Odb::Lib::Protobuf::FileArchive& Design::_internal_filemodel() const { + const ::Odb::Lib::Protobuf::FileArchive* p = _impl_.filemodel_; return p != nullptr ? *p : reinterpret_cast( ::Odb::Lib::Protobuf::_FileArchive_default_instance_); } -inline const ::Odb::Lib::Protobuf::FileArchive& Design::filearchive() const { - // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.Design.fileArchive) - return _internal_filearchive(); +inline const ::Odb::Lib::Protobuf::FileArchive& Design::filemodel() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Design.fileModel) + return _internal_filemodel(); } -inline void Design::unsafe_arena_set_allocated_filearchive( - ::Odb::Lib::Protobuf::FileArchive* filearchive) { +inline void Design::unsafe_arena_set_allocated_filemodel( + ::Odb::Lib::Protobuf::FileArchive* filemodel) { if (GetArenaForAllocation() == nullptr) { - delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.filearchive_); + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.filemodel_); } - _impl_.filearchive_ = filearchive; - if (filearchive) { - _impl_._has_bits_[0] |= 0x00000001u; + _impl_.filemodel_ = filemodel; + if (filemodel) { + _impl_._has_bits_[0] |= 0x00000004u; } else { - _impl_._has_bits_[0] &= ~0x00000001u; + _impl_._has_bits_[0] &= ~0x00000004u; } - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Odb.Lib.Protobuf.Design.fileArchive) + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Odb.Lib.Protobuf.ProductModel.Design.fileModel) } -inline ::Odb::Lib::Protobuf::FileArchive* Design::release_filearchive() { - _impl_._has_bits_[0] &= ~0x00000001u; - ::Odb::Lib::Protobuf::FileArchive* temp = _impl_.filearchive_; - _impl_.filearchive_ = nullptr; +inline ::Odb::Lib::Protobuf::FileArchive* Design::release_filemodel() { + _impl_._has_bits_[0] &= ~0x00000004u; + ::Odb::Lib::Protobuf::FileArchive* temp = _impl_.filemodel_; + _impl_.filemodel_ = nullptr; #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); @@ -276,53 +765,314 @@ inline ::Odb::Lib::Protobuf::FileArchive* Design::release_filearchive() { #endif // !PROTOBUF_FORCE_COPY_IN_RELEASE return temp; } -inline ::Odb::Lib::Protobuf::FileArchive* Design::unsafe_arena_release_filearchive() { - // @@protoc_insertion_point(field_release:Odb.Lib.Protobuf.Design.fileArchive) - _impl_._has_bits_[0] &= ~0x00000001u; - ::Odb::Lib::Protobuf::FileArchive* temp = _impl_.filearchive_; - _impl_.filearchive_ = nullptr; +inline ::Odb::Lib::Protobuf::FileArchive* Design::unsafe_arena_release_filemodel() { + // @@protoc_insertion_point(field_release:Odb.Lib.Protobuf.ProductModel.Design.fileModel) + _impl_._has_bits_[0] &= ~0x00000004u; + ::Odb::Lib::Protobuf::FileArchive* temp = _impl_.filemodel_; + _impl_.filemodel_ = nullptr; return temp; } -inline ::Odb::Lib::Protobuf::FileArchive* Design::_internal_mutable_filearchive() { - _impl_._has_bits_[0] |= 0x00000001u; - if (_impl_.filearchive_ == nullptr) { +inline ::Odb::Lib::Protobuf::FileArchive* Design::_internal_mutable_filemodel() { + _impl_._has_bits_[0] |= 0x00000004u; + if (_impl_.filemodel_ == nullptr) { auto* p = CreateMaybeMessage<::Odb::Lib::Protobuf::FileArchive>(GetArenaForAllocation()); - _impl_.filearchive_ = p; + _impl_.filemodel_ = p; } - return _impl_.filearchive_; + return _impl_.filemodel_; } -inline ::Odb::Lib::Protobuf::FileArchive* Design::mutable_filearchive() { - ::Odb::Lib::Protobuf::FileArchive* _msg = _internal_mutable_filearchive(); - // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.Design.fileArchive) +inline ::Odb::Lib::Protobuf::FileArchive* Design::mutable_filemodel() { + ::Odb::Lib::Protobuf::FileArchive* _msg = _internal_mutable_filemodel(); + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.Design.fileModel) return _msg; } -inline void Design::set_allocated_filearchive(::Odb::Lib::Protobuf::FileArchive* filearchive) { +inline void Design::set_allocated_filemodel(::Odb::Lib::Protobuf::FileArchive* filemodel) { ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); if (message_arena == nullptr) { - delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.filearchive_); + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.filemodel_); } - if (filearchive) { + if (filemodel) { ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( - reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(filearchive)); + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(filemodel)); if (message_arena != submessage_arena) { - filearchive = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( - message_arena, filearchive, submessage_arena); + filemodel = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, filemodel, submessage_arena); } - _impl_._has_bits_[0] |= 0x00000001u; + _impl_._has_bits_[0] |= 0x00000004u; } else { - _impl_._has_bits_[0] &= ~0x00000001u; + _impl_._has_bits_[0] &= ~0x00000004u; } - _impl_.filearchive_ = filearchive; - // @@protoc_insertion_point(field_set_allocated:Odb.Lib.Protobuf.Design.fileArchive) + _impl_.filemodel_ = filemodel; + // @@protoc_insertion_point(field_set_allocated:Odb.Lib.Protobuf.ProductModel.Design.fileModel) +} + +// repeated .Odb.Lib.Protobuf.ProductModel.Net nets = 4; +inline int Design::_internal_nets_size() const { + return _impl_.nets_.size(); +} +inline int Design::nets_size() const { + return _internal_nets_size(); +} +inline ::Odb::Lib::Protobuf::ProductModel::Net* Design::mutable_nets(int index) { + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.Design.nets) + return _impl_.nets_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Net >* +Design::mutable_nets() { + // @@protoc_insertion_point(field_mutable_list:Odb.Lib.Protobuf.ProductModel.Design.nets) + return &_impl_.nets_; +} +inline const ::Odb::Lib::Protobuf::ProductModel::Net& Design::_internal_nets(int index) const { + return _impl_.nets_.Get(index); +} +inline const ::Odb::Lib::Protobuf::ProductModel::Net& Design::nets(int index) const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Design.nets) + return _internal_nets(index); +} +inline ::Odb::Lib::Protobuf::ProductModel::Net* Design::_internal_add_nets() { + return _impl_.nets_.Add(); +} +inline ::Odb::Lib::Protobuf::ProductModel::Net* Design::add_nets() { + ::Odb::Lib::Protobuf::ProductModel::Net* _add = _internal_add_nets(); + // @@protoc_insertion_point(field_add:Odb.Lib.Protobuf.ProductModel.Design.nets) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Net >& +Design::nets() const { + // @@protoc_insertion_point(field_list:Odb.Lib.Protobuf.ProductModel.Design.nets) + return _impl_.nets_; +} + +// map netsByName = 5; +inline int Design::_internal_netsbyname_size() const { + return _impl_.netsbyname_.size(); +} +inline int Design::netsbyname_size() const { + return _internal_netsbyname_size(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Net >& +Design::_internal_netsbyname() const { + return _impl_.netsbyname_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Net >& +Design::netsbyname() const { + // @@protoc_insertion_point(field_map:Odb.Lib.Protobuf.ProductModel.Design.netsByName) + return _internal_netsbyname(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Net >* +Design::_internal_mutable_netsbyname() { + return _impl_.netsbyname_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Net >* +Design::mutable_netsbyname() { + // @@protoc_insertion_point(field_mutable_map:Odb.Lib.Protobuf.ProductModel.Design.netsByName) + return _internal_mutable_netsbyname(); +} + +// repeated .Odb.Lib.Protobuf.ProductModel.Package packages = 6; +inline int Design::_internal_packages_size() const { + return _impl_.packages_.size(); +} +inline int Design::packages_size() const { + return _internal_packages_size(); +} +inline ::Odb::Lib::Protobuf::ProductModel::Package* Design::mutable_packages(int index) { + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.Design.packages) + return _impl_.packages_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Package >* +Design::mutable_packages() { + // @@protoc_insertion_point(field_mutable_list:Odb.Lib.Protobuf.ProductModel.Design.packages) + return &_impl_.packages_; +} +inline const ::Odb::Lib::Protobuf::ProductModel::Package& Design::_internal_packages(int index) const { + return _impl_.packages_.Get(index); +} +inline const ::Odb::Lib::Protobuf::ProductModel::Package& Design::packages(int index) const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Design.packages) + return _internal_packages(index); +} +inline ::Odb::Lib::Protobuf::ProductModel::Package* Design::_internal_add_packages() { + return _impl_.packages_.Add(); +} +inline ::Odb::Lib::Protobuf::ProductModel::Package* Design::add_packages() { + ::Odb::Lib::Protobuf::ProductModel::Package* _add = _internal_add_packages(); + // @@protoc_insertion_point(field_add:Odb.Lib.Protobuf.ProductModel.Design.packages) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Package >& +Design::packages() const { + // @@protoc_insertion_point(field_list:Odb.Lib.Protobuf.ProductModel.Design.packages) + return _impl_.packages_; +} + +// map packagesByName = 7; +inline int Design::_internal_packagesbyname_size() const { + return _impl_.packagesbyname_.size(); +} +inline int Design::packagesbyname_size() const { + return _internal_packagesbyname_size(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Package >& +Design::_internal_packagesbyname() const { + return _impl_.packagesbyname_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Package >& +Design::packagesbyname() const { + // @@protoc_insertion_point(field_map:Odb.Lib.Protobuf.ProductModel.Design.packagesByName) + return _internal_packagesbyname(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Package >* +Design::_internal_mutable_packagesbyname() { + return _impl_.packagesbyname_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Package >* +Design::mutable_packagesbyname() { + // @@protoc_insertion_point(field_mutable_map:Odb.Lib.Protobuf.ProductModel.Design.packagesByName) + return _internal_mutable_packagesbyname(); +} + +// repeated .Odb.Lib.Protobuf.ProductModel.Component components = 8; +inline int Design::_internal_components_size() const { + return _impl_.components_.size(); +} +inline int Design::components_size() const { + return _internal_components_size(); +} +inline ::Odb::Lib::Protobuf::ProductModel::Component* Design::mutable_components(int index) { + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.Design.components) + return _impl_.components_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Component >* +Design::mutable_components() { + // @@protoc_insertion_point(field_mutable_list:Odb.Lib.Protobuf.ProductModel.Design.components) + return &_impl_.components_; +} +inline const ::Odb::Lib::Protobuf::ProductModel::Component& Design::_internal_components(int index) const { + return _impl_.components_.Get(index); +} +inline const ::Odb::Lib::Protobuf::ProductModel::Component& Design::components(int index) const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Design.components) + return _internal_components(index); +} +inline ::Odb::Lib::Protobuf::ProductModel::Component* Design::_internal_add_components() { + return _impl_.components_.Add(); +} +inline ::Odb::Lib::Protobuf::ProductModel::Component* Design::add_components() { + ::Odb::Lib::Protobuf::ProductModel::Component* _add = _internal_add_components(); + // @@protoc_insertion_point(field_add:Odb.Lib.Protobuf.ProductModel.Design.components) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Component >& +Design::components() const { + // @@protoc_insertion_point(field_list:Odb.Lib.Protobuf.ProductModel.Design.components) + return _impl_.components_; +} + +// map componentsByName = 9; +inline int Design::_internal_componentsbyname_size() const { + return _impl_.componentsbyname_.size(); +} +inline int Design::componentsbyname_size() const { + return _internal_componentsbyname_size(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Component >& +Design::_internal_componentsbyname() const { + return _impl_.componentsbyname_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Component >& +Design::componentsbyname() const { + // @@protoc_insertion_point(field_map:Odb.Lib.Protobuf.ProductModel.Design.componentsByName) + return _internal_componentsbyname(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Component >* +Design::_internal_mutable_componentsbyname() { + return _impl_.componentsbyname_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Component >* +Design::mutable_componentsbyname() { + // @@protoc_insertion_point(field_mutable_map:Odb.Lib.Protobuf.ProductModel.Design.componentsByName) + return _internal_mutable_componentsbyname(); +} + +// repeated .Odb.Lib.Protobuf.ProductModel.Part parts = 10; +inline int Design::_internal_parts_size() const { + return _impl_.parts_.size(); +} +inline int Design::parts_size() const { + return _internal_parts_size(); +} +inline ::Odb::Lib::Protobuf::ProductModel::Part* Design::mutable_parts(int index) { + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.Design.parts) + return _impl_.parts_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Part >* +Design::mutable_parts() { + // @@protoc_insertion_point(field_mutable_list:Odb.Lib.Protobuf.ProductModel.Design.parts) + return &_impl_.parts_; +} +inline const ::Odb::Lib::Protobuf::ProductModel::Part& Design::_internal_parts(int index) const { + return _impl_.parts_.Get(index); +} +inline const ::Odb::Lib::Protobuf::ProductModel::Part& Design::parts(int index) const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Design.parts) + return _internal_parts(index); +} +inline ::Odb::Lib::Protobuf::ProductModel::Part* Design::_internal_add_parts() { + return _impl_.parts_.Add(); +} +inline ::Odb::Lib::Protobuf::ProductModel::Part* Design::add_parts() { + ::Odb::Lib::Protobuf::ProductModel::Part* _add = _internal_add_parts(); + // @@protoc_insertion_point(field_add:Odb.Lib.Protobuf.ProductModel.Design.parts) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Part >& +Design::parts() const { + // @@protoc_insertion_point(field_list:Odb.Lib.Protobuf.ProductModel.Design.parts) + return _impl_.parts_; +} + +// map partsByName = 11; +inline int Design::_internal_partsbyname_size() const { + return _impl_.partsbyname_.size(); +} +inline int Design::partsbyname_size() const { + return _internal_partsbyname_size(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Part >& +Design::_internal_partsbyname() const { + return _impl_.partsbyname_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Part >& +Design::partsbyname() const { + // @@protoc_insertion_point(field_map:Odb.Lib.Protobuf.ProductModel.Design.partsByName) + return _internal_partsbyname(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Part >* +Design::_internal_mutable_partsbyname() { + return _impl_.partsbyname_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Part >* +Design::mutable_partsbyname() { + // @@protoc_insertion_point(field_mutable_map:Odb.Lib.Protobuf.ProductModel.Design.partsByName) + return _internal_mutable_partsbyname(); } #ifdef __GNUC__ #pragma GCC diagnostic pop #endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) +} // namespace ProductModel } // namespace Protobuf } // namespace Lib } // namespace Odb diff --git a/OdbDesignLib/ProtoBuf/net.pb.cc b/OdbDesignLib/ProtoBuf/net.pb.cc new file mode 100644 index 00000000..afbf4a1d --- /dev/null +++ b/OdbDesignLib/ProtoBuf/net.pb.cc @@ -0,0 +1,408 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: net.proto + +#include "net.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { +PROTOBUF_CONSTEXPR Net::Net( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.pinconnections_)*/{} + , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.index_)*/0u} {} +struct NetDefaultTypeInternal { + PROTOBUF_CONSTEXPR NetDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~NetDefaultTypeInternal() {} + union { + Net _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NetDefaultTypeInternal _Net_default_instance_; +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +static ::_pb::Metadata file_level_metadata_net_2eproto[1]; +static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_net_2eproto = nullptr; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_net_2eproto = nullptr; + +const uint32_t TableStruct_net_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Net, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Net, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Net, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Net, _impl_.pinconnections_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Net, _impl_.index_), + 0, + ~0u, + 1, +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 9, -1, sizeof(::Odb::Lib::Protobuf::ProductModel::Net)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::Odb::Lib::Protobuf::ProductModel::_Net_default_instance_._instance, +}; + +const char descriptor_table_protodef_net_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\tnet.proto\022\035Odb.Lib.Protobuf.ProductMod" + "el\032\023pinconnection.proto\"\205\001\n\003Net\022\021\n\004name\030" + "\001 \001(\tH\000\210\001\001\022D\n\016pinConnections\030\002 \003(\0132,.Odb" + ".Lib.Protobuf.ProductModel.PinConnection" + "\022\022\n\005index\030\003 \001(\rH\001\210\001\001B\007\n\005_nameB\010\n\006_indexb" + "\006proto3" + ; +static const ::_pbi::DescriptorTable* const descriptor_table_net_2eproto_deps[1] = { + &::descriptor_table_pinconnection_2eproto, +}; +static ::_pbi::once_flag descriptor_table_net_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_net_2eproto = { + false, false, 207, descriptor_table_protodef_net_2eproto, + "net.proto", + &descriptor_table_net_2eproto_once, descriptor_table_net_2eproto_deps, 1, 1, + schemas, file_default_instances, TableStruct_net_2eproto::offsets, + file_level_metadata_net_2eproto, file_level_enum_descriptors_net_2eproto, + file_level_service_descriptors_net_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_net_2eproto_getter() { + return &descriptor_table_net_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_net_2eproto(&descriptor_table_net_2eproto); +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { + +// =================================================================== + +class Net::_Internal { + public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static void set_has_name(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_index(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +void Net::clear_pinconnections() { + _impl_.pinconnections_.Clear(); +} +Net::Net(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:Odb.Lib.Protobuf.ProductModel.Net) +} +Net::Net(const Net& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + Net* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.pinconnections_){from._impl_.pinconnections_} + , decltype(_impl_.name_){} + , decltype(_impl_.index_){}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_name()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + _this->_impl_.index_ = from._impl_.index_; + // @@protoc_insertion_point(copy_constructor:Odb.Lib.Protobuf.ProductModel.Net) +} + +inline void Net::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.pinconnections_){arena} + , decltype(_impl_.name_){} + , decltype(_impl_.index_){0u} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Net::~Net() { + // @@protoc_insertion_point(destructor:Odb.Lib.Protobuf.ProductModel.Net) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Net::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.pinconnections_.~RepeatedPtrField(); + _impl_.name_.Destroy(); +} + +void Net::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Net::Clear() { +// @@protoc_insertion_point(message_clear_start:Odb.Lib.Protobuf.ProductModel.Net) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.pinconnections_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + _impl_.index_ = 0u; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Net::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "Odb.Lib.Protobuf.ProductModel.Net.name")); + } else + goto handle_unusual; + continue; + // repeated .Odb.Lib.Protobuf.ProductModel.PinConnection pinConnections = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_pinconnections(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else + goto handle_unusual; + continue; + // optional uint32 index = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_index(&has_bits); + _impl_.index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Net::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Odb.Lib.Protobuf.ProductModel.Net) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // optional string name = 1; + if (_internal_has_name()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Odb.Lib.Protobuf.ProductModel.Net.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + // repeated .Odb.Lib.Protobuf.ProductModel.PinConnection pinConnections = 2; + for (unsigned i = 0, + n = static_cast(this->_internal_pinconnections_size()); i < n; i++) { + const auto& repfield = this->_internal_pinconnections(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); + } + + // optional uint32 index = 3; + if (_internal_has_index()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_index(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Odb.Lib.Protobuf.ProductModel.Net) + return target; +} + +size_t Net::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Odb.Lib.Protobuf.ProductModel.Net) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .Odb.Lib.Protobuf.ProductModel.PinConnection pinConnections = 2; + total_size += 1UL * this->_internal_pinconnections_size(); + for (const auto& msg : this->_impl_.pinconnections_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // optional uint32 index = 3; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_index()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Net::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + Net::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Net::GetClassData() const { return &_class_data_; } + + +void Net::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:Odb.Lib.Protobuf.ProductModel.Net) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.pinconnections_.MergeFrom(from._impl_.pinconnections_); + 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->_impl_.index_ = from._impl_.index_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Net::CopyFrom(const Net& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Odb.Lib.Protobuf.ProductModel.Net) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Net::IsInitialized() const { + return true; +} + +void Net::InternalSwap(Net* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.pinconnections_.InternalSwap(&other->_impl_.pinconnections_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + swap(_impl_.index_, other->_impl_.index_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Net::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_net_2eproto_getter, &descriptor_table_net_2eproto_once, + file_level_metadata_net_2eproto[0]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::Odb::Lib::Protobuf::ProductModel::Net* +Arena::CreateMaybeMessage< ::Odb::Lib::Protobuf::ProductModel::Net >(Arena* arena) { + return Arena::CreateMessageInternal< ::Odb::Lib::Protobuf::ProductModel::Net >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/OdbDesignLib/ProtoBuf/net.pb.h b/OdbDesignLib/ProtoBuf/net.pb.h new file mode 100644 index 00000000..8ba9aa45 --- /dev/null +++ b/OdbDesignLib/ProtoBuf/net.pb.h @@ -0,0 +1,418 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: net.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_net_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_net_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "pinconnection.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_net_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_net_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_net_2eproto; +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { +class Net; +struct NetDefaultTypeInternal; +extern NetDefaultTypeInternal _Net_default_instance_; +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +PROTOBUF_NAMESPACE_OPEN +template<> ::Odb::Lib::Protobuf::ProductModel::Net* Arena::CreateMaybeMessage<::Odb::Lib::Protobuf::ProductModel::Net>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { + +// =================================================================== + +class Net final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Odb.Lib.Protobuf.ProductModel.Net) */ { + public: + inline Net() : Net(nullptr) {} + ~Net() override; + explicit PROTOBUF_CONSTEXPR Net(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Net(const Net& from); + Net(Net&& from) noexcept + : Net() { + *this = ::std::move(from); + } + + inline Net& operator=(const Net& from) { + CopyFrom(from); + return *this; + } + inline Net& operator=(Net&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Net& default_instance() { + return *internal_default_instance(); + } + static inline const Net* internal_default_instance() { + return reinterpret_cast( + &_Net_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(Net& a, Net& b) { + a.Swap(&b); + } + inline void Swap(Net* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Net* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Net* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Net& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Net& from) { + Net::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Net* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Odb.Lib.Protobuf.ProductModel.Net"; + } + protected: + explicit Net(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPinConnectionsFieldNumber = 2, + kNameFieldNumber = 1, + kIndexFieldNumber = 3, + }; + // repeated .Odb.Lib.Protobuf.ProductModel.PinConnection pinConnections = 2; + int pinconnections_size() const; + private: + int _internal_pinconnections_size() const; + public: + void clear_pinconnections(); + ::Odb::Lib::Protobuf::ProductModel::PinConnection* mutable_pinconnections(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::PinConnection >* + mutable_pinconnections(); + private: + const ::Odb::Lib::Protobuf::ProductModel::PinConnection& _internal_pinconnections(int index) const; + ::Odb::Lib::Protobuf::ProductModel::PinConnection* _internal_add_pinconnections(); + public: + const ::Odb::Lib::Protobuf::ProductModel::PinConnection& pinconnections(int index) const; + ::Odb::Lib::Protobuf::ProductModel::PinConnection* add_pinconnections(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::PinConnection >& + pinconnections() const; + + // optional string name = 1; + bool has_name() const; + private: + bool _internal_has_name() const; + public: + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + 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 uint32 index = 3; + bool has_index() const; + private: + bool _internal_has_index() const; + public: + void clear_index(); + uint32_t index() const; + void set_index(uint32_t value); + private: + uint32_t _internal_index() const; + void _internal_set_index(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:Odb.Lib.Protobuf.ProductModel.Net) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::PinConnection > pinconnections_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + uint32_t index_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_net_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Net + +// optional string name = 1; +inline bool Net::_internal_has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Net::has_name() const { + return _internal_has_name(); +} +inline void Net::clear_name() { + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Net::name() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Net.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Net::set_name(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:Odb.Lib.Protobuf.ProductModel.Net.name) +} +inline std::string* Net::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.Net.name) + return _s; +} +inline const std::string& Net::_internal_name() const { + return _impl_.name_.Get(); +} +inline void Net::_internal_set_name(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* Net::_internal_mutable_name() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* Net::release_name() { + // @@protoc_insertion_point(field_release:Odb.Lib.Protobuf.ProductModel.Net.name) + if (!_internal_has_name()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.name_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Net::set_allocated_name(std::string* name) { + if (name != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:Odb.Lib.Protobuf.ProductModel.Net.name) +} + +// repeated .Odb.Lib.Protobuf.ProductModel.PinConnection pinConnections = 2; +inline int Net::_internal_pinconnections_size() const { + return _impl_.pinconnections_.size(); +} +inline int Net::pinconnections_size() const { + return _internal_pinconnections_size(); +} +inline ::Odb::Lib::Protobuf::ProductModel::PinConnection* Net::mutable_pinconnections(int index) { + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.Net.pinConnections) + return _impl_.pinconnections_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::PinConnection >* +Net::mutable_pinconnections() { + // @@protoc_insertion_point(field_mutable_list:Odb.Lib.Protobuf.ProductModel.Net.pinConnections) + return &_impl_.pinconnections_; +} +inline const ::Odb::Lib::Protobuf::ProductModel::PinConnection& Net::_internal_pinconnections(int index) const { + return _impl_.pinconnections_.Get(index); +} +inline const ::Odb::Lib::Protobuf::ProductModel::PinConnection& Net::pinconnections(int index) const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Net.pinConnections) + return _internal_pinconnections(index); +} +inline ::Odb::Lib::Protobuf::ProductModel::PinConnection* Net::_internal_add_pinconnections() { + return _impl_.pinconnections_.Add(); +} +inline ::Odb::Lib::Protobuf::ProductModel::PinConnection* Net::add_pinconnections() { + ::Odb::Lib::Protobuf::ProductModel::PinConnection* _add = _internal_add_pinconnections(); + // @@protoc_insertion_point(field_add:Odb.Lib.Protobuf.ProductModel.Net.pinConnections) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::PinConnection >& +Net::pinconnections() const { + // @@protoc_insertion_point(field_list:Odb.Lib.Protobuf.ProductModel.Net.pinConnections) + return _impl_.pinconnections_; +} + +// optional uint32 index = 3; +inline bool Net::_internal_has_index() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Net::has_index() const { + return _internal_has_index(); +} +inline void Net::clear_index() { + _impl_.index_ = 0u; + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline uint32_t Net::_internal_index() const { + return _impl_.index_; +} +inline uint32_t Net::index() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Net.index) + return _internal_index(); +} +inline void Net::_internal_set_index(uint32_t value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.index_ = value; +} +inline void Net::set_index(uint32_t value) { + _internal_set_index(value); + // @@protoc_insertion_point(field_set:Odb.Lib.Protobuf.ProductModel.Net.index) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_net_2eproto diff --git a/OdbDesignLib/ProtoBuf/package.pb.cc b/OdbDesignLib/ProtoBuf/package.pb.cc new file mode 100644 index 00000000..44e2d54b --- /dev/null +++ b/OdbDesignLib/ProtoBuf/package.pb.cc @@ -0,0 +1,522 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: package.proto + +#include "package.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { +PROTOBUF_CONSTEXPR Package_PinsByNameEntry_DoNotUse::Package_PinsByNameEntry_DoNotUse( + ::_pbi::ConstantInitialized) {} +struct Package_PinsByNameEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR Package_PinsByNameEntry_DoNotUseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~Package_PinsByNameEntry_DoNotUseDefaultTypeInternal() {} + union { + Package_PinsByNameEntry_DoNotUse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 Package_PinsByNameEntry_DoNotUseDefaultTypeInternal _Package_PinsByNameEntry_DoNotUse_default_instance_; +PROTOBUF_CONSTEXPR Package::Package( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.pins_)*/{} + , /*decltype(_impl_.pinsbyname_)*/{::_pbi::ConstantInitialized()} + , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.index_)*/0u} {} +struct PackageDefaultTypeInternal { + PROTOBUF_CONSTEXPR PackageDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~PackageDefaultTypeInternal() {} + union { + Package _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PackageDefaultTypeInternal _Package_default_instance_; +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +static ::_pb::Metadata file_level_metadata_package_2eproto[2]; +static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_package_2eproto = nullptr; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_package_2eproto = nullptr; + +const uint32_t TableStruct_package_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Package_PinsByNameEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Package_PinsByNameEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Package_PinsByNameEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Package_PinsByNameEntry_DoNotUse, value_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Package, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Package, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Package, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Package, _impl_.pins_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Package, _impl_.pinsbyname_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Package, _impl_.index_), + 0, + ~0u, + ~0u, + 1, +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 8, -1, sizeof(::Odb::Lib::Protobuf::ProductModel::Package_PinsByNameEntry_DoNotUse)}, + { 10, 20, -1, sizeof(::Odb::Lib::Protobuf::ProductModel::Package)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::Odb::Lib::Protobuf::ProductModel::_Package_PinsByNameEntry_DoNotUse_default_instance_._instance, + &::Odb::Lib::Protobuf::ProductModel::_Package_default_instance_._instance, +}; + +const char descriptor_table_protodef_package_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\rpackage.proto\022\035Odb.Lib.Protobuf.Produc" + "tModel\032\tpin.proto\"\230\002\n\007Package\022\021\n\004name\030\001 " + "\001(\tH\000\210\001\001\0220\n\004pins\030\002 \003(\0132\".Odb.Lib.Protobu" + "f.ProductModel.Pin\022J\n\npinsByName\030\003 \003(\01326" + ".Odb.Lib.Protobuf.ProductModel.Package.P" + "insByNameEntry\022\022\n\005index\030\004 \001(\rH\001\210\001\001\032U\n\017Pi" + "nsByNameEntry\022\013\n\003key\030\001 \001(\t\0221\n\005value\030\002 \001(" + "\0132\".Odb.Lib.Protobuf.ProductModel.Pin:\0028" + "\001B\007\n\005_nameB\010\n\006_indexb\006proto3" + ; +static const ::_pbi::DescriptorTable* const descriptor_table_package_2eproto_deps[1] = { + &::descriptor_table_pin_2eproto, +}; +static ::_pbi::once_flag descriptor_table_package_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_package_2eproto = { + false, false, 348, descriptor_table_protodef_package_2eproto, + "package.proto", + &descriptor_table_package_2eproto_once, descriptor_table_package_2eproto_deps, 1, 2, + schemas, file_default_instances, TableStruct_package_2eproto::offsets, + file_level_metadata_package_2eproto, file_level_enum_descriptors_package_2eproto, + file_level_service_descriptors_package_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_package_2eproto_getter() { + return &descriptor_table_package_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_package_2eproto(&descriptor_table_package_2eproto); +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { + +// =================================================================== + +Package_PinsByNameEntry_DoNotUse::Package_PinsByNameEntry_DoNotUse() {} +Package_PinsByNameEntry_DoNotUse::Package_PinsByNameEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void Package_PinsByNameEntry_DoNotUse::MergeFrom(const Package_PinsByNameEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata Package_PinsByNameEntry_DoNotUse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_package_2eproto_getter, &descriptor_table_package_2eproto_once, + file_level_metadata_package_2eproto[0]); +} + +// =================================================================== + +class Package::_Internal { + public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static void set_has_name(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_index(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +void Package::clear_pins() { + _impl_.pins_.Clear(); +} +void Package::clear_pinsbyname() { + _impl_.pinsbyname_.Clear(); +} +Package::Package(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + if (arena != nullptr && !is_message_owned) { + arena->OwnCustomDestructor(this, &Package::ArenaDtor); + } + // @@protoc_insertion_point(arena_constructor:Odb.Lib.Protobuf.ProductModel.Package) +} +Package::Package(const Package& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + Package* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.pins_){from._impl_.pins_} + , /*decltype(_impl_.pinsbyname_)*/{} + , decltype(_impl_.name_){} + , decltype(_impl_.index_){}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_impl_.pinsbyname_.MergeFrom(from._impl_.pinsbyname_); + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_name()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + _this->_impl_.index_ = from._impl_.index_; + // @@protoc_insertion_point(copy_constructor:Odb.Lib.Protobuf.ProductModel.Package) +} + +inline void Package::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.pins_){arena} + , /*decltype(_impl_.pinsbyname_)*/{::_pbi::ArenaInitialized(), arena} + , decltype(_impl_.name_){} + , decltype(_impl_.index_){0u} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Package::~Package() { + // @@protoc_insertion_point(destructor:Odb.Lib.Protobuf.ProductModel.Package) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + ArenaDtor(this); + return; + } + SharedDtor(); +} + +inline void Package::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.pins_.~RepeatedPtrField(); + _impl_.pinsbyname_.Destruct(); + _impl_.pinsbyname_.~MapField(); + _impl_.name_.Destroy(); +} + +void Package::ArenaDtor(void* object) { + Package* _this = reinterpret_cast< Package* >(object); + _this->_impl_.pinsbyname_.Destruct(); +} +void Package::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Package::Clear() { +// @@protoc_insertion_point(message_clear_start:Odb.Lib.Protobuf.ProductModel.Package) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.pins_.Clear(); + _impl_.pinsbyname_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + _impl_.index_ = 0u; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Package::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "Odb.Lib.Protobuf.ProductModel.Package.name")); + } else + goto handle_unusual; + continue; + // repeated .Odb.Lib.Protobuf.ProductModel.Pin pins = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_pins(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else + goto handle_unusual; + continue; + // map pinsByName = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&_impl_.pinsbyname_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else + goto handle_unusual; + continue; + // optional uint32 index = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _Internal::set_has_index(&has_bits); + _impl_.index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Package::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Odb.Lib.Protobuf.ProductModel.Package) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // optional string name = 1; + if (_internal_has_name()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Odb.Lib.Protobuf.ProductModel.Package.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + // repeated .Odb.Lib.Protobuf.ProductModel.Pin pins = 2; + for (unsigned i = 0, + n = static_cast(this->_internal_pins_size()); i < n; i++) { + const auto& repfield = this->_internal_pins(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); + } + + // map pinsByName = 3; + if (!this->_internal_pinsbyname().empty()) { + using MapType = ::_pb::Map; + using WireHelper = Package_PinsByNameEntry_DoNotUse::Funcs; + const auto& map_field = this->_internal_pinsbyname(); + auto check_utf8 = [](const MapType::value_type& entry) { + (void)entry; + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + entry.first.data(), static_cast(entry.first.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Odb.Lib.Protobuf.ProductModel.Package.PinsByNameEntry.key"); + }; + + if (stream->IsSerializationDeterministic() && map_field.size() > 1) { + for (const auto& entry : ::_pbi::MapSorterPtr(map_field)) { + target = WireHelper::InternalSerialize(3, entry.first, entry.second, target, stream); + check_utf8(entry); + } + } else { + for (const auto& entry : map_field) { + target = WireHelper::InternalSerialize(3, entry.first, entry.second, target, stream); + check_utf8(entry); + } + } + } + + // optional uint32 index = 4; + if (_internal_has_index()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_index(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Odb.Lib.Protobuf.ProductModel.Package) + return target; +} + +size_t Package::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Odb.Lib.Protobuf.ProductModel.Package) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .Odb.Lib.Protobuf.ProductModel.Pin pins = 2; + total_size += 1UL * this->_internal_pins_size(); + for (const auto& msg : this->_impl_.pins_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // map pinsByName = 3; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_pinsbyname_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Pin >::const_iterator + it = this->_internal_pinsbyname().begin(); + it != this->_internal_pinsbyname().end(); ++it) { + total_size += Package_PinsByNameEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // optional uint32 index = 4; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_index()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Package::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + Package::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Package::GetClassData() const { return &_class_data_; } + + +void Package::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:Odb.Lib.Protobuf.ProductModel.Package) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.pins_.MergeFrom(from._impl_.pins_); + _this->_impl_.pinsbyname_.MergeFrom(from._impl_.pinsbyname_); + 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->_impl_.index_ = from._impl_.index_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Package::CopyFrom(const Package& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Odb.Lib.Protobuf.ProductModel.Package) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Package::IsInitialized() const { + return true; +} + +void Package::InternalSwap(Package* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.pins_.InternalSwap(&other->_impl_.pins_); + _impl_.pinsbyname_.InternalSwap(&other->_impl_.pinsbyname_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + swap(_impl_.index_, other->_impl_.index_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Package::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_package_2eproto_getter, &descriptor_table_package_2eproto_once, + file_level_metadata_package_2eproto[1]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::Odb::Lib::Protobuf::ProductModel::Package_PinsByNameEntry_DoNotUse* +Arena::CreateMaybeMessage< ::Odb::Lib::Protobuf::ProductModel::Package_PinsByNameEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::Odb::Lib::Protobuf::ProductModel::Package_PinsByNameEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::Odb::Lib::Protobuf::ProductModel::Package* +Arena::CreateMaybeMessage< ::Odb::Lib::Protobuf::ProductModel::Package >(Arena* arena) { + return Arena::CreateMessageInternal< ::Odb::Lib::Protobuf::ProductModel::Package >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/OdbDesignLib/ProtoBuf/package.pb.h b/OdbDesignLib/ProtoBuf/package.pb.h new file mode 100644 index 00000000..4a1402f5 --- /dev/null +++ b/OdbDesignLib/ProtoBuf/package.pb.h @@ -0,0 +1,507 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: package.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_package_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_package_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +#include +#include "pin.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_package_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_package_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_package_2eproto; +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { +class Package; +struct PackageDefaultTypeInternal; +extern PackageDefaultTypeInternal _Package_default_instance_; +class Package_PinsByNameEntry_DoNotUse; +struct Package_PinsByNameEntry_DoNotUseDefaultTypeInternal; +extern Package_PinsByNameEntry_DoNotUseDefaultTypeInternal _Package_PinsByNameEntry_DoNotUse_default_instance_; +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +PROTOBUF_NAMESPACE_OPEN +template<> ::Odb::Lib::Protobuf::ProductModel::Package* Arena::CreateMaybeMessage<::Odb::Lib::Protobuf::ProductModel::Package>(Arena*); +template<> ::Odb::Lib::Protobuf::ProductModel::Package_PinsByNameEntry_DoNotUse* Arena::CreateMaybeMessage<::Odb::Lib::Protobuf::ProductModel::Package_PinsByNameEntry_DoNotUse>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { + +// =================================================================== + +class Package_PinsByNameEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + Package_PinsByNameEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR Package_PinsByNameEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit Package_PinsByNameEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const Package_PinsByNameEntry_DoNotUse& other); + static const Package_PinsByNameEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_Package_PinsByNameEntry_DoNotUse_default_instance_); } + static bool ValidateKey(std::string* s) { + return ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(s->data(), static_cast(s->size()), ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE, "Odb.Lib.Protobuf.ProductModel.Package.PinsByNameEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_package_2eproto; +}; + +// ------------------------------------------------------------------- + +class Package final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Odb.Lib.Protobuf.ProductModel.Package) */ { + public: + inline Package() : Package(nullptr) {} + ~Package() override; + explicit PROTOBUF_CONSTEXPR Package(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Package(const Package& from); + Package(Package&& from) noexcept + : Package() { + *this = ::std::move(from); + } + + inline Package& operator=(const Package& from) { + CopyFrom(from); + return *this; + } + inline Package& operator=(Package&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Package& default_instance() { + return *internal_default_instance(); + } + static inline const Package* internal_default_instance() { + return reinterpret_cast( + &_Package_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(Package& a, Package& b) { + a.Swap(&b); + } + inline void Swap(Package* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Package* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Package* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Package& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Package& from) { + Package::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Package* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Odb.Lib.Protobuf.ProductModel.Package"; + } + protected: + explicit Package(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + private: + static void ArenaDtor(void* object); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + + // accessors ------------------------------------------------------- + + enum : int { + kPinsFieldNumber = 2, + kPinsByNameFieldNumber = 3, + kNameFieldNumber = 1, + kIndexFieldNumber = 4, + }; + // repeated .Odb.Lib.Protobuf.ProductModel.Pin pins = 2; + int pins_size() const; + private: + int _internal_pins_size() const; + public: + void clear_pins(); + ::Odb::Lib::Protobuf::ProductModel::Pin* mutable_pins(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Pin >* + mutable_pins(); + private: + const ::Odb::Lib::Protobuf::ProductModel::Pin& _internal_pins(int index) const; + ::Odb::Lib::Protobuf::ProductModel::Pin* _internal_add_pins(); + public: + const ::Odb::Lib::Protobuf::ProductModel::Pin& pins(int index) const; + ::Odb::Lib::Protobuf::ProductModel::Pin* add_pins(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Pin >& + pins() const; + + // map pinsByName = 3; + int pinsbyname_size() const; + private: + int _internal_pinsbyname_size() const; + public: + void clear_pinsbyname(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Pin >& + _internal_pinsbyname() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Pin >* + _internal_mutable_pinsbyname(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Pin >& + pinsbyname() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Pin >* + mutable_pinsbyname(); + + // optional string name = 1; + bool has_name() const; + private: + bool _internal_has_name() const; + public: + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + 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 uint32 index = 4; + bool has_index() const; + private: + bool _internal_has_index() const; + public: + void clear_index(); + uint32_t index() const; + void set_index(uint32_t value); + private: + uint32_t _internal_index() const; + void _internal_set_index(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:Odb.Lib.Protobuf.ProductModel.Package) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Pin > pins_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + Package_PinsByNameEntry_DoNotUse, + std::string, ::Odb::Lib::Protobuf::ProductModel::Pin, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> pinsbyname_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + uint32_t index_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_package_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// Package + +// optional string name = 1; +inline bool Package::_internal_has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Package::has_name() const { + return _internal_has_name(); +} +inline void Package::clear_name() { + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Package::name() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Package.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Package::set_name(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:Odb.Lib.Protobuf.ProductModel.Package.name) +} +inline std::string* Package::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.Package.name) + return _s; +} +inline const std::string& Package::_internal_name() const { + return _impl_.name_.Get(); +} +inline void Package::_internal_set_name(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* Package::_internal_mutable_name() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* Package::release_name() { + // @@protoc_insertion_point(field_release:Odb.Lib.Protobuf.ProductModel.Package.name) + if (!_internal_has_name()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.name_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Package::set_allocated_name(std::string* name) { + if (name != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:Odb.Lib.Protobuf.ProductModel.Package.name) +} + +// repeated .Odb.Lib.Protobuf.ProductModel.Pin pins = 2; +inline int Package::_internal_pins_size() const { + return _impl_.pins_.size(); +} +inline int Package::pins_size() const { + return _internal_pins_size(); +} +inline ::Odb::Lib::Protobuf::ProductModel::Pin* Package::mutable_pins(int index) { + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.Package.pins) + return _impl_.pins_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Pin >* +Package::mutable_pins() { + // @@protoc_insertion_point(field_mutable_list:Odb.Lib.Protobuf.ProductModel.Package.pins) + return &_impl_.pins_; +} +inline const ::Odb::Lib::Protobuf::ProductModel::Pin& Package::_internal_pins(int index) const { + return _impl_.pins_.Get(index); +} +inline const ::Odb::Lib::Protobuf::ProductModel::Pin& Package::pins(int index) const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Package.pins) + return _internal_pins(index); +} +inline ::Odb::Lib::Protobuf::ProductModel::Pin* Package::_internal_add_pins() { + return _impl_.pins_.Add(); +} +inline ::Odb::Lib::Protobuf::ProductModel::Pin* Package::add_pins() { + ::Odb::Lib::Protobuf::ProductModel::Pin* _add = _internal_add_pins(); + // @@protoc_insertion_point(field_add:Odb.Lib.Protobuf.ProductModel.Package.pins) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::Odb::Lib::Protobuf::ProductModel::Pin >& +Package::pins() const { + // @@protoc_insertion_point(field_list:Odb.Lib.Protobuf.ProductModel.Package.pins) + return _impl_.pins_; +} + +// map pinsByName = 3; +inline int Package::_internal_pinsbyname_size() const { + return _impl_.pinsbyname_.size(); +} +inline int Package::pinsbyname_size() const { + return _internal_pinsbyname_size(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Pin >& +Package::_internal_pinsbyname() const { + return _impl_.pinsbyname_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Pin >& +Package::pinsbyname() const { + // @@protoc_insertion_point(field_map:Odb.Lib.Protobuf.ProductModel.Package.pinsByName) + return _internal_pinsbyname(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Pin >* +Package::_internal_mutable_pinsbyname() { + return _impl_.pinsbyname_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::Odb::Lib::Protobuf::ProductModel::Pin >* +Package::mutable_pinsbyname() { + // @@protoc_insertion_point(field_mutable_map:Odb.Lib.Protobuf.ProductModel.Package.pinsByName) + return _internal_mutable_pinsbyname(); +} + +// optional uint32 index = 4; +inline bool Package::_internal_has_index() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Package::has_index() const { + return _internal_has_index(); +} +inline void Package::clear_index() { + _impl_.index_ = 0u; + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline uint32_t Package::_internal_index() const { + return _impl_.index_; +} +inline uint32_t Package::index() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Package.index) + return _internal_index(); +} +inline void Package::_internal_set_index(uint32_t value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.index_ = value; +} +inline void Package::set_index(uint32_t value) { + _internal_set_index(value); + // @@protoc_insertion_point(field_set:Odb.Lib.Protobuf.ProductModel.Package.index) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_package_2eproto diff --git a/OdbDesignLib/ProtoBuf/part.pb.cc b/OdbDesignLib/ProtoBuf/part.pb.cc new file mode 100644 index 00000000..ac767b34 --- /dev/null +++ b/OdbDesignLib/ProtoBuf/part.pb.cc @@ -0,0 +1,322 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: part.proto + +#include "part.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { +PROTOBUF_CONSTEXPR Part::Part( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {} +struct PartDefaultTypeInternal { + PROTOBUF_CONSTEXPR PartDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~PartDefaultTypeInternal() {} + union { + Part _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PartDefaultTypeInternal _Part_default_instance_; +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +static ::_pb::Metadata file_level_metadata_part_2eproto[1]; +static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_part_2eproto = nullptr; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_part_2eproto = nullptr; + +const uint32_t TableStruct_part_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Part, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Part, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Part, _impl_.name_), + 0, +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 7, -1, sizeof(::Odb::Lib::Protobuf::ProductModel::Part)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::Odb::Lib::Protobuf::ProductModel::_Part_default_instance_._instance, +}; + +const char descriptor_table_protodef_part_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\npart.proto\022\035Odb.Lib.Protobuf.ProductMo" + "del\"\"\n\004Part\022\021\n\004name\030\001 \001(\tH\000\210\001\001B\007\n\005_nameb" + "\006proto3" + ; +static ::_pbi::once_flag descriptor_table_part_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_part_2eproto = { + false, false, 87, descriptor_table_protodef_part_2eproto, + "part.proto", + &descriptor_table_part_2eproto_once, nullptr, 0, 1, + schemas, file_default_instances, TableStruct_part_2eproto::offsets, + file_level_metadata_part_2eproto, file_level_enum_descriptors_part_2eproto, + file_level_service_descriptors_part_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_part_2eproto_getter() { + return &descriptor_table_part_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_part_2eproto(&descriptor_table_part_2eproto); +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { + +// =================================================================== + +class Part::_Internal { + public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static void set_has_name(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +Part::Part(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:Odb.Lib.Protobuf.ProductModel.Part) +} +Part::Part(const Part& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + Part* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.name_){}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_name()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:Odb.Lib.Protobuf.ProductModel.Part) +} + +inline void Part::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.name_){} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Part::~Part() { + // @@protoc_insertion_point(destructor:Odb.Lib.Protobuf.ProductModel.Part) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Part::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.name_.Destroy(); +} + +void Part::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Part::Clear() { +// @@protoc_insertion_point(message_clear_start:Odb.Lib.Protobuf.ProductModel.Part) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Part::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "Odb.Lib.Protobuf.ProductModel.Part.name")); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Part::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Odb.Lib.Protobuf.ProductModel.Part) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // optional string name = 1; + if (_internal_has_name()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Odb.Lib.Protobuf.ProductModel.Part.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Odb.Lib.Protobuf.ProductModel.Part) + return target; +} + +size_t Part::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Odb.Lib.Protobuf.ProductModel.Part) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // optional string name = 1; + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Part::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + Part::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Part::GetClassData() const { return &_class_data_; } + + +void Part::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:Odb.Lib.Protobuf.ProductModel.Part) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_name()) { + _this->_internal_set_name(from._internal_name()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Part::CopyFrom(const Part& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Odb.Lib.Protobuf.ProductModel.Part) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Part::IsInitialized() const { + return true; +} + +void Part::InternalSwap(Part* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Part::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_part_2eproto_getter, &descriptor_table_part_2eproto_once, + file_level_metadata_part_2eproto[0]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::Odb::Lib::Protobuf::ProductModel::Part* +Arena::CreateMaybeMessage< ::Odb::Lib::Protobuf::ProductModel::Part >(Arena* arena) { + return Arena::CreateMessageInternal< ::Odb::Lib::Protobuf::ProductModel::Part >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/OdbDesignLib/ProtoBuf/part.pb.h b/OdbDesignLib/ProtoBuf/part.pb.h new file mode 100644 index 00000000..0b188753 --- /dev/null +++ b/OdbDesignLib/ProtoBuf/part.pb.h @@ -0,0 +1,317 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: part.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_part_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_part_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_part_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_part_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_part_2eproto; +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { +class Part; +struct PartDefaultTypeInternal; +extern PartDefaultTypeInternal _Part_default_instance_; +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +PROTOBUF_NAMESPACE_OPEN +template<> ::Odb::Lib::Protobuf::ProductModel::Part* Arena::CreateMaybeMessage<::Odb::Lib::Protobuf::ProductModel::Part>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { + +// =================================================================== + +class Part final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Odb.Lib.Protobuf.ProductModel.Part) */ { + public: + inline Part() : Part(nullptr) {} + ~Part() override; + explicit PROTOBUF_CONSTEXPR Part(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Part(const Part& from); + Part(Part&& from) noexcept + : Part() { + *this = ::std::move(from); + } + + inline Part& operator=(const Part& from) { + CopyFrom(from); + return *this; + } + inline Part& operator=(Part&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Part& default_instance() { + return *internal_default_instance(); + } + static inline const Part* internal_default_instance() { + return reinterpret_cast( + &_Part_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(Part& a, Part& b) { + a.Swap(&b); + } + inline void Swap(Part* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Part* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Part* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Part& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Part& from) { + Part::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Part* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Odb.Lib.Protobuf.ProductModel.Part"; + } + protected: + explicit Part(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + }; + // optional string name = 1; + bool has_name() const; + private: + bool _internal_has_name() const; + public: + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + 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: + + // @@protoc_insertion_point(class_scope:Odb.Lib.Protobuf.ProductModel.Part) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_part_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Part + +// optional string name = 1; +inline bool Part::_internal_has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Part::has_name() const { + return _internal_has_name(); +} +inline void Part::clear_name() { + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Part::name() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Part.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Part::set_name(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:Odb.Lib.Protobuf.ProductModel.Part.name) +} +inline std::string* Part::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.Part.name) + return _s; +} +inline const std::string& Part::_internal_name() const { + return _impl_.name_.Get(); +} +inline void Part::_internal_set_name(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* Part::_internal_mutable_name() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* Part::release_name() { + // @@protoc_insertion_point(field_release:Odb.Lib.Protobuf.ProductModel.Part.name) + if (!_internal_has_name()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.name_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Part::set_allocated_name(std::string* name) { + if (name != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:Odb.Lib.Protobuf.ProductModel.Part.name) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_part_2eproto diff --git a/OdbDesignLib/ProtoBuf/pin.pb.cc b/OdbDesignLib/ProtoBuf/pin.pb.cc new file mode 100644 index 00000000..a51df15d --- /dev/null +++ b/OdbDesignLib/ProtoBuf/pin.pb.cc @@ -0,0 +1,362 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: pin.proto + +#include "pin.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { +PROTOBUF_CONSTEXPR Pin::Pin( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.index_)*/0u} {} +struct PinDefaultTypeInternal { + PROTOBUF_CONSTEXPR PinDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~PinDefaultTypeInternal() {} + union { + Pin _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PinDefaultTypeInternal _Pin_default_instance_; +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +static ::_pb::Metadata file_level_metadata_pin_2eproto[1]; +static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_pin_2eproto = nullptr; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_pin_2eproto = nullptr; + +const uint32_t TableStruct_pin_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Pin, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Pin, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Pin, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Pin, _impl_.index_), + 0, + 1, +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 8, -1, sizeof(::Odb::Lib::Protobuf::ProductModel::Pin)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::Odb::Lib::Protobuf::ProductModel::_Pin_default_instance_._instance, +}; + +const char descriptor_table_protodef_pin_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\tpin.proto\022\035Odb.Lib.Protobuf.ProductMod" + "el\"\?\n\003Pin\022\021\n\004name\030\001 \001(\tH\000\210\001\001\022\022\n\005index\030\002 " + "\001(\rH\001\210\001\001B\007\n\005_nameB\010\n\006_indexb\006proto3" + ; +static ::_pbi::once_flag descriptor_table_pin_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_pin_2eproto = { + false, false, 115, descriptor_table_protodef_pin_2eproto, + "pin.proto", + &descriptor_table_pin_2eproto_once, nullptr, 0, 1, + schemas, file_default_instances, TableStruct_pin_2eproto::offsets, + file_level_metadata_pin_2eproto, file_level_enum_descriptors_pin_2eproto, + file_level_service_descriptors_pin_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_pin_2eproto_getter() { + return &descriptor_table_pin_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_pin_2eproto(&descriptor_table_pin_2eproto); +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { + +// =================================================================== + +class Pin::_Internal { + public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static void set_has_name(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_index(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +Pin::Pin(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:Odb.Lib.Protobuf.ProductModel.Pin) +} +Pin::Pin(const Pin& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + Pin* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.name_){} + , decltype(_impl_.index_){}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_name()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + _this->_impl_.index_ = from._impl_.index_; + // @@protoc_insertion_point(copy_constructor:Odb.Lib.Protobuf.ProductModel.Pin) +} + +inline void Pin::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.name_){} + , decltype(_impl_.index_){0u} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Pin::~Pin() { + // @@protoc_insertion_point(destructor:Odb.Lib.Protobuf.ProductModel.Pin) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Pin::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.name_.Destroy(); +} + +void Pin::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Pin::Clear() { +// @@protoc_insertion_point(message_clear_start:Odb.Lib.Protobuf.ProductModel.Pin) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + _impl_.index_ = 0u; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Pin::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "Odb.Lib.Protobuf.ProductModel.Pin.name")); + } else + goto handle_unusual; + continue; + // optional uint32 index = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_index(&has_bits); + _impl_.index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Pin::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Odb.Lib.Protobuf.ProductModel.Pin) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // optional string name = 1; + if (_internal_has_name()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Odb.Lib.Protobuf.ProductModel.Pin.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + // optional uint32 index = 2; + if (_internal_has_index()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_index(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Odb.Lib.Protobuf.ProductModel.Pin) + return target; +} + +size_t Pin::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Odb.Lib.Protobuf.ProductModel.Pin) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // optional uint32 index = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_index()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Pin::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + Pin::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Pin::GetClassData() const { return &_class_data_; } + + +void Pin::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:Odb.Lib.Protobuf.ProductModel.Pin) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + 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->_impl_.index_ = from._impl_.index_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Pin::CopyFrom(const Pin& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Odb.Lib.Protobuf.ProductModel.Pin) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Pin::IsInitialized() const { + return true; +} + +void Pin::InternalSwap(Pin* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + swap(_impl_.index_, other->_impl_.index_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Pin::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_pin_2eproto_getter, &descriptor_table_pin_2eproto_once, + file_level_metadata_pin_2eproto[0]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::Odb::Lib::Protobuf::ProductModel::Pin* +Arena::CreateMaybeMessage< ::Odb::Lib::Protobuf::ProductModel::Pin >(Arena* arena) { + return Arena::CreateMessageInternal< ::Odb::Lib::Protobuf::ProductModel::Pin >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/OdbDesignLib/ProtoBuf/pin.pb.h b/OdbDesignLib/ProtoBuf/pin.pb.h new file mode 100644 index 00000000..39888942 --- /dev/null +++ b/OdbDesignLib/ProtoBuf/pin.pb.h @@ -0,0 +1,360 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: pin.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_pin_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_pin_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_pin_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_pin_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_pin_2eproto; +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { +class Pin; +struct PinDefaultTypeInternal; +extern PinDefaultTypeInternal _Pin_default_instance_; +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +PROTOBUF_NAMESPACE_OPEN +template<> ::Odb::Lib::Protobuf::ProductModel::Pin* Arena::CreateMaybeMessage<::Odb::Lib::Protobuf::ProductModel::Pin>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { + +// =================================================================== + +class Pin final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Odb.Lib.Protobuf.ProductModel.Pin) */ { + public: + inline Pin() : Pin(nullptr) {} + ~Pin() override; + explicit PROTOBUF_CONSTEXPR Pin(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Pin(const Pin& from); + Pin(Pin&& from) noexcept + : Pin() { + *this = ::std::move(from); + } + + inline Pin& operator=(const Pin& from) { + CopyFrom(from); + return *this; + } + inline Pin& operator=(Pin&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Pin& default_instance() { + return *internal_default_instance(); + } + static inline const Pin* internal_default_instance() { + return reinterpret_cast( + &_Pin_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(Pin& a, Pin& b) { + a.Swap(&b); + } + inline void Swap(Pin* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Pin* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Pin* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Pin& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Pin& from) { + Pin::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Pin* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Odb.Lib.Protobuf.ProductModel.Pin"; + } + protected: + explicit Pin(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kIndexFieldNumber = 2, + }; + // optional string name = 1; + bool has_name() const; + private: + bool _internal_has_name() const; + public: + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + 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 uint32 index = 2; + bool has_index() const; + private: + bool _internal_has_index() const; + public: + void clear_index(); + uint32_t index() const; + void set_index(uint32_t value); + private: + uint32_t _internal_index() const; + void _internal_set_index(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:Odb.Lib.Protobuf.ProductModel.Pin) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + uint32_t index_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_pin_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Pin + +// optional string name = 1; +inline bool Pin::_internal_has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Pin::has_name() const { + return _internal_has_name(); +} +inline void Pin::clear_name() { + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Pin::name() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Pin.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Pin::set_name(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:Odb.Lib.Protobuf.ProductModel.Pin.name) +} +inline std::string* Pin::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.Pin.name) + return _s; +} +inline const std::string& Pin::_internal_name() const { + return _impl_.name_.Get(); +} +inline void Pin::_internal_set_name(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* Pin::_internal_mutable_name() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* Pin::release_name() { + // @@protoc_insertion_point(field_release:Odb.Lib.Protobuf.ProductModel.Pin.name) + if (!_internal_has_name()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.name_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Pin::set_allocated_name(std::string* name) { + if (name != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:Odb.Lib.Protobuf.ProductModel.Pin.name) +} + +// optional uint32 index = 2; +inline bool Pin::_internal_has_index() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Pin::has_index() const { + return _internal_has_index(); +} +inline void Pin::clear_index() { + _impl_.index_ = 0u; + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline uint32_t Pin::_internal_index() const { + return _impl_.index_; +} +inline uint32_t Pin::index() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Pin.index) + return _internal_index(); +} +inline void Pin::_internal_set_index(uint32_t value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.index_ = value; +} +inline void Pin::set_index(uint32_t value) { + _internal_set_index(value); + // @@protoc_insertion_point(field_set:Odb.Lib.Protobuf.ProductModel.Pin.index) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_pin_2eproto diff --git a/OdbDesignLib/ProtoBuf/pinconnection.pb.cc b/OdbDesignLib/ProtoBuf/pinconnection.pb.cc new file mode 100644 index 00000000..f9f91d6a --- /dev/null +++ b/OdbDesignLib/ProtoBuf/pinconnection.pb.cc @@ -0,0 +1,445 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: pinconnection.proto + +#include "pinconnection.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { +PROTOBUF_CONSTEXPR PinConnection::PinConnection( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.component_)*/nullptr + , /*decltype(_impl_.pin_)*/nullptr} {} +struct PinConnectionDefaultTypeInternal { + PROTOBUF_CONSTEXPR PinConnectionDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~PinConnectionDefaultTypeInternal() {} + union { + PinConnection _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PinConnectionDefaultTypeInternal _PinConnection_default_instance_; +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +static ::_pb::Metadata file_level_metadata_pinconnection_2eproto[1]; +static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_pinconnection_2eproto = nullptr; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_pinconnection_2eproto = nullptr; + +const uint32_t TableStruct_pinconnection_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::PinConnection, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::PinConnection, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::PinConnection, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::PinConnection, _impl_.component_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::PinConnection, _impl_.pin_), + 0, + 1, + 2, +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 9, -1, sizeof(::Odb::Lib::Protobuf::ProductModel::PinConnection)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::Odb::Lib::Protobuf::ProductModel::_PinConnection_default_instance_._instance, +}; + +const char descriptor_table_protodef_pinconnection_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\023pinconnection.proto\022\035Odb.Lib.Protobuf." + "ProductModel\032\017component.proto\032\tpin.proto" + "\"\271\001\n\rPinConnection\022\021\n\004name\030\001 \001(\tH\000\210\001\001\022@\n" + "\tcomponent\030\002 \001(\0132(.Odb.Lib.Protobuf.Prod" + "uctModel.ComponentH\001\210\001\001\0224\n\003pin\030\003 \001(\0132\".O" + "db.Lib.Protobuf.ProductModel.PinH\002\210\001\001B\007\n" + "\005_nameB\014\n\n_componentB\006\n\004_pinb\006proto3" + ; +static const ::_pbi::DescriptorTable* const descriptor_table_pinconnection_2eproto_deps[2] = { + &::descriptor_table_component_2eproto, + &::descriptor_table_pin_2eproto, +}; +static ::_pbi::once_flag descriptor_table_pinconnection_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_pinconnection_2eproto = { + false, false, 276, descriptor_table_protodef_pinconnection_2eproto, + "pinconnection.proto", + &descriptor_table_pinconnection_2eproto_once, descriptor_table_pinconnection_2eproto_deps, 2, 1, + schemas, file_default_instances, TableStruct_pinconnection_2eproto::offsets, + file_level_metadata_pinconnection_2eproto, file_level_enum_descriptors_pinconnection_2eproto, + file_level_service_descriptors_pinconnection_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_pinconnection_2eproto_getter() { + return &descriptor_table_pinconnection_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_pinconnection_2eproto(&descriptor_table_pinconnection_2eproto); +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { + +// =================================================================== + +class PinConnection::_Internal { + public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static void set_has_name(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::Odb::Lib::Protobuf::ProductModel::Component& component(const PinConnection* msg); + static void set_has_component(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::Odb::Lib::Protobuf::ProductModel::Pin& pin(const PinConnection* msg); + static void set_has_pin(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +const ::Odb::Lib::Protobuf::ProductModel::Component& +PinConnection::_Internal::component(const PinConnection* msg) { + return *msg->_impl_.component_; +} +const ::Odb::Lib::Protobuf::ProductModel::Pin& +PinConnection::_Internal::pin(const PinConnection* msg) { + return *msg->_impl_.pin_; +} +void PinConnection::clear_component() { + if (_impl_.component_ != nullptr) _impl_.component_->Clear(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +void PinConnection::clear_pin() { + if (_impl_.pin_ != nullptr) _impl_.pin_->Clear(); + _impl_._has_bits_[0] &= ~0x00000004u; +} +PinConnection::PinConnection(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:Odb.Lib.Protobuf.ProductModel.PinConnection) +} +PinConnection::PinConnection(const PinConnection& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + PinConnection* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.name_){} + , decltype(_impl_.component_){nullptr} + , decltype(_impl_.pin_){nullptr}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_name()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + if (from._internal_has_component()) { + _this->_impl_.component_ = new ::Odb::Lib::Protobuf::ProductModel::Component(*from._impl_.component_); + } + if (from._internal_has_pin()) { + _this->_impl_.pin_ = new ::Odb::Lib::Protobuf::ProductModel::Pin(*from._impl_.pin_); + } + // @@protoc_insertion_point(copy_constructor:Odb.Lib.Protobuf.ProductModel.PinConnection) +} + +inline void PinConnection::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.name_){} + , decltype(_impl_.component_){nullptr} + , decltype(_impl_.pin_){nullptr} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +PinConnection::~PinConnection() { + // @@protoc_insertion_point(destructor:Odb.Lib.Protobuf.ProductModel.PinConnection) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void PinConnection::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.name_.Destroy(); + if (this != internal_default_instance()) delete _impl_.component_; + if (this != internal_default_instance()) delete _impl_.pin_; +} + +void PinConnection::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void PinConnection::Clear() { +// @@protoc_insertion_point(message_clear_start:Odb.Lib.Protobuf.ProductModel.PinConnection) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + 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) { + GOOGLE_DCHECK(_impl_.component_ != nullptr); + _impl_.component_->Clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(_impl_.pin_ != nullptr); + _impl_.pin_->Clear(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* PinConnection::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "Odb.Lib.Protobuf.ProductModel.PinConnection.name")); + } else + goto handle_unusual; + continue; + // optional .Odb.Lib.Protobuf.ProductModel.Component component = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_component(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .Odb.Lib.Protobuf.ProductModel.Pin pin = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_pin(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* PinConnection::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Odb.Lib.Protobuf.ProductModel.PinConnection) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // optional string name = 1; + if (_internal_has_name()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Odb.Lib.Protobuf.ProductModel.PinConnection.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + // optional .Odb.Lib.Protobuf.ProductModel.Component component = 2; + if (_internal_has_component()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, _Internal::component(this), + _Internal::component(this).GetCachedSize(), target, stream); + } + + // optional .Odb.Lib.Protobuf.ProductModel.Pin pin = 3; + if (_internal_has_pin()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, _Internal::pin(this), + _Internal::pin(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Odb.Lib.Protobuf.ProductModel.PinConnection) + return target; +} + +size_t PinConnection::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Odb.Lib.Protobuf.ProductModel.PinConnection) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // optional .Odb.Lib.Protobuf.ProductModel.Component component = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.component_); + } + + // optional .Odb.Lib.Protobuf.ProductModel.Pin pin = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *_impl_.pin_); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PinConnection::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + PinConnection::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PinConnection::GetClassData() const { return &_class_data_; } + + +void PinConnection::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:Odb.Lib.Protobuf.ProductModel.PinConnection) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + 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_mutable_component()->::Odb::Lib::Protobuf::ProductModel::Component::MergeFrom( + from._internal_component()); + } + if (cached_has_bits & 0x00000004u) { + _this->_internal_mutable_pin()->::Odb::Lib::Protobuf::ProductModel::Pin::MergeFrom( + from._internal_pin()); + } + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void PinConnection::CopyFrom(const PinConnection& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Odb.Lib.Protobuf.ProductModel.PinConnection) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PinConnection::IsInitialized() const { + return true; +} + +void PinConnection::InternalSwap(PinConnection* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(PinConnection, _impl_.pin_) + + sizeof(PinConnection::_impl_.pin_) + - PROTOBUF_FIELD_OFFSET(PinConnection, _impl_.component_)>( + reinterpret_cast(&_impl_.component_), + reinterpret_cast(&other->_impl_.component_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata PinConnection::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_pinconnection_2eproto_getter, &descriptor_table_pinconnection_2eproto_once, + file_level_metadata_pinconnection_2eproto[0]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::Odb::Lib::Protobuf::ProductModel::PinConnection* +Arena::CreateMaybeMessage< ::Odb::Lib::Protobuf::ProductModel::PinConnection >(Arena* arena) { + return Arena::CreateMessageInternal< ::Odb::Lib::Protobuf::ProductModel::PinConnection >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/OdbDesignLib/ProtoBuf/pinconnection.pb.h b/OdbDesignLib/ProtoBuf/pinconnection.pb.h new file mode 100644 index 00000000..19df9e11 --- /dev/null +++ b/OdbDesignLib/ProtoBuf/pinconnection.pb.h @@ -0,0 +1,533 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: pinconnection.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_pinconnection_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_pinconnection_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "component.pb.h" +#include "pin.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_pinconnection_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_pinconnection_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_pinconnection_2eproto; +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { +class PinConnection; +struct PinConnectionDefaultTypeInternal; +extern PinConnectionDefaultTypeInternal _PinConnection_default_instance_; +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +PROTOBUF_NAMESPACE_OPEN +template<> ::Odb::Lib::Protobuf::ProductModel::PinConnection* Arena::CreateMaybeMessage<::Odb::Lib::Protobuf::ProductModel::PinConnection>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { + +// =================================================================== + +class PinConnection final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Odb.Lib.Protobuf.ProductModel.PinConnection) */ { + public: + inline PinConnection() : PinConnection(nullptr) {} + ~PinConnection() override; + explicit PROTOBUF_CONSTEXPR PinConnection(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PinConnection(const PinConnection& from); + PinConnection(PinConnection&& from) noexcept + : PinConnection() { + *this = ::std::move(from); + } + + inline PinConnection& operator=(const PinConnection& from) { + CopyFrom(from); + return *this; + } + inline PinConnection& operator=(PinConnection&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const PinConnection& default_instance() { + return *internal_default_instance(); + } + static inline const PinConnection* internal_default_instance() { + return reinterpret_cast( + &_PinConnection_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(PinConnection& a, PinConnection& b) { + a.Swap(&b); + } + inline void Swap(PinConnection* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(PinConnection* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + PinConnection* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const PinConnection& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const PinConnection& from) { + PinConnection::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(PinConnection* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Odb.Lib.Protobuf.ProductModel.PinConnection"; + } + protected: + explicit PinConnection(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kComponentFieldNumber = 2, + kPinFieldNumber = 3, + }; + // optional string name = 1; + bool has_name() const; + private: + bool _internal_has_name() const; + public: + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + 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 .Odb.Lib.Protobuf.ProductModel.Component component = 2; + bool has_component() const; + private: + bool _internal_has_component() const; + public: + void clear_component(); + const ::Odb::Lib::Protobuf::ProductModel::Component& component() const; + PROTOBUF_NODISCARD ::Odb::Lib::Protobuf::ProductModel::Component* release_component(); + ::Odb::Lib::Protobuf::ProductModel::Component* mutable_component(); + void set_allocated_component(::Odb::Lib::Protobuf::ProductModel::Component* component); + private: + const ::Odb::Lib::Protobuf::ProductModel::Component& _internal_component() const; + ::Odb::Lib::Protobuf::ProductModel::Component* _internal_mutable_component(); + public: + void unsafe_arena_set_allocated_component( + ::Odb::Lib::Protobuf::ProductModel::Component* component); + ::Odb::Lib::Protobuf::ProductModel::Component* unsafe_arena_release_component(); + + // optional .Odb.Lib.Protobuf.ProductModel.Pin pin = 3; + bool has_pin() const; + private: + bool _internal_has_pin() const; + public: + void clear_pin(); + const ::Odb::Lib::Protobuf::ProductModel::Pin& pin() const; + PROTOBUF_NODISCARD ::Odb::Lib::Protobuf::ProductModel::Pin* release_pin(); + ::Odb::Lib::Protobuf::ProductModel::Pin* mutable_pin(); + void set_allocated_pin(::Odb::Lib::Protobuf::ProductModel::Pin* pin); + private: + const ::Odb::Lib::Protobuf::ProductModel::Pin& _internal_pin() const; + ::Odb::Lib::Protobuf::ProductModel::Pin* _internal_mutable_pin(); + public: + void unsafe_arena_set_allocated_pin( + ::Odb::Lib::Protobuf::ProductModel::Pin* pin); + ::Odb::Lib::Protobuf::ProductModel::Pin* unsafe_arena_release_pin(); + + // @@protoc_insertion_point(class_scope:Odb.Lib.Protobuf.ProductModel.PinConnection) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::Odb::Lib::Protobuf::ProductModel::Component* component_; + ::Odb::Lib::Protobuf::ProductModel::Pin* pin_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_pinconnection_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// PinConnection + +// optional string name = 1; +inline bool PinConnection::_internal_has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool PinConnection::has_name() const { + return _internal_has_name(); +} +inline void PinConnection::clear_name() { + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& PinConnection::name() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.PinConnection.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void PinConnection::set_name(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:Odb.Lib.Protobuf.ProductModel.PinConnection.name) +} +inline std::string* PinConnection::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.PinConnection.name) + return _s; +} +inline const std::string& PinConnection::_internal_name() const { + return _impl_.name_.Get(); +} +inline void PinConnection::_internal_set_name(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* PinConnection::_internal_mutable_name() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* PinConnection::release_name() { + // @@protoc_insertion_point(field_release:Odb.Lib.Protobuf.ProductModel.PinConnection.name) + if (!_internal_has_name()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.name_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void PinConnection::set_allocated_name(std::string* name) { + if (name != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:Odb.Lib.Protobuf.ProductModel.PinConnection.name) +} + +// optional .Odb.Lib.Protobuf.ProductModel.Component component = 2; +inline bool PinConnection::_internal_has_component() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || _impl_.component_ != nullptr); + return value; +} +inline bool PinConnection::has_component() const { + return _internal_has_component(); +} +inline const ::Odb::Lib::Protobuf::ProductModel::Component& PinConnection::_internal_component() const { + const ::Odb::Lib::Protobuf::ProductModel::Component* p = _impl_.component_; + return p != nullptr ? *p : reinterpret_cast( + ::Odb::Lib::Protobuf::ProductModel::_Component_default_instance_); +} +inline const ::Odb::Lib::Protobuf::ProductModel::Component& PinConnection::component() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.PinConnection.component) + return _internal_component(); +} +inline void PinConnection::unsafe_arena_set_allocated_component( + ::Odb::Lib::Protobuf::ProductModel::Component* component) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.component_); + } + _impl_.component_ = component; + if (component) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Odb.Lib.Protobuf.ProductModel.PinConnection.component) +} +inline ::Odb::Lib::Protobuf::ProductModel::Component* PinConnection::release_component() { + _impl_._has_bits_[0] &= ~0x00000002u; + ::Odb::Lib::Protobuf::ProductModel::Component* temp = _impl_.component_; + _impl_.component_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::Odb::Lib::Protobuf::ProductModel::Component* PinConnection::unsafe_arena_release_component() { + // @@protoc_insertion_point(field_release:Odb.Lib.Protobuf.ProductModel.PinConnection.component) + _impl_._has_bits_[0] &= ~0x00000002u; + ::Odb::Lib::Protobuf::ProductModel::Component* temp = _impl_.component_; + _impl_.component_ = nullptr; + return temp; +} +inline ::Odb::Lib::Protobuf::ProductModel::Component* PinConnection::_internal_mutable_component() { + _impl_._has_bits_[0] |= 0x00000002u; + if (_impl_.component_ == nullptr) { + auto* p = CreateMaybeMessage<::Odb::Lib::Protobuf::ProductModel::Component>(GetArenaForAllocation()); + _impl_.component_ = p; + } + return _impl_.component_; +} +inline ::Odb::Lib::Protobuf::ProductModel::Component* PinConnection::mutable_component() { + ::Odb::Lib::Protobuf::ProductModel::Component* _msg = _internal_mutable_component(); + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.PinConnection.component) + return _msg; +} +inline void PinConnection::set_allocated_component(::Odb::Lib::Protobuf::ProductModel::Component* component) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.component_); + } + if (component) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(component)); + if (message_arena != submessage_arena) { + component = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, component, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.component_ = component; + // @@protoc_insertion_point(field_set_allocated:Odb.Lib.Protobuf.ProductModel.PinConnection.component) +} + +// optional .Odb.Lib.Protobuf.ProductModel.Pin pin = 3; +inline bool PinConnection::_internal_has_pin() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || _impl_.pin_ != nullptr); + return value; +} +inline bool PinConnection::has_pin() const { + return _internal_has_pin(); +} +inline const ::Odb::Lib::Protobuf::ProductModel::Pin& PinConnection::_internal_pin() const { + const ::Odb::Lib::Protobuf::ProductModel::Pin* p = _impl_.pin_; + return p != nullptr ? *p : reinterpret_cast( + ::Odb::Lib::Protobuf::ProductModel::_Pin_default_instance_); +} +inline const ::Odb::Lib::Protobuf::ProductModel::Pin& PinConnection::pin() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.PinConnection.pin) + return _internal_pin(); +} +inline void PinConnection::unsafe_arena_set_allocated_pin( + ::Odb::Lib::Protobuf::ProductModel::Pin* pin) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.pin_); + } + _impl_.pin_ = pin; + if (pin) { + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:Odb.Lib.Protobuf.ProductModel.PinConnection.pin) +} +inline ::Odb::Lib::Protobuf::ProductModel::Pin* PinConnection::release_pin() { + _impl_._has_bits_[0] &= ~0x00000004u; + ::Odb::Lib::Protobuf::ProductModel::Pin* temp = _impl_.pin_; + _impl_.pin_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::Odb::Lib::Protobuf::ProductModel::Pin* PinConnection::unsafe_arena_release_pin() { + // @@protoc_insertion_point(field_release:Odb.Lib.Protobuf.ProductModel.PinConnection.pin) + _impl_._has_bits_[0] &= ~0x00000004u; + ::Odb::Lib::Protobuf::ProductModel::Pin* temp = _impl_.pin_; + _impl_.pin_ = nullptr; + return temp; +} +inline ::Odb::Lib::Protobuf::ProductModel::Pin* PinConnection::_internal_mutable_pin() { + _impl_._has_bits_[0] |= 0x00000004u; + if (_impl_.pin_ == nullptr) { + auto* p = CreateMaybeMessage<::Odb::Lib::Protobuf::ProductModel::Pin>(GetArenaForAllocation()); + _impl_.pin_ = p; + } + return _impl_.pin_; +} +inline ::Odb::Lib::Protobuf::ProductModel::Pin* PinConnection::mutable_pin() { + ::Odb::Lib::Protobuf::ProductModel::Pin* _msg = _internal_mutable_pin(); + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.PinConnection.pin) + return _msg; +} +inline void PinConnection::set_allocated_pin(::Odb::Lib::Protobuf::ProductModel::Pin* pin) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.pin_); + } + if (pin) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(pin)); + if (message_arena != submessage_arena) { + pin = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, pin, submessage_arena); + } + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + _impl_.pin_ = pin; + // @@protoc_insertion_point(field_set_allocated:Odb.Lib.Protobuf.ProductModel.PinConnection.pin) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_pinconnection_2eproto diff --git a/OdbDesignLib/ProtoBuf/via.pb.cc b/OdbDesignLib/ProtoBuf/via.pb.cc new file mode 100644 index 00000000..975b7cfb --- /dev/null +++ b/OdbDesignLib/ProtoBuf/via.pb.cc @@ -0,0 +1,369 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: via.proto + +#include "via.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { +PROTOBUF_CONSTEXPR Via::Via( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.boardside_)*/0} {} +struct ViaDefaultTypeInternal { + PROTOBUF_CONSTEXPR ViaDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ViaDefaultTypeInternal() {} + union { + Via _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ViaDefaultTypeInternal _Via_default_instance_; +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +static ::_pb::Metadata file_level_metadata_via_2eproto[1]; +static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_via_2eproto = nullptr; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_via_2eproto = nullptr; + +const uint32_t TableStruct_via_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Via, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Via, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Via, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::Odb::Lib::Protobuf::ProductModel::Via, _impl_.boardside_), + 0, + 1, +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 8, -1, sizeof(::Odb::Lib::Protobuf::ProductModel::Via)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::Odb::Lib::Protobuf::ProductModel::_Via_default_instance_._instance, +}; + +const char descriptor_table_protodef_via_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\tvia.proto\022\035Odb.Lib.Protobuf.ProductMod" + "el\032\013enums.proto\"d\n\003Via\022\021\n\004name\030\001 \001(\tH\000\210\001" + "\001\0223\n\tboardSide\030\002 \001(\0162\033.Odb.Lib.Protobuf." + "BoardSideH\001\210\001\001B\007\n\005_nameB\014\n\n_boardSideb\006p" + "roto3" + ; +static const ::_pbi::DescriptorTable* const descriptor_table_via_2eproto_deps[1] = { + &::descriptor_table_enums_2eproto, +}; +static ::_pbi::once_flag descriptor_table_via_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_via_2eproto = { + false, false, 165, descriptor_table_protodef_via_2eproto, + "via.proto", + &descriptor_table_via_2eproto_once, descriptor_table_via_2eproto_deps, 1, 1, + schemas, file_default_instances, TableStruct_via_2eproto::offsets, + file_level_metadata_via_2eproto, file_level_enum_descriptors_via_2eproto, + file_level_service_descriptors_via_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_via_2eproto_getter() { + return &descriptor_table_via_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_via_2eproto(&descriptor_table_via_2eproto); +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { + +// =================================================================== + +class Via::_Internal { + public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static void set_has_name(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_boardside(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +Via::Via(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(arena, is_message_owned); + // @@protoc_insertion_point(arena_constructor:Odb.Lib.Protobuf.ProductModel.Via) +} +Via::Via(const Via& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + Via* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.name_){} + , decltype(_impl_.boardside_){}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_name()) { + _this->_impl_.name_.Set(from._internal_name(), + _this->GetArenaForAllocation()); + } + _this->_impl_.boardside_ = from._impl_.boardside_; + // @@protoc_insertion_point(copy_constructor:Odb.Lib.Protobuf.ProductModel.Via) +} + +inline void Via::SharedCtor( + ::_pb::Arena* arena, bool is_message_owned) { + (void)arena; + (void)is_message_owned; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.name_){} + , decltype(_impl_.boardside_){0} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +Via::~Via() { + // @@protoc_insertion_point(destructor:Odb.Lib.Protobuf.ProductModel.Via) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void Via::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.name_.Destroy(); +} + +void Via::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void Via::Clear() { +// @@protoc_insertion_point(message_clear_start:Odb.Lib.Protobuf.ProductModel.Via) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + _impl_.boardside_ = 0; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* Via::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "Odb.Lib.Protobuf.ProductModel.Via.name")); + } else + goto handle_unusual; + continue; + // optional .Odb.Lib.Protobuf.BoardSide boardSide = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_boardside(static_cast<::Odb::Lib::Protobuf::BoardSide>(val)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _impl_._has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* Via::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:Odb.Lib.Protobuf.ProductModel.Via) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // optional string name = 1; + if (_internal_has_name()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "Odb.Lib.Protobuf.ProductModel.Via.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + // optional .Odb.Lib.Protobuf.BoardSide boardSide = 2; + if (_internal_has_boardside()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this->_internal_boardside(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:Odb.Lib.Protobuf.ProductModel.Via) + return target; +} + +size_t Via::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:Odb.Lib.Protobuf.ProductModel.Via) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // optional .Odb.Lib.Protobuf.BoardSide boardSide = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_boardside()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Via::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + Via::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Via::GetClassData() const { return &_class_data_; } + + +void Via::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { + auto* const _this = static_cast(&to_msg); + auto& from = static_cast(from_msg); + // @@protoc_insertion_point(class_specific_merge_from_start:Odb.Lib.Protobuf.ProductModel.Via) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + 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->_impl_.boardside_ = from._impl_.boardside_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void Via::CopyFrom(const Via& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:Odb.Lib.Protobuf.ProductModel.Via) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Via::IsInitialized() const { + return true; +} + +void Via::InternalSwap(Via* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + swap(_impl_.boardside_, other->_impl_.boardside_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Via::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_via_2eproto_getter, &descriptor_table_via_2eproto_once, + file_level_metadata_via_2eproto[0]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::Odb::Lib::Protobuf::ProductModel::Via* +Arena::CreateMaybeMessage< ::Odb::Lib::Protobuf::ProductModel::Via >(Arena* arena) { + return Arena::CreateMessageInternal< ::Odb::Lib::Protobuf::ProductModel::Via >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/OdbDesignLib/ProtoBuf/via.pb.h b/OdbDesignLib/ProtoBuf/via.pb.h new file mode 100644 index 00000000..02baad12 --- /dev/null +++ b/OdbDesignLib/ProtoBuf/via.pb.h @@ -0,0 +1,361 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: via.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_via_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_via_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3021000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3021012 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include "enums.pb.h" +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_via_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_via_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_via_2eproto; +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { +class Via; +struct ViaDefaultTypeInternal; +extern ViaDefaultTypeInternal _Via_default_instance_; +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb +PROTOBUF_NAMESPACE_OPEN +template<> ::Odb::Lib::Protobuf::ProductModel::Via* Arena::CreateMaybeMessage<::Odb::Lib::Protobuf::ProductModel::Via>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace Odb { +namespace Lib { +namespace Protobuf { +namespace ProductModel { + +// =================================================================== + +class Via final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:Odb.Lib.Protobuf.ProductModel.Via) */ { + public: + inline Via() : Via(nullptr) {} + ~Via() override; + explicit PROTOBUF_CONSTEXPR Via(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + Via(const Via& from); + Via(Via&& from) noexcept + : Via() { + *this = ::std::move(from); + } + + inline Via& operator=(const Via& from) { + CopyFrom(from); + return *this; + } + inline Via& operator=(Via&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const Via& default_instance() { + return *internal_default_instance(); + } + static inline const Via* internal_default_instance() { + return reinterpret_cast( + &_Via_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(Via& a, Via& b) { + a.Swap(&b); + } + inline void Swap(Via* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Via* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + Via* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const Via& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const Via& from) { + Via::MergeImpl(*this, from); + } + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _impl_._cached_size_.Get(); } + + private: + void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Via* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "Odb.Lib.Protobuf.ProductModel.Via"; + } + protected: + explicit Via(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kBoardSideFieldNumber = 2, + }; + // optional string name = 1; + bool has_name() const; + private: + bool _internal_has_name() const; + public: + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + 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 .Odb.Lib.Protobuf.BoardSide boardSide = 2; + bool has_boardside() const; + private: + bool _internal_has_boardside() const; + public: + void clear_boardside(); + ::Odb::Lib::Protobuf::BoardSide boardside() const; + void set_boardside(::Odb::Lib::Protobuf::BoardSide value); + private: + ::Odb::Lib::Protobuf::BoardSide _internal_boardside() const; + void _internal_set_boardside(::Odb::Lib::Protobuf::BoardSide value); + public: + + // @@protoc_insertion_point(class_scope:Odb.Lib.Protobuf.ProductModel.Via) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + struct Impl_ { + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + int boardside_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_via_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Via + +// optional string name = 1; +inline bool Via::_internal_has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool Via::has_name() const { + return _internal_has_name(); +} +inline void Via::clear_name() { + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& Via::name() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Via.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void Via::set_name(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:Odb.Lib.Protobuf.ProductModel.Via.name) +} +inline std::string* Via::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:Odb.Lib.Protobuf.ProductModel.Via.name) + return _s; +} +inline const std::string& Via::_internal_name() const { + return _impl_.name_.Get(); +} +inline void Via::_internal_set_name(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* Via::_internal_mutable_name() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* Via::release_name() { + // @@protoc_insertion_point(field_release:Odb.Lib.Protobuf.ProductModel.Via.name) + if (!_internal_has_name()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.name_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void Via::set_allocated_name(std::string* name) { + if (name != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.name_.IsDefault()) { + _impl_.name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:Odb.Lib.Protobuf.ProductModel.Via.name) +} + +// optional .Odb.Lib.Protobuf.BoardSide boardSide = 2; +inline bool Via::_internal_has_boardside() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool Via::has_boardside() const { + return _internal_has_boardside(); +} +inline void Via::clear_boardside() { + _impl_.boardside_ = 0; + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline ::Odb::Lib::Protobuf::BoardSide Via::_internal_boardside() const { + return static_cast< ::Odb::Lib::Protobuf::BoardSide >(_impl_.boardside_); +} +inline ::Odb::Lib::Protobuf::BoardSide Via::boardside() const { + // @@protoc_insertion_point(field_get:Odb.Lib.Protobuf.ProductModel.Via.boardSide) + return _internal_boardside(); +} +inline void Via::_internal_set_boardside(::Odb::Lib::Protobuf::BoardSide value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.boardside_ = value; +} +inline void Via::set_boardside(::Odb::Lib::Protobuf::BoardSide value) { + _internal_set_boardside(value); + // @@protoc_insertion_point(field_set:Odb.Lib.Protobuf.ProductModel.Via.boardSide) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ + +// @@protoc_insertion_point(namespace_scope) + +} // namespace ProductModel +} // namespace Protobuf +} // namespace Lib +} // namespace Odb + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_via_2eproto diff --git a/OdbDesignLib/protoc/component.proto b/OdbDesignLib/protoc/component.proto new file mode 100644 index 00000000..25b15cb6 --- /dev/null +++ b/OdbDesignLib/protoc/component.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; + +//// https://protobuf.dev/reference/cpp/cpp-generated/#message +//option optimize_for = CODE_SIZE; + +import "enums.proto"; +import "part.proto"; +import "package.proto"; + +package Odb.Lib.Protobuf.ProductModel; + +// +// Component.h +// + +message Component { + + // std::string m_refDes; + // std::string m_partName; + // std::shared_ptr m_pPackage; + // unsigned int m_index; + // BoardSide m_side; + // std::shared_ptr m_pPart; + + optional string refDes = 1; + optional string partName = 2; + optional Package package = 3; + optional uint32 index = 4; + optional BoardSide side = 5; + optional Part part = 6; + +} \ No newline at end of file diff --git a/OdbDesignLib/protoc/design.proto b/OdbDesignLib/protoc/design.proto index 92909540..a70a6324 100644 --- a/OdbDesignLib/protoc/design.proto +++ b/OdbDesignLib/protoc/design.proto @@ -3,10 +3,13 @@ syntax = "proto3"; //// https://protobuf.dev/reference/cpp/cpp-generated/#message //option optimize_for = CODE_SIZE; -package Odb.Lib.Protobuf; - - import "filearchive.proto"; +import "net.proto"; +import "package.proto"; +import "component.proto"; +import "part.proto"; + +package Odb.Lib.Protobuf.ProductModel; // // Design.h @@ -14,6 +17,33 @@ import "filearchive.proto"; message Design { - optional FileArchive fileArchive = 1; + // std::string m_productModel; + // std::string m_name; + + // std::shared_ptr m_pFileModel; + + // Net::Vector m_nets; + // Net::StringMap m_netsByName; + + // Package::Vector m_packages; + // Package::StringMap m_packagesByName; + + // Component::Vector m_components; + // Component::StringMap m_componentsByName; + + // Part::Vector m_parts; + // Part::StringMap m_partsByName; + optional string productModel = 1; + optional string name = 2; + optional FileArchive fileModel = 3; + repeated Net nets = 4; + map netsByName = 5; + repeated Package packages = 6; + map packagesByName = 7; + repeated Component components = 8; + map componentsByName = 9; + repeated Part parts = 10; + map partsByName = 11; + } \ No newline at end of file diff --git a/OdbDesignLib/protoc/net.proto b/OdbDesignLib/protoc/net.proto new file mode 100644 index 00000000..9dbf5df8 --- /dev/null +++ b/OdbDesignLib/protoc/net.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; + +//// https://protobuf.dev/reference/cpp/cpp-generated/#message +//option optimize_for = CODE_SIZE; + +import "pinconnection.proto"; + +package Odb.Lib.Protobuf.ProductModel; + +// +// Net.h +// + +message Net { + + // std::string m_name; + // PinConnection::Vector m_pinConnections; + // unsigned int m_index; + + optional string name = 1; + repeated PinConnection pinConnections = 2; + optional uint32 index = 3; + +} \ No newline at end of file diff --git a/OdbDesignLib/protoc/package.proto b/OdbDesignLib/protoc/package.proto new file mode 100644 index 00000000..ee5a74d6 --- /dev/null +++ b/OdbDesignLib/protoc/package.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; + +//// https://protobuf.dev/reference/cpp/cpp-generated/#message +//option optimize_for = CODE_SIZE; + +import "pin.proto"; + +package Odb.Lib.Protobuf.ProductModel; + +// +// Package.h +// + +message Package { + + // std::string m_name; + // Pin::Vector m_pins; + // Pin::StringMap m_pinsByName; + // unsigned int m_index; + + optional string name = 1; + repeated Pin pins = 2; + map pinsByName = 3; + optional uint32 index = 4; +} \ No newline at end of file diff --git a/OdbDesignLib/protoc/part.proto b/OdbDesignLib/protoc/part.proto new file mode 100644 index 00000000..1acaaa9e --- /dev/null +++ b/OdbDesignLib/protoc/part.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +//// https://protobuf.dev/reference/cpp/cpp-generated/#message +//option optimize_for = CODE_SIZE; + +package Odb.Lib.Protobuf.ProductModel; + +// +// Part.h +// + +message Part { + + optional string name = 1; + +} \ No newline at end of file diff --git a/OdbDesignLib/protoc/pin.proto b/OdbDesignLib/protoc/pin.proto new file mode 100644 index 00000000..ec1c2628 --- /dev/null +++ b/OdbDesignLib/protoc/pin.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +//// https://protobuf.dev/reference/cpp/cpp-generated/#message +//option optimize_for = CODE_SIZE; + +package Odb.Lib.Protobuf.ProductModel; + +// +// Pin.h +// + +message Pin { + + optional string name = 1; + optional uint32 index = 2; + +} \ No newline at end of file diff --git a/OdbDesignLib/protoc/pinconnection.proto b/OdbDesignLib/protoc/pinconnection.proto new file mode 100644 index 00000000..cef956c6 --- /dev/null +++ b/OdbDesignLib/protoc/pinconnection.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; + +//// https://protobuf.dev/reference/cpp/cpp-generated/#message +//option optimize_for = CODE_SIZE; + +import "component.proto"; +import "pin.proto"; + +package Odb.Lib.Protobuf.ProductModel; + +// +// PinConnection.h +// + +message PinConnection { + + // std::string m_name; + // std::shared_ptr m_pComponent; + // std::shared_ptr m_pPin; + + optional string name = 1; + optional Component component = 2; + optional Pin pin = 3; + +} \ No newline at end of file diff --git a/OdbDesignLib/protoc/via.proto b/OdbDesignLib/protoc/via.proto new file mode 100644 index 00000000..4ca99391 --- /dev/null +++ b/OdbDesignLib/protoc/via.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +//// https://protobuf.dev/reference/cpp/cpp-generated/#message +//option optimize_for = CODE_SIZE; + +import "enums.proto"; + +package Odb.Lib.Protobuf.ProductModel; + +// +// Via.h +// + +message Via { + + optional string name = 1; + optional BoardSide boardSide = 2; + +} \ No newline at end of file