diff --git a/.gitignore b/.gitignore index 434317f5..b6e817eb 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ PyOdbDesignServer/PyOdbDesignLib/ build/ /vcpkg_installed /OdbDesignServer/designs/ +/cmake-build-debug-visual-studio diff --git a/BUILD.md b/BUILD.md new file mode 100644 index 00000000..e69de29b diff --git a/CMakeLists.txt b/CMakeLists.txt index d50c7dcd..10d4a081 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,11 +4,12 @@ cmake_minimum_required (VERSION 3.21) # require C++0x17 compiler -set(MY_CXX_STANDARD 17) +set(MY_CXX_STANDARD 20) set(CXX_STANDARD ${MY_CXX_STANDARD}) set(CMAKE_CXX_STANDARD ${MY_CXX_STANDARD}) set(CMAKE_CXX_STANDARD_REQUIRED True) +# required for SWIG python wrapper set(CMAKE_POSITION_INDEPENDENT_CODE ON) ## treat warnings as errors (https://cmake.org/cmake/help/latest/variable/CMAKE_COMPILE_WARNING_AS_ERROR.html#variable:CMAKE_COMPILE_WARNING_AS_ERROR) @@ -22,6 +23,14 @@ endif() project ("OdbDesign") +if (MSVC) + # control where the static and shared libraries are built so that on windows + # we don't need to tinker with the path to run the executable + set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") +endif() + # increase warnings in a compiler-specific manner if (MSVC) # warning level 4 @@ -51,6 +60,7 @@ add_subdirectory("Utils") target_link_libraries(OdbDesignApp PUBLIC OdbDesign) target_link_libraries(OdbDesignServer PUBLIC OdbDesign) +# link to Utils lib in all targets target_link_libraries(OdbDesignApp PUBLIC Utils) target_link_libraries(OdbDesignServer PUBLIC Utils) target_link_libraries(OdbDesign PUBLIC Utils) diff --git a/Dockerfile b/Dockerfile index 6979df39..bb1e4efa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,21 @@ RUN apt-get update && \ ninja-build \ python3-dev \ # mingw-w64 \ - swig + swig \ + build-essential \ + git \ + cmake \ + zip \ + unzip \ + tar && \ + rm -rf /var/lib/apt/lists/* + +# install vcpkg +# /root/src/github/microsoft/vcpkg/scripts/buildsystems/vcpkg.cmake +WORKDIR /root/src/github/microsoft +RUN git clone https://github.com/Microsoft/vcpkg.git +WORKDIR /root/src/github/microsoft/vcpkg +RUN ./bootstrap-vcpkg.sh # copy source COPY . /src/OdbDesign diff --git a/OdbDesignApp/OdbDesignApp.cpp b/OdbDesignApp/OdbDesignApp.cpp index e8eaae46..73ff6588 100644 --- a/OdbDesignApp/OdbDesignApp.cpp +++ b/OdbDesignApp/OdbDesignApp.cpp @@ -100,12 +100,12 @@ bool TestRigidFlexDesign() auto subnetType = pSubnetRecord->type; if (subnetType == Odb::Lib::FileModel::Design::EdaDataFile::NetRecord::SubnetRecord::Type::Toeprint) { - auto pViaSubnetRecord = std::dynamic_pointer_cast(pSubnetRecord); - auto viaType = pViaSubnetRecord->type; - if (viaType == Odb::Lib::FileModel::Design::EdaDataFile::NetRecord::ToeprintSubnetRecord::Type::Via) - { + //auto pToeprintSubnetRecord = pSubnetRecord; + //auto viaType = pToeprintSubnetRecord->type; + //if (viaType == Odb::Lib::FileModel::Design::EdaDataFile::NetRecord::ToeprintSubnetRecord::Type::Via) + //{ - } + //} } } } diff --git a/OdbDesignLib/ArchiveExtractor.cpp b/OdbDesignLib/ArchiveExtractor.cpp deleted file mode 100644 index 34e40a57..00000000 --- a/OdbDesignLib/ArchiveExtractor.cpp +++ /dev/null @@ -1,61 +0,0 @@ -#include "ArchiveExtractor.h" -#include -#include "libarchive_extract.h" - - -ArchiveExtractor::ArchiveExtractor(const std::string& path) - : m_path(path) -{ -} - -std::string ArchiveExtractor::GetPath() const -{ - return m_path; -} - -std::string ArchiveExtractor::GetExtractedPath() const -{ - return m_extractedPath; -} - -bool ArchiveExtractor::IsArchiveTypeSupported(const std::filesystem::path& file) -{ - return true; - - //for (const auto& ext : SupportedExtensions) - //{ - // if (file.extension() == "."+ext) - // { - // return true; - // } - //} - - //return false; -} - -bool ArchiveExtractor::IsArchiveTypeSupported(const std::string& file) -{ - return IsArchiveTypeSupported(std::filesystem::path(file)); -} - -bool ArchiveExtractor::Extract() -{ - auto path = std::filesystem::path(m_path); - //auto extractionPath = path.replace_extension().string(); - auto extractionPath = path.parent_path().string(); - return Extract(extractionPath); -} - -bool ArchiveExtractor::Extract(const std::string& destinationPath) -{ - if (extract(m_path.c_str(), destinationPath.c_str())) - { - std::filesystem::path p(destinationPath); - p /= std::filesystem::path(m_path).stem(); - m_extractedPath = p.string(); - - return true; - } - - return false; -} diff --git a/OdbDesignLib/ArchiveExtractor.h b/OdbDesignLib/ArchiveExtractor.h deleted file mode 100644 index d9bdd7b0..00000000 --- a/OdbDesignLib/ArchiveExtractor.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -#include -#include - - -class ArchiveExtractor -{ -public: - ArchiveExtractor(const std::string& path); - //~ArchiveExtractor(); - - std::string GetPath() const; - std::string GetExtractedPath() const; - - static bool IsArchiveTypeSupported(const std::filesystem::path& file); - static bool IsArchiveTypeSupported(const std::string& file); - - bool Extract(); - bool Extract(const std::string& destinationPath); - - static inline const std::string SupportedExtensions[] = { "tgz", "tar.gz", "gz", "zip" }; - -private: - std::string m_path; - std::string m_extractedPath; - -}; diff --git a/OdbDesignLib/CMakeLists.txt b/OdbDesignLib/CMakeLists.txt index aa47d1ec..b288661a 100644 --- a/OdbDesignLib/CMakeLists.txt +++ b/OdbDesignLib/CMakeLists.txt @@ -1,22 +1,26 @@ # CMakeList.txt : CMake project for OdbDesignLib # -add_library(OdbDesign SHARED "export.h" "ComponentLayerDirectory.cpp" "ComponentLayerDirectory.h" "EdaDataFile.cpp" "EdaDataFile.h" "LayerDirectory.cpp" "LayerDirectory.h" "NetlistFile.cpp" "NetlistFile.h" "FileArchive.cpp" "FileArchive.h" "StepDirectory.cpp" "StepDirectory.h" "string_trim.h" "macros.h" "Net.h" "Net.cpp" "Component.h" "Component.cpp" "Pin.h" "Pin.cpp" "PinConnection.h" "PinConnection.cpp" "Package.h" "Package.cpp" "Part.h" "Part.cpp" "Via.h" "Via.cpp" "Design.h" "Design.cpp" "BoardSide.h" "string_trim.cpp" "ArchiveExtractor.h" "ArchiveExtractor.cpp" "libarchive_extract.h" "libarchive_extract.cpp" "OdbDesign.h" "DesignCache.h" "DesignCache.cpp" "CrowReturnable.h" "CrowReturnable.cpp") +add_library(OdbDesign SHARED "odbdesign_export.h" "ComponentLayerDirectory.cpp" "ComponentLayerDirectory.h" "EdaDataFile.cpp" "EdaDataFile.h" "LayerDirectory.cpp" "LayerDirectory.h" "NetlistFile.cpp" "NetlistFile.h" "FileArchive.cpp" "FileArchive.h" "StepDirectory.cpp" "StepDirectory.h" "Net.h" "Net.cpp" "Component.h" "Component.cpp" "Pin.h" "Pin.cpp" "PinConnection.h" "PinConnection.cpp" "Package.h" "Package.cpp" "Part.h" "Part.cpp" "Via.h" "Via.cpp" "Design.h" "Design.cpp" "BoardSide.h" "OdbDesign.h" "DesignCache.h" "DesignCache.cpp" "win.h" "proto/edadatafile.pb.h" "proto/edadatafile.pb.cc" "IProtoBuffable.h" "crow_win.h" "OdbFile.h" "OdbFile.cpp" "OdbFileRecord.h" "OdbFileRecord.cpp" "IOdbServerApp.h" "IOdbServerApp.cpp") # required for SWIG set_property(TARGET OdbDesign PROPERTY POSITION_INDEPENDENT_CODE ON) -# state that anybody linking to us needs to include the current source dir, -# while we don't. +# state that anybody linking to us needs to include the current source dir, while we don't. target_include_directories(OdbDesign INTERFACE $ $) -# Link to LibArchive -find_package(LibArchive REQUIRED) -target_include_directories(OdbDesign PRIVATE ${LibArchive_INCLUDE_DIRS}) -target_link_libraries(OdbDesign PUBLIC ${LibArchive_LIBRARIES}) +# Link to Protobuf +find_package(Protobuf CONFIG REQUIRED) +#protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS protoc/edadatafile.proto) +#target_link_libraries(OdbDesign PUBLIC protobuf::libprotoc protobuf::libprotobuf protobuf::libprotobuf-lite) +target_link_libraries(OdbDesign PUBLIC protobuf::libprotobuf) +# mark the generated Protofbuf C++ files as generated +#set_source_files_properties(${PROTO_SRC} ${PROTO_HDRS} PROPERTIES GENERATED TRUE) +# add the generated Protobuf C++ files to the target +#target_sources(OdbDesign PRIVATE ${PROTO_SRCS} ${PROTO_HDRS}) # Python extension module build settings if (PYTHON_MODULE_BUILD) @@ -25,23 +29,23 @@ if (PYTHON_MODULE_BUILD) # PRE_BUILD # COMMAND scripts/generate-python-module.ps1) - if (MSVC) - # make a copy of output library with name expected by Python module extensions - add_custom_command(TARGET OdbDesign - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy $ $/_PyOdbDesignLib.pyd - COMMENT Copying to Python module extension - ) -elseif(LINUX) - # make a copy of output library with name expected by Python module extensions - add_custom_command(TARGET OdbDesign - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy $ $/_PyOdbDesignLib.so - COMMENT Copying to Python module extension - ) -endif() + if (MSVC) + # make a copy of output library with name expected by Python module extensions + add_custom_command(TARGET OdbDesign + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy $ $/_PyOdbDesignLib.pyd + COMMENT Copying to Python module extension + ) + elseif(LINUX) + # make a copy of output library with name expected by Python module extensions + add_custom_command(TARGET OdbDesign + POST_BUILD + COMMAND ${CMAKE_COMMAND} + ARGS -E copy $ $/_PyOdbDesignLib.so + COMMENT Copying to Python module extension + ) + endif() target_sources(OdbDesign PRIVATE "OdbDesignLib_wrap.cxx") diff --git a/OdbDesignLib/Component.h b/OdbDesignLib/Component.h index d9f60fd6..efa79c60 100644 --- a/OdbDesignLib/Component.h +++ b/OdbDesignLib/Component.h @@ -1,6 +1,6 @@ #pragma once -#include "export.h" +#include "odbdesign_export.h" #include #include #include @@ -12,7 +12,7 @@ namespace Odb::Lib::ProductModel { - class DECLSPEC Component + class ODBDESIGN_EXPORT Component { public: Component(std::string refDes, std::string partName, std::shared_ptr pPackage, unsigned int index, BoardSide side); diff --git a/OdbDesignLib/ComponentLayerDirectory.h b/OdbDesignLib/ComponentLayerDirectory.h index d78cb7da..782ae1b2 100644 --- a/OdbDesignLib/ComponentLayerDirectory.h +++ b/OdbDesignLib/ComponentLayerDirectory.h @@ -8,7 +8,7 @@ namespace Odb::Lib::FileModel::Design { - class DECLSPEC ComponentLayerDirectory : public LayerDirectory + class ODBDESIGN_EXPORT ComponentLayerDirectory : public LayerDirectory { public: ComponentLayerDirectory(std::filesystem::path path, BoardSide side); diff --git a/OdbDesignLib/CrowReturnable.cpp b/OdbDesignLib/CrowReturnable.cpp deleted file mode 100644 index 5b09cd79..00000000 --- a/OdbDesignLib/CrowReturnable.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "CrowReturnable.h" \ No newline at end of file diff --git a/OdbDesignLib/CrowReturnable.h b/OdbDesignLib/CrowReturnable.h deleted file mode 100644 index c32ad6e5..00000000 --- a/OdbDesignLib/CrowReturnable.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#include "crow.h" - - -class CrowReturnable : public crow::returnable -{ - CrowReturnable() - : returnable("text/plain") - {} - - // - virtual std::string as_string() const = 0; - - std::string dump() const override - { - return this->as_string(); - } -}; diff --git a/OdbDesignLib/Design.h b/OdbDesignLib/Design.h index 96cd3ca1..942f2d01 100644 --- a/OdbDesignLib/Design.h +++ b/OdbDesignLib/Design.h @@ -1,6 +1,6 @@ #pragma once -#include "export.h" +#include "odbdesign_export.h" #include #include #include "Net.h" @@ -13,7 +13,7 @@ namespace Odb::Lib::ProductModel { - class DECLSPEC Design + class ODBDESIGN_EXPORT Design { public: Design(); diff --git a/OdbDesignLib/DesignCache.cpp b/OdbDesignLib/DesignCache.cpp index 3464e5d0..f83c0d6b 100644 --- a/OdbDesignLib/DesignCache.cpp +++ b/OdbDesignLib/DesignCache.cpp @@ -16,8 +16,7 @@ namespace Odb::Lib DesignCache::~DesignCache() { - m_fileArchivesByName.clear(); - m_designsByName.clear(); + Clear(); } std::shared_ptr DesignCache::GetDesign(std::string designName) @@ -34,6 +33,8 @@ namespace Odb::Lib std::shared_ptr DesignCache::GetFileArchive(std::string designName) { + std::cout << std::format("Retrieving \"{}\" from cache... ", designName) << std::endl; + auto findIt = m_fileArchivesByName.find(designName); if (findIt == m_fileArchivesByName.end()) { @@ -44,6 +45,12 @@ namespace Odb::Lib return m_fileArchivesByName[designName]; } + void DesignCache::Clear() + { + m_fileArchivesByName.clear(); + m_designsByName.clear(); + } + std::shared_ptr DesignCache::LoadDesign(std::string designName) { std::filesystem::path dir(m_directory); diff --git a/OdbDesignLib/DesignCache.h b/OdbDesignLib/DesignCache.h index eb192767..c10a7414 100644 --- a/OdbDesignLib/DesignCache.h +++ b/OdbDesignLib/DesignCache.h @@ -2,12 +2,12 @@ #include "FileArchive.h" #include "Design.h" -#include "export.h" +#include "odbdesign_export.h" namespace Odb::Lib { - class DECLSPEC DesignCache + class ODBDESIGN_EXPORT DesignCache { public: DesignCache(); @@ -16,6 +16,8 @@ namespace Odb::Lib std::shared_ptr GetDesign(std::string designName); std::shared_ptr GetFileArchive(std::string designName); + + void Clear(); private: std::string m_directory; diff --git a/OdbDesignLib/EdaDataFile.cpp b/OdbDesignLib/EdaDataFile.cpp index 5c37b7ef..3581eec1 100644 --- a/OdbDesignLib/EdaDataFile.cpp +++ b/OdbDesignLib/EdaDataFile.cpp @@ -1,48 +1,119 @@ +#include "crow_win.h" #include "EdaDataFile.h" #include #include -#include "string_trim.h" +#include "str_trim.h" #include "BoardSide.h" +#include "proto/edadatafile.pb.h" +#include namespace Odb::Lib::FileModel::Design { - EdaDataFile::EdaDataFile() + EdaDataFile::EdaDataFile() { } - - //EdaData::EdaData(std::filesystem::path path) - // : m_path(path) - //{ - //} - + EdaDataFile::~EdaDataFile() { } - ///*static*/ const EdaDataFile EdaDataFile::EMPTY; - - std::filesystem::path EdaDataFile::GetPath() const + const std::filesystem::path& EdaDataFile::GetPath() const { return m_path; } - std::string EdaDataFile::GetUnits() const + const std::string& EdaDataFile::GetUnits() const { return m_units; } + const std::string& EdaDataFile::GetSource() const + { + return m_source; + } + EdaDataFile::NetRecord::SubnetRecord::~SubnetRecord() { m_featureIdRecords.clear(); } + std::unique_ptr EdaDataFile::NetRecord::SubnetRecord::to_protobuf() const + { + std::unique_ptr pSubnetRecordMessage(new odbdesign::proto::EdaDataFile::NetRecord::SubnetRecord); + pSubnetRecordMessage->set_type((odbdesign::proto::EdaDataFile::NetRecord::SubnetRecord::Type) type); + if (type == Type::Toeprint) + { + pSubnetRecordMessage->set_componentnumber(componentNumber); + pSubnetRecordMessage->set_toeprintnumber(toeprintNumber); + pSubnetRecordMessage->set_side((odbdesign::proto::EdaDataFile_BoardSide)side); + } + else if (type == Type::Plane) + { + pSubnetRecordMessage->set_filltype((odbdesign::proto::EdaDataFile::NetRecord::SubnetRecord::FillType)fillType); + pSubnetRecordMessage->set_cutouttype((odbdesign::proto::EdaDataFile::NetRecord::SubnetRecord::CutoutType) cutoutType); + pSubnetRecordMessage->set_fillsize(fillSize); + } + + for (const auto& featureIdRecord : m_featureIdRecords) + { + auto pFeatureIdRecordMessage = pSubnetRecordMessage->add_featureidrecords(); + pFeatureIdRecordMessage->CopyFrom(*featureIdRecord->to_protobuf()); + } + return pSubnetRecordMessage; + } + + void EdaDataFile::NetRecord::SubnetRecord::from_protobuf(const odbdesign::proto::EdaDataFile::NetRecord::SubnetRecord& message) + { + } + EdaDataFile::NetRecord::~NetRecord() { m_subnetRecords.clear(); m_propertyRecords.clear(); } + std::unique_ptr EdaDataFile::NetRecord::to_protobuf() const + { + std::unique_ptr pNetRecordMessage(new odbdesign::proto::EdaDataFile::NetRecord); + pNetRecordMessage->set_name(name); + pNetRecordMessage->set_attributesidstring(attributesIdString); + pNetRecordMessage->set_index(index); + + for (const auto& propertyRecord : m_propertyRecords) + { + auto pPropertyRecordMessage = pNetRecordMessage->add_propertyrecords(); + pPropertyRecordMessage->CopyFrom(*propertyRecord->to_protobuf()); + } + + for (const auto& subnetRecord : m_subnetRecords) + { + auto pSubnetRecordMessage = pNetRecordMessage->add_subnetrecords(); + pSubnetRecordMessage->CopyFrom(*subnetRecord->to_protobuf()); + } + return pNetRecordMessage; + } + + void EdaDataFile::NetRecord::from_protobuf(const odbdesign::proto::EdaDataFile::NetRecord& message) + { + + } + + std::unique_ptr + EdaDataFile::NetRecord::SubnetRecord::FeatureIdRecord::to_protobuf() const + { + std::unique_ptr pFeatureIdRecordMessage(new odbdesign::proto::EdaDataFile::NetRecord::SubnetRecord::FeatureIdRecord); + pFeatureIdRecordMessage->set_type((odbdesign::proto::EdaDataFile::NetRecord::SubnetRecord::FeatureIdRecord::Type) type); + pFeatureIdRecordMessage->set_layernumber(layerNumber); + pFeatureIdRecordMessage->set_featurenumber(featureNumber); + return pFeatureIdRecordMessage; + } + + void EdaDataFile::NetRecord::SubnetRecord::FeatureIdRecord::from_protobuf(const odbdesign::proto::EdaDataFile::NetRecord::SubnetRecord::FeatureIdRecord& message) + { + + } + const std::vector& EdaDataFile::GetLayerNames() const { return m_layerNames; @@ -78,6 +149,50 @@ namespace Odb::Lib::FileModel::Design return m_packageRecordsByName; } + std::unique_ptr EdaDataFile::to_protobuf() const + { + std::unique_ptr pEdaDataFileMessage(new odbdesign::proto::EdaDataFile); + pEdaDataFileMessage->set_path(m_path.string()); + pEdaDataFileMessage->set_units(m_units); + pEdaDataFileMessage->set_source(m_source); + for (const auto& layerName : m_layerNames) + { + pEdaDataFileMessage->add_layernames(layerName); + } + for (const auto& attributeName : m_attributeNames) + { + pEdaDataFileMessage->add_attributenames(attributeName); + } + for (const auto& attrTextValue : m_attributeTextValues) + { + pEdaDataFileMessage->add_attributetextvalues(attrTextValue); + } + for (const auto& pNetRecord : m_netRecords) + { + auto pNetRecordMessage = pEdaDataFileMessage->add_netrecords(); + pNetRecordMessage->CopyFrom(*pNetRecord->to_protobuf()); + } + for (const auto& kvNetRecord : m_netRecordsByName) + { + (*pEdaDataFileMessage->mutable_netrecordsbyname())[kvNetRecord.first] = *kvNetRecord.second->to_protobuf(); + } + for (const auto& pPackageRecord : m_packageRecords) + { + auto pPackageRecordMessage = pEdaDataFileMessage->add_packagerecords(); + pPackageRecordMessage->CopyFrom(*pPackageRecord->to_protobuf()); + } + for (const auto& kvPackageRecord : m_packageRecordsByName) + { + (*pEdaDataFileMessage->mutable_packagerecordsbyname())[kvPackageRecord.first] = *kvPackageRecord.second->to_protobuf(); + } + return pEdaDataFileMessage; + } + + void EdaDataFile::from_protobuf(const odbdesign::proto::EdaDataFile& message) + { + + } + bool EdaDataFile::Parse(std::filesystem::path path) { m_path = path; @@ -101,7 +216,7 @@ namespace Odb::Lib::FileModel::Design while (std::getline(edaDataFile, line)) { // trim whitespace from beginning and end of line - trim(line); + Utils::str_trim(line); if (!line.empty()) { std::stringstream lineStream(line); @@ -148,7 +263,7 @@ namespace Odb::Lib::FileModel::Design // read the rest of the line as the source if (!std::getline(lineStream, m_source)) return false; - trim(m_source); + Utils::str_trim(m_source); } else if (line.find(LAYER_NAMES_RECORD_TOKEN) == 0) { @@ -231,13 +346,13 @@ namespace Odb::Lib::FileModel::Design lineStream >> pCurrentNetRecord->attributesIdString; } - else if (line.find(SUBNET_RECORD_TOKEN) == 0) + else if (line.find(NetRecord::SubnetRecord::RECORD_TOKEN) == 0) { // component record line std::string token; lineStream >> token; - if (token != SUBNET_RECORD_TOKEN) return false; + if (token != NetRecord::SubnetRecord::RECORD_TOKEN) return false; if (pCurrentNetRecord != nullptr) { @@ -249,32 +364,31 @@ namespace Odb::Lib::FileModel::Design } } + pCurrentSubnetRecord = std::make_shared(); + // subnet type lineStream >> token; - if (token == "VIA") - { - pCurrentSubnetRecord = std::make_shared(); + if (token == NetRecord::SubnetRecord::RECORD_TYPE_VIA_TOKEN) + { pCurrentSubnetRecord->type = NetRecord::SubnetRecord::Type::Via; } - else if (token == "TRC") - { - pCurrentSubnetRecord = std::make_shared(); + else if (token == NetRecord::SubnetRecord::RECORD_TYPE_TRACE_TOKEN) + { pCurrentSubnetRecord->type = NetRecord::SubnetRecord::Type::Trace; } - else if (token == "PLN") + else if (token == NetRecord::SubnetRecord::RECORD_TYPE_PLANE_TOKEN) { - pCurrentSubnetRecord = std::make_shared(); pCurrentSubnetRecord->type = NetRecord::SubnetRecord::Type::Plane; // fill type lineStream >> token; if (token == "S") { - std::dynamic_pointer_cast(pCurrentSubnetRecord)->fillType = NetRecord::PlaneSubnetRecord::FillType::Solid; + pCurrentSubnetRecord->fillType = NetRecord::SubnetRecord::FillType::Solid; } else if (token == "O") { - std::dynamic_pointer_cast(pCurrentSubnetRecord)->fillType = NetRecord::PlaneSubnetRecord::FillType::Outline; + pCurrentSubnetRecord->fillType = NetRecord::SubnetRecord::FillType::Outline; } else { @@ -285,19 +399,19 @@ namespace Odb::Lib::FileModel::Design lineStream >> token; if (token == "C") { - std::dynamic_pointer_cast(pCurrentSubnetRecord)->cutoutType = NetRecord::PlaneSubnetRecord::CutoutType::Circle; + pCurrentSubnetRecord->cutoutType = NetRecord::SubnetRecord::CutoutType::Circle; } else if (token == "R") { - std::dynamic_pointer_cast(pCurrentSubnetRecord)->cutoutType = NetRecord::PlaneSubnetRecord::CutoutType::Rectangle; + pCurrentSubnetRecord->cutoutType = NetRecord::SubnetRecord::CutoutType::Rectangle; } else if (token == "O") { - std::dynamic_pointer_cast(pCurrentSubnetRecord)->cutoutType = NetRecord::PlaneSubnetRecord::CutoutType::Octagon; + pCurrentSubnetRecord->cutoutType = NetRecord::SubnetRecord::CutoutType::Octagon; } else if (token == "E") { - std::dynamic_pointer_cast(pCurrentSubnetRecord)->cutoutType = NetRecord::PlaneSubnetRecord::CutoutType::Exact; + pCurrentSubnetRecord->cutoutType = NetRecord::SubnetRecord::CutoutType::Exact; } else { @@ -305,22 +419,21 @@ namespace Odb::Lib::FileModel::Design } // fill size - lineStream >> std::dynamic_pointer_cast(pCurrentSubnetRecord)->fillSize; + lineStream >> pCurrentSubnetRecord->fillSize; } - else if (token == "TOP") + else if (token == NetRecord::SubnetRecord::RECORD_TYPE_TOEPRINT_TOKEN) { - pCurrentSubnetRecord = std::make_shared(); pCurrentSubnetRecord->type = NetRecord::SubnetRecord::Type::Toeprint; // side lineStream >> token; if (token == "T") { - std::dynamic_pointer_cast(pCurrentSubnetRecord)->side = BoardSide::Top; + pCurrentSubnetRecord->side = BoardSide::Top; } else if (token == "B") { - std::dynamic_pointer_cast(pCurrentSubnetRecord)->side = BoardSide::Bottom; + pCurrentSubnetRecord->side = BoardSide::Bottom; } else { @@ -328,10 +441,10 @@ namespace Odb::Lib::FileModel::Design } // componentNumber - lineStream >> std::dynamic_pointer_cast(pCurrentSubnetRecord)->componentNumber; + lineStream >> pCurrentSubnetRecord->componentNumber; // toeprintNumber - lineStream >> std::dynamic_pointer_cast(pCurrentSubnetRecord)->toeprintNumber; + lineStream >> pCurrentSubnetRecord->toeprintNumber; } else { @@ -518,7 +631,7 @@ namespace Odb::Lib::FileModel::Design } else if (token == "T") { - pPinRecord->mountType = PackageRecord::PinRecord::MountType::ThroughHole; + pPinRecord->mountType = PackageRecord::PinRecord::MountType::MT_ThroughHole; } else if (token == "R") { @@ -538,7 +651,7 @@ namespace Odb::Lib::FileModel::Design } else if (token == "U") { - pPinRecord->mountType = PackageRecord::PinRecord::MountType::Undefined; + pPinRecord->mountType = PackageRecord::PinRecord::MountType::MT_Undefined; } else { @@ -580,7 +693,7 @@ namespace Odb::Lib::FileModel::Design } // finish current (previous) net record - // this is the case where the last line of the file is not a net record (and there are no PKG records) + // this is the case where the last line of the file is not a net record (and there are no PKG records) if (pCurrentNetRecord != nullptr) { // finish current (previous) subnet record @@ -613,4 +726,76 @@ namespace Odb::Lib::FileModel::Design return true; } + + // Inherited via IProtoBuffable + std::unique_ptr + EdaDataFile::PropertyRecord::to_protobuf() const + { + std::unique_ptr pPropertyRecordMessage(new odbdesign::proto::EdaDataFile::PropertyRecord); + pPropertyRecordMessage->set_name(name); + pPropertyRecordMessage->set_value(value); + for (const auto& f : floatValues) + { + pPropertyRecordMessage->add_floatvalues(f); + } + return pPropertyRecordMessage; + } + + void EdaDataFile::PropertyRecord::from_protobuf(const odbdesign::proto::EdaDataFile::PropertyRecord& message) + { + }; + + // Inherited via IProtoBuffable + std::unique_ptr + EdaDataFile::PackageRecord::to_protobuf() const + { + std::unique_ptr pPackageRecordMessage(new odbdesign::proto::EdaDataFile::PackageRecord); + pPackageRecordMessage->set_name(name); + pPackageRecordMessage->set_pitch(pitch); + pPackageRecordMessage->set_xmin(xMin); + pPackageRecordMessage->set_ymin(yMin); + pPackageRecordMessage->set_xmax(xMax); + pPackageRecordMessage->set_ymax(yMax); + pPackageRecordMessage->set_attributesidstring(attributesIdString); + for (const auto& pinRecord : m_pinRecords) + { + auto pPinRecordMessage = pPackageRecordMessage->add_pinrecords(); + pPinRecordMessage->CopyFrom(*pinRecord->to_protobuf()); + } + for (const auto& kvPinRecord : m_pinRecordsByName) + { + (*pPackageRecordMessage->mutable_pinrecordsbyname())[kvPinRecord.first] = *kvPinRecord.second->to_protobuf(); + } + for (const auto& propertyRecord : m_propertyRecords) + { + auto pPropertyRecordMessage = pPackageRecordMessage->add_propertyrecords(); + pPropertyRecordMessage->CopyFrom(*propertyRecord->to_protobuf()); + } + return pPackageRecordMessage; + } + + void EdaDataFile::PackageRecord::from_protobuf(const odbdesign::proto::EdaDataFile::PackageRecord& message) + { + }; + + // Inherited via IProtoBuffable + std::unique_ptr + EdaDataFile::PackageRecord::PinRecord::to_protobuf() const + { + std::unique_ptr pPinRecordMessage(new odbdesign::proto::EdaDataFile::PackageRecord::PinRecord); + pPinRecordMessage->set_name(name); + pPinRecordMessage->set_type((odbdesign::proto::EdaDataFile::PackageRecord::PinRecord::Type)type); + pPinRecordMessage->set_xcenter(xCenter); + pPinRecordMessage->set_ycenter(yCenter); + pPinRecordMessage->set_finishedholesize(finishedHoleSize); + pPinRecordMessage->set_electricaltype((odbdesign::proto::EdaDataFile::PackageRecord::PinRecord::ElectricalType)electricalType); + pPinRecordMessage->set_mounttype((odbdesign::proto::EdaDataFile::PackageRecord::PinRecord::MountType)mountType); + pPinRecordMessage->set_id(id); + pPinRecordMessage->set_index(index); + return pPinRecordMessage; + } + + void EdaDataFile::PackageRecord::PinRecord::from_protobuf(const odbdesign::proto::EdaDataFile::PackageRecord::PinRecord& message) + { + }; } \ No newline at end of file diff --git a/OdbDesignLib/EdaDataFile.h b/OdbDesignLib/EdaDataFile.h index 67163bee..b461c696 100644 --- a/OdbDesignLib/EdaDataFile.h +++ b/OdbDesignLib/EdaDataFile.h @@ -4,28 +4,28 @@ #include #include #include -#include "export.h" +#include "odbdesign_export.h" #include "BoardSide.h" +#include "proto/edadatafile.pb.h" +#include +#include "IProtoBuffable.h" namespace Odb::Lib::FileModel::Design { - class DECLSPEC EdaDataFile + class ODBDESIGN_EXPORT EdaDataFile : public IProtoBuffable { public: - EdaDataFile(); - //EdaData(std::filesystem::path path); + EdaDataFile(); ~EdaDataFile(); - std::filesystem::path GetPath() const; - std::string GetUnits() const; + const std::filesystem::path& GetPath() const; + const std::string& GetUnits() const; + const std::string& GetSource() const; - bool Parse(std::filesystem::path path); + bool Parse(std::filesystem::path path); - // the invalid "null" case - //static const EdaDataFile EMPTY; - - struct DECLSPEC PropertyRecord + struct ODBDESIGN_EXPORT PropertyRecord : public IProtoBuffable { // data members std::string name; @@ -38,12 +38,17 @@ namespace Odb::Lib::FileModel::Design // typedefs typedef std::map> StringMap; typedef std::vector> Vector; + + // Inherited via IProtoBuffable + std::unique_ptr to_protobuf() const override; + void from_protobuf(const odbdesign::proto::EdaDataFile::PropertyRecord& message) override; }; - struct DECLSPEC NetRecord - { - struct DECLSPEC SubnetRecord - { + struct ODBDESIGN_EXPORT NetRecord : public IProtoBuffable + { + struct ODBDESIGN_EXPORT SubnetRecord : public IProtoBuffable + { + // common subnet enums enum class Type { Via, @@ -52,7 +57,22 @@ namespace Odb::Lib::FileModel::Design Toeprint }; - struct DECLSPEC FeatureIdRecord + // Plane subnet type enums + enum class FillType + { + Solid, + Outline + }; + + enum class CutoutType + { + Circle, + Rectangle, + Octagon, + Exact + }; + + struct ODBDESIGN_EXPORT FeatureIdRecord : public IProtoBuffable { enum class Type { @@ -66,43 +86,41 @@ namespace Odb::Lib::FileModel::Design Type type; unsigned int layerNumber; unsigned int featureNumber; + + // Inherited via IProtoBuffable + std::unique_ptr to_protobuf() const override; + void from_protobuf(const odbdesign::proto::EdaDataFile::NetRecord::SubnetRecord::FeatureIdRecord& message) override; }; typedef std::vector> Vector; virtual ~SubnetRecord(); + // common subnet fields Type type; FeatureIdRecord::Vector m_featureIdRecords; - }; - struct DECLSPEC ToeprintSubnetRecord : public SubnetRecord - { + // Toeprint subnet type fields BoardSide side; unsigned int componentNumber; // component index in the layer components/placements file unsigned toeprintNumber; // toeprint index of component reference in the layer components/placements file - }; - - struct DECLSPEC PlaneSubnetRecord : public SubnetRecord - { - enum class FillType - { - Solid, - Outline - }; - - enum class CutoutType - { - Circle, - Rectangle, - Octagon, - Exact - }; + // Plane subnet type fields FillType fillType; CutoutType cutoutType; float fillSize; - }; + + inline static const std::string RECORD_TOKEN = "SNT"; + inline static const std::string RECORD_TYPE_TRACE_TOKEN = "TRC"; + inline static const std::string RECORD_TYPE_VIA_TOKEN = "VIA"; + inline static const std::string RECORD_TYPE_TOEPRINT_TOKEN = "TOP"; + inline static const std::string RECORD_TYPE_PLANE_TOKEN = "PLN"; + + // Inherited via IProtoBuffable + std::unique_ptr to_protobuf() const override; + void from_protobuf(const odbdesign::proto::EdaDataFile::NetRecord::SubnetRecord& message) override; + + }; // SubnetRecord typedef std::vector> Vector; typedef std::map> StringMap; @@ -116,11 +134,16 @@ namespace Odb::Lib::FileModel::Design SubnetRecord::Vector m_subnetRecords; PropertyRecord::Vector m_propertyRecords; - }; - struct DECLSPEC PackageRecord + // Inherited via IProtoBuffable + std::unique_ptr to_protobuf() const override; + void from_protobuf(const odbdesign::proto::EdaDataFile::NetRecord& message) override; + + }; // NetRecord + + struct ODBDESIGN_EXPORT PackageRecord : public IProtoBuffable { - struct DECLSPEC PinRecord + struct ODBDESIGN_EXPORT PinRecord : public IProtoBuffable { enum class Type { @@ -140,12 +163,12 @@ namespace Odb::Lib::FileModel::Design { Smt, RecommendedSmtPad, - ThroughHole, + MT_ThroughHole, RecommendedThroughHole, Pressfit, NonBoard, Hole, - Undefined // default + MT_Undefined // default }; typedef std::vector> Vector; @@ -159,8 +182,13 @@ namespace Odb::Lib::FileModel::Design ElectricalType electricalType; MountType mountType; unsigned int id; - size_t index; - }; + unsigned int index; + + // Inherited via IProtoBuffable + std::unique_ptr to_protobuf() const override; + void from_protobuf(const odbdesign::proto::EdaDataFile::PackageRecord::PinRecord& message) override; + + }; // PinRecord typedef std::vector> Vector; typedef std::map> StringMap; @@ -175,7 +203,12 @@ namespace Odb::Lib::FileModel::Design PinRecord::StringMap m_pinRecordsByName; PropertyRecord::Vector m_propertyRecords; - }; + + // Inherited via IProtoBuffable + std::unique_ptr to_protobuf() const override; + void from_protobuf(const odbdesign::proto::EdaDataFile::PackageRecord& message) override; + + }; // PackageRecord const std::vector& GetLayerNames() const; const std::vector& GetAttributeNames() const; @@ -186,6 +219,10 @@ namespace Odb::Lib::FileModel::Design const PackageRecord::Vector& GetPackageRecords() const; const PackageRecord::StringMap& GetPackageRecordsByName() const; + // Inherited via IProtoBuffable + std::unique_ptr to_protobuf() const override; + void from_protobuf(const odbdesign::proto::EdaDataFile& message) override; + private: std::filesystem::path m_path; std::string m_units; @@ -210,16 +247,15 @@ namespace Odb::Lib::FileModel::Design inline static const std::string ATTRIBUTE_NAME_TOKEN = "@"; inline static const std::string ATTRIBUTE_VALUE_TOKEN = "&"; inline static const std::string NET_RECORD_TOKEN = "NET"; - inline static const std::string SUBNET_RECORD_TOKEN = "SNT"; inline static const std::string FEATURE_ID_RECORD_TOKEN = "FID"; inline static const std::string PACKAGE_RECORD_TOKEN = "PKG"; inline static const std::string PIN_RECORD_TOKEN = "PIN"; inline static const std::string FEATURE_GROUP_RECORD_TOKEN = "FGR"; // TODO: Outline records: // RC, CR, SQ, CT, OB, OS, OC, OE, CE — Outline Records + + }; // EdaDataFile - }; - - //EXPIMP_TEMPLATE template class DECLSPEC std::vector>; - //EXPIMP_TEMPLATE template class DECLSPEC std::map>; + //EXPIMP_TEMPLATE template class ODBDESIGN_EXPORT std::vector>; + //EXPIMP_TEMPLATE template class ODBDESIGN_EXPORT std::map>; } \ No newline at end of file diff --git a/OdbDesignLib/FileArchive.cpp b/OdbDesignLib/FileArchive.cpp index 7956d79b..c88e27c6 100644 --- a/OdbDesignLib/FileArchive.cpp +++ b/OdbDesignLib/FileArchive.cpp @@ -70,9 +70,9 @@ namespace Odb::Lib::FileModel::Design { std::cout << " - Extracting... "; - if (!ArchiveExtractor::IsArchiveTypeSupported(path)) return false; + if (!Utils::ArchiveExtractor::IsArchiveTypeSupported(path)) return false; - ArchiveExtractor extractor(path.string()); + Utils::ArchiveExtractor extractor(path.string()); if (!extractor.Extract()) return false; auto extracted = std::filesystem::path(extractor.GetExtractedPath()); diff --git a/OdbDesignLib/FileArchive.h b/OdbDesignLib/FileArchive.h index dbff4843..341d8bac 100644 --- a/OdbDesignLib/FileArchive.h +++ b/OdbDesignLib/FileArchive.h @@ -1,6 +1,6 @@ #pragma once -#include "export.h" +#include "odbdesign_export.h" #include #include "StepDirectory.h" #include "EdaDataFile.h" @@ -10,7 +10,7 @@ namespace Odb::Lib::FileModel::Design { - class DECLSPEC FileArchive + class ODBDESIGN_EXPORT FileArchive { public: FileArchive(std::string path); diff --git a/OdbDesignLib/IOdbServerApp.cpp b/OdbDesignLib/IOdbServerApp.cpp new file mode 100644 index 00000000..edc74ed1 --- /dev/null +++ b/OdbDesignLib/IOdbServerApp.cpp @@ -0,0 +1 @@ +#include "IOdbServerApp.h" \ No newline at end of file diff --git a/OdbDesignLib/IOdbServerApp.h b/OdbDesignLib/IOdbServerApp.h new file mode 100644 index 00000000..5951a763 --- /dev/null +++ b/OdbDesignLib/IOdbServerApp.h @@ -0,0 +1,27 @@ +#pragma once + +#include "CommandLineArgs.h" +#include "DesignCache.h" +#include "ExitCode.h" +#include "crow_win.h" +#include "odbdesign_export.h" + +namespace Odb::Lib +{ + class ODBDESIGN_EXPORT IOdbServerApp + { + public: + virtual ~IOdbServerApp() {} + + virtual const Utils::CommandLineArgs& arguments() const = 0; + virtual crow::SimpleApp& crow_app() = 0; + virtual Odb::Lib::DesignCache& design_cache() = 0; + + virtual Utils::ExitCode Run() = 0; + + protected: + // abstract class/interface + IOdbServerApp() = default; + + }; +} diff --git a/OdbDesignLib/IProtoBuffable.h b/OdbDesignLib/IProtoBuffable.h new file mode 100644 index 00000000..5b637810 --- /dev/null +++ b/OdbDesignLib/IProtoBuffable.h @@ -0,0 +1,60 @@ +#pragma once + +#include +#include +#include +#include "IJsonable.h" +#include "odbdesign_export.h" + +using namespace google::protobuf; +using namespace google::protobuf::util; + + +namespace Odb::Lib +{ + template + class IProtoBuffable : public Utils::IJsonable + { + public: + virtual std::unique_ptr to_protobuf() const = 0; + virtual void from_protobuf(const TPbMessage& message) = 0; + + // Inherited via IJsonConvertable + std::string to_json() const; + void from_json(const std::string& json) override; + + protected: + // abstract class + IProtoBuffable() + {} + + // TMessage MUST derive from Message (must use this until template type contraints support is added) + static_assert(std::is_base_of::value, "template parameter type TPbMessage must derive from Protobuf Message class"); + + }; + + template + std::string IProtoBuffable::to_json() const + { + // use default options + JsonOptions jsonOptions; + + std::string json; + auto status = MessageToJsonString(*to_protobuf(), &json, jsonOptions); + if (!status.ok()) json.clear(); + return json; + } + + template + inline void IProtoBuffable::from_json(const std::string& json) + { + StringPiece sp_json(json); + // use default options + JsonOptions jsonOptions; + + auto pMessage = std::unique_ptr(); + auto status = JsonStringToMessage(sp_json, pMessage.get()); + if (!status.ok()) return; + from_protobuf(*pMessage); + } +} diff --git a/OdbDesignLib/LayerDirectory.h b/OdbDesignLib/LayerDirectory.h index e0665d4f..1e5ed1da 100644 --- a/OdbDesignLib/LayerDirectory.h +++ b/OdbDesignLib/LayerDirectory.h @@ -4,12 +4,12 @@ #include #include #include -#include "export.h" +#include "odbdesign_export.h" namespace Odb::Lib::FileModel::Design { - class DECLSPEC LayerDirectory + class ODBDESIGN_EXPORT LayerDirectory { public: LayerDirectory(std::filesystem::path path); diff --git a/OdbDesignLib/Net.h b/OdbDesignLib/Net.h index e953609e..fc0f07ce 100644 --- a/OdbDesignLib/Net.h +++ b/OdbDesignLib/Net.h @@ -1,6 +1,6 @@ #pragma once -#include "export.h" +#include "odbdesign_export.h" #include #include #include @@ -12,7 +12,7 @@ namespace Odb::Lib::ProductModel { - class DECLSPEC Net + class ODBDESIGN_EXPORT Net { public: Net(std::string name, unsigned int index); diff --git a/OdbDesignLib/NetlistFile.h b/OdbDesignLib/NetlistFile.h index 718658d2..b556955d 100644 --- a/OdbDesignLib/NetlistFile.h +++ b/OdbDesignLib/NetlistFile.h @@ -5,12 +5,12 @@ #include #include #include -#include "export.h" +#include "odbdesign_export.h" namespace Odb::Lib::FileModel::Design { - class DECLSPEC NetlistFile + class ODBDESIGN_EXPORT NetlistFile { public: enum class Staggered diff --git a/OdbDesignLib/OdbDesignLib.i b/OdbDesignLib/OdbDesignLib.i index e89f361f..a0a4bb89 100644 --- a/OdbDesignLib/OdbDesignLib.i +++ b/OdbDesignLib/OdbDesignLib.i @@ -45,7 +45,7 @@ using StepDirectory = Odb::Lib::FileModel::Design::StepDirectory; %include "Component.h" %include "Design.h" %include "EdaDataFile.h" -%include "enums.h" +%include "BoardSide.h" %include "FileArchive.h" %include "LayerDirectory.h" %include "ComponentLayerDirectory.h" @@ -56,5 +56,5 @@ using StepDirectory = Odb::Lib::FileModel::Design::StepDirectory; %include "Pin.h" %include "PinConnection.h" %include "StepDirectory.h" -%include "string_trim.h" +%include "str_trim.h" %include "Via.h" diff --git a/OdbDesignLib/OdbFile.cpp b/OdbDesignLib/OdbFile.cpp new file mode 100644 index 00000000..b93cfce2 --- /dev/null +++ b/OdbDesignLib/OdbFile.cpp @@ -0,0 +1,6 @@ +#include "OdbFile.h" + +namespace Odb::Lib::FileModel +{ + +} \ No newline at end of file diff --git a/OdbDesignLib/OdbFile.h b/OdbDesignLib/OdbFile.h new file mode 100644 index 00000000..dd3742ab --- /dev/null +++ b/OdbDesignLib/OdbFile.h @@ -0,0 +1,8 @@ +#pragma once + +namespace Odb::Lib::FileModel +{ + class OdbFile + { + }; +} diff --git a/OdbDesignLib/OdbFileRecord.cpp b/OdbDesignLib/OdbFileRecord.cpp new file mode 100644 index 00000000..f4d6ae8f --- /dev/null +++ b/OdbDesignLib/OdbFileRecord.cpp @@ -0,0 +1,6 @@ +#include "OdbFileRecord.h" + +namespace Odb::Lib::FileModel +{ + +} \ No newline at end of file diff --git a/OdbDesignLib/OdbFileRecord.h b/OdbDesignLib/OdbFileRecord.h new file mode 100644 index 00000000..183b2290 --- /dev/null +++ b/OdbDesignLib/OdbFileRecord.h @@ -0,0 +1,8 @@ +#pragma once + +namespace Odb::Lib::FileModel +{ + class OdbFileRecord + { + }; +} diff --git a/OdbDesignLib/Package.h b/OdbDesignLib/Package.h index cf4c8072..532e09c8 100644 --- a/OdbDesignLib/Package.h +++ b/OdbDesignLib/Package.h @@ -1,6 +1,6 @@ #pragma once -#include "export.h" +#include "odbdesign_export.h" #include #include #include @@ -10,7 +10,7 @@ namespace Odb::Lib::ProductModel { - class DECLSPEC Package + class ODBDESIGN_EXPORT Package { public: Package(std::string name, unsigned int index); diff --git a/OdbDesignLib/Part.h b/OdbDesignLib/Part.h index 4488ce21..ad1c7d9b 100644 --- a/OdbDesignLib/Part.h +++ b/OdbDesignLib/Part.h @@ -1,6 +1,6 @@ #pragma once -#include "export.h" +#include "odbdesign_export.h" #include #include #include diff --git a/OdbDesignLib/Pin.h b/OdbDesignLib/Pin.h index b9c4e6c1..672ee102 100644 --- a/OdbDesignLib/Pin.h +++ b/OdbDesignLib/Pin.h @@ -1,6 +1,6 @@ #pragma once -#include "export.h" +#include "odbdesign_export.h" #include #include #include @@ -9,7 +9,7 @@ namespace Odb::Lib::ProductModel { - class DECLSPEC Pin + class ODBDESIGN_EXPORT Pin { public: Pin(std::string name, unsigned int index); diff --git a/OdbDesignLib/PinConnection.h b/OdbDesignLib/PinConnection.h index 0858afc7..f10163d7 100644 --- a/OdbDesignLib/PinConnection.h +++ b/OdbDesignLib/PinConnection.h @@ -1,6 +1,6 @@ #pragma once -#include "export.h" +#include "odbdesign_export.h" #include #include #include @@ -11,7 +11,7 @@ namespace Odb::Lib::ProductModel { - class DECLSPEC PinConnection + class ODBDESIGN_EXPORT PinConnection { public: PinConnection(std::shared_ptr pComponent, std::shared_ptr pPin, std::string name); diff --git a/OdbDesignLib/StepDirectory.cpp b/OdbDesignLib/StepDirectory.cpp index e8e360a8..575e29b4 100644 --- a/OdbDesignLib/StepDirectory.cpp +++ b/OdbDesignLib/StepDirectory.cpp @@ -66,7 +66,9 @@ namespace Odb::Lib::FileModel::Design if (layerName == LayerDirectory::TOP_COMPONENTS_LAYER_NAME || layerName == LayerDirectory::BOTTOM_COMPONENTS_LAYER_NAME) { - auto boardSide = layerName == LayerDirectory::TOP_COMPONENTS_LAYER_NAME ? BoardSide::Top : BoardSide::Bottom; + auto boardSide = layerName == LayerDirectory::TOP_COMPONENTS_LAYER_NAME ? + BoardSide::Top : + BoardSide::Bottom; pLayer = std::make_shared(d.path(), boardSide); } else diff --git a/OdbDesignLib/StepDirectory.h b/OdbDesignLib/StepDirectory.h index a2f1b91f..da735dd6 100644 --- a/OdbDesignLib/StepDirectory.h +++ b/OdbDesignLib/StepDirectory.h @@ -5,7 +5,7 @@ #include #include -#include "export.h" +#include "odbdesign_export.h" #include "ComponentLayerDirectory.h" #include "LayerDirectory.h" #include "EdaDataFile.h" @@ -14,7 +14,7 @@ namespace Odb::Lib::FileModel::Design { - class DECLSPEC StepDirectory + class ODBDESIGN_EXPORT StepDirectory { public: StepDirectory(std::filesystem::path path); diff --git a/OdbDesignLib/Via.h b/OdbDesignLib/Via.h index 9a5a5b4d..192e5f6a 100644 --- a/OdbDesignLib/Via.h +++ b/OdbDesignLib/Via.h @@ -1,6 +1,6 @@ #pragma once -#include "export.h" +#include "odbdesign_export.h" #include #include #include @@ -9,7 +9,7 @@ namespace Odb::Lib::ProductModel { - class DECLSPEC Via + class ODBDESIGN_EXPORT Via { public: Via(); diff --git a/OdbDesignLib/crow_win.h b/OdbDesignLib/crow_win.h new file mode 100644 index 00000000..fce2e362 --- /dev/null +++ b/OdbDesignLib/crow_win.h @@ -0,0 +1,4 @@ +#pragma once + +#include "win.h" +#include "crow.h" diff --git a/OdbDesignLib/libarchive_extract.cpp b/OdbDesignLib/libarchive_extract.cpp deleted file mode 100644 index acc6fc82..00000000 --- a/OdbDesignLib/libarchive_extract.cpp +++ /dev/null @@ -1,113 +0,0 @@ -#include "libarchive_extract.h" -#include -#include -#include -#include - - -// from: https://github.com/libarchive/libarchive/wiki/Examples#user-content-A_Complete_Extractor - -int copy_data(struct archive* ar, struct archive* aw); - -const bool SECURE_EXTRACTION = true; - -bool extract(const char* filename, const char* destDir) -{ - struct archive* a; - struct archive* ext; - struct archive_entry* entry; - int flags; - int r; - - /* Select which attributes we want to restore. */ - flags = ARCHIVE_EXTRACT_TIME; - flags |= ARCHIVE_EXTRACT_PERM; - flags |= ARCHIVE_EXTRACT_ACL; - flags |= ARCHIVE_EXTRACT_FFLAGS; - - if (SECURE_EXTRACTION) - { - flags |= ARCHIVE_EXTRACT_SECURE_SYMLINKS; - flags |= ARCHIVE_EXTRACT_SECURE_NODOTDOT; - flags |= ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS; - } - - a = archive_read_new(); - archive_read_support_format_all(a); - archive_read_support_filter_all(a); - //archive_read_support_format_tar(a); - //archive_read_support_filter_gzip(a); - ext = archive_write_disk_new(); - archive_write_disk_set_options(ext, flags); - archive_write_disk_set_standard_lookup(ext); - r = archive_read_open_filename(a, filename, 1024 * 10); - if (r) - { - return false; - } - - for (;;) { - r = archive_read_next_header(a, &entry); - if (r == ARCHIVE_EOF) - break; - if (r < ARCHIVE_OK) - fprintf(stderr, "%s\n", archive_error_string(a)); - if (r < ARCHIVE_WARN) - { - return false; - } - - // prepend destPath to beginning of entry to extract it in the destination path - auto entryPathname = archive_entry_pathname(entry); - std::filesystem::path entryDestinationPathname(destDir); - entryDestinationPathname /= entryPathname; - archive_entry_set_pathname(entry, entryDestinationPathname.string().c_str()); - - r = archive_write_header(ext, entry); - if (r < ARCHIVE_OK) - fprintf(stderr, "%s\n", archive_error_string(ext)); - else if (archive_entry_size(entry) > 0) { - r = copy_data(a, ext); - if (r < ARCHIVE_OK) - fprintf(stderr, "%s\n", archive_error_string(ext)); - if (r < ARCHIVE_WARN) - { - return false; - } - } - r = archive_write_finish_entry(ext); - if (r < ARCHIVE_OK) - fprintf(stderr, "%s\n", archive_error_string(ext)); - if (r < ARCHIVE_WARN) - { - return false; - } - } - archive_read_close(a); - archive_read_free(a); - archive_write_close(ext); - archive_write_free(ext); - - return true; -} - -int copy_data(struct archive* ar, struct archive* aw) -{ - int r; - const void* buff; - size_t size; - la_int64_t offset; - - for (;;) { - r = archive_read_data_block(ar, &buff, &size, &offset); - if (r == ARCHIVE_EOF) - return (ARCHIVE_OK); - if (r < ARCHIVE_OK) - return (r); - r = archive_write_data_block(aw, buff, size, offset); - if (r < ARCHIVE_OK) { - fprintf(stderr, "%s\n", archive_error_string(aw)); - return (r); - } - } -} \ No newline at end of file diff --git a/OdbDesignLib/libarchive_extract.h b/OdbDesignLib/libarchive_extract.h deleted file mode 100644 index 33ce3975..00000000 --- a/OdbDesignLib/libarchive_extract.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -bool extract(const char* filename, const char* destDir); diff --git a/OdbDesignLib/export.h b/OdbDesignLib/odbdesign_export.h similarity index 61% rename from OdbDesignLib/export.h rename to OdbDesignLib/odbdesign_export.h index 7f157ee3..312e5ff1 100644 --- a/OdbDesignLib/export.h +++ b/OdbDesignLib/odbdesign_export.h @@ -1,12 +1,12 @@ #if defined(_WIN32) # if defined(OdbDesign_EXPORTS) -# define DECLSPEC __declspec(dllexport) +# define ODBDESIGN_EXPORT __declspec(dllexport) # define EXPIMP_TEMPLATE # else -# define DECLSPEC __declspec(dllimport) +# define ODBDESIGN_EXPORT __declspec(dllimport) # //define EXPIMP_TEMPLATE extern # endif #else // non windows define it to nothing (Linux exports by default) -# define DECLSPEC +# define ODBDESIGN_EXPORT #endif diff --git a/OdbDesignLib/proto/edadatafile.pb.cc b/OdbDesignLib/proto/edadatafile.pb.cc new file mode 100644 index 00000000..6b9f0362 --- /dev/null +++ b/OdbDesignLib/proto/edadatafile.pb.cc @@ -0,0 +1,3839 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: edadatafile.proto + +#include "edadatafile.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 odbdesign { +namespace proto { +PROTOBUF_CONSTEXPR EdaDataFile_PropertyRecord::EdaDataFile_PropertyRecord( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.floatvalues_)*/{} + , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.value_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {} +struct EdaDataFile_PropertyRecordDefaultTypeInternal { + PROTOBUF_CONSTEXPR EdaDataFile_PropertyRecordDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~EdaDataFile_PropertyRecordDefaultTypeInternal() {} + union { + EdaDataFile_PropertyRecord _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EdaDataFile_PropertyRecordDefaultTypeInternal _EdaDataFile_PropertyRecord_default_instance_; +PROTOBUF_CONSTEXPR EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.type_)*/0 + , /*decltype(_impl_.layernumber_)*/0u + , /*decltype(_impl_.featurenumber_)*/0u} {} +struct EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecordDefaultTypeInternal { + PROTOBUF_CONSTEXPR EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecordDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecordDefaultTypeInternal() {} + union { + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecordDefaultTypeInternal _EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_default_instance_; +PROTOBUF_CONSTEXPR EdaDataFile_NetRecord_SubnetRecord::EdaDataFile_NetRecord_SubnetRecord( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.featureidrecords_)*/{} + , /*decltype(_impl_.type_)*/0 + , /*decltype(_impl_.filltype_)*/0 + , /*decltype(_impl_.cutouttype_)*/0 + , /*decltype(_impl_.fillsize_)*/0 + , /*decltype(_impl_.side_)*/0 + , /*decltype(_impl_.componentnumber_)*/0u + , /*decltype(_impl_.toeprintnumber_)*/0u} {} +struct EdaDataFile_NetRecord_SubnetRecordDefaultTypeInternal { + PROTOBUF_CONSTEXPR EdaDataFile_NetRecord_SubnetRecordDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~EdaDataFile_NetRecord_SubnetRecordDefaultTypeInternal() {} + union { + EdaDataFile_NetRecord_SubnetRecord _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EdaDataFile_NetRecord_SubnetRecordDefaultTypeInternal _EdaDataFile_NetRecord_SubnetRecord_default_instance_; +PROTOBUF_CONSTEXPR EdaDataFile_NetRecord::EdaDataFile_NetRecord( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.subnetrecords_)*/{} + , /*decltype(_impl_.propertyrecords_)*/{} + , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.attributesidstring_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.index_)*/0u} {} +struct EdaDataFile_NetRecordDefaultTypeInternal { + PROTOBUF_CONSTEXPR EdaDataFile_NetRecordDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~EdaDataFile_NetRecordDefaultTypeInternal() {} + union { + EdaDataFile_NetRecord _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EdaDataFile_NetRecordDefaultTypeInternal _EdaDataFile_NetRecord_default_instance_; +PROTOBUF_CONSTEXPR EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse::EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse( + ::_pbi::ConstantInitialized) {} +struct EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUseDefaultTypeInternal() {} + union { + EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUseDefaultTypeInternal _EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse_default_instance_; +PROTOBUF_CONSTEXPR EdaDataFile_PackageRecord_PinRecord::EdaDataFile_PackageRecord_PinRecord( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.type_)*/0 + , /*decltype(_impl_.xcenter_)*/0 + , /*decltype(_impl_.ycenter_)*/0 + , /*decltype(_impl_.finishedholesize_)*/0 + , /*decltype(_impl_.electricaltype_)*/0 + , /*decltype(_impl_.mounttype_)*/0 + , /*decltype(_impl_.id_)*/0u + , /*decltype(_impl_.index_)*/0u} {} +struct EdaDataFile_PackageRecord_PinRecordDefaultTypeInternal { + PROTOBUF_CONSTEXPR EdaDataFile_PackageRecord_PinRecordDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~EdaDataFile_PackageRecord_PinRecordDefaultTypeInternal() {} + union { + EdaDataFile_PackageRecord_PinRecord _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EdaDataFile_PackageRecord_PinRecordDefaultTypeInternal _EdaDataFile_PackageRecord_PinRecord_default_instance_; +PROTOBUF_CONSTEXPR EdaDataFile_PackageRecord::EdaDataFile_PackageRecord( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.pinrecords_)*/{} + , /*decltype(_impl_.pinrecordsbyname_)*/{::_pbi::ConstantInitialized()} + , /*decltype(_impl_.propertyrecords_)*/{} + , /*decltype(_impl_.name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.attributesidstring_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.pitch_)*/0 + , /*decltype(_impl_.xmin_)*/0 + , /*decltype(_impl_.ymin_)*/0 + , /*decltype(_impl_.xmax_)*/0 + , /*decltype(_impl_.ymax_)*/0} {} +struct EdaDataFile_PackageRecordDefaultTypeInternal { + PROTOBUF_CONSTEXPR EdaDataFile_PackageRecordDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~EdaDataFile_PackageRecordDefaultTypeInternal() {} + union { + EdaDataFile_PackageRecord _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EdaDataFile_PackageRecordDefaultTypeInternal _EdaDataFile_PackageRecord_default_instance_; +PROTOBUF_CONSTEXPR EdaDataFile_NetRecordsByNameEntry_DoNotUse::EdaDataFile_NetRecordsByNameEntry_DoNotUse( + ::_pbi::ConstantInitialized) {} +struct EdaDataFile_NetRecordsByNameEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR EdaDataFile_NetRecordsByNameEntry_DoNotUseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~EdaDataFile_NetRecordsByNameEntry_DoNotUseDefaultTypeInternal() {} + union { + EdaDataFile_NetRecordsByNameEntry_DoNotUse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EdaDataFile_NetRecordsByNameEntry_DoNotUseDefaultTypeInternal _EdaDataFile_NetRecordsByNameEntry_DoNotUse_default_instance_; +PROTOBUF_CONSTEXPR EdaDataFile_PackageRecordsByNameEntry_DoNotUse::EdaDataFile_PackageRecordsByNameEntry_DoNotUse( + ::_pbi::ConstantInitialized) {} +struct EdaDataFile_PackageRecordsByNameEntry_DoNotUseDefaultTypeInternal { + PROTOBUF_CONSTEXPR EdaDataFile_PackageRecordsByNameEntry_DoNotUseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~EdaDataFile_PackageRecordsByNameEntry_DoNotUseDefaultTypeInternal() {} + union { + EdaDataFile_PackageRecordsByNameEntry_DoNotUse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EdaDataFile_PackageRecordsByNameEntry_DoNotUseDefaultTypeInternal _EdaDataFile_PackageRecordsByNameEntry_DoNotUse_default_instance_; +PROTOBUF_CONSTEXPR EdaDataFile::EdaDataFile( + ::_pbi::ConstantInitialized): _impl_{ + /*decltype(_impl_._has_bits_)*/{} + , /*decltype(_impl_._cached_size_)*/{} + , /*decltype(_impl_.layernames_)*/{} + , /*decltype(_impl_.attributenames_)*/{} + , /*decltype(_impl_.attributetextvalues_)*/{} + , /*decltype(_impl_.netrecords_)*/{} + , /*decltype(_impl_.netrecordsbyname_)*/{::_pbi::ConstantInitialized()} + , /*decltype(_impl_.packagerecords_)*/{} + , /*decltype(_impl_.packagerecordsbyname_)*/{::_pbi::ConstantInitialized()} + , /*decltype(_impl_.path_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.units_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}} + , /*decltype(_impl_.source_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {} +struct EdaDataFileDefaultTypeInternal { + PROTOBUF_CONSTEXPR EdaDataFileDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~EdaDataFileDefaultTypeInternal() {} + union { + EdaDataFile _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EdaDataFileDefaultTypeInternal _EdaDataFile_default_instance_; +} // namespace proto +} // namespace odbdesign +static ::_pb::Metadata file_level_metadata_edadatafile_2eproto[10]; +static const ::_pb::EnumDescriptor* file_level_enum_descriptors_edadatafile_2eproto[8]; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_edadatafile_2eproto = nullptr; + +const uint32_t TableStruct_edadatafile_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PropertyRecord, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PropertyRecord, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PropertyRecord, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PropertyRecord, _impl_.value_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PropertyRecord, _impl_.floatvalues_), + 0, + 1, + ~0u, + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord, _impl_.type_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord, _impl_.layernumber_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord, _impl_.featurenumber_), + 0, + 1, + 2, + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord, _impl_.type_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord, _impl_.featureidrecords_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord, _impl_.filltype_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord, _impl_.cutouttype_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord, _impl_.fillsize_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord, _impl_.side_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord, _impl_.componentnumber_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord, _impl_.toeprintnumber_), + 0, + ~0u, + 1, + 2, + 3, + 4, + 5, + 6, + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord, _impl_.attributesidstring_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord, _impl_.index_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord, _impl_.subnetrecords_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecord, _impl_.propertyrecords_), + 0, + 1, + 2, + ~0u, + ~0u, + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse, value_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord, _impl_.type_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord, _impl_.xcenter_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord, _impl_.ycenter_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord, _impl_.finishedholesize_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord, _impl_.electricaltype_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord, _impl_.mounttype_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord, _impl_.id_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord, _impl_.index_), + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord, _impl_.name_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord, _impl_.pitch_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord, _impl_.xmin_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord, _impl_.ymin_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord, _impl_.xmax_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord, _impl_.ymax_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord, _impl_.attributesidstring_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord, _impl_.pinrecords_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord, _impl_.pinrecordsbyname_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecord, _impl_.propertyrecords_), + 0, + 2, + 3, + 4, + 5, + 6, + 1, + ~0u, + ~0u, + ~0u, + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecordsByNameEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecordsByNameEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecordsByNameEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_NetRecordsByNameEntry_DoNotUse, value_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecordsByNameEntry_DoNotUse, _has_bits_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecordsByNameEntry_DoNotUse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecordsByNameEntry_DoNotUse, key_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile_PackageRecordsByNameEntry_DoNotUse, value_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile, _impl_._has_bits_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile, _impl_.path_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile, _impl_.units_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile, _impl_.source_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile, _impl_.layernames_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile, _impl_.attributenames_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile, _impl_.attributetextvalues_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile, _impl_.netrecords_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile, _impl_.netrecordsbyname_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile, _impl_.packagerecords_), + PROTOBUF_FIELD_OFFSET(::odbdesign::proto::EdaDataFile, _impl_.packagerecordsbyname_), + 0, + 1, + 2, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, + ~0u, +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 9, -1, sizeof(::odbdesign::proto::EdaDataFile_PropertyRecord)}, + { 12, 21, -1, sizeof(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord)}, + { 24, 38, -1, sizeof(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord)}, + { 46, 57, -1, sizeof(::odbdesign::proto::EdaDataFile_NetRecord)}, + { 62, 70, -1, sizeof(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse)}, + { 72, 87, -1, sizeof(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord)}, + { 96, 112, -1, sizeof(::odbdesign::proto::EdaDataFile_PackageRecord)}, + { 122, 130, -1, sizeof(::odbdesign::proto::EdaDataFile_NetRecordsByNameEntry_DoNotUse)}, + { 132, 140, -1, sizeof(::odbdesign::proto::EdaDataFile_PackageRecordsByNameEntry_DoNotUse)}, + { 142, 158, -1, sizeof(::odbdesign::proto::EdaDataFile)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::odbdesign::proto::_EdaDataFile_PropertyRecord_default_instance_._instance, + &::odbdesign::proto::_EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_default_instance_._instance, + &::odbdesign::proto::_EdaDataFile_NetRecord_SubnetRecord_default_instance_._instance, + &::odbdesign::proto::_EdaDataFile_NetRecord_default_instance_._instance, + &::odbdesign::proto::_EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse_default_instance_._instance, + &::odbdesign::proto::_EdaDataFile_PackageRecord_PinRecord_default_instance_._instance, + &::odbdesign::proto::_EdaDataFile_PackageRecord_default_instance_._instance, + &::odbdesign::proto::_EdaDataFile_NetRecordsByNameEntry_DoNotUse_default_instance_._instance, + &::odbdesign::proto::_EdaDataFile_PackageRecordsByNameEntry_DoNotUse_default_instance_._instance, + &::odbdesign::proto::_EdaDataFile_default_instance_._instance, +}; + +const char descriptor_table_protodef_edadatafile_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\021edadatafile.proto\022\017odbdesign.proto\"\221\033\n" + "\013EdaDataFile\022\021\n\004path\030\001 \001(\tH\000\210\001\001\022\022\n\005units" + "\030\002 \001(\tH\001\210\001\001\022\023\n\006source\030\003 \001(\tH\002\210\001\001\022\022\n\nlaye" + "rNames\030\004 \003(\t\022\026\n\016attributeNames\030\005 \003(\t\022\033\n\023" + "attributeTextValues\030\006 \003(\t\022:\n\nnetRecords\030" + "\007 \003(\0132&.odbdesign.proto.EdaDataFile.NetR" + "ecord\022L\n\020netRecordsByName\030\010 \003(\01322.odbdes" + "ign.proto.EdaDataFile.NetRecordsByNameEn" + "try\022B\n\016packageRecords\030\t \003(\0132*.odbdesign." + "proto.EdaDataFile.PackageRecord\022T\n\024packa" + "geRecordsByName\030\n \003(\01326.odbdesign.proto." + "EdaDataFile.PackageRecordsByNameEntry\032_\n" + "\016PropertyRecord\022\021\n\004name\030\001 \001(\tH\000\210\001\001\022\022\n\005va" + "lue\030\002 \001(\tH\001\210\001\001\022\023\n\013floatValues\030\003 \003(\002B\007\n\005_" + "nameB\010\n\006_value\032\201\n\n\tNetRecord\022\021\n\004name\030\001 \001" + "(\tH\000\210\001\001\022\037\n\022attributesIdString\030\002 \001(\tH\001\210\001\001" + "\022\022\n\005index\030\003 \001(\rH\002\210\001\001\022J\n\rsubnetRecords\030\004 " + "\003(\01323.odbdesign.proto.EdaDataFile.NetRec" + "ord.SubnetRecord\022D\n\017propertyRecords\030\005 \003(" + "\0132+.odbdesign.proto.EdaDataFile.Property" + "Record\032\357\007\n\014SubnetRecord\022K\n\004type\030\001 \001(\01628." + "odbdesign.proto.EdaDataFile.NetRecord.Su" + "bnetRecord.TypeH\000\210\001\001\022]\n\020featureIdRecords" + "\030\002 \003(\0132C.odbdesign.proto.EdaDataFile.Net" + "Record.SubnetRecord.FeatureIdRecord\022S\n\010f" + "illType\030\003 \001(\0162<.odbdesign.proto.EdaDataF" + "ile.NetRecord.SubnetRecord.FillTypeH\001\210\001\001" + "\022W\n\ncutoutType\030\004 \001(\0162>.odbdesign.proto.E" + "daDataFile.NetRecord.SubnetRecord.Cutout" + "TypeH\002\210\001\001\022\025\n\010fillSize\030\005 \001(\002H\003\210\001\001\0229\n\004side" + "\030\006 \001(\0162&.odbdesign.proto.EdaDataFile.Boa" + "rdSideH\004\210\001\001\022\034\n\017componentNumber\030\007 \001(\rH\005\210\001" + "\001\022\033\n\016toeprintNumber\030\010 \001(\rH\006\210\001\001\032\373\001\n\017Featu" + "reIdRecord\022[\n\004type\030\001 \001(\0162H.odbdesign.pro" + "to.EdaDataFile.NetRecord.SubnetRecord.Fe" + "atureIdRecord.TypeH\000\210\001\001\022\030\n\013layerNumber\030\002" + " \001(\rH\001\210\001\001\022\032\n\rfeatureNumber\030\003 \001(\rH\002\210\001\001\"*\n" + "\004Type\022\n\n\006COPPER\020\000\022\014\n\010LAMINATE\020\001\022\010\n\004HOLE\020" + "\002B\007\n\005_typeB\016\n\014_layerNumberB\020\n\016_featureNu" + "mber\"3\n\004Type\022\007\n\003VIA\020\000\022\t\n\005TRACE\020\001\022\t\n\005PLAN" + "E\020\002\022\014\n\010TOEPRINT\020\003\"\"\n\010FillType\022\t\n\005SOLID\020\000" + "\022\013\n\007OUTLINE\020\001\"\?\n\nCutoutType\022\n\n\006CIRCLE\020\000\022" + "\r\n\tRECTANGLE\020\001\022\013\n\007OCTAGON\020\002\022\t\n\005EXACT\020\003B\007" + "\n\005_typeB\013\n\t_fillTypeB\r\n\013_cutoutTypeB\013\n\t_" + "fillSizeB\007\n\005_sideB\022\n\020_componentNumberB\021\n" + "\017_toeprintNumberB\007\n\005_nameB\025\n\023_attributes" + "IdStringB\010\n\006_index\032\351\n\n\rPackageRecord\022\021\n\004" + "name\030\001 \001(\tH\000\210\001\001\022\022\n\005pitch\030\002 \001(\002H\001\210\001\001\022\021\n\004x" + "Min\030\003 \001(\002H\002\210\001\001\022\021\n\004yMin\030\004 \001(\002H\003\210\001\001\022\021\n\004xMa" + "x\030\005 \001(\002H\004\210\001\001\022\021\n\004yMax\030\006 \001(\002H\005\210\001\001\022\037\n\022attri" + "butesIdString\030\007 \001(\tH\006\210\001\001\022H\n\npinRecords\030\010" + " \003(\01324.odbdesign.proto.EdaDataFile.Packa" + "geRecord.PinRecord\022Z\n\020pinRecordsByName\030\t" + " \003(\0132@.odbdesign.proto.EdaDataFile.Packa" + "geRecord.PinRecordsByNameEntry\022D\n\017proper" + "tyRecords\030\n \003(\0132+.odbdesign.proto.EdaDat" + "aFile.PropertyRecord\032m\n\025PinRecordsByName" + "Entry\022\013\n\003key\030\001 \001(\t\022C\n\005value\030\002 \001(\01324.odbd" + "esign.proto.EdaDataFile.PackageRecord.Pi" + "nRecord:\0028\001\032\232\006\n\tPinRecord\022\021\n\004name\030\001 \001(\tH" + "\000\210\001\001\022L\n\004type\030\002 \001(\01629.odbdesign.proto.Eda" + "DataFile.PackageRecord.PinRecord.TypeH\001\210" + "\001\001\022\024\n\007xCenter\030\003 \001(\002H\002\210\001\001\022\024\n\007yCenter\030\004 \001(" + "\002H\003\210\001\001\022\035\n\020finishedHoleSize\030\005 \001(\002H\004\210\001\001\022`\n" + "\016electricalType\030\006 \001(\0162C.odbdesign.proto." + "EdaDataFile.PackageRecord.PinRecord.Elec" + "tricalTypeH\005\210\001\001\022V\n\tmountType\030\007 \001(\0162>.odb" + "design.proto.EdaDataFile.PackageRecord.P" + "inRecord.MountTypeH\006\210\001\001\022\017\n\002id\030\010 \001(\rH\007\210\001\001" + "\022\022\n\005index\030\t \001(\rH\010\210\001\001\"0\n\004Type\022\020\n\014THROUGH_" + "HOLE\020\000\022\t\n\005BLIND\020\001\022\013\n\007SURFACE\020\002\"C\n\016Electr" + "icalType\022\016\n\nELECTRICAL\020\000\022\022\n\016NON_ELECTRIC" + "AL\020\001\022\r\n\tUNDEFINED\020\002\"\231\001\n\tMountType\022\007\n\003SMT" + "\020\000\022\027\n\023RECOMMENDED_SMT_PAD\020\001\022\023\n\017MT_THROUG" + "H_HOLE\020\002\022\034\n\030RECOMMENDED_THROUGH_HOLE\020\003\022\014" + "\n\010PRESSFIT\020\004\022\r\n\tNON_BOARD\020\005\022\010\n\004HOLE\020\006\022\020\n" + "\014MT_UNDEFINED\020\007B\007\n\005_nameB\007\n\005_typeB\n\n\010_xC" + "enterB\n\n\010_yCenterB\023\n\021_finishedHoleSizeB\021" + "\n\017_electricalTypeB\014\n\n_mountTypeB\005\n\003_idB\010" + "\n\006_indexB\007\n\005_nameB\010\n\006_pitchB\007\n\005_xMinB\007\n\005" + "_yMinB\007\n\005_xMaxB\007\n\005_yMaxB\025\n\023_attributesId" + "String\032_\n\025NetRecordsByNameEntry\022\013\n\003key\030\001" + " \001(\t\0225\n\005value\030\002 \001(\0132&.odbdesign.proto.Ed" + "aDataFile.NetRecord:\0028\001\032g\n\031PackageRecord" + "sByNameEntry\022\013\n\003key\030\001 \001(\t\0229\n\005value\030\002 \001(\013" + "2*.odbdesign.proto.EdaDataFile.PackageRe" + "cord:\0028\001\" \n\tBoardSide\022\007\n\003TOP\020\000\022\n\n\006BOTTOM" + "\020\001B\007\n\005_pathB\010\n\006_unitsB\t\n\007_sourceb\006proto3" + ; +static ::_pbi::once_flag descriptor_table_edadatafile_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_edadatafile_2eproto = { + false, false, 3520, descriptor_table_protodef_edadatafile_2eproto, + "edadatafile.proto", + &descriptor_table_edadatafile_2eproto_once, nullptr, 0, 10, + schemas, file_default_instances, TableStruct_edadatafile_2eproto::offsets, + file_level_metadata_edadatafile_2eproto, file_level_enum_descriptors_edadatafile_2eproto, + file_level_service_descriptors_edadatafile_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_edadatafile_2eproto_getter() { + return &descriptor_table_edadatafile_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_edadatafile_2eproto(&descriptor_table_edadatafile_2eproto); +namespace odbdesign { +namespace proto { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_edadatafile_2eproto); + return file_level_enum_descriptors_edadatafile_2eproto[0]; +} +bool EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::COPPER; +constexpr EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::LAMINATE; +constexpr EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::HOLE; +constexpr EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::Type_MIN; +constexpr EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::Type_MAX; +constexpr int EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::Type_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdaDataFile_NetRecord_SubnetRecord_Type_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_edadatafile_2eproto); + return file_level_enum_descriptors_edadatafile_2eproto[1]; +} +bool EdaDataFile_NetRecord_SubnetRecord_Type_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr EdaDataFile_NetRecord_SubnetRecord_Type EdaDataFile_NetRecord_SubnetRecord::VIA; +constexpr EdaDataFile_NetRecord_SubnetRecord_Type EdaDataFile_NetRecord_SubnetRecord::TRACE; +constexpr EdaDataFile_NetRecord_SubnetRecord_Type EdaDataFile_NetRecord_SubnetRecord::PLANE; +constexpr EdaDataFile_NetRecord_SubnetRecord_Type EdaDataFile_NetRecord_SubnetRecord::TOEPRINT; +constexpr EdaDataFile_NetRecord_SubnetRecord_Type EdaDataFile_NetRecord_SubnetRecord::Type_MIN; +constexpr EdaDataFile_NetRecord_SubnetRecord_Type EdaDataFile_NetRecord_SubnetRecord::Type_MAX; +constexpr int EdaDataFile_NetRecord_SubnetRecord::Type_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdaDataFile_NetRecord_SubnetRecord_FillType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_edadatafile_2eproto); + return file_level_enum_descriptors_edadatafile_2eproto[2]; +} +bool EdaDataFile_NetRecord_SubnetRecord_FillType_IsValid(int value) { + switch (value) { + case 0: + case 1: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr EdaDataFile_NetRecord_SubnetRecord_FillType EdaDataFile_NetRecord_SubnetRecord::SOLID; +constexpr EdaDataFile_NetRecord_SubnetRecord_FillType EdaDataFile_NetRecord_SubnetRecord::OUTLINE; +constexpr EdaDataFile_NetRecord_SubnetRecord_FillType EdaDataFile_NetRecord_SubnetRecord::FillType_MIN; +constexpr EdaDataFile_NetRecord_SubnetRecord_FillType EdaDataFile_NetRecord_SubnetRecord::FillType_MAX; +constexpr int EdaDataFile_NetRecord_SubnetRecord::FillType_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdaDataFile_NetRecord_SubnetRecord_CutoutType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_edadatafile_2eproto); + return file_level_enum_descriptors_edadatafile_2eproto[3]; +} +bool EdaDataFile_NetRecord_SubnetRecord_CutoutType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr EdaDataFile_NetRecord_SubnetRecord_CutoutType EdaDataFile_NetRecord_SubnetRecord::CIRCLE; +constexpr EdaDataFile_NetRecord_SubnetRecord_CutoutType EdaDataFile_NetRecord_SubnetRecord::RECTANGLE; +constexpr EdaDataFile_NetRecord_SubnetRecord_CutoutType EdaDataFile_NetRecord_SubnetRecord::OCTAGON; +constexpr EdaDataFile_NetRecord_SubnetRecord_CutoutType EdaDataFile_NetRecord_SubnetRecord::EXACT; +constexpr EdaDataFile_NetRecord_SubnetRecord_CutoutType EdaDataFile_NetRecord_SubnetRecord::CutoutType_MIN; +constexpr EdaDataFile_NetRecord_SubnetRecord_CutoutType EdaDataFile_NetRecord_SubnetRecord::CutoutType_MAX; +constexpr int EdaDataFile_NetRecord_SubnetRecord::CutoutType_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdaDataFile_PackageRecord_PinRecord_Type_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_edadatafile_2eproto); + return file_level_enum_descriptors_edadatafile_2eproto[4]; +} +bool EdaDataFile_PackageRecord_PinRecord_Type_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr EdaDataFile_PackageRecord_PinRecord_Type EdaDataFile_PackageRecord_PinRecord::THROUGH_HOLE; +constexpr EdaDataFile_PackageRecord_PinRecord_Type EdaDataFile_PackageRecord_PinRecord::BLIND; +constexpr EdaDataFile_PackageRecord_PinRecord_Type EdaDataFile_PackageRecord_PinRecord::SURFACE; +constexpr EdaDataFile_PackageRecord_PinRecord_Type EdaDataFile_PackageRecord_PinRecord::Type_MIN; +constexpr EdaDataFile_PackageRecord_PinRecord_Type EdaDataFile_PackageRecord_PinRecord::Type_MAX; +constexpr int EdaDataFile_PackageRecord_PinRecord::Type_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdaDataFile_PackageRecord_PinRecord_ElectricalType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_edadatafile_2eproto); + return file_level_enum_descriptors_edadatafile_2eproto[5]; +} +bool EdaDataFile_PackageRecord_PinRecord_ElectricalType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr EdaDataFile_PackageRecord_PinRecord_ElectricalType EdaDataFile_PackageRecord_PinRecord::ELECTRICAL; +constexpr EdaDataFile_PackageRecord_PinRecord_ElectricalType EdaDataFile_PackageRecord_PinRecord::NON_ELECTRICAL; +constexpr EdaDataFile_PackageRecord_PinRecord_ElectricalType EdaDataFile_PackageRecord_PinRecord::UNDEFINED; +constexpr EdaDataFile_PackageRecord_PinRecord_ElectricalType EdaDataFile_PackageRecord_PinRecord::ElectricalType_MIN; +constexpr EdaDataFile_PackageRecord_PinRecord_ElectricalType EdaDataFile_PackageRecord_PinRecord::ElectricalType_MAX; +constexpr int EdaDataFile_PackageRecord_PinRecord::ElectricalType_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdaDataFile_PackageRecord_PinRecord_MountType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_edadatafile_2eproto); + return file_level_enum_descriptors_edadatafile_2eproto[6]; +} +bool EdaDataFile_PackageRecord_PinRecord_MountType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr EdaDataFile_PackageRecord_PinRecord_MountType EdaDataFile_PackageRecord_PinRecord::SMT; +constexpr EdaDataFile_PackageRecord_PinRecord_MountType EdaDataFile_PackageRecord_PinRecord::RECOMMENDED_SMT_PAD; +constexpr EdaDataFile_PackageRecord_PinRecord_MountType EdaDataFile_PackageRecord_PinRecord::MT_THROUGH_HOLE; +constexpr EdaDataFile_PackageRecord_PinRecord_MountType EdaDataFile_PackageRecord_PinRecord::RECOMMENDED_THROUGH_HOLE; +constexpr EdaDataFile_PackageRecord_PinRecord_MountType EdaDataFile_PackageRecord_PinRecord::PRESSFIT; +constexpr EdaDataFile_PackageRecord_PinRecord_MountType EdaDataFile_PackageRecord_PinRecord::NON_BOARD; +constexpr EdaDataFile_PackageRecord_PinRecord_MountType EdaDataFile_PackageRecord_PinRecord::HOLE; +constexpr EdaDataFile_PackageRecord_PinRecord_MountType EdaDataFile_PackageRecord_PinRecord::MT_UNDEFINED; +constexpr EdaDataFile_PackageRecord_PinRecord_MountType EdaDataFile_PackageRecord_PinRecord::MountType_MIN; +constexpr EdaDataFile_PackageRecord_PinRecord_MountType EdaDataFile_PackageRecord_PinRecord::MountType_MAX; +constexpr int EdaDataFile_PackageRecord_PinRecord::MountType_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdaDataFile_BoardSide_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_edadatafile_2eproto); + return file_level_enum_descriptors_edadatafile_2eproto[7]; +} +bool EdaDataFile_BoardSide_IsValid(int value) { + switch (value) { + case 0: + case 1: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr EdaDataFile_BoardSide EdaDataFile::TOP; +constexpr EdaDataFile_BoardSide EdaDataFile::BOTTOM; +constexpr EdaDataFile_BoardSide EdaDataFile::BoardSide_MIN; +constexpr EdaDataFile_BoardSide EdaDataFile::BoardSide_MAX; +constexpr int EdaDataFile::BoardSide_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) + +// =================================================================== + +class EdaDataFile_PropertyRecord::_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_value(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +EdaDataFile_PropertyRecord::EdaDataFile_PropertyRecord(::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:odbdesign.proto.EdaDataFile.PropertyRecord) +} +EdaDataFile_PropertyRecord::EdaDataFile_PropertyRecord(const EdaDataFile_PropertyRecord& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + EdaDataFile_PropertyRecord* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.floatvalues_){from._impl_.floatvalues_} + , decltype(_impl_.name_){} + , decltype(_impl_.value_){}}; + + _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()); + } + _impl_.value_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.value_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_value()) { + _this->_impl_.value_.Set(from._internal_value(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:odbdesign.proto.EdaDataFile.PropertyRecord) +} + +inline void EdaDataFile_PropertyRecord::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_.floatvalues_){arena} + , decltype(_impl_.name_){} + , decltype(_impl_.value_){} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.value_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.value_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +EdaDataFile_PropertyRecord::~EdaDataFile_PropertyRecord() { + // @@protoc_insertion_point(destructor:odbdesign.proto.EdaDataFile.PropertyRecord) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void EdaDataFile_PropertyRecord::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.floatvalues_.~RepeatedField(); + _impl_.name_.Destroy(); + _impl_.value_.Destroy(); +} + +void EdaDataFile_PropertyRecord::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void EdaDataFile_PropertyRecord::Clear() { +// @@protoc_insertion_point(message_clear_start:odbdesign.proto.EdaDataFile.PropertyRecord) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.floatvalues_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.value_.ClearNonDefaultToEmpty(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* EdaDataFile_PropertyRecord::_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, "odbdesign.proto.EdaDataFile.PropertyRecord.name")); + } else + goto handle_unusual; + continue; + // optional string value = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_value(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "odbdesign.proto.EdaDataFile.PropertyRecord.value")); + } else + goto handle_unusual; + continue; + // repeated float floatValues = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_floatvalues(), ptr, ctx); + CHK_(ptr); + } else if (static_cast(tag) == 29) { + _internal_add_floatvalues(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); + ptr += sizeof(float); + } 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* EdaDataFile_PropertyRecord::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:odbdesign.proto.EdaDataFile.PropertyRecord) + 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, + "odbdesign.proto.EdaDataFile.PropertyRecord.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + // optional string value = 2; + if (_internal_has_value()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_value().data(), static_cast(this->_internal_value().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "odbdesign.proto.EdaDataFile.PropertyRecord.value"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_value(), target); + } + + // repeated float floatValues = 3; + if (this->_internal_floatvalues_size() > 0) { + target = stream->WriteFixedPacked(3, _internal_floatvalues(), 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:odbdesign.proto.EdaDataFile.PropertyRecord) + return target; +} + +size_t EdaDataFile_PropertyRecord::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:odbdesign.proto.EdaDataFile.PropertyRecord) + 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 float floatValues = 3; + { + unsigned int count = static_cast(this->_internal_floatvalues_size()); + size_t data_size = 4UL * count; + if (data_size > 0) { + total_size += 1 + + ::_pbi::WireFormatLite::Int32Size(static_cast(data_size)); + } + total_size += data_size; + } + + 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 string value = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_value()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EdaDataFile_PropertyRecord::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + EdaDataFile_PropertyRecord::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EdaDataFile_PropertyRecord::GetClassData() const { return &_class_data_; } + + +void EdaDataFile_PropertyRecord::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:odbdesign.proto.EdaDataFile.PropertyRecord) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.floatvalues_.MergeFrom(from._impl_.floatvalues_); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_name(from._internal_name()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_value(from._internal_value()); + } + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void EdaDataFile_PropertyRecord::CopyFrom(const EdaDataFile_PropertyRecord& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:odbdesign.proto.EdaDataFile.PropertyRecord) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EdaDataFile_PropertyRecord::IsInitialized() const { + return true; +} + +void EdaDataFile_PropertyRecord::InternalSwap(EdaDataFile_PropertyRecord* 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_.floatvalues_.InternalSwap(&other->_impl_.floatvalues_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.value_, lhs_arena, + &other->_impl_.value_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata EdaDataFile_PropertyRecord::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_edadatafile_2eproto_getter, &descriptor_table_edadatafile_2eproto_once, + file_level_metadata_edadatafile_2eproto[0]); +} + +// =================================================================== + +class EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::_Internal { + public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static void set_has_type(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_layernumber(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_featurenumber(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord(::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:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord) +} +EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord(const EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.type_){} + , decltype(_impl_.layernumber_){} + , decltype(_impl_.featurenumber_){}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&_impl_.type_, &from._impl_.type_, + static_cast(reinterpret_cast(&_impl_.featurenumber_) - + reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.featurenumber_)); + // @@protoc_insertion_point(copy_constructor:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord) +} + +inline void EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::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_.type_){0} + , decltype(_impl_.layernumber_){0u} + , decltype(_impl_.featurenumber_){0u} + }; +} + +EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::~EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord() { + // @@protoc_insertion_point(destructor:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::Clear() { +// @@protoc_insertion_point(message_clear_start:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord) + 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) { + ::memset(&_impl_.type_, 0, static_cast( + reinterpret_cast(&_impl_.featurenumber_) - + reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.featurenumber_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::_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 .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord.Type type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_type(static_cast<::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type>(val)); + } else + goto handle_unusual; + continue; + // optional uint32 layerNumber = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_layernumber(&has_bits); + _impl_.layernumber_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional uint32 featureNumber = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_featurenumber(&has_bits); + _impl_.featurenumber_ = ::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* EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // optional .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord.Type type = 1; + if (_internal_has_type()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_type(), target); + } + + // optional uint32 layerNumber = 2; + if (_internal_has_layernumber()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(2, this->_internal_layernumber(), target); + } + + // optional uint32 featureNumber = 3; + if (_internal_has_featurenumber()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_featurenumber(), 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:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord) + return target; +} + +size_t EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord) + 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 .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord.Type type = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); + } + + // optional uint32 layerNumber = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_layernumber()); + } + + // optional uint32 featureNumber = 3; + if (cached_has_bits & 0x00000004u) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_featurenumber()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::GetClassData() const { return &_class_data_; } + + +void EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::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:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord) + 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->_impl_.type_ = from._impl_.type_; + } + if (cached_has_bits & 0x00000002u) { + _this->_impl_.layernumber_ = from._impl_.layernumber_; + } + if (cached_has_bits & 0x00000004u) { + _this->_impl_.featurenumber_ = from._impl_.featurenumber_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::CopyFrom(const EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::IsInitialized() const { + return true; +} + +void EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::InternalSwap(EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord, _impl_.featurenumber_) + + sizeof(EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::_impl_.featurenumber_) + - PROTOBUF_FIELD_OFFSET(EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord, _impl_.type_)>( + reinterpret_cast(&_impl_.type_), + reinterpret_cast(&other->_impl_.type_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_edadatafile_2eproto_getter, &descriptor_table_edadatafile_2eproto_once, + file_level_metadata_edadatafile_2eproto[1]); +} + +// =================================================================== + +class EdaDataFile_NetRecord_SubnetRecord::_Internal { + public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static void set_has_type(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_filltype(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_cutouttype(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_fillsize(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_side(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_componentnumber(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_toeprintnumber(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } +}; + +EdaDataFile_NetRecord_SubnetRecord::EdaDataFile_NetRecord_SubnetRecord(::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:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord) +} +EdaDataFile_NetRecord_SubnetRecord::EdaDataFile_NetRecord_SubnetRecord(const EdaDataFile_NetRecord_SubnetRecord& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + EdaDataFile_NetRecord_SubnetRecord* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.featureidrecords_){from._impl_.featureidrecords_} + , decltype(_impl_.type_){} + , decltype(_impl_.filltype_){} + , decltype(_impl_.cutouttype_){} + , decltype(_impl_.fillsize_){} + , decltype(_impl_.side_){} + , decltype(_impl_.componentnumber_){} + , decltype(_impl_.toeprintnumber_){}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&_impl_.type_, &from._impl_.type_, + static_cast(reinterpret_cast(&_impl_.toeprintnumber_) - + reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.toeprintnumber_)); + // @@protoc_insertion_point(copy_constructor:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord) +} + +inline void EdaDataFile_NetRecord_SubnetRecord::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_.featureidrecords_){arena} + , decltype(_impl_.type_){0} + , decltype(_impl_.filltype_){0} + , decltype(_impl_.cutouttype_){0} + , decltype(_impl_.fillsize_){0} + , decltype(_impl_.side_){0} + , decltype(_impl_.componentnumber_){0u} + , decltype(_impl_.toeprintnumber_){0u} + }; +} + +EdaDataFile_NetRecord_SubnetRecord::~EdaDataFile_NetRecord_SubnetRecord() { + // @@protoc_insertion_point(destructor:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void EdaDataFile_NetRecord_SubnetRecord::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.featureidrecords_.~RepeatedPtrField(); +} + +void EdaDataFile_NetRecord_SubnetRecord::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void EdaDataFile_NetRecord_SubnetRecord::Clear() { +// @@protoc_insertion_point(message_clear_start:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.featureidrecords_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x0000007fu) { + ::memset(&_impl_.type_, 0, static_cast( + reinterpret_cast(&_impl_.toeprintnumber_) - + reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.toeprintnumber_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* EdaDataFile_NetRecord_SubnetRecord::_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 .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.Type type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_type(static_cast<::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_Type>(val)); + } else + goto handle_unusual; + continue; + // repeated .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord featureIdRecords = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_featureidrecords(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else + goto handle_unusual; + continue; + // optional .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FillType fillType = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_filltype(static_cast<::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FillType>(val)); + } else + goto handle_unusual; + continue; + // optional .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.CutoutType cutoutType = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_cutouttype(static_cast<::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_CutoutType>(val)); + } else + goto handle_unusual; + continue; + // optional float fillSize = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 45)) { + _Internal::set_has_fillsize(&has_bits); + _impl_.fillsize_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + // optional .odbdesign.proto.EdaDataFile.BoardSide side = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_side(static_cast<::odbdesign::proto::EdaDataFile_BoardSide>(val)); + } else + goto handle_unusual; + continue; + // optional uint32 componentNumber = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { + _Internal::set_has_componentnumber(&has_bits); + _impl_.componentnumber_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional uint32 toeprintNumber = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { + _Internal::set_has_toeprintnumber(&has_bits); + _impl_.toeprintnumber_ = ::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* EdaDataFile_NetRecord_SubnetRecord::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // optional .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.Type type = 1; + if (_internal_has_type()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_type(), target); + } + + // repeated .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord featureIdRecords = 2; + for (unsigned i = 0, + n = static_cast(this->_internal_featureidrecords_size()); i < n; i++) { + const auto& repfield = this->_internal_featureidrecords(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); + } + + // optional .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FillType fillType = 3; + if (_internal_has_filltype()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 3, this->_internal_filltype(), target); + } + + // optional .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.CutoutType cutoutType = 4; + if (_internal_has_cutouttype()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 4, this->_internal_cutouttype(), target); + } + + // optional float fillSize = 5; + if (_internal_has_fillsize()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(5, this->_internal_fillsize(), target); + } + + // optional .odbdesign.proto.EdaDataFile.BoardSide side = 6; + if (_internal_has_side()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 6, this->_internal_side(), target); + } + + // optional uint32 componentNumber = 7; + if (_internal_has_componentnumber()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(7, this->_internal_componentnumber(), target); + } + + // optional uint32 toeprintNumber = 8; + if (_internal_has_toeprintnumber()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(8, this->_internal_toeprintnumber(), 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:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord) + return target; +} + +size_t EdaDataFile_NetRecord_SubnetRecord::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord) + 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 .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord featureIdRecords = 2; + total_size += 1UL * this->_internal_featureidrecords_size(); + for (const auto& msg : this->_impl_.featureidrecords_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x0000007fu) { + // optional .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.Type type = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); + } + + // optional .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FillType fillType = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_filltype()); + } + + // optional .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.CutoutType cutoutType = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_cutouttype()); + } + + // optional float fillSize = 5; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + 4; + } + + // optional .odbdesign.proto.EdaDataFile.BoardSide side = 6; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_side()); + } + + // optional uint32 componentNumber = 7; + if (cached_has_bits & 0x00000020u) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_componentnumber()); + } + + // optional uint32 toeprintNumber = 8; + if (cached_has_bits & 0x00000040u) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_toeprintnumber()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EdaDataFile_NetRecord_SubnetRecord::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + EdaDataFile_NetRecord_SubnetRecord::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EdaDataFile_NetRecord_SubnetRecord::GetClassData() const { return &_class_data_; } + + +void EdaDataFile_NetRecord_SubnetRecord::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:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.featureidrecords_.MergeFrom(from._impl_.featureidrecords_); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000007fu) { + if (cached_has_bits & 0x00000001u) { + _this->_impl_.type_ = from._impl_.type_; + } + if (cached_has_bits & 0x00000002u) { + _this->_impl_.filltype_ = from._impl_.filltype_; + } + if (cached_has_bits & 0x00000004u) { + _this->_impl_.cutouttype_ = from._impl_.cutouttype_; + } + if (cached_has_bits & 0x00000008u) { + _this->_impl_.fillsize_ = from._impl_.fillsize_; + } + if (cached_has_bits & 0x00000010u) { + _this->_impl_.side_ = from._impl_.side_; + } + if (cached_has_bits & 0x00000020u) { + _this->_impl_.componentnumber_ = from._impl_.componentnumber_; + } + if (cached_has_bits & 0x00000040u) { + _this->_impl_.toeprintnumber_ = from._impl_.toeprintnumber_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void EdaDataFile_NetRecord_SubnetRecord::CopyFrom(const EdaDataFile_NetRecord_SubnetRecord& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EdaDataFile_NetRecord_SubnetRecord::IsInitialized() const { + return true; +} + +void EdaDataFile_NetRecord_SubnetRecord::InternalSwap(EdaDataFile_NetRecord_SubnetRecord* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]); + _impl_.featureidrecords_.InternalSwap(&other->_impl_.featureidrecords_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(EdaDataFile_NetRecord_SubnetRecord, _impl_.toeprintnumber_) + + sizeof(EdaDataFile_NetRecord_SubnetRecord::_impl_.toeprintnumber_) + - PROTOBUF_FIELD_OFFSET(EdaDataFile_NetRecord_SubnetRecord, _impl_.type_)>( + reinterpret_cast(&_impl_.type_), + reinterpret_cast(&other->_impl_.type_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata EdaDataFile_NetRecord_SubnetRecord::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_edadatafile_2eproto_getter, &descriptor_table_edadatafile_2eproto_once, + file_level_metadata_edadatafile_2eproto[2]); +} + +// =================================================================== + +class EdaDataFile_NetRecord::_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_attributesidstring(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_index(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +EdaDataFile_NetRecord::EdaDataFile_NetRecord(::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:odbdesign.proto.EdaDataFile.NetRecord) +} +EdaDataFile_NetRecord::EdaDataFile_NetRecord(const EdaDataFile_NetRecord& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + EdaDataFile_NetRecord* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.subnetrecords_){from._impl_.subnetrecords_} + , decltype(_impl_.propertyrecords_){from._impl_.propertyrecords_} + , decltype(_impl_.name_){} + , decltype(_impl_.attributesidstring_){} + , 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()); + } + _impl_.attributesidstring_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.attributesidstring_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_attributesidstring()) { + _this->_impl_.attributesidstring_.Set(from._internal_attributesidstring(), + _this->GetArenaForAllocation()); + } + _this->_impl_.index_ = from._impl_.index_; + // @@protoc_insertion_point(copy_constructor:odbdesign.proto.EdaDataFile.NetRecord) +} + +inline void EdaDataFile_NetRecord::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_.subnetrecords_){arena} + , decltype(_impl_.propertyrecords_){arena} + , decltype(_impl_.name_){} + , decltype(_impl_.attributesidstring_){} + , decltype(_impl_.index_){0u} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.attributesidstring_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.attributesidstring_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +EdaDataFile_NetRecord::~EdaDataFile_NetRecord() { + // @@protoc_insertion_point(destructor:odbdesign.proto.EdaDataFile.NetRecord) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void EdaDataFile_NetRecord::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.subnetrecords_.~RepeatedPtrField(); + _impl_.propertyrecords_.~RepeatedPtrField(); + _impl_.name_.Destroy(); + _impl_.attributesidstring_.Destroy(); +} + +void EdaDataFile_NetRecord::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void EdaDataFile_NetRecord::Clear() { +// @@protoc_insertion_point(message_clear_start:odbdesign.proto.EdaDataFile.NetRecord) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.subnetrecords_.Clear(); + _impl_.propertyrecords_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.attributesidstring_.ClearNonDefaultToEmpty(); + } + } + _impl_.index_ = 0u; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* EdaDataFile_NetRecord::_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, "odbdesign.proto.EdaDataFile.NetRecord.name")); + } else + goto handle_unusual; + continue; + // optional string attributesIdString = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_attributesidstring(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "odbdesign.proto.EdaDataFile.NetRecord.attributesIdString")); + } 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; + // repeated .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord subnetRecords = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_subnetrecords(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .odbdesign.proto.EdaDataFile.PropertyRecord propertyRecords = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_propertyrecords(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(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* EdaDataFile_NetRecord::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:odbdesign.proto.EdaDataFile.NetRecord) + 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, + "odbdesign.proto.EdaDataFile.NetRecord.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + // optional string attributesIdString = 2; + if (_internal_has_attributesidstring()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_attributesidstring().data(), static_cast(this->_internal_attributesidstring().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "odbdesign.proto.EdaDataFile.NetRecord.attributesIdString"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_attributesidstring(), target); + } + + // optional uint32 index = 3; + if (_internal_has_index()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(3, this->_internal_index(), target); + } + + // repeated .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord subnetRecords = 4; + for (unsigned i = 0, + n = static_cast(this->_internal_subnetrecords_size()); i < n; i++) { + const auto& repfield = this->_internal_subnetrecords(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream); + } + + // repeated .odbdesign.proto.EdaDataFile.PropertyRecord propertyRecords = 5; + for (unsigned i = 0, + n = static_cast(this->_internal_propertyrecords_size()); i < n; i++) { + const auto& repfield = this->_internal_propertyrecords(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(5, repfield, repfield.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:odbdesign.proto.EdaDataFile.NetRecord) + return target; +} + +size_t EdaDataFile_NetRecord::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:odbdesign.proto.EdaDataFile.NetRecord) + 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 .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord subnetRecords = 4; + total_size += 1UL * this->_internal_subnetrecords_size(); + for (const auto& msg : this->_impl_.subnetrecords_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .odbdesign.proto.EdaDataFile.PropertyRecord propertyRecords = 5; + total_size += 1UL * this->_internal_propertyrecords_size(); + for (const auto& msg : this->_impl_.propertyrecords_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + 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 string attributesIdString = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_attributesidstring()); + } + + // optional uint32 index = 3; + if (cached_has_bits & 0x00000004u) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_index()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EdaDataFile_NetRecord::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + EdaDataFile_NetRecord::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EdaDataFile_NetRecord::GetClassData() const { return &_class_data_; } + + +void EdaDataFile_NetRecord::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:odbdesign.proto.EdaDataFile.NetRecord) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.subnetrecords_.MergeFrom(from._impl_.subnetrecords_); + _this->_impl_.propertyrecords_.MergeFrom(from._impl_.propertyrecords_); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_name(from._internal_name()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_attributesidstring(from._internal_attributesidstring()); + } + if (cached_has_bits & 0x00000004u) { + _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 EdaDataFile_NetRecord::CopyFrom(const EdaDataFile_NetRecord& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:odbdesign.proto.EdaDataFile.NetRecord) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EdaDataFile_NetRecord::IsInitialized() const { + return true; +} + +void EdaDataFile_NetRecord::InternalSwap(EdaDataFile_NetRecord* 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_.subnetrecords_.InternalSwap(&other->_impl_.subnetrecords_); + _impl_.propertyrecords_.InternalSwap(&other->_impl_.propertyrecords_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.attributesidstring_, lhs_arena, + &other->_impl_.attributesidstring_, rhs_arena + ); + swap(_impl_.index_, other->_impl_.index_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata EdaDataFile_NetRecord::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_edadatafile_2eproto_getter, &descriptor_table_edadatafile_2eproto_once, + file_level_metadata_edadatafile_2eproto[3]); +} + +// =================================================================== + +EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse::EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse() {} +EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse::EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse::MergeFrom(const EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_edadatafile_2eproto_getter, &descriptor_table_edadatafile_2eproto_once, + file_level_metadata_edadatafile_2eproto[4]); +} + +// =================================================================== + +class EdaDataFile_PackageRecord_PinRecord::_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_type(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_xcenter(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_ycenter(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_finishedholesize(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_electricaltype(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_mounttype(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static void set_has_id(HasBits* has_bits) { + (*has_bits)[0] |= 128u; + } + static void set_has_index(HasBits* has_bits) { + (*has_bits)[0] |= 256u; + } +}; + +EdaDataFile_PackageRecord_PinRecord::EdaDataFile_PackageRecord_PinRecord(::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:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord) +} +EdaDataFile_PackageRecord_PinRecord::EdaDataFile_PackageRecord_PinRecord(const EdaDataFile_PackageRecord_PinRecord& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + EdaDataFile_PackageRecord_PinRecord* 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_.type_){} + , decltype(_impl_.xcenter_){} + , decltype(_impl_.ycenter_){} + , decltype(_impl_.finishedholesize_){} + , decltype(_impl_.electricaltype_){} + , decltype(_impl_.mounttype_){} + , decltype(_impl_.id_){} + , 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()); + } + ::memcpy(&_impl_.type_, &from._impl_.type_, + static_cast(reinterpret_cast(&_impl_.index_) - + reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.index_)); + // @@protoc_insertion_point(copy_constructor:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord) +} + +inline void EdaDataFile_PackageRecord_PinRecord::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_.type_){0} + , decltype(_impl_.xcenter_){0} + , decltype(_impl_.ycenter_){0} + , decltype(_impl_.finishedholesize_){0} + , decltype(_impl_.electricaltype_){0} + , decltype(_impl_.mounttype_){0} + , decltype(_impl_.id_){0u} + , decltype(_impl_.index_){0u} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +EdaDataFile_PackageRecord_PinRecord::~EdaDataFile_PackageRecord_PinRecord() { + // @@protoc_insertion_point(destructor:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void EdaDataFile_PackageRecord_PinRecord::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.name_.Destroy(); +} + +void EdaDataFile_PackageRecord_PinRecord::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void EdaDataFile_PackageRecord_PinRecord::Clear() { +// @@protoc_insertion_point(message_clear_start:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord) + 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(); + } + if (cached_has_bits & 0x000000feu) { + ::memset(&_impl_.type_, 0, static_cast( + reinterpret_cast(&_impl_.id_) - + reinterpret_cast(&_impl_.type_)) + sizeof(_impl_.id_)); + } + _impl_.index_ = 0u; + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* EdaDataFile_PackageRecord_PinRecord::_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, "odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.name")); + } else + goto handle_unusual; + continue; + // optional .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.Type type = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_type(static_cast<::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_Type>(val)); + } else + goto handle_unusual; + continue; + // optional float xCenter = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 29)) { + _Internal::set_has_xcenter(&has_bits); + _impl_.xcenter_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + // optional float yCenter = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 37)) { + _Internal::set_has_ycenter(&has_bits); + _impl_.ycenter_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + // optional float finishedHoleSize = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 45)) { + _Internal::set_has_finishedholesize(&has_bits); + _impl_.finishedholesize_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + // optional .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.ElectricalType electricalType = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_electricaltype(static_cast<::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_ElectricalType>(val)); + } else + goto handle_unusual; + continue; + // optional .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.MountType mountType = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + _internal_set_mounttype(static_cast<::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_MountType>(val)); + } else + goto handle_unusual; + continue; + // optional uint32 id = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { + _Internal::set_has_id(&has_bits); + _impl_.id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional uint32 index = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { + _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* EdaDataFile_PackageRecord_PinRecord::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord) + 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, + "odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + // optional .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.Type type = 2; + if (_internal_has_type()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this->_internal_type(), target); + } + + // optional float xCenter = 3; + if (_internal_has_xcenter()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_xcenter(), target); + } + + // optional float yCenter = 4; + if (_internal_has_ycenter()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(4, this->_internal_ycenter(), target); + } + + // optional float finishedHoleSize = 5; + if (_internal_has_finishedholesize()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(5, this->_internal_finishedholesize(), target); + } + + // optional .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.ElectricalType electricalType = 6; + if (_internal_has_electricaltype()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 6, this->_internal_electricaltype(), target); + } + + // optional .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.MountType mountType = 7; + if (_internal_has_mounttype()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 7, this->_internal_mounttype(), target); + } + + // optional uint32 id = 8; + if (_internal_has_id()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(8, this->_internal_id(), target); + } + + // optional uint32 index = 9; + if (_internal_has_index()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteUInt32ToArray(9, 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:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord) + return target; +} + +size_t EdaDataFile_PackageRecord_PinRecord::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord) + 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 & 0x000000ffu) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // optional .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.Type type = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_type()); + } + + // optional float xCenter = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + 4; + } + + // optional float yCenter = 4; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + 4; + } + + // optional float finishedHoleSize = 5; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + 4; + } + + // optional .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.ElectricalType electricalType = 6; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_electricaltype()); + } + + // optional .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.MountType mountType = 7; + if (cached_has_bits & 0x00000040u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_mounttype()); + } + + // optional uint32 id = 8; + if (cached_has_bits & 0x00000080u) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_id()); + } + + } + // optional uint32 index = 9; + if (cached_has_bits & 0x00000100u) { + total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_index()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EdaDataFile_PackageRecord_PinRecord::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + EdaDataFile_PackageRecord_PinRecord::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EdaDataFile_PackageRecord_PinRecord::GetClassData() const { return &_class_data_; } + + +void EdaDataFile_PackageRecord_PinRecord::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:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord) + 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 & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_name(from._internal_name()); + } + if (cached_has_bits & 0x00000002u) { + _this->_impl_.type_ = from._impl_.type_; + } + if (cached_has_bits & 0x00000004u) { + _this->_impl_.xcenter_ = from._impl_.xcenter_; + } + if (cached_has_bits & 0x00000008u) { + _this->_impl_.ycenter_ = from._impl_.ycenter_; + } + if (cached_has_bits & 0x00000010u) { + _this->_impl_.finishedholesize_ = from._impl_.finishedholesize_; + } + if (cached_has_bits & 0x00000020u) { + _this->_impl_.electricaltype_ = from._impl_.electricaltype_; + } + if (cached_has_bits & 0x00000040u) { + _this->_impl_.mounttype_ = from._impl_.mounttype_; + } + if (cached_has_bits & 0x00000080u) { + _this->_impl_.id_ = from._impl_.id_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + if (cached_has_bits & 0x00000100u) { + _this->_internal_set_index(from._internal_index()); + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void EdaDataFile_PackageRecord_PinRecord::CopyFrom(const EdaDataFile_PackageRecord_PinRecord& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EdaDataFile_PackageRecord_PinRecord::IsInitialized() const { + return true; +} + +void EdaDataFile_PackageRecord_PinRecord::InternalSwap(EdaDataFile_PackageRecord_PinRecord* 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(EdaDataFile_PackageRecord_PinRecord, _impl_.index_) + + sizeof(EdaDataFile_PackageRecord_PinRecord::_impl_.index_) + - PROTOBUF_FIELD_OFFSET(EdaDataFile_PackageRecord_PinRecord, _impl_.type_)>( + reinterpret_cast(&_impl_.type_), + reinterpret_cast(&other->_impl_.type_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata EdaDataFile_PackageRecord_PinRecord::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_edadatafile_2eproto_getter, &descriptor_table_edadatafile_2eproto_once, + file_level_metadata_edadatafile_2eproto[5]); +} + +// =================================================================== + +class EdaDataFile_PackageRecord::_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_pitch(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_xmin(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_ymin(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_xmax(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_ymax(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static void set_has_attributesidstring(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +EdaDataFile_PackageRecord::EdaDataFile_PackageRecord(::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, &EdaDataFile_PackageRecord::ArenaDtor); + } + // @@protoc_insertion_point(arena_constructor:odbdesign.proto.EdaDataFile.PackageRecord) +} +EdaDataFile_PackageRecord::EdaDataFile_PackageRecord(const EdaDataFile_PackageRecord& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + EdaDataFile_PackageRecord* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.pinrecords_){from._impl_.pinrecords_} + , /*decltype(_impl_.pinrecordsbyname_)*/{} + , decltype(_impl_.propertyrecords_){from._impl_.propertyrecords_} + , decltype(_impl_.name_){} + , decltype(_impl_.attributesidstring_){} + , decltype(_impl_.pitch_){} + , decltype(_impl_.xmin_){} + , decltype(_impl_.ymin_){} + , decltype(_impl_.xmax_){} + , decltype(_impl_.ymax_){}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_impl_.pinrecordsbyname_.MergeFrom(from._impl_.pinrecordsbyname_); + _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()); + } + _impl_.attributesidstring_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.attributesidstring_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_attributesidstring()) { + _this->_impl_.attributesidstring_.Set(from._internal_attributesidstring(), + _this->GetArenaForAllocation()); + } + ::memcpy(&_impl_.pitch_, &from._impl_.pitch_, + static_cast(reinterpret_cast(&_impl_.ymax_) - + reinterpret_cast(&_impl_.pitch_)) + sizeof(_impl_.ymax_)); + // @@protoc_insertion_point(copy_constructor:odbdesign.proto.EdaDataFile.PackageRecord) +} + +inline void EdaDataFile_PackageRecord::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_.pinrecords_){arena} + , /*decltype(_impl_.pinrecordsbyname_)*/{::_pbi::ArenaInitialized(), arena} + , decltype(_impl_.propertyrecords_){arena} + , decltype(_impl_.name_){} + , decltype(_impl_.attributesidstring_){} + , decltype(_impl_.pitch_){0} + , decltype(_impl_.xmin_){0} + , decltype(_impl_.ymin_){0} + , decltype(_impl_.xmax_){0} + , decltype(_impl_.ymax_){0} + }; + _impl_.name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.attributesidstring_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.attributesidstring_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +EdaDataFile_PackageRecord::~EdaDataFile_PackageRecord() { + // @@protoc_insertion_point(destructor:odbdesign.proto.EdaDataFile.PackageRecord) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + ArenaDtor(this); + return; + } + SharedDtor(); +} + +inline void EdaDataFile_PackageRecord::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.pinrecords_.~RepeatedPtrField(); + _impl_.pinrecordsbyname_.Destruct(); + _impl_.pinrecordsbyname_.~MapField(); + _impl_.propertyrecords_.~RepeatedPtrField(); + _impl_.name_.Destroy(); + _impl_.attributesidstring_.Destroy(); +} + +void EdaDataFile_PackageRecord::ArenaDtor(void* object) { + EdaDataFile_PackageRecord* _this = reinterpret_cast< EdaDataFile_PackageRecord* >(object); + _this->_impl_.pinrecordsbyname_.Destruct(); +} +void EdaDataFile_PackageRecord::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void EdaDataFile_PackageRecord::Clear() { +// @@protoc_insertion_point(message_clear_start:odbdesign.proto.EdaDataFile.PackageRecord) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.pinrecords_.Clear(); + _impl_.pinrecordsbyname_.Clear(); + _impl_.propertyrecords_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _impl_.name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.attributesidstring_.ClearNonDefaultToEmpty(); + } + } + if (cached_has_bits & 0x0000007cu) { + ::memset(&_impl_.pitch_, 0, static_cast( + reinterpret_cast(&_impl_.ymax_) - + reinterpret_cast(&_impl_.pitch_)) + sizeof(_impl_.ymax_)); + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* EdaDataFile_PackageRecord::_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, "odbdesign.proto.EdaDataFile.PackageRecord.name")); + } else + goto handle_unusual; + continue; + // optional float pitch = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 21)) { + _Internal::set_has_pitch(&has_bits); + _impl_.pitch_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + // optional float xMin = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 29)) { + _Internal::set_has_xmin(&has_bits); + _impl_.xmin_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + // optional float yMin = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 37)) { + _Internal::set_has_ymin(&has_bits); + _impl_.ymin_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + // optional float xMax = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 45)) { + _Internal::set_has_xmax(&has_bits); + _impl_.xmax_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + // optional float yMax = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 53)) { + _Internal::set_has_ymax(&has_bits); + _impl_.ymax_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + // optional string attributesIdString = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + auto str = _internal_mutable_attributesidstring(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "odbdesign.proto.EdaDataFile.PackageRecord.attributesIdString")); + } else + goto handle_unusual; + continue; + // repeated .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord pinRecords = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_pinrecords(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr)); + } else + goto handle_unusual; + continue; + // map pinRecordsByName = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&_impl_.pinrecordsbyname_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .odbdesign.proto.EdaDataFile.PropertyRecord propertyRecords = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 82)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_propertyrecords(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<82>(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* EdaDataFile_PackageRecord::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:odbdesign.proto.EdaDataFile.PackageRecord) + 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, + "odbdesign.proto.EdaDataFile.PackageRecord.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + // optional float pitch = 2; + if (_internal_has_pitch()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_pitch(), target); + } + + // optional float xMin = 3; + if (_internal_has_xmin()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_xmin(), target); + } + + // optional float yMin = 4; + if (_internal_has_ymin()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(4, this->_internal_ymin(), target); + } + + // optional float xMax = 5; + if (_internal_has_xmax()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(5, this->_internal_xmax(), target); + } + + // optional float yMax = 6; + if (_internal_has_ymax()) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteFloatToArray(6, this->_internal_ymax(), target); + } + + // optional string attributesIdString = 7; + if (_internal_has_attributesidstring()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_attributesidstring().data(), static_cast(this->_internal_attributesidstring().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "odbdesign.proto.EdaDataFile.PackageRecord.attributesIdString"); + target = stream->WriteStringMaybeAliased( + 7, this->_internal_attributesidstring(), target); + } + + // repeated .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord pinRecords = 8; + for (unsigned i = 0, + n = static_cast(this->_internal_pinrecords_size()); i < n; i++) { + const auto& repfield = this->_internal_pinrecords(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(8, repfield, repfield.GetCachedSize(), target, stream); + } + + // map pinRecordsByName = 9; + if (!this->_internal_pinrecordsbyname().empty()) { + using MapType = ::_pb::Map; + using WireHelper = EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse::Funcs; + const auto& map_field = this->_internal_pinrecordsbyname(); + 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, + "odbdesign.proto.EdaDataFile.PackageRecord.PinRecordsByNameEntry.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 .odbdesign.proto.EdaDataFile.PropertyRecord propertyRecords = 10; + for (unsigned i = 0, + n = static_cast(this->_internal_propertyrecords_size()); i < n; i++) { + const auto& repfield = this->_internal_propertyrecords(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(10, repfield, repfield.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:odbdesign.proto.EdaDataFile.PackageRecord) + return target; +} + +size_t EdaDataFile_PackageRecord::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:odbdesign.proto.EdaDataFile.PackageRecord) + 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 .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord pinRecords = 8; + total_size += 1UL * this->_internal_pinrecords_size(); + for (const auto& msg : this->_impl_.pinrecords_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // map pinRecordsByName = 9; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_pinrecordsbyname_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord >::const_iterator + it = this->_internal_pinrecordsbyname().begin(); + it != this->_internal_pinrecordsbyname().end(); ++it) { + total_size += EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + // repeated .odbdesign.proto.EdaDataFile.PropertyRecord propertyRecords = 10; + total_size += 1UL * this->_internal_propertyrecords_size(); + for (const auto& msg : this->_impl_.propertyrecords_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x0000007fu) { + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // optional string attributesIdString = 7; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_attributesidstring()); + } + + // optional float pitch = 2; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + 4; + } + + // optional float xMin = 3; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + 4; + } + + // optional float yMin = 4; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + 4; + } + + // optional float xMax = 5; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + 4; + } + + // optional float yMax = 6; + if (cached_has_bits & 0x00000040u) { + total_size += 1 + 4; + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EdaDataFile_PackageRecord::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + EdaDataFile_PackageRecord::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EdaDataFile_PackageRecord::GetClassData() const { return &_class_data_; } + + +void EdaDataFile_PackageRecord::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:odbdesign.proto.EdaDataFile.PackageRecord) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.pinrecords_.MergeFrom(from._impl_.pinrecords_); + _this->_impl_.pinrecordsbyname_.MergeFrom(from._impl_.pinrecordsbyname_); + _this->_impl_.propertyrecords_.MergeFrom(from._impl_.propertyrecords_); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x0000007fu) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_name(from._internal_name()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_attributesidstring(from._internal_attributesidstring()); + } + if (cached_has_bits & 0x00000004u) { + _this->_impl_.pitch_ = from._impl_.pitch_; + } + if (cached_has_bits & 0x00000008u) { + _this->_impl_.xmin_ = from._impl_.xmin_; + } + if (cached_has_bits & 0x00000010u) { + _this->_impl_.ymin_ = from._impl_.ymin_; + } + if (cached_has_bits & 0x00000020u) { + _this->_impl_.xmax_ = from._impl_.xmax_; + } + if (cached_has_bits & 0x00000040u) { + _this->_impl_.ymax_ = from._impl_.ymax_; + } + _this->_impl_._has_bits_[0] |= cached_has_bits; + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void EdaDataFile_PackageRecord::CopyFrom(const EdaDataFile_PackageRecord& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:odbdesign.proto.EdaDataFile.PackageRecord) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EdaDataFile_PackageRecord::IsInitialized() const { + return true; +} + +void EdaDataFile_PackageRecord::InternalSwap(EdaDataFile_PackageRecord* 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_.pinrecords_.InternalSwap(&other->_impl_.pinrecords_); + _impl_.pinrecordsbyname_.InternalSwap(&other->_impl_.pinrecordsbyname_); + _impl_.propertyrecords_.InternalSwap(&other->_impl_.propertyrecords_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.name_, lhs_arena, + &other->_impl_.name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.attributesidstring_, lhs_arena, + &other->_impl_.attributesidstring_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(EdaDataFile_PackageRecord, _impl_.ymax_) + + sizeof(EdaDataFile_PackageRecord::_impl_.ymax_) + - PROTOBUF_FIELD_OFFSET(EdaDataFile_PackageRecord, _impl_.pitch_)>( + reinterpret_cast(&_impl_.pitch_), + reinterpret_cast(&other->_impl_.pitch_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata EdaDataFile_PackageRecord::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_edadatafile_2eproto_getter, &descriptor_table_edadatafile_2eproto_once, + file_level_metadata_edadatafile_2eproto[6]); +} + +// =================================================================== + +EdaDataFile_NetRecordsByNameEntry_DoNotUse::EdaDataFile_NetRecordsByNameEntry_DoNotUse() {} +EdaDataFile_NetRecordsByNameEntry_DoNotUse::EdaDataFile_NetRecordsByNameEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void EdaDataFile_NetRecordsByNameEntry_DoNotUse::MergeFrom(const EdaDataFile_NetRecordsByNameEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata EdaDataFile_NetRecordsByNameEntry_DoNotUse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_edadatafile_2eproto_getter, &descriptor_table_edadatafile_2eproto_once, + file_level_metadata_edadatafile_2eproto[7]); +} + +// =================================================================== + +EdaDataFile_PackageRecordsByNameEntry_DoNotUse::EdaDataFile_PackageRecordsByNameEntry_DoNotUse() {} +EdaDataFile_PackageRecordsByNameEntry_DoNotUse::EdaDataFile_PackageRecordsByNameEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : SuperType(arena) {} +void EdaDataFile_PackageRecordsByNameEntry_DoNotUse::MergeFrom(const EdaDataFile_PackageRecordsByNameEntry_DoNotUse& other) { + MergeFromInternal(other); +} +::PROTOBUF_NAMESPACE_ID::Metadata EdaDataFile_PackageRecordsByNameEntry_DoNotUse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_edadatafile_2eproto_getter, &descriptor_table_edadatafile_2eproto_once, + file_level_metadata_edadatafile_2eproto[8]); +} + +// =================================================================== + +class EdaDataFile::_Internal { + public: + using HasBits = decltype(std::declval()._impl_._has_bits_); + static void set_has_path(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_units(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_source(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +EdaDataFile::EdaDataFile(::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, &EdaDataFile::ArenaDtor); + } + // @@protoc_insertion_point(arena_constructor:odbdesign.proto.EdaDataFile) +} +EdaDataFile::EdaDataFile(const EdaDataFile& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + EdaDataFile* const _this = this; (void)_this; + new (&_impl_) Impl_{ + decltype(_impl_._has_bits_){from._impl_._has_bits_} + , /*decltype(_impl_._cached_size_)*/{} + , decltype(_impl_.layernames_){from._impl_.layernames_} + , decltype(_impl_.attributenames_){from._impl_.attributenames_} + , decltype(_impl_.attributetextvalues_){from._impl_.attributetextvalues_} + , decltype(_impl_.netrecords_){from._impl_.netrecords_} + , /*decltype(_impl_.netrecordsbyname_)*/{} + , decltype(_impl_.packagerecords_){from._impl_.packagerecords_} + , /*decltype(_impl_.packagerecordsbyname_)*/{} + , decltype(_impl_.path_){} + , decltype(_impl_.units_){} + , decltype(_impl_.source_){}}; + + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + _this->_impl_.netrecordsbyname_.MergeFrom(from._impl_.netrecordsbyname_); + _this->_impl_.packagerecordsbyname_.MergeFrom(from._impl_.packagerecordsbyname_); + _impl_.path_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.path_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_path()) { + _this->_impl_.path_.Set(from._internal_path(), + _this->GetArenaForAllocation()); + } + _impl_.units_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.units_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_units()) { + _this->_impl_.units_.Set(from._internal_units(), + _this->GetArenaForAllocation()); + } + _impl_.source_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.source_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_source()) { + _this->_impl_.source_.Set(from._internal_source(), + _this->GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:odbdesign.proto.EdaDataFile) +} + +inline void EdaDataFile::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_.layernames_){arena} + , decltype(_impl_.attributenames_){arena} + , decltype(_impl_.attributetextvalues_){arena} + , decltype(_impl_.netrecords_){arena} + , /*decltype(_impl_.netrecordsbyname_)*/{::_pbi::ArenaInitialized(), arena} + , decltype(_impl_.packagerecords_){arena} + , /*decltype(_impl_.packagerecordsbyname_)*/{::_pbi::ArenaInitialized(), arena} + , decltype(_impl_.path_){} + , decltype(_impl_.units_){} + , decltype(_impl_.source_){} + }; + _impl_.path_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.path_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.units_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.units_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.source_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + _impl_.source_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +EdaDataFile::~EdaDataFile() { + // @@protoc_insertion_point(destructor:odbdesign.proto.EdaDataFile) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + ArenaDtor(this); + return; + } + SharedDtor(); +} + +inline void EdaDataFile::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + _impl_.layernames_.~RepeatedPtrField(); + _impl_.attributenames_.~RepeatedPtrField(); + _impl_.attributetextvalues_.~RepeatedPtrField(); + _impl_.netrecords_.~RepeatedPtrField(); + _impl_.netrecordsbyname_.Destruct(); + _impl_.netrecordsbyname_.~MapField(); + _impl_.packagerecords_.~RepeatedPtrField(); + _impl_.packagerecordsbyname_.Destruct(); + _impl_.packagerecordsbyname_.~MapField(); + _impl_.path_.Destroy(); + _impl_.units_.Destroy(); + _impl_.source_.Destroy(); +} + +void EdaDataFile::ArenaDtor(void* object) { + EdaDataFile* _this = reinterpret_cast< EdaDataFile* >(object); + _this->_impl_.netrecordsbyname_.Destruct(); + _this->_impl_.packagerecordsbyname_.Destruct(); +} +void EdaDataFile::SetCachedSize(int size) const { + _impl_._cached_size_.Set(size); +} + +void EdaDataFile::Clear() { +// @@protoc_insertion_point(message_clear_start:odbdesign.proto.EdaDataFile) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + _impl_.layernames_.Clear(); + _impl_.attributenames_.Clear(); + _impl_.attributetextvalues_.Clear(); + _impl_.netrecords_.Clear(); + _impl_.netrecordsbyname_.Clear(); + _impl_.packagerecords_.Clear(); + _impl_.packagerecordsbyname_.Clear(); + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _impl_.path_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + _impl_.units_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + _impl_.source_.ClearNonDefaultToEmpty(); + } + } + _impl_._has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* EdaDataFile::_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 path = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_path(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "odbdesign.proto.EdaDataFile.path")); + } else + goto handle_unusual; + continue; + // optional string units = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_units(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "odbdesign.proto.EdaDataFile.units")); + } else + goto handle_unusual; + continue; + // optional string source = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_source(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "odbdesign.proto.EdaDataFile.source")); + } else + goto handle_unusual; + continue; + // repeated string layerNames = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_layernames(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "odbdesign.proto.EdaDataFile.layerNames")); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else + goto handle_unusual; + continue; + // repeated string attributeNames = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_attributenames(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "odbdesign.proto.EdaDataFile.attributeNames")); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr)); + } else + goto handle_unusual; + continue; + // repeated string attributeTextValues = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_attributetextvalues(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + CHK_(::_pbi::VerifyUTF8(str, "odbdesign.proto.EdaDataFile.attributeTextValues")); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .odbdesign.proto.EdaDataFile.NetRecord netRecords = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 58)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_netrecords(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr)); + } else + goto handle_unusual; + continue; + // map netRecordsByName = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&_impl_.netrecordsbyname_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .odbdesign.proto.EdaDataFile.PackageRecord packageRecords = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_packagerecords(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr)); + } else + goto handle_unusual; + continue; + // map packageRecordsByName = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 82)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(&_impl_.packagerecordsbyname_, ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<82>(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* EdaDataFile::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:odbdesign.proto.EdaDataFile) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // optional string path = 1; + if (_internal_has_path()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_path().data(), static_cast(this->_internal_path().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "odbdesign.proto.EdaDataFile.path"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_path(), target); + } + + // optional string units = 2; + if (_internal_has_units()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_units().data(), static_cast(this->_internal_units().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "odbdesign.proto.EdaDataFile.units"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_units(), target); + } + + // optional string source = 3; + if (_internal_has_source()) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_source().data(), static_cast(this->_internal_source().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "odbdesign.proto.EdaDataFile.source"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_source(), target); + } + + // repeated string layerNames = 4; + for (int i = 0, n = this->_internal_layernames_size(); i < n; i++) { + const auto& s = this->_internal_layernames(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "odbdesign.proto.EdaDataFile.layerNames"); + target = stream->WriteString(4, s, target); + } + + // repeated string attributeNames = 5; + for (int i = 0, n = this->_internal_attributenames_size(); i < n; i++) { + const auto& s = this->_internal_attributenames(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "odbdesign.proto.EdaDataFile.attributeNames"); + target = stream->WriteString(5, s, target); + } + + // repeated string attributeTextValues = 6; + for (int i = 0, n = this->_internal_attributetextvalues_size(); i < n; i++) { + const auto& s = this->_internal_attributetextvalues(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "odbdesign.proto.EdaDataFile.attributeTextValues"); + target = stream->WriteString(6, s, target); + } + + // repeated .odbdesign.proto.EdaDataFile.NetRecord netRecords = 7; + for (unsigned i = 0, + n = static_cast(this->_internal_netrecords_size()); i < n; i++) { + const auto& repfield = this->_internal_netrecords(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(7, repfield, repfield.GetCachedSize(), target, stream); + } + + // map netRecordsByName = 8; + if (!this->_internal_netrecordsbyname().empty()) { + using MapType = ::_pb::Map; + using WireHelper = EdaDataFile_NetRecordsByNameEntry_DoNotUse::Funcs; + const auto& map_field = this->_internal_netrecordsbyname(); + 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, + "odbdesign.proto.EdaDataFile.NetRecordsByNameEntry.key"); + }; + + if (stream->IsSerializationDeterministic() && map_field.size() > 1) { + for (const auto& entry : ::_pbi::MapSorterPtr(map_field)) { + target = WireHelper::InternalSerialize(8, entry.first, entry.second, target, stream); + check_utf8(entry); + } + } else { + for (const auto& entry : map_field) { + target = WireHelper::InternalSerialize(8, entry.first, entry.second, target, stream); + check_utf8(entry); + } + } + } + + // repeated .odbdesign.proto.EdaDataFile.PackageRecord packageRecords = 9; + for (unsigned i = 0, + n = static_cast(this->_internal_packagerecords_size()); i < n; i++) { + const auto& repfield = this->_internal_packagerecords(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(9, repfield, repfield.GetCachedSize(), target, stream); + } + + // map packageRecordsByName = 10; + if (!this->_internal_packagerecordsbyname().empty()) { + using MapType = ::_pb::Map; + using WireHelper = EdaDataFile_PackageRecordsByNameEntry_DoNotUse::Funcs; + const auto& map_field = this->_internal_packagerecordsbyname(); + 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, + "odbdesign.proto.EdaDataFile.PackageRecordsByNameEntry.key"); + }; + + if (stream->IsSerializationDeterministic() && map_field.size() > 1) { + for (const auto& entry : ::_pbi::MapSorterPtr(map_field)) { + target = WireHelper::InternalSerialize(10, entry.first, entry.second, target, stream); + check_utf8(entry); + } + } else { + for (const auto& entry : map_field) { + target = WireHelper::InternalSerialize(10, 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:odbdesign.proto.EdaDataFile) + return target; +} + +size_t EdaDataFile::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:odbdesign.proto.EdaDataFile) + 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 string layerNames = 4; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.layernames_.size()); + for (int i = 0, n = _impl_.layernames_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + _impl_.layernames_.Get(i)); + } + + // repeated string attributeNames = 5; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.attributenames_.size()); + for (int i = 0, n = _impl_.attributenames_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + _impl_.attributenames_.Get(i)); + } + + // repeated string attributeTextValues = 6; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.attributetextvalues_.size()); + for (int i = 0, n = _impl_.attributetextvalues_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + _impl_.attributetextvalues_.Get(i)); + } + + // repeated .odbdesign.proto.EdaDataFile.NetRecord netRecords = 7; + total_size += 1UL * this->_internal_netrecords_size(); + for (const auto& msg : this->_impl_.netrecords_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // map netRecordsByName = 8; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_netrecordsbyname_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_NetRecord >::const_iterator + it = this->_internal_netrecordsbyname().begin(); + it != this->_internal_netrecordsbyname().end(); ++it) { + total_size += EdaDataFile_NetRecordsByNameEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + // repeated .odbdesign.proto.EdaDataFile.PackageRecord packageRecords = 9; + total_size += 1UL * this->_internal_packagerecords_size(); + for (const auto& msg : this->_impl_.packagerecords_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // map packageRecordsByName = 10; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_packagerecordsbyname_size()); + for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_PackageRecord >::const_iterator + it = this->_internal_packagerecordsbyname().begin(); + it != this->_internal_packagerecordsbyname().end(); ++it) { + total_size += EdaDataFile_PackageRecordsByNameEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second); + } + + cached_has_bits = _impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional string path = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_path()); + } + + // optional string units = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_units()); + } + + // optional string source = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_source()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EdaDataFile::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, + EdaDataFile::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EdaDataFile::GetClassData() const { return &_class_data_; } + + +void EdaDataFile::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:odbdesign.proto.EdaDataFile) + GOOGLE_DCHECK_NE(&from, _this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + _this->_impl_.layernames_.MergeFrom(from._impl_.layernames_); + _this->_impl_.attributenames_.MergeFrom(from._impl_.attributenames_); + _this->_impl_.attributetextvalues_.MergeFrom(from._impl_.attributetextvalues_); + _this->_impl_.netrecords_.MergeFrom(from._impl_.netrecords_); + _this->_impl_.netrecordsbyname_.MergeFrom(from._impl_.netrecordsbyname_); + _this->_impl_.packagerecords_.MergeFrom(from._impl_.packagerecords_); + _this->_impl_.packagerecordsbyname_.MergeFrom(from._impl_.packagerecordsbyname_); + cached_has_bits = from._impl_._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _this->_internal_set_path(from._internal_path()); + } + if (cached_has_bits & 0x00000002u) { + _this->_internal_set_units(from._internal_units()); + } + if (cached_has_bits & 0x00000004u) { + _this->_internal_set_source(from._internal_source()); + } + } + _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void EdaDataFile::CopyFrom(const EdaDataFile& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:odbdesign.proto.EdaDataFile) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EdaDataFile::IsInitialized() const { + return true; +} + +void EdaDataFile::InternalSwap(EdaDataFile* 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_.layernames_.InternalSwap(&other->_impl_.layernames_); + _impl_.attributenames_.InternalSwap(&other->_impl_.attributenames_); + _impl_.attributetextvalues_.InternalSwap(&other->_impl_.attributetextvalues_); + _impl_.netrecords_.InternalSwap(&other->_impl_.netrecords_); + _impl_.netrecordsbyname_.InternalSwap(&other->_impl_.netrecordsbyname_); + _impl_.packagerecords_.InternalSwap(&other->_impl_.packagerecords_); + _impl_.packagerecordsbyname_.InternalSwap(&other->_impl_.packagerecordsbyname_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.path_, lhs_arena, + &other->_impl_.path_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.units_, lhs_arena, + &other->_impl_.units_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &_impl_.source_, lhs_arena, + &other->_impl_.source_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata EdaDataFile::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_edadatafile_2eproto_getter, &descriptor_table_edadatafile_2eproto_once, + file_level_metadata_edadatafile_2eproto[9]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace proto +} // namespace odbdesign +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::odbdesign::proto::EdaDataFile_PropertyRecord* +Arena::CreateMaybeMessage< ::odbdesign::proto::EdaDataFile_PropertyRecord >(Arena* arena) { + return Arena::CreateMessageInternal< ::odbdesign::proto::EdaDataFile_PropertyRecord >(arena); +} +template<> PROTOBUF_NOINLINE ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord* +Arena::CreateMaybeMessage< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord >(Arena* arena) { + return Arena::CreateMessageInternal< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord >(arena); +} +template<> PROTOBUF_NOINLINE ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord* +Arena::CreateMaybeMessage< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord >(Arena* arena) { + return Arena::CreateMessageInternal< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord >(arena); +} +template<> PROTOBUF_NOINLINE ::odbdesign::proto::EdaDataFile_NetRecord* +Arena::CreateMaybeMessage< ::odbdesign::proto::EdaDataFile_NetRecord >(Arena* arena) { + return Arena::CreateMessageInternal< ::odbdesign::proto::EdaDataFile_NetRecord >(arena); +} +template<> PROTOBUF_NOINLINE ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse* +Arena::CreateMaybeMessage< ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord* +Arena::CreateMaybeMessage< ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord >(Arena* arena) { + return Arena::CreateMessageInternal< ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord >(arena); +} +template<> PROTOBUF_NOINLINE ::odbdesign::proto::EdaDataFile_PackageRecord* +Arena::CreateMaybeMessage< ::odbdesign::proto::EdaDataFile_PackageRecord >(Arena* arena) { + return Arena::CreateMessageInternal< ::odbdesign::proto::EdaDataFile_PackageRecord >(arena); +} +template<> PROTOBUF_NOINLINE ::odbdesign::proto::EdaDataFile_NetRecordsByNameEntry_DoNotUse* +Arena::CreateMaybeMessage< ::odbdesign::proto::EdaDataFile_NetRecordsByNameEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::odbdesign::proto::EdaDataFile_NetRecordsByNameEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::odbdesign::proto::EdaDataFile_PackageRecordsByNameEntry_DoNotUse* +Arena::CreateMaybeMessage< ::odbdesign::proto::EdaDataFile_PackageRecordsByNameEntry_DoNotUse >(Arena* arena) { + return Arena::CreateMessageInternal< ::odbdesign::proto::EdaDataFile_PackageRecordsByNameEntry_DoNotUse >(arena); +} +template<> PROTOBUF_NOINLINE ::odbdesign::proto::EdaDataFile* +Arena::CreateMaybeMessage< ::odbdesign::proto::EdaDataFile >(Arena* arena) { + return Arena::CreateMessageInternal< ::odbdesign::proto::EdaDataFile >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/OdbDesignLib/proto/edadatafile.pb.h b/OdbDesignLib/proto/edadatafile.pb.h new file mode 100644 index 00000000..70a1753a --- /dev/null +++ b/OdbDesignLib/proto/edadatafile.pb.h @@ -0,0 +1,4615 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: edadatafile.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_edadatafile_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_edadatafile_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 +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_edadatafile_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_edadatafile_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_edadatafile_2eproto; +namespace odbdesign { +namespace proto { +class EdaDataFile; +struct EdaDataFileDefaultTypeInternal; +extern EdaDataFileDefaultTypeInternal _EdaDataFile_default_instance_; +class EdaDataFile_NetRecord; +struct EdaDataFile_NetRecordDefaultTypeInternal; +extern EdaDataFile_NetRecordDefaultTypeInternal _EdaDataFile_NetRecord_default_instance_; +class EdaDataFile_NetRecord_SubnetRecord; +struct EdaDataFile_NetRecord_SubnetRecordDefaultTypeInternal; +extern EdaDataFile_NetRecord_SubnetRecordDefaultTypeInternal _EdaDataFile_NetRecord_SubnetRecord_default_instance_; +class EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord; +struct EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecordDefaultTypeInternal; +extern EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecordDefaultTypeInternal _EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_default_instance_; +class EdaDataFile_NetRecordsByNameEntry_DoNotUse; +struct EdaDataFile_NetRecordsByNameEntry_DoNotUseDefaultTypeInternal; +extern EdaDataFile_NetRecordsByNameEntry_DoNotUseDefaultTypeInternal _EdaDataFile_NetRecordsByNameEntry_DoNotUse_default_instance_; +class EdaDataFile_PackageRecord; +struct EdaDataFile_PackageRecordDefaultTypeInternal; +extern EdaDataFile_PackageRecordDefaultTypeInternal _EdaDataFile_PackageRecord_default_instance_; +class EdaDataFile_PackageRecord_PinRecord; +struct EdaDataFile_PackageRecord_PinRecordDefaultTypeInternal; +extern EdaDataFile_PackageRecord_PinRecordDefaultTypeInternal _EdaDataFile_PackageRecord_PinRecord_default_instance_; +class EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse; +struct EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUseDefaultTypeInternal; +extern EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUseDefaultTypeInternal _EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse_default_instance_; +class EdaDataFile_PackageRecordsByNameEntry_DoNotUse; +struct EdaDataFile_PackageRecordsByNameEntry_DoNotUseDefaultTypeInternal; +extern EdaDataFile_PackageRecordsByNameEntry_DoNotUseDefaultTypeInternal _EdaDataFile_PackageRecordsByNameEntry_DoNotUse_default_instance_; +class EdaDataFile_PropertyRecord; +struct EdaDataFile_PropertyRecordDefaultTypeInternal; +extern EdaDataFile_PropertyRecordDefaultTypeInternal _EdaDataFile_PropertyRecord_default_instance_; +} // namespace proto +} // namespace odbdesign +PROTOBUF_NAMESPACE_OPEN +template<> ::odbdesign::proto::EdaDataFile* Arena::CreateMaybeMessage<::odbdesign::proto::EdaDataFile>(Arena*); +template<> ::odbdesign::proto::EdaDataFile_NetRecord* Arena::CreateMaybeMessage<::odbdesign::proto::EdaDataFile_NetRecord>(Arena*); +template<> ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord* Arena::CreateMaybeMessage<::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord>(Arena*); +template<> ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord* Arena::CreateMaybeMessage<::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord>(Arena*); +template<> ::odbdesign::proto::EdaDataFile_NetRecordsByNameEntry_DoNotUse* Arena::CreateMaybeMessage<::odbdesign::proto::EdaDataFile_NetRecordsByNameEntry_DoNotUse>(Arena*); +template<> ::odbdesign::proto::EdaDataFile_PackageRecord* Arena::CreateMaybeMessage<::odbdesign::proto::EdaDataFile_PackageRecord>(Arena*); +template<> ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord* Arena::CreateMaybeMessage<::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord>(Arena*); +template<> ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse* Arena::CreateMaybeMessage<::odbdesign::proto::EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse>(Arena*); +template<> ::odbdesign::proto::EdaDataFile_PackageRecordsByNameEntry_DoNotUse* Arena::CreateMaybeMessage<::odbdesign::proto::EdaDataFile_PackageRecordsByNameEntry_DoNotUse>(Arena*); +template<> ::odbdesign::proto::EdaDataFile_PropertyRecord* Arena::CreateMaybeMessage<::odbdesign::proto::EdaDataFile_PropertyRecord>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace odbdesign { +namespace proto { + +enum EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type : int { + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_COPPER = 0, + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_LAMINATE = 1, + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_HOLE = 2, + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_IsValid(int value); +constexpr EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_Type_MIN = EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_COPPER; +constexpr EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_Type_MAX = EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_HOLE; +constexpr int EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_Type_ARRAYSIZE = EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_Type_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_descriptor(); +template +inline const std::string& EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_descriptor(), enum_t_value); +} +inline bool EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_descriptor(), name, value); +} +enum EdaDataFile_NetRecord_SubnetRecord_Type : int { + EdaDataFile_NetRecord_SubnetRecord_Type_VIA = 0, + EdaDataFile_NetRecord_SubnetRecord_Type_TRACE = 1, + EdaDataFile_NetRecord_SubnetRecord_Type_PLANE = 2, + EdaDataFile_NetRecord_SubnetRecord_Type_TOEPRINT = 3, + EdaDataFile_NetRecord_SubnetRecord_Type_EdaDataFile_NetRecord_SubnetRecord_Type_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + EdaDataFile_NetRecord_SubnetRecord_Type_EdaDataFile_NetRecord_SubnetRecord_Type_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool EdaDataFile_NetRecord_SubnetRecord_Type_IsValid(int value); +constexpr EdaDataFile_NetRecord_SubnetRecord_Type EdaDataFile_NetRecord_SubnetRecord_Type_Type_MIN = EdaDataFile_NetRecord_SubnetRecord_Type_VIA; +constexpr EdaDataFile_NetRecord_SubnetRecord_Type EdaDataFile_NetRecord_SubnetRecord_Type_Type_MAX = EdaDataFile_NetRecord_SubnetRecord_Type_TOEPRINT; +constexpr int EdaDataFile_NetRecord_SubnetRecord_Type_Type_ARRAYSIZE = EdaDataFile_NetRecord_SubnetRecord_Type_Type_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdaDataFile_NetRecord_SubnetRecord_Type_descriptor(); +template +inline const std::string& EdaDataFile_NetRecord_SubnetRecord_Type_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EdaDataFile_NetRecord_SubnetRecord_Type_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + EdaDataFile_NetRecord_SubnetRecord_Type_descriptor(), enum_t_value); +} +inline bool EdaDataFile_NetRecord_SubnetRecord_Type_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EdaDataFile_NetRecord_SubnetRecord_Type* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + EdaDataFile_NetRecord_SubnetRecord_Type_descriptor(), name, value); +} +enum EdaDataFile_NetRecord_SubnetRecord_FillType : int { + EdaDataFile_NetRecord_SubnetRecord_FillType_SOLID = 0, + EdaDataFile_NetRecord_SubnetRecord_FillType_OUTLINE = 1, + EdaDataFile_NetRecord_SubnetRecord_FillType_EdaDataFile_NetRecord_SubnetRecord_FillType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + EdaDataFile_NetRecord_SubnetRecord_FillType_EdaDataFile_NetRecord_SubnetRecord_FillType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool EdaDataFile_NetRecord_SubnetRecord_FillType_IsValid(int value); +constexpr EdaDataFile_NetRecord_SubnetRecord_FillType EdaDataFile_NetRecord_SubnetRecord_FillType_FillType_MIN = EdaDataFile_NetRecord_SubnetRecord_FillType_SOLID; +constexpr EdaDataFile_NetRecord_SubnetRecord_FillType EdaDataFile_NetRecord_SubnetRecord_FillType_FillType_MAX = EdaDataFile_NetRecord_SubnetRecord_FillType_OUTLINE; +constexpr int EdaDataFile_NetRecord_SubnetRecord_FillType_FillType_ARRAYSIZE = EdaDataFile_NetRecord_SubnetRecord_FillType_FillType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdaDataFile_NetRecord_SubnetRecord_FillType_descriptor(); +template +inline const std::string& EdaDataFile_NetRecord_SubnetRecord_FillType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EdaDataFile_NetRecord_SubnetRecord_FillType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + EdaDataFile_NetRecord_SubnetRecord_FillType_descriptor(), enum_t_value); +} +inline bool EdaDataFile_NetRecord_SubnetRecord_FillType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EdaDataFile_NetRecord_SubnetRecord_FillType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + EdaDataFile_NetRecord_SubnetRecord_FillType_descriptor(), name, value); +} +enum EdaDataFile_NetRecord_SubnetRecord_CutoutType : int { + EdaDataFile_NetRecord_SubnetRecord_CutoutType_CIRCLE = 0, + EdaDataFile_NetRecord_SubnetRecord_CutoutType_RECTANGLE = 1, + EdaDataFile_NetRecord_SubnetRecord_CutoutType_OCTAGON = 2, + EdaDataFile_NetRecord_SubnetRecord_CutoutType_EXACT = 3, + EdaDataFile_NetRecord_SubnetRecord_CutoutType_EdaDataFile_NetRecord_SubnetRecord_CutoutType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + EdaDataFile_NetRecord_SubnetRecord_CutoutType_EdaDataFile_NetRecord_SubnetRecord_CutoutType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool EdaDataFile_NetRecord_SubnetRecord_CutoutType_IsValid(int value); +constexpr EdaDataFile_NetRecord_SubnetRecord_CutoutType EdaDataFile_NetRecord_SubnetRecord_CutoutType_CutoutType_MIN = EdaDataFile_NetRecord_SubnetRecord_CutoutType_CIRCLE; +constexpr EdaDataFile_NetRecord_SubnetRecord_CutoutType EdaDataFile_NetRecord_SubnetRecord_CutoutType_CutoutType_MAX = EdaDataFile_NetRecord_SubnetRecord_CutoutType_EXACT; +constexpr int EdaDataFile_NetRecord_SubnetRecord_CutoutType_CutoutType_ARRAYSIZE = EdaDataFile_NetRecord_SubnetRecord_CutoutType_CutoutType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdaDataFile_NetRecord_SubnetRecord_CutoutType_descriptor(); +template +inline const std::string& EdaDataFile_NetRecord_SubnetRecord_CutoutType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EdaDataFile_NetRecord_SubnetRecord_CutoutType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + EdaDataFile_NetRecord_SubnetRecord_CutoutType_descriptor(), enum_t_value); +} +inline bool EdaDataFile_NetRecord_SubnetRecord_CutoutType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EdaDataFile_NetRecord_SubnetRecord_CutoutType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + EdaDataFile_NetRecord_SubnetRecord_CutoutType_descriptor(), name, value); +} +enum EdaDataFile_PackageRecord_PinRecord_Type : int { + EdaDataFile_PackageRecord_PinRecord_Type_THROUGH_HOLE = 0, + EdaDataFile_PackageRecord_PinRecord_Type_BLIND = 1, + EdaDataFile_PackageRecord_PinRecord_Type_SURFACE = 2, + EdaDataFile_PackageRecord_PinRecord_Type_EdaDataFile_PackageRecord_PinRecord_Type_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + EdaDataFile_PackageRecord_PinRecord_Type_EdaDataFile_PackageRecord_PinRecord_Type_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool EdaDataFile_PackageRecord_PinRecord_Type_IsValid(int value); +constexpr EdaDataFile_PackageRecord_PinRecord_Type EdaDataFile_PackageRecord_PinRecord_Type_Type_MIN = EdaDataFile_PackageRecord_PinRecord_Type_THROUGH_HOLE; +constexpr EdaDataFile_PackageRecord_PinRecord_Type EdaDataFile_PackageRecord_PinRecord_Type_Type_MAX = EdaDataFile_PackageRecord_PinRecord_Type_SURFACE; +constexpr int EdaDataFile_PackageRecord_PinRecord_Type_Type_ARRAYSIZE = EdaDataFile_PackageRecord_PinRecord_Type_Type_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdaDataFile_PackageRecord_PinRecord_Type_descriptor(); +template +inline const std::string& EdaDataFile_PackageRecord_PinRecord_Type_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EdaDataFile_PackageRecord_PinRecord_Type_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + EdaDataFile_PackageRecord_PinRecord_Type_descriptor(), enum_t_value); +} +inline bool EdaDataFile_PackageRecord_PinRecord_Type_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EdaDataFile_PackageRecord_PinRecord_Type* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + EdaDataFile_PackageRecord_PinRecord_Type_descriptor(), name, value); +} +enum EdaDataFile_PackageRecord_PinRecord_ElectricalType : int { + EdaDataFile_PackageRecord_PinRecord_ElectricalType_ELECTRICAL = 0, + EdaDataFile_PackageRecord_PinRecord_ElectricalType_NON_ELECTRICAL = 1, + EdaDataFile_PackageRecord_PinRecord_ElectricalType_UNDEFINED = 2, + EdaDataFile_PackageRecord_PinRecord_ElectricalType_EdaDataFile_PackageRecord_PinRecord_ElectricalType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + EdaDataFile_PackageRecord_PinRecord_ElectricalType_EdaDataFile_PackageRecord_PinRecord_ElectricalType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool EdaDataFile_PackageRecord_PinRecord_ElectricalType_IsValid(int value); +constexpr EdaDataFile_PackageRecord_PinRecord_ElectricalType EdaDataFile_PackageRecord_PinRecord_ElectricalType_ElectricalType_MIN = EdaDataFile_PackageRecord_PinRecord_ElectricalType_ELECTRICAL; +constexpr EdaDataFile_PackageRecord_PinRecord_ElectricalType EdaDataFile_PackageRecord_PinRecord_ElectricalType_ElectricalType_MAX = EdaDataFile_PackageRecord_PinRecord_ElectricalType_UNDEFINED; +constexpr int EdaDataFile_PackageRecord_PinRecord_ElectricalType_ElectricalType_ARRAYSIZE = EdaDataFile_PackageRecord_PinRecord_ElectricalType_ElectricalType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdaDataFile_PackageRecord_PinRecord_ElectricalType_descriptor(); +template +inline const std::string& EdaDataFile_PackageRecord_PinRecord_ElectricalType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EdaDataFile_PackageRecord_PinRecord_ElectricalType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + EdaDataFile_PackageRecord_PinRecord_ElectricalType_descriptor(), enum_t_value); +} +inline bool EdaDataFile_PackageRecord_PinRecord_ElectricalType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EdaDataFile_PackageRecord_PinRecord_ElectricalType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + EdaDataFile_PackageRecord_PinRecord_ElectricalType_descriptor(), name, value); +} +enum EdaDataFile_PackageRecord_PinRecord_MountType : int { + EdaDataFile_PackageRecord_PinRecord_MountType_SMT = 0, + EdaDataFile_PackageRecord_PinRecord_MountType_RECOMMENDED_SMT_PAD = 1, + EdaDataFile_PackageRecord_PinRecord_MountType_MT_THROUGH_HOLE = 2, + EdaDataFile_PackageRecord_PinRecord_MountType_RECOMMENDED_THROUGH_HOLE = 3, + EdaDataFile_PackageRecord_PinRecord_MountType_PRESSFIT = 4, + EdaDataFile_PackageRecord_PinRecord_MountType_NON_BOARD = 5, + EdaDataFile_PackageRecord_PinRecord_MountType_HOLE = 6, + EdaDataFile_PackageRecord_PinRecord_MountType_MT_UNDEFINED = 7, + EdaDataFile_PackageRecord_PinRecord_MountType_EdaDataFile_PackageRecord_PinRecord_MountType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + EdaDataFile_PackageRecord_PinRecord_MountType_EdaDataFile_PackageRecord_PinRecord_MountType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool EdaDataFile_PackageRecord_PinRecord_MountType_IsValid(int value); +constexpr EdaDataFile_PackageRecord_PinRecord_MountType EdaDataFile_PackageRecord_PinRecord_MountType_MountType_MIN = EdaDataFile_PackageRecord_PinRecord_MountType_SMT; +constexpr EdaDataFile_PackageRecord_PinRecord_MountType EdaDataFile_PackageRecord_PinRecord_MountType_MountType_MAX = EdaDataFile_PackageRecord_PinRecord_MountType_MT_UNDEFINED; +constexpr int EdaDataFile_PackageRecord_PinRecord_MountType_MountType_ARRAYSIZE = EdaDataFile_PackageRecord_PinRecord_MountType_MountType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdaDataFile_PackageRecord_PinRecord_MountType_descriptor(); +template +inline const std::string& EdaDataFile_PackageRecord_PinRecord_MountType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EdaDataFile_PackageRecord_PinRecord_MountType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + EdaDataFile_PackageRecord_PinRecord_MountType_descriptor(), enum_t_value); +} +inline bool EdaDataFile_PackageRecord_PinRecord_MountType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EdaDataFile_PackageRecord_PinRecord_MountType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + EdaDataFile_PackageRecord_PinRecord_MountType_descriptor(), name, value); +} +enum EdaDataFile_BoardSide : int { + EdaDataFile_BoardSide_TOP = 0, + EdaDataFile_BoardSide_BOTTOM = 1, + EdaDataFile_BoardSide_EdaDataFile_BoardSide_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + EdaDataFile_BoardSide_EdaDataFile_BoardSide_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() +}; +bool EdaDataFile_BoardSide_IsValid(int value); +constexpr EdaDataFile_BoardSide EdaDataFile_BoardSide_BoardSide_MIN = EdaDataFile_BoardSide_TOP; +constexpr EdaDataFile_BoardSide EdaDataFile_BoardSide_BoardSide_MAX = EdaDataFile_BoardSide_BOTTOM; +constexpr int EdaDataFile_BoardSide_BoardSide_ARRAYSIZE = EdaDataFile_BoardSide_BoardSide_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdaDataFile_BoardSide_descriptor(); +template +inline const std::string& EdaDataFile_BoardSide_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EdaDataFile_BoardSide_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + EdaDataFile_BoardSide_descriptor(), enum_t_value); +} +inline bool EdaDataFile_BoardSide_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EdaDataFile_BoardSide* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + EdaDataFile_BoardSide_descriptor(), name, value); +} +// =================================================================== + +class EdaDataFile_PropertyRecord final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:odbdesign.proto.EdaDataFile.PropertyRecord) */ { + public: + inline EdaDataFile_PropertyRecord() : EdaDataFile_PropertyRecord(nullptr) {} + ~EdaDataFile_PropertyRecord() override; + explicit PROTOBUF_CONSTEXPR EdaDataFile_PropertyRecord(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EdaDataFile_PropertyRecord(const EdaDataFile_PropertyRecord& from); + EdaDataFile_PropertyRecord(EdaDataFile_PropertyRecord&& from) noexcept + : EdaDataFile_PropertyRecord() { + *this = ::std::move(from); + } + + inline EdaDataFile_PropertyRecord& operator=(const EdaDataFile_PropertyRecord& from) { + CopyFrom(from); + return *this; + } + inline EdaDataFile_PropertyRecord& operator=(EdaDataFile_PropertyRecord&& 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 EdaDataFile_PropertyRecord& default_instance() { + return *internal_default_instance(); + } + static inline const EdaDataFile_PropertyRecord* internal_default_instance() { + return reinterpret_cast( + &_EdaDataFile_PropertyRecord_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(EdaDataFile_PropertyRecord& a, EdaDataFile_PropertyRecord& b) { + a.Swap(&b); + } + inline void Swap(EdaDataFile_PropertyRecord* 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(EdaDataFile_PropertyRecord* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + EdaDataFile_PropertyRecord* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const EdaDataFile_PropertyRecord& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const EdaDataFile_PropertyRecord& from) { + EdaDataFile_PropertyRecord::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(EdaDataFile_PropertyRecord* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "odbdesign.proto.EdaDataFile.PropertyRecord"; + } + protected: + explicit EdaDataFile_PropertyRecord(::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 { + kFloatValuesFieldNumber = 3, + kNameFieldNumber = 1, + kValueFieldNumber = 2, + }; + // repeated float floatValues = 3; + int floatvalues_size() const; + private: + int _internal_floatvalues_size() const; + public: + void clear_floatvalues(); + private: + float _internal_floatvalues(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& + _internal_floatvalues() const; + void _internal_add_floatvalues(float value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* + _internal_mutable_floatvalues(); + public: + float floatvalues(int index) const; + void set_floatvalues(int index, float value); + void add_floatvalues(float value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& + floatvalues() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* + mutable_floatvalues(); + + // 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 string value = 2; + bool has_value() const; + private: + bool _internal_has_value() const; + public: + void clear_value(); + const std::string& value() const; + template + void set_value(ArgT0&& arg0, ArgT... args); + std::string* mutable_value(); + PROTOBUF_NODISCARD std::string* release_value(); + void set_allocated_value(std::string* value); + private: + const std::string& _internal_value() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(const std::string& value); + std::string* _internal_mutable_value(); + public: + + // @@protoc_insertion_point(class_scope:odbdesign.proto.EdaDataFile.PropertyRecord) + 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::RepeatedField< float > floatvalues_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_edadatafile_2eproto; +}; +// ------------------------------------------------------------------- + +class EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord) */ { + public: + inline EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord() : EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord(nullptr) {} + ~EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord() override; + explicit PROTOBUF_CONSTEXPR EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord(const EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord& from); + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord(EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord&& from) noexcept + : EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord() { + *this = ::std::move(from); + } + + inline EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord& operator=(const EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord& from) { + CopyFrom(from); + return *this; + } + inline EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord& operator=(EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord&& 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 EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord& default_instance() { + return *internal_default_instance(); + } + static inline const EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord* internal_default_instance() { + return reinterpret_cast( + &_EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord& a, EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord& b) { + a.Swap(&b); + } + inline void Swap(EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord* 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(EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord& from) { + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::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(EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord"; + } + protected: + explicit EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord(::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 ---------------------------------------------------- + + typedef EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type Type; + static constexpr Type COPPER = + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_COPPER; + static constexpr Type LAMINATE = + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_LAMINATE; + static constexpr Type HOLE = + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_HOLE; + static inline bool Type_IsValid(int value) { + return EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_IsValid(value); + } + static constexpr Type Type_MIN = + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_Type_MIN; + static constexpr Type Type_MAX = + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_Type_MAX; + static constexpr int Type_ARRAYSIZE = + EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_Type_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Type_descriptor() { + return EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_descriptor(); + } + template + static inline const std::string& Type_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Type_Name."); + return EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_Name(enum_t_value); + } + static inline bool Type_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Type* value) { + return EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kTypeFieldNumber = 1, + kLayerNumberFieldNumber = 2, + kFeatureNumberFieldNumber = 3, + }; + // optional .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord.Type type = 1; + bool has_type() const; + private: + bool _internal_has_type() const; + public: + void clear_type(); + ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type type() const; + void set_type(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type value); + private: + ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type _internal_type() const; + void _internal_set_type(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type value); + public: + + // optional uint32 layerNumber = 2; + bool has_layernumber() const; + private: + bool _internal_has_layernumber() const; + public: + void clear_layernumber(); + uint32_t layernumber() const; + void set_layernumber(uint32_t value); + private: + uint32_t _internal_layernumber() const; + void _internal_set_layernumber(uint32_t value); + public: + + // optional uint32 featureNumber = 3; + bool has_featurenumber() const; + private: + bool _internal_has_featurenumber() const; + public: + void clear_featurenumber(); + uint32_t featurenumber() const; + void set_featurenumber(uint32_t value); + private: + uint32_t _internal_featurenumber() const; + void _internal_set_featurenumber(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord) + 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_; + int type_; + uint32_t layernumber_; + uint32_t featurenumber_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_edadatafile_2eproto; +}; +// ------------------------------------------------------------------- + +class EdaDataFile_NetRecord_SubnetRecord final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord) */ { + public: + inline EdaDataFile_NetRecord_SubnetRecord() : EdaDataFile_NetRecord_SubnetRecord(nullptr) {} + ~EdaDataFile_NetRecord_SubnetRecord() override; + explicit PROTOBUF_CONSTEXPR EdaDataFile_NetRecord_SubnetRecord(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EdaDataFile_NetRecord_SubnetRecord(const EdaDataFile_NetRecord_SubnetRecord& from); + EdaDataFile_NetRecord_SubnetRecord(EdaDataFile_NetRecord_SubnetRecord&& from) noexcept + : EdaDataFile_NetRecord_SubnetRecord() { + *this = ::std::move(from); + } + + inline EdaDataFile_NetRecord_SubnetRecord& operator=(const EdaDataFile_NetRecord_SubnetRecord& from) { + CopyFrom(from); + return *this; + } + inline EdaDataFile_NetRecord_SubnetRecord& operator=(EdaDataFile_NetRecord_SubnetRecord&& 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 EdaDataFile_NetRecord_SubnetRecord& default_instance() { + return *internal_default_instance(); + } + static inline const EdaDataFile_NetRecord_SubnetRecord* internal_default_instance() { + return reinterpret_cast( + &_EdaDataFile_NetRecord_SubnetRecord_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(EdaDataFile_NetRecord_SubnetRecord& a, EdaDataFile_NetRecord_SubnetRecord& b) { + a.Swap(&b); + } + inline void Swap(EdaDataFile_NetRecord_SubnetRecord* 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(EdaDataFile_NetRecord_SubnetRecord* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + EdaDataFile_NetRecord_SubnetRecord* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const EdaDataFile_NetRecord_SubnetRecord& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const EdaDataFile_NetRecord_SubnetRecord& from) { + EdaDataFile_NetRecord_SubnetRecord::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(EdaDataFile_NetRecord_SubnetRecord* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord"; + } + protected: + explicit EdaDataFile_NetRecord_SubnetRecord(::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 ---------------------------------------------------- + + typedef EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord FeatureIdRecord; + + typedef EdaDataFile_NetRecord_SubnetRecord_Type Type; + static constexpr Type VIA = + EdaDataFile_NetRecord_SubnetRecord_Type_VIA; + static constexpr Type TRACE = + EdaDataFile_NetRecord_SubnetRecord_Type_TRACE; + static constexpr Type PLANE = + EdaDataFile_NetRecord_SubnetRecord_Type_PLANE; + static constexpr Type TOEPRINT = + EdaDataFile_NetRecord_SubnetRecord_Type_TOEPRINT; + static inline bool Type_IsValid(int value) { + return EdaDataFile_NetRecord_SubnetRecord_Type_IsValid(value); + } + static constexpr Type Type_MIN = + EdaDataFile_NetRecord_SubnetRecord_Type_Type_MIN; + static constexpr Type Type_MAX = + EdaDataFile_NetRecord_SubnetRecord_Type_Type_MAX; + static constexpr int Type_ARRAYSIZE = + EdaDataFile_NetRecord_SubnetRecord_Type_Type_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Type_descriptor() { + return EdaDataFile_NetRecord_SubnetRecord_Type_descriptor(); + } + template + static inline const std::string& Type_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Type_Name."); + return EdaDataFile_NetRecord_SubnetRecord_Type_Name(enum_t_value); + } + static inline bool Type_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Type* value) { + return EdaDataFile_NetRecord_SubnetRecord_Type_Parse(name, value); + } + + typedef EdaDataFile_NetRecord_SubnetRecord_FillType FillType; + static constexpr FillType SOLID = + EdaDataFile_NetRecord_SubnetRecord_FillType_SOLID; + static constexpr FillType OUTLINE = + EdaDataFile_NetRecord_SubnetRecord_FillType_OUTLINE; + static inline bool FillType_IsValid(int value) { + return EdaDataFile_NetRecord_SubnetRecord_FillType_IsValid(value); + } + static constexpr FillType FillType_MIN = + EdaDataFile_NetRecord_SubnetRecord_FillType_FillType_MIN; + static constexpr FillType FillType_MAX = + EdaDataFile_NetRecord_SubnetRecord_FillType_FillType_MAX; + static constexpr int FillType_ARRAYSIZE = + EdaDataFile_NetRecord_SubnetRecord_FillType_FillType_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + FillType_descriptor() { + return EdaDataFile_NetRecord_SubnetRecord_FillType_descriptor(); + } + template + static inline const std::string& FillType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function FillType_Name."); + return EdaDataFile_NetRecord_SubnetRecord_FillType_Name(enum_t_value); + } + static inline bool FillType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + FillType* value) { + return EdaDataFile_NetRecord_SubnetRecord_FillType_Parse(name, value); + } + + typedef EdaDataFile_NetRecord_SubnetRecord_CutoutType CutoutType; + static constexpr CutoutType CIRCLE = + EdaDataFile_NetRecord_SubnetRecord_CutoutType_CIRCLE; + static constexpr CutoutType RECTANGLE = + EdaDataFile_NetRecord_SubnetRecord_CutoutType_RECTANGLE; + static constexpr CutoutType OCTAGON = + EdaDataFile_NetRecord_SubnetRecord_CutoutType_OCTAGON; + static constexpr CutoutType EXACT = + EdaDataFile_NetRecord_SubnetRecord_CutoutType_EXACT; + static inline bool CutoutType_IsValid(int value) { + return EdaDataFile_NetRecord_SubnetRecord_CutoutType_IsValid(value); + } + static constexpr CutoutType CutoutType_MIN = + EdaDataFile_NetRecord_SubnetRecord_CutoutType_CutoutType_MIN; + static constexpr CutoutType CutoutType_MAX = + EdaDataFile_NetRecord_SubnetRecord_CutoutType_CutoutType_MAX; + static constexpr int CutoutType_ARRAYSIZE = + EdaDataFile_NetRecord_SubnetRecord_CutoutType_CutoutType_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + CutoutType_descriptor() { + return EdaDataFile_NetRecord_SubnetRecord_CutoutType_descriptor(); + } + template + static inline const std::string& CutoutType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function CutoutType_Name."); + return EdaDataFile_NetRecord_SubnetRecord_CutoutType_Name(enum_t_value); + } + static inline bool CutoutType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + CutoutType* value) { + return EdaDataFile_NetRecord_SubnetRecord_CutoutType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kFeatureIdRecordsFieldNumber = 2, + kTypeFieldNumber = 1, + kFillTypeFieldNumber = 3, + kCutoutTypeFieldNumber = 4, + kFillSizeFieldNumber = 5, + kSideFieldNumber = 6, + kComponentNumberFieldNumber = 7, + kToeprintNumberFieldNumber = 8, + }; + // repeated .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord featureIdRecords = 2; + int featureidrecords_size() const; + private: + int _internal_featureidrecords_size() const; + public: + void clear_featureidrecords(); + ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord* mutable_featureidrecords(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord >* + mutable_featureidrecords(); + private: + const ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord& _internal_featureidrecords(int index) const; + ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord* _internal_add_featureidrecords(); + public: + const ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord& featureidrecords(int index) const; + ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord* add_featureidrecords(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord >& + featureidrecords() const; + + // optional .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.Type type = 1; + bool has_type() const; + private: + bool _internal_has_type() const; + public: + void clear_type(); + ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_Type type() const; + void set_type(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_Type value); + private: + ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_Type _internal_type() const; + void _internal_set_type(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_Type value); + public: + + // optional .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FillType fillType = 3; + bool has_filltype() const; + private: + bool _internal_has_filltype() const; + public: + void clear_filltype(); + ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FillType filltype() const; + void set_filltype(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FillType value); + private: + ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FillType _internal_filltype() const; + void _internal_set_filltype(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FillType value); + public: + + // optional .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.CutoutType cutoutType = 4; + bool has_cutouttype() const; + private: + bool _internal_has_cutouttype() const; + public: + void clear_cutouttype(); + ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_CutoutType cutouttype() const; + void set_cutouttype(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_CutoutType value); + private: + ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_CutoutType _internal_cutouttype() const; + void _internal_set_cutouttype(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_CutoutType value); + public: + + // optional float fillSize = 5; + bool has_fillsize() const; + private: + bool _internal_has_fillsize() const; + public: + void clear_fillsize(); + float fillsize() const; + void set_fillsize(float value); + private: + float _internal_fillsize() const; + void _internal_set_fillsize(float value); + public: + + // optional .odbdesign.proto.EdaDataFile.BoardSide side = 6; + bool has_side() const; + private: + bool _internal_has_side() const; + public: + void clear_side(); + ::odbdesign::proto::EdaDataFile_BoardSide side() const; + void set_side(::odbdesign::proto::EdaDataFile_BoardSide value); + private: + ::odbdesign::proto::EdaDataFile_BoardSide _internal_side() const; + void _internal_set_side(::odbdesign::proto::EdaDataFile_BoardSide value); + public: + + // optional uint32 componentNumber = 7; + bool has_componentnumber() const; + private: + bool _internal_has_componentnumber() const; + public: + void clear_componentnumber(); + uint32_t componentnumber() const; + void set_componentnumber(uint32_t value); + private: + uint32_t _internal_componentnumber() const; + void _internal_set_componentnumber(uint32_t value); + public: + + // optional uint32 toeprintNumber = 8; + bool has_toeprintnumber() const; + private: + bool _internal_has_toeprintnumber() const; + public: + void clear_toeprintnumber(); + uint32_t toeprintnumber() const; + void set_toeprintnumber(uint32_t value); + private: + uint32_t _internal_toeprintnumber() const; + void _internal_set_toeprintnumber(uint32_t value); + public: + + // @@protoc_insertion_point(class_scope:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord) + 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< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord > featureidrecords_; + int type_; + int filltype_; + int cutouttype_; + float fillsize_; + int side_; + uint32_t componentnumber_; + uint32_t toeprintnumber_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_edadatafile_2eproto; +}; +// ------------------------------------------------------------------- + +class EdaDataFile_NetRecord final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:odbdesign.proto.EdaDataFile.NetRecord) */ { + public: + inline EdaDataFile_NetRecord() : EdaDataFile_NetRecord(nullptr) {} + ~EdaDataFile_NetRecord() override; + explicit PROTOBUF_CONSTEXPR EdaDataFile_NetRecord(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EdaDataFile_NetRecord(const EdaDataFile_NetRecord& from); + EdaDataFile_NetRecord(EdaDataFile_NetRecord&& from) noexcept + : EdaDataFile_NetRecord() { + *this = ::std::move(from); + } + + inline EdaDataFile_NetRecord& operator=(const EdaDataFile_NetRecord& from) { + CopyFrom(from); + return *this; + } + inline EdaDataFile_NetRecord& operator=(EdaDataFile_NetRecord&& 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 EdaDataFile_NetRecord& default_instance() { + return *internal_default_instance(); + } + static inline const EdaDataFile_NetRecord* internal_default_instance() { + return reinterpret_cast( + &_EdaDataFile_NetRecord_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(EdaDataFile_NetRecord& a, EdaDataFile_NetRecord& b) { + a.Swap(&b); + } + inline void Swap(EdaDataFile_NetRecord* 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(EdaDataFile_NetRecord* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + EdaDataFile_NetRecord* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const EdaDataFile_NetRecord& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const EdaDataFile_NetRecord& from) { + EdaDataFile_NetRecord::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(EdaDataFile_NetRecord* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "odbdesign.proto.EdaDataFile.NetRecord"; + } + protected: + explicit EdaDataFile_NetRecord(::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 ---------------------------------------------------- + + typedef EdaDataFile_NetRecord_SubnetRecord SubnetRecord; + + // accessors ------------------------------------------------------- + + enum : int { + kSubnetRecordsFieldNumber = 4, + kPropertyRecordsFieldNumber = 5, + kNameFieldNumber = 1, + kAttributesIdStringFieldNumber = 2, + kIndexFieldNumber = 3, + }; + // repeated .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord subnetRecords = 4; + int subnetrecords_size() const; + private: + int _internal_subnetrecords_size() const; + public: + void clear_subnetrecords(); + ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord* mutable_subnetrecords(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord >* + mutable_subnetrecords(); + private: + const ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord& _internal_subnetrecords(int index) const; + ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord* _internal_add_subnetrecords(); + public: + const ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord& subnetrecords(int index) const; + ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord* add_subnetrecords(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord >& + subnetrecords() const; + + // repeated .odbdesign.proto.EdaDataFile.PropertyRecord propertyRecords = 5; + int propertyrecords_size() const; + private: + int _internal_propertyrecords_size() const; + public: + void clear_propertyrecords(); + ::odbdesign::proto::EdaDataFile_PropertyRecord* mutable_propertyrecords(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_PropertyRecord >* + mutable_propertyrecords(); + private: + const ::odbdesign::proto::EdaDataFile_PropertyRecord& _internal_propertyrecords(int index) const; + ::odbdesign::proto::EdaDataFile_PropertyRecord* _internal_add_propertyrecords(); + public: + const ::odbdesign::proto::EdaDataFile_PropertyRecord& propertyrecords(int index) const; + ::odbdesign::proto::EdaDataFile_PropertyRecord* add_propertyrecords(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_PropertyRecord >& + propertyrecords() 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 string attributesIdString = 2; + bool has_attributesidstring() const; + private: + bool _internal_has_attributesidstring() const; + public: + void clear_attributesidstring(); + const std::string& attributesidstring() const; + template + void set_attributesidstring(ArgT0&& arg0, ArgT... args); + std::string* mutable_attributesidstring(); + PROTOBUF_NODISCARD std::string* release_attributesidstring(); + void set_allocated_attributesidstring(std::string* attributesidstring); + private: + const std::string& _internal_attributesidstring() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_attributesidstring(const std::string& value); + std::string* _internal_mutable_attributesidstring(); + 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:odbdesign.proto.EdaDataFile.NetRecord) + 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< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord > subnetrecords_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_PropertyRecord > propertyrecords_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr attributesidstring_; + uint32_t index_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_edadatafile_2eproto; +}; +// ------------------------------------------------------------------- + +class EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse& other); + static const EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_EdaDataFile_PackageRecord_PinRecordsByNameEntry_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, "odbdesign.proto.EdaDataFile.PackageRecord.PinRecordsByNameEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_edadatafile_2eproto; +}; + +// ------------------------------------------------------------------- + +class EdaDataFile_PackageRecord_PinRecord final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord) */ { + public: + inline EdaDataFile_PackageRecord_PinRecord() : EdaDataFile_PackageRecord_PinRecord(nullptr) {} + ~EdaDataFile_PackageRecord_PinRecord() override; + explicit PROTOBUF_CONSTEXPR EdaDataFile_PackageRecord_PinRecord(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EdaDataFile_PackageRecord_PinRecord(const EdaDataFile_PackageRecord_PinRecord& from); + EdaDataFile_PackageRecord_PinRecord(EdaDataFile_PackageRecord_PinRecord&& from) noexcept + : EdaDataFile_PackageRecord_PinRecord() { + *this = ::std::move(from); + } + + inline EdaDataFile_PackageRecord_PinRecord& operator=(const EdaDataFile_PackageRecord_PinRecord& from) { + CopyFrom(from); + return *this; + } + inline EdaDataFile_PackageRecord_PinRecord& operator=(EdaDataFile_PackageRecord_PinRecord&& 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 EdaDataFile_PackageRecord_PinRecord& default_instance() { + return *internal_default_instance(); + } + static inline const EdaDataFile_PackageRecord_PinRecord* internal_default_instance() { + return reinterpret_cast( + &_EdaDataFile_PackageRecord_PinRecord_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(EdaDataFile_PackageRecord_PinRecord& a, EdaDataFile_PackageRecord_PinRecord& b) { + a.Swap(&b); + } + inline void Swap(EdaDataFile_PackageRecord_PinRecord* 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(EdaDataFile_PackageRecord_PinRecord* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + EdaDataFile_PackageRecord_PinRecord* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const EdaDataFile_PackageRecord_PinRecord& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const EdaDataFile_PackageRecord_PinRecord& from) { + EdaDataFile_PackageRecord_PinRecord::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(EdaDataFile_PackageRecord_PinRecord* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "odbdesign.proto.EdaDataFile.PackageRecord.PinRecord"; + } + protected: + explicit EdaDataFile_PackageRecord_PinRecord(::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 ---------------------------------------------------- + + typedef EdaDataFile_PackageRecord_PinRecord_Type Type; + static constexpr Type THROUGH_HOLE = + EdaDataFile_PackageRecord_PinRecord_Type_THROUGH_HOLE; + static constexpr Type BLIND = + EdaDataFile_PackageRecord_PinRecord_Type_BLIND; + static constexpr Type SURFACE = + EdaDataFile_PackageRecord_PinRecord_Type_SURFACE; + static inline bool Type_IsValid(int value) { + return EdaDataFile_PackageRecord_PinRecord_Type_IsValid(value); + } + static constexpr Type Type_MIN = + EdaDataFile_PackageRecord_PinRecord_Type_Type_MIN; + static constexpr Type Type_MAX = + EdaDataFile_PackageRecord_PinRecord_Type_Type_MAX; + static constexpr int Type_ARRAYSIZE = + EdaDataFile_PackageRecord_PinRecord_Type_Type_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Type_descriptor() { + return EdaDataFile_PackageRecord_PinRecord_Type_descriptor(); + } + template + static inline const std::string& Type_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Type_Name."); + return EdaDataFile_PackageRecord_PinRecord_Type_Name(enum_t_value); + } + static inline bool Type_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Type* value) { + return EdaDataFile_PackageRecord_PinRecord_Type_Parse(name, value); + } + + typedef EdaDataFile_PackageRecord_PinRecord_ElectricalType ElectricalType; + static constexpr ElectricalType ELECTRICAL = + EdaDataFile_PackageRecord_PinRecord_ElectricalType_ELECTRICAL; + static constexpr ElectricalType NON_ELECTRICAL = + EdaDataFile_PackageRecord_PinRecord_ElectricalType_NON_ELECTRICAL; + static constexpr ElectricalType UNDEFINED = + EdaDataFile_PackageRecord_PinRecord_ElectricalType_UNDEFINED; + static inline bool ElectricalType_IsValid(int value) { + return EdaDataFile_PackageRecord_PinRecord_ElectricalType_IsValid(value); + } + static constexpr ElectricalType ElectricalType_MIN = + EdaDataFile_PackageRecord_PinRecord_ElectricalType_ElectricalType_MIN; + static constexpr ElectricalType ElectricalType_MAX = + EdaDataFile_PackageRecord_PinRecord_ElectricalType_ElectricalType_MAX; + static constexpr int ElectricalType_ARRAYSIZE = + EdaDataFile_PackageRecord_PinRecord_ElectricalType_ElectricalType_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + ElectricalType_descriptor() { + return EdaDataFile_PackageRecord_PinRecord_ElectricalType_descriptor(); + } + template + static inline const std::string& ElectricalType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ElectricalType_Name."); + return EdaDataFile_PackageRecord_PinRecord_ElectricalType_Name(enum_t_value); + } + static inline bool ElectricalType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + ElectricalType* value) { + return EdaDataFile_PackageRecord_PinRecord_ElectricalType_Parse(name, value); + } + + typedef EdaDataFile_PackageRecord_PinRecord_MountType MountType; + static constexpr MountType SMT = + EdaDataFile_PackageRecord_PinRecord_MountType_SMT; + static constexpr MountType RECOMMENDED_SMT_PAD = + EdaDataFile_PackageRecord_PinRecord_MountType_RECOMMENDED_SMT_PAD; + static constexpr MountType MT_THROUGH_HOLE = + EdaDataFile_PackageRecord_PinRecord_MountType_MT_THROUGH_HOLE; + static constexpr MountType RECOMMENDED_THROUGH_HOLE = + EdaDataFile_PackageRecord_PinRecord_MountType_RECOMMENDED_THROUGH_HOLE; + static constexpr MountType PRESSFIT = + EdaDataFile_PackageRecord_PinRecord_MountType_PRESSFIT; + static constexpr MountType NON_BOARD = + EdaDataFile_PackageRecord_PinRecord_MountType_NON_BOARD; + static constexpr MountType HOLE = + EdaDataFile_PackageRecord_PinRecord_MountType_HOLE; + static constexpr MountType MT_UNDEFINED = + EdaDataFile_PackageRecord_PinRecord_MountType_MT_UNDEFINED; + static inline bool MountType_IsValid(int value) { + return EdaDataFile_PackageRecord_PinRecord_MountType_IsValid(value); + } + static constexpr MountType MountType_MIN = + EdaDataFile_PackageRecord_PinRecord_MountType_MountType_MIN; + static constexpr MountType MountType_MAX = + EdaDataFile_PackageRecord_PinRecord_MountType_MountType_MAX; + static constexpr int MountType_ARRAYSIZE = + EdaDataFile_PackageRecord_PinRecord_MountType_MountType_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + MountType_descriptor() { + return EdaDataFile_PackageRecord_PinRecord_MountType_descriptor(); + } + template + static inline const std::string& MountType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function MountType_Name."); + return EdaDataFile_PackageRecord_PinRecord_MountType_Name(enum_t_value); + } + static inline bool MountType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + MountType* value) { + return EdaDataFile_PackageRecord_PinRecord_MountType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kTypeFieldNumber = 2, + kXCenterFieldNumber = 3, + kYCenterFieldNumber = 4, + kFinishedHoleSizeFieldNumber = 5, + kElectricalTypeFieldNumber = 6, + kMountTypeFieldNumber = 7, + kIdFieldNumber = 8, + kIndexFieldNumber = 9, + }; + // 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 .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.Type type = 2; + bool has_type() const; + private: + bool _internal_has_type() const; + public: + void clear_type(); + ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_Type type() const; + void set_type(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_Type value); + private: + ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_Type _internal_type() const; + void _internal_set_type(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_Type value); + public: + + // optional float xCenter = 3; + bool has_xcenter() const; + private: + bool _internal_has_xcenter() const; + public: + void clear_xcenter(); + float xcenter() const; + void set_xcenter(float value); + private: + float _internal_xcenter() const; + void _internal_set_xcenter(float value); + public: + + // optional float yCenter = 4; + bool has_ycenter() const; + private: + bool _internal_has_ycenter() const; + public: + void clear_ycenter(); + float ycenter() const; + void set_ycenter(float value); + private: + float _internal_ycenter() const; + void _internal_set_ycenter(float value); + public: + + // optional float finishedHoleSize = 5; + bool has_finishedholesize() const; + private: + bool _internal_has_finishedholesize() const; + public: + void clear_finishedholesize(); + float finishedholesize() const; + void set_finishedholesize(float value); + private: + float _internal_finishedholesize() const; + void _internal_set_finishedholesize(float value); + public: + + // optional .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.ElectricalType electricalType = 6; + bool has_electricaltype() const; + private: + bool _internal_has_electricaltype() const; + public: + void clear_electricaltype(); + ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_ElectricalType electricaltype() const; + void set_electricaltype(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_ElectricalType value); + private: + ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_ElectricalType _internal_electricaltype() const; + void _internal_set_electricaltype(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_ElectricalType value); + public: + + // optional .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.MountType mountType = 7; + bool has_mounttype() const; + private: + bool _internal_has_mounttype() const; + public: + void clear_mounttype(); + ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_MountType mounttype() const; + void set_mounttype(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_MountType value); + private: + ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_MountType _internal_mounttype() const; + void _internal_set_mounttype(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_MountType value); + public: + + // optional uint32 id = 8; + bool has_id() const; + private: + bool _internal_has_id() const; + public: + void clear_id(); + uint32_t id() const; + void set_id(uint32_t value); + private: + uint32_t _internal_id() const; + void _internal_set_id(uint32_t value); + public: + + // optional uint32 index = 9; + 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:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord) + 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 type_; + float xcenter_; + float ycenter_; + float finishedholesize_; + int electricaltype_; + int mounttype_; + uint32_t id_; + uint32_t index_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_edadatafile_2eproto; +}; +// ------------------------------------------------------------------- + +class EdaDataFile_PackageRecord final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:odbdesign.proto.EdaDataFile.PackageRecord) */ { + public: + inline EdaDataFile_PackageRecord() : EdaDataFile_PackageRecord(nullptr) {} + ~EdaDataFile_PackageRecord() override; + explicit PROTOBUF_CONSTEXPR EdaDataFile_PackageRecord(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EdaDataFile_PackageRecord(const EdaDataFile_PackageRecord& from); + EdaDataFile_PackageRecord(EdaDataFile_PackageRecord&& from) noexcept + : EdaDataFile_PackageRecord() { + *this = ::std::move(from); + } + + inline EdaDataFile_PackageRecord& operator=(const EdaDataFile_PackageRecord& from) { + CopyFrom(from); + return *this; + } + inline EdaDataFile_PackageRecord& operator=(EdaDataFile_PackageRecord&& 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 EdaDataFile_PackageRecord& default_instance() { + return *internal_default_instance(); + } + static inline const EdaDataFile_PackageRecord* internal_default_instance() { + return reinterpret_cast( + &_EdaDataFile_PackageRecord_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(EdaDataFile_PackageRecord& a, EdaDataFile_PackageRecord& b) { + a.Swap(&b); + } + inline void Swap(EdaDataFile_PackageRecord* 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(EdaDataFile_PackageRecord* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + EdaDataFile_PackageRecord* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const EdaDataFile_PackageRecord& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const EdaDataFile_PackageRecord& from) { + EdaDataFile_PackageRecord::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(EdaDataFile_PackageRecord* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "odbdesign.proto.EdaDataFile.PackageRecord"; + } + protected: + explicit EdaDataFile_PackageRecord(::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 ---------------------------------------------------- + + typedef EdaDataFile_PackageRecord_PinRecord PinRecord; + + // accessors ------------------------------------------------------- + + enum : int { + kPinRecordsFieldNumber = 8, + kPinRecordsByNameFieldNumber = 9, + kPropertyRecordsFieldNumber = 10, + kNameFieldNumber = 1, + kAttributesIdStringFieldNumber = 7, + kPitchFieldNumber = 2, + kXMinFieldNumber = 3, + kYMinFieldNumber = 4, + kXMaxFieldNumber = 5, + kYMaxFieldNumber = 6, + }; + // repeated .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord pinRecords = 8; + int pinrecords_size() const; + private: + int _internal_pinrecords_size() const; + public: + void clear_pinrecords(); + ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord* mutable_pinrecords(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord >* + mutable_pinrecords(); + private: + const ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord& _internal_pinrecords(int index) const; + ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord* _internal_add_pinrecords(); + public: + const ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord& pinrecords(int index) const; + ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord* add_pinrecords(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord >& + pinrecords() const; + + // map pinRecordsByName = 9; + int pinrecordsbyname_size() const; + private: + int _internal_pinrecordsbyname_size() const; + public: + void clear_pinrecordsbyname(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord >& + _internal_pinrecordsbyname() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord >* + _internal_mutable_pinrecordsbyname(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord >& + pinrecordsbyname() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord >* + mutable_pinrecordsbyname(); + + // repeated .odbdesign.proto.EdaDataFile.PropertyRecord propertyRecords = 10; + int propertyrecords_size() const; + private: + int _internal_propertyrecords_size() const; + public: + void clear_propertyrecords(); + ::odbdesign::proto::EdaDataFile_PropertyRecord* mutable_propertyrecords(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_PropertyRecord >* + mutable_propertyrecords(); + private: + const ::odbdesign::proto::EdaDataFile_PropertyRecord& _internal_propertyrecords(int index) const; + ::odbdesign::proto::EdaDataFile_PropertyRecord* _internal_add_propertyrecords(); + public: + const ::odbdesign::proto::EdaDataFile_PropertyRecord& propertyrecords(int index) const; + ::odbdesign::proto::EdaDataFile_PropertyRecord* add_propertyrecords(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_PropertyRecord >& + propertyrecords() 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 string attributesIdString = 7; + bool has_attributesidstring() const; + private: + bool _internal_has_attributesidstring() const; + public: + void clear_attributesidstring(); + const std::string& attributesidstring() const; + template + void set_attributesidstring(ArgT0&& arg0, ArgT... args); + std::string* mutable_attributesidstring(); + PROTOBUF_NODISCARD std::string* release_attributesidstring(); + void set_allocated_attributesidstring(std::string* attributesidstring); + private: + const std::string& _internal_attributesidstring() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_attributesidstring(const std::string& value); + std::string* _internal_mutable_attributesidstring(); + public: + + // optional float pitch = 2; + bool has_pitch() const; + private: + bool _internal_has_pitch() const; + public: + void clear_pitch(); + float pitch() const; + void set_pitch(float value); + private: + float _internal_pitch() const; + void _internal_set_pitch(float value); + public: + + // optional float xMin = 3; + bool has_xmin() const; + private: + bool _internal_has_xmin() const; + public: + void clear_xmin(); + float xmin() const; + void set_xmin(float value); + private: + float _internal_xmin() const; + void _internal_set_xmin(float value); + public: + + // optional float yMin = 4; + bool has_ymin() const; + private: + bool _internal_has_ymin() const; + public: + void clear_ymin(); + float ymin() const; + void set_ymin(float value); + private: + float _internal_ymin() const; + void _internal_set_ymin(float value); + public: + + // optional float xMax = 5; + bool has_xmax() const; + private: + bool _internal_has_xmax() const; + public: + void clear_xmax(); + float xmax() const; + void set_xmax(float value); + private: + float _internal_xmax() const; + void _internal_set_xmax(float value); + public: + + // optional float yMax = 6; + bool has_ymax() const; + private: + bool _internal_has_ymax() const; + public: + void clear_ymax(); + float ymax() const; + void set_ymax(float value); + private: + float _internal_ymax() const; + void _internal_set_ymax(float value); + public: + + // @@protoc_insertion_point(class_scope:odbdesign.proto.EdaDataFile.PackageRecord) + 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< ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord > pinrecords_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + EdaDataFile_PackageRecord_PinRecordsByNameEntry_DoNotUse, + std::string, ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> pinrecordsbyname_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_PropertyRecord > propertyrecords_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr attributesidstring_; + float pitch_; + float xmin_; + float ymin_; + float xmax_; + float ymax_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_edadatafile_2eproto; +}; +// ------------------------------------------------------------------- + +class EdaDataFile_NetRecordsByNameEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + EdaDataFile_NetRecordsByNameEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR EdaDataFile_NetRecordsByNameEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit EdaDataFile_NetRecordsByNameEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const EdaDataFile_NetRecordsByNameEntry_DoNotUse& other); + static const EdaDataFile_NetRecordsByNameEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_EdaDataFile_NetRecordsByNameEntry_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, "odbdesign.proto.EdaDataFile.NetRecordsByNameEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_edadatafile_2eproto; +}; + +// ------------------------------------------------------------------- + +class EdaDataFile_PackageRecordsByNameEntry_DoNotUse : public ::PROTOBUF_NAMESPACE_ID::internal::MapEntry { +public: + typedef ::PROTOBUF_NAMESPACE_ID::internal::MapEntry SuperType; + EdaDataFile_PackageRecordsByNameEntry_DoNotUse(); + explicit PROTOBUF_CONSTEXPR EdaDataFile_PackageRecordsByNameEntry_DoNotUse( + ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + explicit EdaDataFile_PackageRecordsByNameEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena); + void MergeFrom(const EdaDataFile_PackageRecordsByNameEntry_DoNotUse& other); + static const EdaDataFile_PackageRecordsByNameEntry_DoNotUse* internal_default_instance() { return reinterpret_cast(&_EdaDataFile_PackageRecordsByNameEntry_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, "odbdesign.proto.EdaDataFile.PackageRecordsByNameEntry.key"); + } + static bool ValidateValue(void*) { return true; } + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + friend struct ::TableStruct_edadatafile_2eproto; +}; + +// ------------------------------------------------------------------- + +class EdaDataFile final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:odbdesign.proto.EdaDataFile) */ { + public: + inline EdaDataFile() : EdaDataFile(nullptr) {} + ~EdaDataFile() override; + explicit PROTOBUF_CONSTEXPR EdaDataFile(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EdaDataFile(const EdaDataFile& from); + EdaDataFile(EdaDataFile&& from) noexcept + : EdaDataFile() { + *this = ::std::move(from); + } + + inline EdaDataFile& operator=(const EdaDataFile& from) { + CopyFrom(from); + return *this; + } + inline EdaDataFile& operator=(EdaDataFile&& 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 EdaDataFile& default_instance() { + return *internal_default_instance(); + } + static inline const EdaDataFile* internal_default_instance() { + return reinterpret_cast( + &_EdaDataFile_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(EdaDataFile& a, EdaDataFile& b) { + a.Swap(&b); + } + inline void Swap(EdaDataFile* 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(EdaDataFile* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + EdaDataFile* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const EdaDataFile& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom( const EdaDataFile& from) { + EdaDataFile::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(EdaDataFile* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "odbdesign.proto.EdaDataFile"; + } + protected: + explicit EdaDataFile(::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 ---------------------------------------------------- + + typedef EdaDataFile_PropertyRecord PropertyRecord; + typedef EdaDataFile_NetRecord NetRecord; + typedef EdaDataFile_PackageRecord PackageRecord; + + typedef EdaDataFile_BoardSide BoardSide; + static constexpr BoardSide TOP = + EdaDataFile_BoardSide_TOP; + static constexpr BoardSide BOTTOM = + EdaDataFile_BoardSide_BOTTOM; + static inline bool BoardSide_IsValid(int value) { + return EdaDataFile_BoardSide_IsValid(value); + } + static constexpr BoardSide BoardSide_MIN = + EdaDataFile_BoardSide_BoardSide_MIN; + static constexpr BoardSide BoardSide_MAX = + EdaDataFile_BoardSide_BoardSide_MAX; + static constexpr int BoardSide_ARRAYSIZE = + EdaDataFile_BoardSide_BoardSide_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + BoardSide_descriptor() { + return EdaDataFile_BoardSide_descriptor(); + } + template + static inline const std::string& BoardSide_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function BoardSide_Name."); + return EdaDataFile_BoardSide_Name(enum_t_value); + } + static inline bool BoardSide_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + BoardSide* value) { + return EdaDataFile_BoardSide_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kLayerNamesFieldNumber = 4, + kAttributeNamesFieldNumber = 5, + kAttributeTextValuesFieldNumber = 6, + kNetRecordsFieldNumber = 7, + kNetRecordsByNameFieldNumber = 8, + kPackageRecordsFieldNumber = 9, + kPackageRecordsByNameFieldNumber = 10, + kPathFieldNumber = 1, + kUnitsFieldNumber = 2, + kSourceFieldNumber = 3, + }; + // repeated string layerNames = 4; + int layernames_size() const; + private: + int _internal_layernames_size() const; + public: + void clear_layernames(); + const std::string& layernames(int index) const; + std::string* mutable_layernames(int index); + void set_layernames(int index, const std::string& value); + void set_layernames(int index, std::string&& value); + void set_layernames(int index, const char* value); + void set_layernames(int index, const char* value, size_t size); + std::string* add_layernames(); + void add_layernames(const std::string& value); + void add_layernames(std::string&& value); + void add_layernames(const char* value); + void add_layernames(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& layernames() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_layernames(); + private: + const std::string& _internal_layernames(int index) const; + std::string* _internal_add_layernames(); + public: + + // repeated string attributeNames = 5; + int attributenames_size() const; + private: + int _internal_attributenames_size() const; + public: + void clear_attributenames(); + const std::string& attributenames(int index) const; + std::string* mutable_attributenames(int index); + void set_attributenames(int index, const std::string& value); + void set_attributenames(int index, std::string&& value); + void set_attributenames(int index, const char* value); + void set_attributenames(int index, const char* value, size_t size); + std::string* add_attributenames(); + void add_attributenames(const std::string& value); + void add_attributenames(std::string&& value); + void add_attributenames(const char* value); + void add_attributenames(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& attributenames() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_attributenames(); + private: + const std::string& _internal_attributenames(int index) const; + std::string* _internal_add_attributenames(); + public: + + // repeated string attributeTextValues = 6; + int attributetextvalues_size() const; + private: + int _internal_attributetextvalues_size() const; + public: + void clear_attributetextvalues(); + const std::string& attributetextvalues(int index) const; + std::string* mutable_attributetextvalues(int index); + void set_attributetextvalues(int index, const std::string& value); + void set_attributetextvalues(int index, std::string&& value); + void set_attributetextvalues(int index, const char* value); + void set_attributetextvalues(int index, const char* value, size_t size); + std::string* add_attributetextvalues(); + void add_attributetextvalues(const std::string& value); + void add_attributetextvalues(std::string&& value); + void add_attributetextvalues(const char* value); + void add_attributetextvalues(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& attributetextvalues() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_attributetextvalues(); + private: + const std::string& _internal_attributetextvalues(int index) const; + std::string* _internal_add_attributetextvalues(); + public: + + // repeated .odbdesign.proto.EdaDataFile.NetRecord netRecords = 7; + int netrecords_size() const; + private: + int _internal_netrecords_size() const; + public: + void clear_netrecords(); + ::odbdesign::proto::EdaDataFile_NetRecord* mutable_netrecords(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_NetRecord >* + mutable_netrecords(); + private: + const ::odbdesign::proto::EdaDataFile_NetRecord& _internal_netrecords(int index) const; + ::odbdesign::proto::EdaDataFile_NetRecord* _internal_add_netrecords(); + public: + const ::odbdesign::proto::EdaDataFile_NetRecord& netrecords(int index) const; + ::odbdesign::proto::EdaDataFile_NetRecord* add_netrecords(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_NetRecord >& + netrecords() const; + + // map netRecordsByName = 8; + int netrecordsbyname_size() const; + private: + int _internal_netrecordsbyname_size() const; + public: + void clear_netrecordsbyname(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_NetRecord >& + _internal_netrecordsbyname() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_NetRecord >* + _internal_mutable_netrecordsbyname(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_NetRecord >& + netrecordsbyname() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_NetRecord >* + mutable_netrecordsbyname(); + + // repeated .odbdesign.proto.EdaDataFile.PackageRecord packageRecords = 9; + int packagerecords_size() const; + private: + int _internal_packagerecords_size() const; + public: + void clear_packagerecords(); + ::odbdesign::proto::EdaDataFile_PackageRecord* mutable_packagerecords(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_PackageRecord >* + mutable_packagerecords(); + private: + const ::odbdesign::proto::EdaDataFile_PackageRecord& _internal_packagerecords(int index) const; + ::odbdesign::proto::EdaDataFile_PackageRecord* _internal_add_packagerecords(); + public: + const ::odbdesign::proto::EdaDataFile_PackageRecord& packagerecords(int index) const; + ::odbdesign::proto::EdaDataFile_PackageRecord* add_packagerecords(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_PackageRecord >& + packagerecords() const; + + // map packageRecordsByName = 10; + int packagerecordsbyname_size() const; + private: + int _internal_packagerecordsbyname_size() const; + public: + void clear_packagerecordsbyname(); + private: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_PackageRecord >& + _internal_packagerecordsbyname() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_PackageRecord >* + _internal_mutable_packagerecordsbyname(); + public: + const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_PackageRecord >& + packagerecordsbyname() const; + ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_PackageRecord >* + mutable_packagerecordsbyname(); + + // optional string path = 1; + bool has_path() const; + private: + bool _internal_has_path() const; + public: + void clear_path(); + const std::string& path() const; + template + void set_path(ArgT0&& arg0, ArgT... args); + std::string* mutable_path(); + PROTOBUF_NODISCARD std::string* release_path(); + void set_allocated_path(std::string* path); + private: + const std::string& _internal_path() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_path(const std::string& value); + std::string* _internal_mutable_path(); + public: + + // optional string units = 2; + bool has_units() const; + private: + bool _internal_has_units() const; + public: + void clear_units(); + const std::string& units() const; + template + void set_units(ArgT0&& arg0, ArgT... args); + std::string* mutable_units(); + PROTOBUF_NODISCARD std::string* release_units(); + void set_allocated_units(std::string* units); + private: + const std::string& _internal_units() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_units(const std::string& value); + std::string* _internal_mutable_units(); + public: + + // optional string source = 3; + bool has_source() const; + private: + bool _internal_has_source() const; + public: + void clear_source(); + const std::string& source() const; + template + void set_source(ArgT0&& arg0, ArgT... args); + std::string* mutable_source(); + PROTOBUF_NODISCARD std::string* release_source(); + void set_allocated_source(std::string* source); + private: + const std::string& _internal_source() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_source(const std::string& value); + std::string* _internal_mutable_source(); + public: + + // @@protoc_insertion_point(class_scope:odbdesign.proto.EdaDataFile) + 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 layernames_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField attributenames_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField attributetextvalues_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_NetRecord > netrecords_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + EdaDataFile_NetRecordsByNameEntry_DoNotUse, + std::string, ::odbdesign::proto::EdaDataFile_NetRecord, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> netrecordsbyname_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_PackageRecord > packagerecords_; + ::PROTOBUF_NAMESPACE_ID::internal::MapField< + EdaDataFile_PackageRecordsByNameEntry_DoNotUse, + std::string, ::odbdesign::proto::EdaDataFile_PackageRecord, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_STRING, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_MESSAGE> packagerecordsbyname_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr path_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr units_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr source_; + }; + union { Impl_ _impl_; }; + friend struct ::TableStruct_edadatafile_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// EdaDataFile_PropertyRecord + +// optional string name = 1; +inline bool EdaDataFile_PropertyRecord::_internal_has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool EdaDataFile_PropertyRecord::has_name() const { + return _internal_has_name(); +} +inline void EdaDataFile_PropertyRecord::clear_name() { + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& EdaDataFile_PropertyRecord::name() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PropertyRecord.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EdaDataFile_PropertyRecord::set_name(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.PropertyRecord.name) +} +inline std::string* EdaDataFile_PropertyRecord::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.PropertyRecord.name) + return _s; +} +inline const std::string& EdaDataFile_PropertyRecord::_internal_name() const { + return _impl_.name_.Get(); +} +inline void EdaDataFile_PropertyRecord::_internal_set_name(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* EdaDataFile_PropertyRecord::_internal_mutable_name() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* EdaDataFile_PropertyRecord::release_name() { + // @@protoc_insertion_point(field_release:odbdesign.proto.EdaDataFile.PropertyRecord.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 EdaDataFile_PropertyRecord::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:odbdesign.proto.EdaDataFile.PropertyRecord.name) +} + +// optional string value = 2; +inline bool EdaDataFile_PropertyRecord::_internal_has_value() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool EdaDataFile_PropertyRecord::has_value() const { + return _internal_has_value(); +} +inline void EdaDataFile_PropertyRecord::clear_value() { + _impl_.value_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& EdaDataFile_PropertyRecord::value() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PropertyRecord.value) + return _internal_value(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EdaDataFile_PropertyRecord::set_value(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.value_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.PropertyRecord.value) +} +inline std::string* EdaDataFile_PropertyRecord::mutable_value() { + std::string* _s = _internal_mutable_value(); + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.PropertyRecord.value) + return _s; +} +inline const std::string& EdaDataFile_PropertyRecord::_internal_value() const { + return _impl_.value_.Get(); +} +inline void EdaDataFile_PropertyRecord::_internal_set_value(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.value_.Set(value, GetArenaForAllocation()); +} +inline std::string* EdaDataFile_PropertyRecord::_internal_mutable_value() { + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.value_.Mutable(GetArenaForAllocation()); +} +inline std::string* EdaDataFile_PropertyRecord::release_value() { + // @@protoc_insertion_point(field_release:odbdesign.proto.EdaDataFile.PropertyRecord.value) + if (!_internal_has_value()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* p = _impl_.value_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.value_.IsDefault()) { + _impl_.value_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void EdaDataFile_PropertyRecord::set_allocated_value(std::string* value) { + if (value != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.value_.SetAllocated(value, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.value_.IsDefault()) { + _impl_.value_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:odbdesign.proto.EdaDataFile.PropertyRecord.value) +} + +// repeated float floatValues = 3; +inline int EdaDataFile_PropertyRecord::_internal_floatvalues_size() const { + return _impl_.floatvalues_.size(); +} +inline int EdaDataFile_PropertyRecord::floatvalues_size() const { + return _internal_floatvalues_size(); +} +inline void EdaDataFile_PropertyRecord::clear_floatvalues() { + _impl_.floatvalues_.Clear(); +} +inline float EdaDataFile_PropertyRecord::_internal_floatvalues(int index) const { + return _impl_.floatvalues_.Get(index); +} +inline float EdaDataFile_PropertyRecord::floatvalues(int index) const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PropertyRecord.floatValues) + return _internal_floatvalues(index); +} +inline void EdaDataFile_PropertyRecord::set_floatvalues(int index, float value) { + _impl_.floatvalues_.Set(index, value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.PropertyRecord.floatValues) +} +inline void EdaDataFile_PropertyRecord::_internal_add_floatvalues(float value) { + _impl_.floatvalues_.Add(value); +} +inline void EdaDataFile_PropertyRecord::add_floatvalues(float value) { + _internal_add_floatvalues(value); + // @@protoc_insertion_point(field_add:odbdesign.proto.EdaDataFile.PropertyRecord.floatValues) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& +EdaDataFile_PropertyRecord::_internal_floatvalues() const { + return _impl_.floatvalues_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& +EdaDataFile_PropertyRecord::floatvalues() const { + // @@protoc_insertion_point(field_list:odbdesign.proto.EdaDataFile.PropertyRecord.floatValues) + return _internal_floatvalues(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* +EdaDataFile_PropertyRecord::_internal_mutable_floatvalues() { + return &_impl_.floatvalues_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* +EdaDataFile_PropertyRecord::mutable_floatvalues() { + // @@protoc_insertion_point(field_mutable_list:odbdesign.proto.EdaDataFile.PropertyRecord.floatValues) + return _internal_mutable_floatvalues(); +} + +// ------------------------------------------------------------------- + +// EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord + +// optional .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord.Type type = 1; +inline bool EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::_internal_has_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::has_type() const { + return _internal_has_type(); +} +inline void EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::clear_type() { + _impl_.type_ = 0; + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::_internal_type() const { + return static_cast< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type >(_impl_.type_); +} +inline ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::type() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord.type) + return _internal_type(); +} +inline void EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::_internal_set_type(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.type_ = value; +} +inline void EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::set_type(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type value) { + _internal_set_type(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord.type) +} + +// optional uint32 layerNumber = 2; +inline bool EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::_internal_has_layernumber() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::has_layernumber() const { + return _internal_has_layernumber(); +} +inline void EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::clear_layernumber() { + _impl_.layernumber_ = 0u; + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline uint32_t EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::_internal_layernumber() const { + return _impl_.layernumber_; +} +inline uint32_t EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::layernumber() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord.layerNumber) + return _internal_layernumber(); +} +inline void EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::_internal_set_layernumber(uint32_t value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.layernumber_ = value; +} +inline void EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::set_layernumber(uint32_t value) { + _internal_set_layernumber(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord.layerNumber) +} + +// optional uint32 featureNumber = 3; +inline bool EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::_internal_has_featurenumber() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::has_featurenumber() const { + return _internal_has_featurenumber(); +} +inline void EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::clear_featurenumber() { + _impl_.featurenumber_ = 0u; + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline uint32_t EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::_internal_featurenumber() const { + return _impl_.featurenumber_; +} +inline uint32_t EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::featurenumber() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord.featureNumber) + return _internal_featurenumber(); +} +inline void EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::_internal_set_featurenumber(uint32_t value) { + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.featurenumber_ = value; +} +inline void EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord::set_featurenumber(uint32_t value) { + _internal_set_featurenumber(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord.featureNumber) +} + +// ------------------------------------------------------------------- + +// EdaDataFile_NetRecord_SubnetRecord + +// optional .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.Type type = 1; +inline bool EdaDataFile_NetRecord_SubnetRecord::_internal_has_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool EdaDataFile_NetRecord_SubnetRecord::has_type() const { + return _internal_has_type(); +} +inline void EdaDataFile_NetRecord_SubnetRecord::clear_type() { + _impl_.type_ = 0; + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_Type EdaDataFile_NetRecord_SubnetRecord::_internal_type() const { + return static_cast< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_Type >(_impl_.type_); +} +inline ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_Type EdaDataFile_NetRecord_SubnetRecord::type() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.type) + return _internal_type(); +} +inline void EdaDataFile_NetRecord_SubnetRecord::_internal_set_type(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_Type value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.type_ = value; +} +inline void EdaDataFile_NetRecord_SubnetRecord::set_type(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_Type value) { + _internal_set_type(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.type) +} + +// repeated .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FeatureIdRecord featureIdRecords = 2; +inline int EdaDataFile_NetRecord_SubnetRecord::_internal_featureidrecords_size() const { + return _impl_.featureidrecords_.size(); +} +inline int EdaDataFile_NetRecord_SubnetRecord::featureidrecords_size() const { + return _internal_featureidrecords_size(); +} +inline void EdaDataFile_NetRecord_SubnetRecord::clear_featureidrecords() { + _impl_.featureidrecords_.Clear(); +} +inline ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord* EdaDataFile_NetRecord_SubnetRecord::mutable_featureidrecords(int index) { + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.featureIdRecords) + return _impl_.featureidrecords_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord >* +EdaDataFile_NetRecord_SubnetRecord::mutable_featureidrecords() { + // @@protoc_insertion_point(field_mutable_list:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.featureIdRecords) + return &_impl_.featureidrecords_; +} +inline const ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord& EdaDataFile_NetRecord_SubnetRecord::_internal_featureidrecords(int index) const { + return _impl_.featureidrecords_.Get(index); +} +inline const ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord& EdaDataFile_NetRecord_SubnetRecord::featureidrecords(int index) const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.featureIdRecords) + return _internal_featureidrecords(index); +} +inline ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord* EdaDataFile_NetRecord_SubnetRecord::_internal_add_featureidrecords() { + return _impl_.featureidrecords_.Add(); +} +inline ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord* EdaDataFile_NetRecord_SubnetRecord::add_featureidrecords() { + ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord* _add = _internal_add_featureidrecords(); + // @@protoc_insertion_point(field_add:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.featureIdRecords) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord >& +EdaDataFile_NetRecord_SubnetRecord::featureidrecords() const { + // @@protoc_insertion_point(field_list:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.featureIdRecords) + return _impl_.featureidrecords_; +} + +// optional .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.FillType fillType = 3; +inline bool EdaDataFile_NetRecord_SubnetRecord::_internal_has_filltype() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool EdaDataFile_NetRecord_SubnetRecord::has_filltype() const { + return _internal_has_filltype(); +} +inline void EdaDataFile_NetRecord_SubnetRecord::clear_filltype() { + _impl_.filltype_ = 0; + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FillType EdaDataFile_NetRecord_SubnetRecord::_internal_filltype() const { + return static_cast< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FillType >(_impl_.filltype_); +} +inline ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FillType EdaDataFile_NetRecord_SubnetRecord::filltype() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.fillType) + return _internal_filltype(); +} +inline void EdaDataFile_NetRecord_SubnetRecord::_internal_set_filltype(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FillType value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.filltype_ = value; +} +inline void EdaDataFile_NetRecord_SubnetRecord::set_filltype(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FillType value) { + _internal_set_filltype(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.fillType) +} + +// optional .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.CutoutType cutoutType = 4; +inline bool EdaDataFile_NetRecord_SubnetRecord::_internal_has_cutouttype() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool EdaDataFile_NetRecord_SubnetRecord::has_cutouttype() const { + return _internal_has_cutouttype(); +} +inline void EdaDataFile_NetRecord_SubnetRecord::clear_cutouttype() { + _impl_.cutouttype_ = 0; + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_CutoutType EdaDataFile_NetRecord_SubnetRecord::_internal_cutouttype() const { + return static_cast< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_CutoutType >(_impl_.cutouttype_); +} +inline ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_CutoutType EdaDataFile_NetRecord_SubnetRecord::cutouttype() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.cutoutType) + return _internal_cutouttype(); +} +inline void EdaDataFile_NetRecord_SubnetRecord::_internal_set_cutouttype(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_CutoutType value) { + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.cutouttype_ = value; +} +inline void EdaDataFile_NetRecord_SubnetRecord::set_cutouttype(::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_CutoutType value) { + _internal_set_cutouttype(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.cutoutType) +} + +// optional float fillSize = 5; +inline bool EdaDataFile_NetRecord_SubnetRecord::_internal_has_fillsize() const { + bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool EdaDataFile_NetRecord_SubnetRecord::has_fillsize() const { + return _internal_has_fillsize(); +} +inline void EdaDataFile_NetRecord_SubnetRecord::clear_fillsize() { + _impl_.fillsize_ = 0; + _impl_._has_bits_[0] &= ~0x00000008u; +} +inline float EdaDataFile_NetRecord_SubnetRecord::_internal_fillsize() const { + return _impl_.fillsize_; +} +inline float EdaDataFile_NetRecord_SubnetRecord::fillsize() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.fillSize) + return _internal_fillsize(); +} +inline void EdaDataFile_NetRecord_SubnetRecord::_internal_set_fillsize(float value) { + _impl_._has_bits_[0] |= 0x00000008u; + _impl_.fillsize_ = value; +} +inline void EdaDataFile_NetRecord_SubnetRecord::set_fillsize(float value) { + _internal_set_fillsize(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.fillSize) +} + +// optional .odbdesign.proto.EdaDataFile.BoardSide side = 6; +inline bool EdaDataFile_NetRecord_SubnetRecord::_internal_has_side() const { + bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool EdaDataFile_NetRecord_SubnetRecord::has_side() const { + return _internal_has_side(); +} +inline void EdaDataFile_NetRecord_SubnetRecord::clear_side() { + _impl_.side_ = 0; + _impl_._has_bits_[0] &= ~0x00000010u; +} +inline ::odbdesign::proto::EdaDataFile_BoardSide EdaDataFile_NetRecord_SubnetRecord::_internal_side() const { + return static_cast< ::odbdesign::proto::EdaDataFile_BoardSide >(_impl_.side_); +} +inline ::odbdesign::proto::EdaDataFile_BoardSide EdaDataFile_NetRecord_SubnetRecord::side() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.side) + return _internal_side(); +} +inline void EdaDataFile_NetRecord_SubnetRecord::_internal_set_side(::odbdesign::proto::EdaDataFile_BoardSide value) { + _impl_._has_bits_[0] |= 0x00000010u; + _impl_.side_ = value; +} +inline void EdaDataFile_NetRecord_SubnetRecord::set_side(::odbdesign::proto::EdaDataFile_BoardSide value) { + _internal_set_side(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.side) +} + +// optional uint32 componentNumber = 7; +inline bool EdaDataFile_NetRecord_SubnetRecord::_internal_has_componentnumber() const { + bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool EdaDataFile_NetRecord_SubnetRecord::has_componentnumber() const { + return _internal_has_componentnumber(); +} +inline void EdaDataFile_NetRecord_SubnetRecord::clear_componentnumber() { + _impl_.componentnumber_ = 0u; + _impl_._has_bits_[0] &= ~0x00000020u; +} +inline uint32_t EdaDataFile_NetRecord_SubnetRecord::_internal_componentnumber() const { + return _impl_.componentnumber_; +} +inline uint32_t EdaDataFile_NetRecord_SubnetRecord::componentnumber() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.componentNumber) + return _internal_componentnumber(); +} +inline void EdaDataFile_NetRecord_SubnetRecord::_internal_set_componentnumber(uint32_t value) { + _impl_._has_bits_[0] |= 0x00000020u; + _impl_.componentnumber_ = value; +} +inline void EdaDataFile_NetRecord_SubnetRecord::set_componentnumber(uint32_t value) { + _internal_set_componentnumber(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.componentNumber) +} + +// optional uint32 toeprintNumber = 8; +inline bool EdaDataFile_NetRecord_SubnetRecord::_internal_has_toeprintnumber() const { + bool value = (_impl_._has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool EdaDataFile_NetRecord_SubnetRecord::has_toeprintnumber() const { + return _internal_has_toeprintnumber(); +} +inline void EdaDataFile_NetRecord_SubnetRecord::clear_toeprintnumber() { + _impl_.toeprintnumber_ = 0u; + _impl_._has_bits_[0] &= ~0x00000040u; +} +inline uint32_t EdaDataFile_NetRecord_SubnetRecord::_internal_toeprintnumber() const { + return _impl_.toeprintnumber_; +} +inline uint32_t EdaDataFile_NetRecord_SubnetRecord::toeprintnumber() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.toeprintNumber) + return _internal_toeprintnumber(); +} +inline void EdaDataFile_NetRecord_SubnetRecord::_internal_set_toeprintnumber(uint32_t value) { + _impl_._has_bits_[0] |= 0x00000040u; + _impl_.toeprintnumber_ = value; +} +inline void EdaDataFile_NetRecord_SubnetRecord::set_toeprintnumber(uint32_t value) { + _internal_set_toeprintnumber(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord.toeprintNumber) +} + +// ------------------------------------------------------------------- + +// EdaDataFile_NetRecord + +// optional string name = 1; +inline bool EdaDataFile_NetRecord::_internal_has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool EdaDataFile_NetRecord::has_name() const { + return _internal_has_name(); +} +inline void EdaDataFile_NetRecord::clear_name() { + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& EdaDataFile_NetRecord::name() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.NetRecord.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EdaDataFile_NetRecord::set_name(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.NetRecord.name) +} +inline std::string* EdaDataFile_NetRecord::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.NetRecord.name) + return _s; +} +inline const std::string& EdaDataFile_NetRecord::_internal_name() const { + return _impl_.name_.Get(); +} +inline void EdaDataFile_NetRecord::_internal_set_name(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* EdaDataFile_NetRecord::_internal_mutable_name() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* EdaDataFile_NetRecord::release_name() { + // @@protoc_insertion_point(field_release:odbdesign.proto.EdaDataFile.NetRecord.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 EdaDataFile_NetRecord::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:odbdesign.proto.EdaDataFile.NetRecord.name) +} + +// optional string attributesIdString = 2; +inline bool EdaDataFile_NetRecord::_internal_has_attributesidstring() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool EdaDataFile_NetRecord::has_attributesidstring() const { + return _internal_has_attributesidstring(); +} +inline void EdaDataFile_NetRecord::clear_attributesidstring() { + _impl_.attributesidstring_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& EdaDataFile_NetRecord::attributesidstring() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.NetRecord.attributesIdString) + return _internal_attributesidstring(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EdaDataFile_NetRecord::set_attributesidstring(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.attributesidstring_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.NetRecord.attributesIdString) +} +inline std::string* EdaDataFile_NetRecord::mutable_attributesidstring() { + std::string* _s = _internal_mutable_attributesidstring(); + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.NetRecord.attributesIdString) + return _s; +} +inline const std::string& EdaDataFile_NetRecord::_internal_attributesidstring() const { + return _impl_.attributesidstring_.Get(); +} +inline void EdaDataFile_NetRecord::_internal_set_attributesidstring(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.attributesidstring_.Set(value, GetArenaForAllocation()); +} +inline std::string* EdaDataFile_NetRecord::_internal_mutable_attributesidstring() { + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.attributesidstring_.Mutable(GetArenaForAllocation()); +} +inline std::string* EdaDataFile_NetRecord::release_attributesidstring() { + // @@protoc_insertion_point(field_release:odbdesign.proto.EdaDataFile.NetRecord.attributesIdString) + if (!_internal_has_attributesidstring()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* p = _impl_.attributesidstring_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.attributesidstring_.IsDefault()) { + _impl_.attributesidstring_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void EdaDataFile_NetRecord::set_allocated_attributesidstring(std::string* attributesidstring) { + if (attributesidstring != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.attributesidstring_.SetAllocated(attributesidstring, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.attributesidstring_.IsDefault()) { + _impl_.attributesidstring_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:odbdesign.proto.EdaDataFile.NetRecord.attributesIdString) +} + +// optional uint32 index = 3; +inline bool EdaDataFile_NetRecord::_internal_has_index() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool EdaDataFile_NetRecord::has_index() const { + return _internal_has_index(); +} +inline void EdaDataFile_NetRecord::clear_index() { + _impl_.index_ = 0u; + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline uint32_t EdaDataFile_NetRecord::_internal_index() const { + return _impl_.index_; +} +inline uint32_t EdaDataFile_NetRecord::index() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.NetRecord.index) + return _internal_index(); +} +inline void EdaDataFile_NetRecord::_internal_set_index(uint32_t value) { + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.index_ = value; +} +inline void EdaDataFile_NetRecord::set_index(uint32_t value) { + _internal_set_index(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.NetRecord.index) +} + +// repeated .odbdesign.proto.EdaDataFile.NetRecord.SubnetRecord subnetRecords = 4; +inline int EdaDataFile_NetRecord::_internal_subnetrecords_size() const { + return _impl_.subnetrecords_.size(); +} +inline int EdaDataFile_NetRecord::subnetrecords_size() const { + return _internal_subnetrecords_size(); +} +inline void EdaDataFile_NetRecord::clear_subnetrecords() { + _impl_.subnetrecords_.Clear(); +} +inline ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord* EdaDataFile_NetRecord::mutable_subnetrecords(int index) { + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.NetRecord.subnetRecords) + return _impl_.subnetrecords_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord >* +EdaDataFile_NetRecord::mutable_subnetrecords() { + // @@protoc_insertion_point(field_mutable_list:odbdesign.proto.EdaDataFile.NetRecord.subnetRecords) + return &_impl_.subnetrecords_; +} +inline const ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord& EdaDataFile_NetRecord::_internal_subnetrecords(int index) const { + return _impl_.subnetrecords_.Get(index); +} +inline const ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord& EdaDataFile_NetRecord::subnetrecords(int index) const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.NetRecord.subnetRecords) + return _internal_subnetrecords(index); +} +inline ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord* EdaDataFile_NetRecord::_internal_add_subnetrecords() { + return _impl_.subnetrecords_.Add(); +} +inline ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord* EdaDataFile_NetRecord::add_subnetrecords() { + ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord* _add = _internal_add_subnetrecords(); + // @@protoc_insertion_point(field_add:odbdesign.proto.EdaDataFile.NetRecord.subnetRecords) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord >& +EdaDataFile_NetRecord::subnetrecords() const { + // @@protoc_insertion_point(field_list:odbdesign.proto.EdaDataFile.NetRecord.subnetRecords) + return _impl_.subnetrecords_; +} + +// repeated .odbdesign.proto.EdaDataFile.PropertyRecord propertyRecords = 5; +inline int EdaDataFile_NetRecord::_internal_propertyrecords_size() const { + return _impl_.propertyrecords_.size(); +} +inline int EdaDataFile_NetRecord::propertyrecords_size() const { + return _internal_propertyrecords_size(); +} +inline void EdaDataFile_NetRecord::clear_propertyrecords() { + _impl_.propertyrecords_.Clear(); +} +inline ::odbdesign::proto::EdaDataFile_PropertyRecord* EdaDataFile_NetRecord::mutable_propertyrecords(int index) { + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.NetRecord.propertyRecords) + return _impl_.propertyrecords_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_PropertyRecord >* +EdaDataFile_NetRecord::mutable_propertyrecords() { + // @@protoc_insertion_point(field_mutable_list:odbdesign.proto.EdaDataFile.NetRecord.propertyRecords) + return &_impl_.propertyrecords_; +} +inline const ::odbdesign::proto::EdaDataFile_PropertyRecord& EdaDataFile_NetRecord::_internal_propertyrecords(int index) const { + return _impl_.propertyrecords_.Get(index); +} +inline const ::odbdesign::proto::EdaDataFile_PropertyRecord& EdaDataFile_NetRecord::propertyrecords(int index) const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.NetRecord.propertyRecords) + return _internal_propertyrecords(index); +} +inline ::odbdesign::proto::EdaDataFile_PropertyRecord* EdaDataFile_NetRecord::_internal_add_propertyrecords() { + return _impl_.propertyrecords_.Add(); +} +inline ::odbdesign::proto::EdaDataFile_PropertyRecord* EdaDataFile_NetRecord::add_propertyrecords() { + ::odbdesign::proto::EdaDataFile_PropertyRecord* _add = _internal_add_propertyrecords(); + // @@protoc_insertion_point(field_add:odbdesign.proto.EdaDataFile.NetRecord.propertyRecords) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_PropertyRecord >& +EdaDataFile_NetRecord::propertyrecords() const { + // @@protoc_insertion_point(field_list:odbdesign.proto.EdaDataFile.NetRecord.propertyRecords) + return _impl_.propertyrecords_; +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// EdaDataFile_PackageRecord_PinRecord + +// optional string name = 1; +inline bool EdaDataFile_PackageRecord_PinRecord::_internal_has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool EdaDataFile_PackageRecord_PinRecord::has_name() const { + return _internal_has_name(); +} +inline void EdaDataFile_PackageRecord_PinRecord::clear_name() { + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& EdaDataFile_PackageRecord_PinRecord::name() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EdaDataFile_PackageRecord_PinRecord::set_name(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.name) +} +inline std::string* EdaDataFile_PackageRecord_PinRecord::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.name) + return _s; +} +inline const std::string& EdaDataFile_PackageRecord_PinRecord::_internal_name() const { + return _impl_.name_.Get(); +} +inline void EdaDataFile_PackageRecord_PinRecord::_internal_set_name(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* EdaDataFile_PackageRecord_PinRecord::_internal_mutable_name() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* EdaDataFile_PackageRecord_PinRecord::release_name() { + // @@protoc_insertion_point(field_release:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.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 EdaDataFile_PackageRecord_PinRecord::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:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.name) +} + +// optional .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.Type type = 2; +inline bool EdaDataFile_PackageRecord_PinRecord::_internal_has_type() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool EdaDataFile_PackageRecord_PinRecord::has_type() const { + return _internal_has_type(); +} +inline void EdaDataFile_PackageRecord_PinRecord::clear_type() { + _impl_.type_ = 0; + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_Type EdaDataFile_PackageRecord_PinRecord::_internal_type() const { + return static_cast< ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_Type >(_impl_.type_); +} +inline ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_Type EdaDataFile_PackageRecord_PinRecord::type() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.type) + return _internal_type(); +} +inline void EdaDataFile_PackageRecord_PinRecord::_internal_set_type(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_Type value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.type_ = value; +} +inline void EdaDataFile_PackageRecord_PinRecord::set_type(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_Type value) { + _internal_set_type(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.type) +} + +// optional float xCenter = 3; +inline bool EdaDataFile_PackageRecord_PinRecord::_internal_has_xcenter() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool EdaDataFile_PackageRecord_PinRecord::has_xcenter() const { + return _internal_has_xcenter(); +} +inline void EdaDataFile_PackageRecord_PinRecord::clear_xcenter() { + _impl_.xcenter_ = 0; + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline float EdaDataFile_PackageRecord_PinRecord::_internal_xcenter() const { + return _impl_.xcenter_; +} +inline float EdaDataFile_PackageRecord_PinRecord::xcenter() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.xCenter) + return _internal_xcenter(); +} +inline void EdaDataFile_PackageRecord_PinRecord::_internal_set_xcenter(float value) { + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.xcenter_ = value; +} +inline void EdaDataFile_PackageRecord_PinRecord::set_xcenter(float value) { + _internal_set_xcenter(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.xCenter) +} + +// optional float yCenter = 4; +inline bool EdaDataFile_PackageRecord_PinRecord::_internal_has_ycenter() const { + bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool EdaDataFile_PackageRecord_PinRecord::has_ycenter() const { + return _internal_has_ycenter(); +} +inline void EdaDataFile_PackageRecord_PinRecord::clear_ycenter() { + _impl_.ycenter_ = 0; + _impl_._has_bits_[0] &= ~0x00000008u; +} +inline float EdaDataFile_PackageRecord_PinRecord::_internal_ycenter() const { + return _impl_.ycenter_; +} +inline float EdaDataFile_PackageRecord_PinRecord::ycenter() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.yCenter) + return _internal_ycenter(); +} +inline void EdaDataFile_PackageRecord_PinRecord::_internal_set_ycenter(float value) { + _impl_._has_bits_[0] |= 0x00000008u; + _impl_.ycenter_ = value; +} +inline void EdaDataFile_PackageRecord_PinRecord::set_ycenter(float value) { + _internal_set_ycenter(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.yCenter) +} + +// optional float finishedHoleSize = 5; +inline bool EdaDataFile_PackageRecord_PinRecord::_internal_has_finishedholesize() const { + bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool EdaDataFile_PackageRecord_PinRecord::has_finishedholesize() const { + return _internal_has_finishedholesize(); +} +inline void EdaDataFile_PackageRecord_PinRecord::clear_finishedholesize() { + _impl_.finishedholesize_ = 0; + _impl_._has_bits_[0] &= ~0x00000010u; +} +inline float EdaDataFile_PackageRecord_PinRecord::_internal_finishedholesize() const { + return _impl_.finishedholesize_; +} +inline float EdaDataFile_PackageRecord_PinRecord::finishedholesize() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.finishedHoleSize) + return _internal_finishedholesize(); +} +inline void EdaDataFile_PackageRecord_PinRecord::_internal_set_finishedholesize(float value) { + _impl_._has_bits_[0] |= 0x00000010u; + _impl_.finishedholesize_ = value; +} +inline void EdaDataFile_PackageRecord_PinRecord::set_finishedholesize(float value) { + _internal_set_finishedholesize(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.finishedHoleSize) +} + +// optional .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.ElectricalType electricalType = 6; +inline bool EdaDataFile_PackageRecord_PinRecord::_internal_has_electricaltype() const { + bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool EdaDataFile_PackageRecord_PinRecord::has_electricaltype() const { + return _internal_has_electricaltype(); +} +inline void EdaDataFile_PackageRecord_PinRecord::clear_electricaltype() { + _impl_.electricaltype_ = 0; + _impl_._has_bits_[0] &= ~0x00000020u; +} +inline ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_ElectricalType EdaDataFile_PackageRecord_PinRecord::_internal_electricaltype() const { + return static_cast< ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_ElectricalType >(_impl_.electricaltype_); +} +inline ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_ElectricalType EdaDataFile_PackageRecord_PinRecord::electricaltype() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.electricalType) + return _internal_electricaltype(); +} +inline void EdaDataFile_PackageRecord_PinRecord::_internal_set_electricaltype(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_ElectricalType value) { + _impl_._has_bits_[0] |= 0x00000020u; + _impl_.electricaltype_ = value; +} +inline void EdaDataFile_PackageRecord_PinRecord::set_electricaltype(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_ElectricalType value) { + _internal_set_electricaltype(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.electricalType) +} + +// optional .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.MountType mountType = 7; +inline bool EdaDataFile_PackageRecord_PinRecord::_internal_has_mounttype() const { + bool value = (_impl_._has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool EdaDataFile_PackageRecord_PinRecord::has_mounttype() const { + return _internal_has_mounttype(); +} +inline void EdaDataFile_PackageRecord_PinRecord::clear_mounttype() { + _impl_.mounttype_ = 0; + _impl_._has_bits_[0] &= ~0x00000040u; +} +inline ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_MountType EdaDataFile_PackageRecord_PinRecord::_internal_mounttype() const { + return static_cast< ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_MountType >(_impl_.mounttype_); +} +inline ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_MountType EdaDataFile_PackageRecord_PinRecord::mounttype() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.mountType) + return _internal_mounttype(); +} +inline void EdaDataFile_PackageRecord_PinRecord::_internal_set_mounttype(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_MountType value) { + _impl_._has_bits_[0] |= 0x00000040u; + _impl_.mounttype_ = value; +} +inline void EdaDataFile_PackageRecord_PinRecord::set_mounttype(::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_MountType value) { + _internal_set_mounttype(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.mountType) +} + +// optional uint32 id = 8; +inline bool EdaDataFile_PackageRecord_PinRecord::_internal_has_id() const { + bool value = (_impl_._has_bits_[0] & 0x00000080u) != 0; + return value; +} +inline bool EdaDataFile_PackageRecord_PinRecord::has_id() const { + return _internal_has_id(); +} +inline void EdaDataFile_PackageRecord_PinRecord::clear_id() { + _impl_.id_ = 0u; + _impl_._has_bits_[0] &= ~0x00000080u; +} +inline uint32_t EdaDataFile_PackageRecord_PinRecord::_internal_id() const { + return _impl_.id_; +} +inline uint32_t EdaDataFile_PackageRecord_PinRecord::id() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.id) + return _internal_id(); +} +inline void EdaDataFile_PackageRecord_PinRecord::_internal_set_id(uint32_t value) { + _impl_._has_bits_[0] |= 0x00000080u; + _impl_.id_ = value; +} +inline void EdaDataFile_PackageRecord_PinRecord::set_id(uint32_t value) { + _internal_set_id(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.id) +} + +// optional uint32 index = 9; +inline bool EdaDataFile_PackageRecord_PinRecord::_internal_has_index() const { + bool value = (_impl_._has_bits_[0] & 0x00000100u) != 0; + return value; +} +inline bool EdaDataFile_PackageRecord_PinRecord::has_index() const { + return _internal_has_index(); +} +inline void EdaDataFile_PackageRecord_PinRecord::clear_index() { + _impl_.index_ = 0u; + _impl_._has_bits_[0] &= ~0x00000100u; +} +inline uint32_t EdaDataFile_PackageRecord_PinRecord::_internal_index() const { + return _impl_.index_; +} +inline uint32_t EdaDataFile_PackageRecord_PinRecord::index() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.index) + return _internal_index(); +} +inline void EdaDataFile_PackageRecord_PinRecord::_internal_set_index(uint32_t value) { + _impl_._has_bits_[0] |= 0x00000100u; + _impl_.index_ = value; +} +inline void EdaDataFile_PackageRecord_PinRecord::set_index(uint32_t value) { + _internal_set_index(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.PackageRecord.PinRecord.index) +} + +// ------------------------------------------------------------------- + +// EdaDataFile_PackageRecord + +// optional string name = 1; +inline bool EdaDataFile_PackageRecord::_internal_has_name() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool EdaDataFile_PackageRecord::has_name() const { + return _internal_has_name(); +} +inline void EdaDataFile_PackageRecord::clear_name() { + _impl_.name_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& EdaDataFile_PackageRecord::name() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PackageRecord.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EdaDataFile_PackageRecord::set_name(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.PackageRecord.name) +} +inline std::string* EdaDataFile_PackageRecord::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.PackageRecord.name) + return _s; +} +inline const std::string& EdaDataFile_PackageRecord::_internal_name() const { + return _impl_.name_.Get(); +} +inline void EdaDataFile_PackageRecord::_internal_set_name(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.name_.Set(value, GetArenaForAllocation()); +} +inline std::string* EdaDataFile_PackageRecord::_internal_mutable_name() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.name_.Mutable(GetArenaForAllocation()); +} +inline std::string* EdaDataFile_PackageRecord::release_name() { + // @@protoc_insertion_point(field_release:odbdesign.proto.EdaDataFile.PackageRecord.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 EdaDataFile_PackageRecord::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:odbdesign.proto.EdaDataFile.PackageRecord.name) +} + +// optional float pitch = 2; +inline bool EdaDataFile_PackageRecord::_internal_has_pitch() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool EdaDataFile_PackageRecord::has_pitch() const { + return _internal_has_pitch(); +} +inline void EdaDataFile_PackageRecord::clear_pitch() { + _impl_.pitch_ = 0; + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline float EdaDataFile_PackageRecord::_internal_pitch() const { + return _impl_.pitch_; +} +inline float EdaDataFile_PackageRecord::pitch() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PackageRecord.pitch) + return _internal_pitch(); +} +inline void EdaDataFile_PackageRecord::_internal_set_pitch(float value) { + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.pitch_ = value; +} +inline void EdaDataFile_PackageRecord::set_pitch(float value) { + _internal_set_pitch(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.PackageRecord.pitch) +} + +// optional float xMin = 3; +inline bool EdaDataFile_PackageRecord::_internal_has_xmin() const { + bool value = (_impl_._has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool EdaDataFile_PackageRecord::has_xmin() const { + return _internal_has_xmin(); +} +inline void EdaDataFile_PackageRecord::clear_xmin() { + _impl_.xmin_ = 0; + _impl_._has_bits_[0] &= ~0x00000008u; +} +inline float EdaDataFile_PackageRecord::_internal_xmin() const { + return _impl_.xmin_; +} +inline float EdaDataFile_PackageRecord::xmin() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PackageRecord.xMin) + return _internal_xmin(); +} +inline void EdaDataFile_PackageRecord::_internal_set_xmin(float value) { + _impl_._has_bits_[0] |= 0x00000008u; + _impl_.xmin_ = value; +} +inline void EdaDataFile_PackageRecord::set_xmin(float value) { + _internal_set_xmin(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.PackageRecord.xMin) +} + +// optional float yMin = 4; +inline bool EdaDataFile_PackageRecord::_internal_has_ymin() const { + bool value = (_impl_._has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool EdaDataFile_PackageRecord::has_ymin() const { + return _internal_has_ymin(); +} +inline void EdaDataFile_PackageRecord::clear_ymin() { + _impl_.ymin_ = 0; + _impl_._has_bits_[0] &= ~0x00000010u; +} +inline float EdaDataFile_PackageRecord::_internal_ymin() const { + return _impl_.ymin_; +} +inline float EdaDataFile_PackageRecord::ymin() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PackageRecord.yMin) + return _internal_ymin(); +} +inline void EdaDataFile_PackageRecord::_internal_set_ymin(float value) { + _impl_._has_bits_[0] |= 0x00000010u; + _impl_.ymin_ = value; +} +inline void EdaDataFile_PackageRecord::set_ymin(float value) { + _internal_set_ymin(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.PackageRecord.yMin) +} + +// optional float xMax = 5; +inline bool EdaDataFile_PackageRecord::_internal_has_xmax() const { + bool value = (_impl_._has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool EdaDataFile_PackageRecord::has_xmax() const { + return _internal_has_xmax(); +} +inline void EdaDataFile_PackageRecord::clear_xmax() { + _impl_.xmax_ = 0; + _impl_._has_bits_[0] &= ~0x00000020u; +} +inline float EdaDataFile_PackageRecord::_internal_xmax() const { + return _impl_.xmax_; +} +inline float EdaDataFile_PackageRecord::xmax() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PackageRecord.xMax) + return _internal_xmax(); +} +inline void EdaDataFile_PackageRecord::_internal_set_xmax(float value) { + _impl_._has_bits_[0] |= 0x00000020u; + _impl_.xmax_ = value; +} +inline void EdaDataFile_PackageRecord::set_xmax(float value) { + _internal_set_xmax(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.PackageRecord.xMax) +} + +// optional float yMax = 6; +inline bool EdaDataFile_PackageRecord::_internal_has_ymax() const { + bool value = (_impl_._has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool EdaDataFile_PackageRecord::has_ymax() const { + return _internal_has_ymax(); +} +inline void EdaDataFile_PackageRecord::clear_ymax() { + _impl_.ymax_ = 0; + _impl_._has_bits_[0] &= ~0x00000040u; +} +inline float EdaDataFile_PackageRecord::_internal_ymax() const { + return _impl_.ymax_; +} +inline float EdaDataFile_PackageRecord::ymax() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PackageRecord.yMax) + return _internal_ymax(); +} +inline void EdaDataFile_PackageRecord::_internal_set_ymax(float value) { + _impl_._has_bits_[0] |= 0x00000040u; + _impl_.ymax_ = value; +} +inline void EdaDataFile_PackageRecord::set_ymax(float value) { + _internal_set_ymax(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.PackageRecord.yMax) +} + +// optional string attributesIdString = 7; +inline bool EdaDataFile_PackageRecord::_internal_has_attributesidstring() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool EdaDataFile_PackageRecord::has_attributesidstring() const { + return _internal_has_attributesidstring(); +} +inline void EdaDataFile_PackageRecord::clear_attributesidstring() { + _impl_.attributesidstring_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& EdaDataFile_PackageRecord::attributesidstring() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PackageRecord.attributesIdString) + return _internal_attributesidstring(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EdaDataFile_PackageRecord::set_attributesidstring(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.attributesidstring_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.PackageRecord.attributesIdString) +} +inline std::string* EdaDataFile_PackageRecord::mutable_attributesidstring() { + std::string* _s = _internal_mutable_attributesidstring(); + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.PackageRecord.attributesIdString) + return _s; +} +inline const std::string& EdaDataFile_PackageRecord::_internal_attributesidstring() const { + return _impl_.attributesidstring_.Get(); +} +inline void EdaDataFile_PackageRecord::_internal_set_attributesidstring(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.attributesidstring_.Set(value, GetArenaForAllocation()); +} +inline std::string* EdaDataFile_PackageRecord::_internal_mutable_attributesidstring() { + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.attributesidstring_.Mutable(GetArenaForAllocation()); +} +inline std::string* EdaDataFile_PackageRecord::release_attributesidstring() { + // @@protoc_insertion_point(field_release:odbdesign.proto.EdaDataFile.PackageRecord.attributesIdString) + if (!_internal_has_attributesidstring()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* p = _impl_.attributesidstring_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.attributesidstring_.IsDefault()) { + _impl_.attributesidstring_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void EdaDataFile_PackageRecord::set_allocated_attributesidstring(std::string* attributesidstring) { + if (attributesidstring != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.attributesidstring_.SetAllocated(attributesidstring, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.attributesidstring_.IsDefault()) { + _impl_.attributesidstring_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:odbdesign.proto.EdaDataFile.PackageRecord.attributesIdString) +} + +// repeated .odbdesign.proto.EdaDataFile.PackageRecord.PinRecord pinRecords = 8; +inline int EdaDataFile_PackageRecord::_internal_pinrecords_size() const { + return _impl_.pinrecords_.size(); +} +inline int EdaDataFile_PackageRecord::pinrecords_size() const { + return _internal_pinrecords_size(); +} +inline void EdaDataFile_PackageRecord::clear_pinrecords() { + _impl_.pinrecords_.Clear(); +} +inline ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord* EdaDataFile_PackageRecord::mutable_pinrecords(int index) { + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.PackageRecord.pinRecords) + return _impl_.pinrecords_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord >* +EdaDataFile_PackageRecord::mutable_pinrecords() { + // @@protoc_insertion_point(field_mutable_list:odbdesign.proto.EdaDataFile.PackageRecord.pinRecords) + return &_impl_.pinrecords_; +} +inline const ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord& EdaDataFile_PackageRecord::_internal_pinrecords(int index) const { + return _impl_.pinrecords_.Get(index); +} +inline const ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord& EdaDataFile_PackageRecord::pinrecords(int index) const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PackageRecord.pinRecords) + return _internal_pinrecords(index); +} +inline ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord* EdaDataFile_PackageRecord::_internal_add_pinrecords() { + return _impl_.pinrecords_.Add(); +} +inline ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord* EdaDataFile_PackageRecord::add_pinrecords() { + ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord* _add = _internal_add_pinrecords(); + // @@protoc_insertion_point(field_add:odbdesign.proto.EdaDataFile.PackageRecord.pinRecords) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord >& +EdaDataFile_PackageRecord::pinrecords() const { + // @@protoc_insertion_point(field_list:odbdesign.proto.EdaDataFile.PackageRecord.pinRecords) + return _impl_.pinrecords_; +} + +// map pinRecordsByName = 9; +inline int EdaDataFile_PackageRecord::_internal_pinrecordsbyname_size() const { + return _impl_.pinrecordsbyname_.size(); +} +inline int EdaDataFile_PackageRecord::pinrecordsbyname_size() const { + return _internal_pinrecordsbyname_size(); +} +inline void EdaDataFile_PackageRecord::clear_pinrecordsbyname() { + _impl_.pinrecordsbyname_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord >& +EdaDataFile_PackageRecord::_internal_pinrecordsbyname() const { + return _impl_.pinrecordsbyname_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord >& +EdaDataFile_PackageRecord::pinrecordsbyname() const { + // @@protoc_insertion_point(field_map:odbdesign.proto.EdaDataFile.PackageRecord.pinRecordsByName) + return _internal_pinrecordsbyname(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord >* +EdaDataFile_PackageRecord::_internal_mutable_pinrecordsbyname() { + return _impl_.pinrecordsbyname_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord >* +EdaDataFile_PackageRecord::mutable_pinrecordsbyname() { + // @@protoc_insertion_point(field_mutable_map:odbdesign.proto.EdaDataFile.PackageRecord.pinRecordsByName) + return _internal_mutable_pinrecordsbyname(); +} + +// repeated .odbdesign.proto.EdaDataFile.PropertyRecord propertyRecords = 10; +inline int EdaDataFile_PackageRecord::_internal_propertyrecords_size() const { + return _impl_.propertyrecords_.size(); +} +inline int EdaDataFile_PackageRecord::propertyrecords_size() const { + return _internal_propertyrecords_size(); +} +inline void EdaDataFile_PackageRecord::clear_propertyrecords() { + _impl_.propertyrecords_.Clear(); +} +inline ::odbdesign::proto::EdaDataFile_PropertyRecord* EdaDataFile_PackageRecord::mutable_propertyrecords(int index) { + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.PackageRecord.propertyRecords) + return _impl_.propertyrecords_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_PropertyRecord >* +EdaDataFile_PackageRecord::mutable_propertyrecords() { + // @@protoc_insertion_point(field_mutable_list:odbdesign.proto.EdaDataFile.PackageRecord.propertyRecords) + return &_impl_.propertyrecords_; +} +inline const ::odbdesign::proto::EdaDataFile_PropertyRecord& EdaDataFile_PackageRecord::_internal_propertyrecords(int index) const { + return _impl_.propertyrecords_.Get(index); +} +inline const ::odbdesign::proto::EdaDataFile_PropertyRecord& EdaDataFile_PackageRecord::propertyrecords(int index) const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.PackageRecord.propertyRecords) + return _internal_propertyrecords(index); +} +inline ::odbdesign::proto::EdaDataFile_PropertyRecord* EdaDataFile_PackageRecord::_internal_add_propertyrecords() { + return _impl_.propertyrecords_.Add(); +} +inline ::odbdesign::proto::EdaDataFile_PropertyRecord* EdaDataFile_PackageRecord::add_propertyrecords() { + ::odbdesign::proto::EdaDataFile_PropertyRecord* _add = _internal_add_propertyrecords(); + // @@protoc_insertion_point(field_add:odbdesign.proto.EdaDataFile.PackageRecord.propertyRecords) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_PropertyRecord >& +EdaDataFile_PackageRecord::propertyrecords() const { + // @@protoc_insertion_point(field_list:odbdesign.proto.EdaDataFile.PackageRecord.propertyRecords) + return _impl_.propertyrecords_; +} + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// EdaDataFile + +// optional string path = 1; +inline bool EdaDataFile::_internal_has_path() const { + bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool EdaDataFile::has_path() const { + return _internal_has_path(); +} +inline void EdaDataFile::clear_path() { + _impl_.path_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000001u; +} +inline const std::string& EdaDataFile::path() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.path) + return _internal_path(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EdaDataFile::set_path(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.path_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.path) +} +inline std::string* EdaDataFile::mutable_path() { + std::string* _s = _internal_mutable_path(); + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.path) + return _s; +} +inline const std::string& EdaDataFile::_internal_path() const { + return _impl_.path_.Get(); +} +inline void EdaDataFile::_internal_set_path(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000001u; + _impl_.path_.Set(value, GetArenaForAllocation()); +} +inline std::string* EdaDataFile::_internal_mutable_path() { + _impl_._has_bits_[0] |= 0x00000001u; + return _impl_.path_.Mutable(GetArenaForAllocation()); +} +inline std::string* EdaDataFile::release_path() { + // @@protoc_insertion_point(field_release:odbdesign.proto.EdaDataFile.path) + if (!_internal_has_path()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000001u; + auto* p = _impl_.path_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.path_.IsDefault()) { + _impl_.path_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void EdaDataFile::set_allocated_path(std::string* path) { + if (path != nullptr) { + _impl_._has_bits_[0] |= 0x00000001u; + } else { + _impl_._has_bits_[0] &= ~0x00000001u; + } + _impl_.path_.SetAllocated(path, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.path_.IsDefault()) { + _impl_.path_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:odbdesign.proto.EdaDataFile.path) +} + +// optional string units = 2; +inline bool EdaDataFile::_internal_has_units() const { + bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool EdaDataFile::has_units() const { + return _internal_has_units(); +} +inline void EdaDataFile::clear_units() { + _impl_.units_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000002u; +} +inline const std::string& EdaDataFile::units() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.units) + return _internal_units(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EdaDataFile::set_units(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.units_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.units) +} +inline std::string* EdaDataFile::mutable_units() { + std::string* _s = _internal_mutable_units(); + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.units) + return _s; +} +inline const std::string& EdaDataFile::_internal_units() const { + return _impl_.units_.Get(); +} +inline void EdaDataFile::_internal_set_units(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000002u; + _impl_.units_.Set(value, GetArenaForAllocation()); +} +inline std::string* EdaDataFile::_internal_mutable_units() { + _impl_._has_bits_[0] |= 0x00000002u; + return _impl_.units_.Mutable(GetArenaForAllocation()); +} +inline std::string* EdaDataFile::release_units() { + // @@protoc_insertion_point(field_release:odbdesign.proto.EdaDataFile.units) + if (!_internal_has_units()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000002u; + auto* p = _impl_.units_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.units_.IsDefault()) { + _impl_.units_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void EdaDataFile::set_allocated_units(std::string* units) { + if (units != nullptr) { + _impl_._has_bits_[0] |= 0x00000002u; + } else { + _impl_._has_bits_[0] &= ~0x00000002u; + } + _impl_.units_.SetAllocated(units, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.units_.IsDefault()) { + _impl_.units_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:odbdesign.proto.EdaDataFile.units) +} + +// optional string source = 3; +inline bool EdaDataFile::_internal_has_source() const { + bool value = (_impl_._has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool EdaDataFile::has_source() const { + return _internal_has_source(); +} +inline void EdaDataFile::clear_source() { + _impl_.source_.ClearToEmpty(); + _impl_._has_bits_[0] &= ~0x00000004u; +} +inline const std::string& EdaDataFile::source() const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.source) + return _internal_source(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EdaDataFile::set_source(ArgT0&& arg0, ArgT... args) { + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.source_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.source) +} +inline std::string* EdaDataFile::mutable_source() { + std::string* _s = _internal_mutable_source(); + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.source) + return _s; +} +inline const std::string& EdaDataFile::_internal_source() const { + return _impl_.source_.Get(); +} +inline void EdaDataFile::_internal_set_source(const std::string& value) { + _impl_._has_bits_[0] |= 0x00000004u; + _impl_.source_.Set(value, GetArenaForAllocation()); +} +inline std::string* EdaDataFile::_internal_mutable_source() { + _impl_._has_bits_[0] |= 0x00000004u; + return _impl_.source_.Mutable(GetArenaForAllocation()); +} +inline std::string* EdaDataFile::release_source() { + // @@protoc_insertion_point(field_release:odbdesign.proto.EdaDataFile.source) + if (!_internal_has_source()) { + return nullptr; + } + _impl_._has_bits_[0] &= ~0x00000004u; + auto* p = _impl_.source_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.source_.IsDefault()) { + _impl_.source_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void EdaDataFile::set_allocated_source(std::string* source) { + if (source != nullptr) { + _impl_._has_bits_[0] |= 0x00000004u; + } else { + _impl_._has_bits_[0] &= ~0x00000004u; + } + _impl_.source_.SetAllocated(source, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (_impl_.source_.IsDefault()) { + _impl_.source_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:odbdesign.proto.EdaDataFile.source) +} + +// repeated string layerNames = 4; +inline int EdaDataFile::_internal_layernames_size() const { + return _impl_.layernames_.size(); +} +inline int EdaDataFile::layernames_size() const { + return _internal_layernames_size(); +} +inline void EdaDataFile::clear_layernames() { + _impl_.layernames_.Clear(); +} +inline std::string* EdaDataFile::add_layernames() { + std::string* _s = _internal_add_layernames(); + // @@protoc_insertion_point(field_add_mutable:odbdesign.proto.EdaDataFile.layerNames) + return _s; +} +inline const std::string& EdaDataFile::_internal_layernames(int index) const { + return _impl_.layernames_.Get(index); +} +inline const std::string& EdaDataFile::layernames(int index) const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.layerNames) + return _internal_layernames(index); +} +inline std::string* EdaDataFile::mutable_layernames(int index) { + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.layerNames) + return _impl_.layernames_.Mutable(index); +} +inline void EdaDataFile::set_layernames(int index, const std::string& value) { + _impl_.layernames_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.layerNames) +} +inline void EdaDataFile::set_layernames(int index, std::string&& value) { + _impl_.layernames_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.layerNames) +} +inline void EdaDataFile::set_layernames(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.layernames_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:odbdesign.proto.EdaDataFile.layerNames) +} +inline void EdaDataFile::set_layernames(int index, const char* value, size_t size) { + _impl_.layernames_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:odbdesign.proto.EdaDataFile.layerNames) +} +inline std::string* EdaDataFile::_internal_add_layernames() { + return _impl_.layernames_.Add(); +} +inline void EdaDataFile::add_layernames(const std::string& value) { + _impl_.layernames_.Add()->assign(value); + // @@protoc_insertion_point(field_add:odbdesign.proto.EdaDataFile.layerNames) +} +inline void EdaDataFile::add_layernames(std::string&& value) { + _impl_.layernames_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:odbdesign.proto.EdaDataFile.layerNames) +} +inline void EdaDataFile::add_layernames(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.layernames_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:odbdesign.proto.EdaDataFile.layerNames) +} +inline void EdaDataFile::add_layernames(const char* value, size_t size) { + _impl_.layernames_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:odbdesign.proto.EdaDataFile.layerNames) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +EdaDataFile::layernames() const { + // @@protoc_insertion_point(field_list:odbdesign.proto.EdaDataFile.layerNames) + return _impl_.layernames_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +EdaDataFile::mutable_layernames() { + // @@protoc_insertion_point(field_mutable_list:odbdesign.proto.EdaDataFile.layerNames) + return &_impl_.layernames_; +} + +// repeated string attributeNames = 5; +inline int EdaDataFile::_internal_attributenames_size() const { + return _impl_.attributenames_.size(); +} +inline int EdaDataFile::attributenames_size() const { + return _internal_attributenames_size(); +} +inline void EdaDataFile::clear_attributenames() { + _impl_.attributenames_.Clear(); +} +inline std::string* EdaDataFile::add_attributenames() { + std::string* _s = _internal_add_attributenames(); + // @@protoc_insertion_point(field_add_mutable:odbdesign.proto.EdaDataFile.attributeNames) + return _s; +} +inline const std::string& EdaDataFile::_internal_attributenames(int index) const { + return _impl_.attributenames_.Get(index); +} +inline const std::string& EdaDataFile::attributenames(int index) const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.attributeNames) + return _internal_attributenames(index); +} +inline std::string* EdaDataFile::mutable_attributenames(int index) { + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.attributeNames) + return _impl_.attributenames_.Mutable(index); +} +inline void EdaDataFile::set_attributenames(int index, const std::string& value) { + _impl_.attributenames_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.attributeNames) +} +inline void EdaDataFile::set_attributenames(int index, std::string&& value) { + _impl_.attributenames_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.attributeNames) +} +inline void EdaDataFile::set_attributenames(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.attributenames_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:odbdesign.proto.EdaDataFile.attributeNames) +} +inline void EdaDataFile::set_attributenames(int index, const char* value, size_t size) { + _impl_.attributenames_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:odbdesign.proto.EdaDataFile.attributeNames) +} +inline std::string* EdaDataFile::_internal_add_attributenames() { + return _impl_.attributenames_.Add(); +} +inline void EdaDataFile::add_attributenames(const std::string& value) { + _impl_.attributenames_.Add()->assign(value); + // @@protoc_insertion_point(field_add:odbdesign.proto.EdaDataFile.attributeNames) +} +inline void EdaDataFile::add_attributenames(std::string&& value) { + _impl_.attributenames_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:odbdesign.proto.EdaDataFile.attributeNames) +} +inline void EdaDataFile::add_attributenames(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.attributenames_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:odbdesign.proto.EdaDataFile.attributeNames) +} +inline void EdaDataFile::add_attributenames(const char* value, size_t size) { + _impl_.attributenames_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:odbdesign.proto.EdaDataFile.attributeNames) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +EdaDataFile::attributenames() const { + // @@protoc_insertion_point(field_list:odbdesign.proto.EdaDataFile.attributeNames) + return _impl_.attributenames_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +EdaDataFile::mutable_attributenames() { + // @@protoc_insertion_point(field_mutable_list:odbdesign.proto.EdaDataFile.attributeNames) + return &_impl_.attributenames_; +} + +// repeated string attributeTextValues = 6; +inline int EdaDataFile::_internal_attributetextvalues_size() const { + return _impl_.attributetextvalues_.size(); +} +inline int EdaDataFile::attributetextvalues_size() const { + return _internal_attributetextvalues_size(); +} +inline void EdaDataFile::clear_attributetextvalues() { + _impl_.attributetextvalues_.Clear(); +} +inline std::string* EdaDataFile::add_attributetextvalues() { + std::string* _s = _internal_add_attributetextvalues(); + // @@protoc_insertion_point(field_add_mutable:odbdesign.proto.EdaDataFile.attributeTextValues) + return _s; +} +inline const std::string& EdaDataFile::_internal_attributetextvalues(int index) const { + return _impl_.attributetextvalues_.Get(index); +} +inline const std::string& EdaDataFile::attributetextvalues(int index) const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.attributeTextValues) + return _internal_attributetextvalues(index); +} +inline std::string* EdaDataFile::mutable_attributetextvalues(int index) { + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.attributeTextValues) + return _impl_.attributetextvalues_.Mutable(index); +} +inline void EdaDataFile::set_attributetextvalues(int index, const std::string& value) { + _impl_.attributetextvalues_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.attributeTextValues) +} +inline void EdaDataFile::set_attributetextvalues(int index, std::string&& value) { + _impl_.attributetextvalues_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:odbdesign.proto.EdaDataFile.attributeTextValues) +} +inline void EdaDataFile::set_attributetextvalues(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.attributetextvalues_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:odbdesign.proto.EdaDataFile.attributeTextValues) +} +inline void EdaDataFile::set_attributetextvalues(int index, const char* value, size_t size) { + _impl_.attributetextvalues_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:odbdesign.proto.EdaDataFile.attributeTextValues) +} +inline std::string* EdaDataFile::_internal_add_attributetextvalues() { + return _impl_.attributetextvalues_.Add(); +} +inline void EdaDataFile::add_attributetextvalues(const std::string& value) { + _impl_.attributetextvalues_.Add()->assign(value); + // @@protoc_insertion_point(field_add:odbdesign.proto.EdaDataFile.attributeTextValues) +} +inline void EdaDataFile::add_attributetextvalues(std::string&& value) { + _impl_.attributetextvalues_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:odbdesign.proto.EdaDataFile.attributeTextValues) +} +inline void EdaDataFile::add_attributetextvalues(const char* value) { + GOOGLE_DCHECK(value != nullptr); + _impl_.attributetextvalues_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:odbdesign.proto.EdaDataFile.attributeTextValues) +} +inline void EdaDataFile::add_attributetextvalues(const char* value, size_t size) { + _impl_.attributetextvalues_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:odbdesign.proto.EdaDataFile.attributeTextValues) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +EdaDataFile::attributetextvalues() const { + // @@protoc_insertion_point(field_list:odbdesign.proto.EdaDataFile.attributeTextValues) + return _impl_.attributetextvalues_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +EdaDataFile::mutable_attributetextvalues() { + // @@protoc_insertion_point(field_mutable_list:odbdesign.proto.EdaDataFile.attributeTextValues) + return &_impl_.attributetextvalues_; +} + +// repeated .odbdesign.proto.EdaDataFile.NetRecord netRecords = 7; +inline int EdaDataFile::_internal_netrecords_size() const { + return _impl_.netrecords_.size(); +} +inline int EdaDataFile::netrecords_size() const { + return _internal_netrecords_size(); +} +inline void EdaDataFile::clear_netrecords() { + _impl_.netrecords_.Clear(); +} +inline ::odbdesign::proto::EdaDataFile_NetRecord* EdaDataFile::mutable_netrecords(int index) { + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.netRecords) + return _impl_.netrecords_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_NetRecord >* +EdaDataFile::mutable_netrecords() { + // @@protoc_insertion_point(field_mutable_list:odbdesign.proto.EdaDataFile.netRecords) + return &_impl_.netrecords_; +} +inline const ::odbdesign::proto::EdaDataFile_NetRecord& EdaDataFile::_internal_netrecords(int index) const { + return _impl_.netrecords_.Get(index); +} +inline const ::odbdesign::proto::EdaDataFile_NetRecord& EdaDataFile::netrecords(int index) const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.netRecords) + return _internal_netrecords(index); +} +inline ::odbdesign::proto::EdaDataFile_NetRecord* EdaDataFile::_internal_add_netrecords() { + return _impl_.netrecords_.Add(); +} +inline ::odbdesign::proto::EdaDataFile_NetRecord* EdaDataFile::add_netrecords() { + ::odbdesign::proto::EdaDataFile_NetRecord* _add = _internal_add_netrecords(); + // @@protoc_insertion_point(field_add:odbdesign.proto.EdaDataFile.netRecords) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_NetRecord >& +EdaDataFile::netrecords() const { + // @@protoc_insertion_point(field_list:odbdesign.proto.EdaDataFile.netRecords) + return _impl_.netrecords_; +} + +// map netRecordsByName = 8; +inline int EdaDataFile::_internal_netrecordsbyname_size() const { + return _impl_.netrecordsbyname_.size(); +} +inline int EdaDataFile::netrecordsbyname_size() const { + return _internal_netrecordsbyname_size(); +} +inline void EdaDataFile::clear_netrecordsbyname() { + _impl_.netrecordsbyname_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_NetRecord >& +EdaDataFile::_internal_netrecordsbyname() const { + return _impl_.netrecordsbyname_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_NetRecord >& +EdaDataFile::netrecordsbyname() const { + // @@protoc_insertion_point(field_map:odbdesign.proto.EdaDataFile.netRecordsByName) + return _internal_netrecordsbyname(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_NetRecord >* +EdaDataFile::_internal_mutable_netrecordsbyname() { + return _impl_.netrecordsbyname_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_NetRecord >* +EdaDataFile::mutable_netrecordsbyname() { + // @@protoc_insertion_point(field_mutable_map:odbdesign.proto.EdaDataFile.netRecordsByName) + return _internal_mutable_netrecordsbyname(); +} + +// repeated .odbdesign.proto.EdaDataFile.PackageRecord packageRecords = 9; +inline int EdaDataFile::_internal_packagerecords_size() const { + return _impl_.packagerecords_.size(); +} +inline int EdaDataFile::packagerecords_size() const { + return _internal_packagerecords_size(); +} +inline void EdaDataFile::clear_packagerecords() { + _impl_.packagerecords_.Clear(); +} +inline ::odbdesign::proto::EdaDataFile_PackageRecord* EdaDataFile::mutable_packagerecords(int index) { + // @@protoc_insertion_point(field_mutable:odbdesign.proto.EdaDataFile.packageRecords) + return _impl_.packagerecords_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_PackageRecord >* +EdaDataFile::mutable_packagerecords() { + // @@protoc_insertion_point(field_mutable_list:odbdesign.proto.EdaDataFile.packageRecords) + return &_impl_.packagerecords_; +} +inline const ::odbdesign::proto::EdaDataFile_PackageRecord& EdaDataFile::_internal_packagerecords(int index) const { + return _impl_.packagerecords_.Get(index); +} +inline const ::odbdesign::proto::EdaDataFile_PackageRecord& EdaDataFile::packagerecords(int index) const { + // @@protoc_insertion_point(field_get:odbdesign.proto.EdaDataFile.packageRecords) + return _internal_packagerecords(index); +} +inline ::odbdesign::proto::EdaDataFile_PackageRecord* EdaDataFile::_internal_add_packagerecords() { + return _impl_.packagerecords_.Add(); +} +inline ::odbdesign::proto::EdaDataFile_PackageRecord* EdaDataFile::add_packagerecords() { + ::odbdesign::proto::EdaDataFile_PackageRecord* _add = _internal_add_packagerecords(); + // @@protoc_insertion_point(field_add:odbdesign.proto.EdaDataFile.packageRecords) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::odbdesign::proto::EdaDataFile_PackageRecord >& +EdaDataFile::packagerecords() const { + // @@protoc_insertion_point(field_list:odbdesign.proto.EdaDataFile.packageRecords) + return _impl_.packagerecords_; +} + +// map packageRecordsByName = 10; +inline int EdaDataFile::_internal_packagerecordsbyname_size() const { + return _impl_.packagerecordsbyname_.size(); +} +inline int EdaDataFile::packagerecordsbyname_size() const { + return _internal_packagerecordsbyname_size(); +} +inline void EdaDataFile::clear_packagerecordsbyname() { + _impl_.packagerecordsbyname_.Clear(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_PackageRecord >& +EdaDataFile::_internal_packagerecordsbyname() const { + return _impl_.packagerecordsbyname_.GetMap(); +} +inline const ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_PackageRecord >& +EdaDataFile::packagerecordsbyname() const { + // @@protoc_insertion_point(field_map:odbdesign.proto.EdaDataFile.packageRecordsByName) + return _internal_packagerecordsbyname(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_PackageRecord >* +EdaDataFile::_internal_mutable_packagerecordsbyname() { + return _impl_.packagerecordsbyname_.MutableMap(); +} +inline ::PROTOBUF_NAMESPACE_ID::Map< std::string, ::odbdesign::proto::EdaDataFile_PackageRecord >* +EdaDataFile::mutable_packagerecordsbyname() { + // @@protoc_insertion_point(field_mutable_map:odbdesign.proto.EdaDataFile.packageRecordsByName) + return _internal_mutable_packagerecordsbyname(); +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace proto +} // namespace odbdesign + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type>() { + return ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FeatureIdRecord_Type_descriptor(); +} +template <> struct is_proto_enum< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_Type> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_Type>() { + return ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_Type_descriptor(); +} +template <> struct is_proto_enum< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FillType> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FillType>() { + return ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_FillType_descriptor(); +} +template <> struct is_proto_enum< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_CutoutType> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_CutoutType>() { + return ::odbdesign::proto::EdaDataFile_NetRecord_SubnetRecord_CutoutType_descriptor(); +} +template <> struct is_proto_enum< ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_Type> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_Type>() { + return ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_Type_descriptor(); +} +template <> struct is_proto_enum< ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_ElectricalType> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_ElectricalType>() { + return ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_ElectricalType_descriptor(); +} +template <> struct is_proto_enum< ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_MountType> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_MountType>() { + return ::odbdesign::proto::EdaDataFile_PackageRecord_PinRecord_MountType_descriptor(); +} +template <> struct is_proto_enum< ::odbdesign::proto::EdaDataFile_BoardSide> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::odbdesign::proto::EdaDataFile_BoardSide>() { + return ::odbdesign::proto::EdaDataFile_BoardSide_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_edadatafile_2eproto diff --git a/OdbDesignLib/protoc/edadatafile.proto b/OdbDesignLib/protoc/edadatafile.proto new file mode 100644 index 00000000..ff9eeca9 --- /dev/null +++ b/OdbDesignLib/protoc/edadatafile.proto @@ -0,0 +1,173 @@ +syntax = "proto3"; + +package odbdesign.proto; + +// +// EdaDataFile.h +// + +message EdaDataFile { + + enum BoardSide { + TOP = 0; + BOTTOM = 1; + }; + + message PropertyRecord { + + optional string name = 1; + optional string value = 2; + repeated float floatValues = 3; + } + + message NetRecord { + + message SubnetRecord { + + // common subnet enums + enum Type { + VIA = 0; + TRACE = 1; + PLANE = 2; + TOEPRINT = 3; + }; + + // Plane subnet type enums + enum FillType { + SOLID = 0; + OUTLINE = 1; + }; + + enum CutoutType { + CIRCLE = 0; + RECTANGLE = 1; + OCTAGON = 2; + EXACT = 3; + }; + + message FeatureIdRecord { + + enum Type { + COPPER = 0; + LAMINATE = 1; + HOLE = 2; + }; + + optional Type type = 1; + optional uint32 layerNumber = 2; + optional uint32 featureNumber = 3; + }; + + // common subnet fields + optional Type type = 1; + repeated FeatureIdRecord featureIdRecords = 2; + + // Plane subnet type fields + optional FillType fillType = 3; + optional CutoutType cutoutType = 4; + optional float fillSize = 5; + + // Toeprint subnet type fields + optional BoardSide side = 6; + optional uint32 componentNumber = 7; + optional uint32 toeprintNumber = 8; + }; + + // message ToeprintSubnetRecord { + + // //optional SubnetRecord subnetRecord = 1; + // optional uint32 componentNumber = 2; + // optional uint32 toeprintNumber = 3; + // }; + + // message PlaneSubnetRecord { + + // //optional SubnetRecord subnetRecord = 1; + + // enum FillType { + // SOLID = 0; + // OUTLINE = 1; + // }; + + // enum CutoutType { + // CIRCLE = 0; + // RECTANGLE = 1; + // OCTAGON = 2; + // EXACT = 3; + // }; + + // optional FillType fillType = 1; + // optional CutoutType cutoutType = 2; + // optional float fillSize = 3; + // }; + + optional string name = 1; + optional string attributesIdString = 2; + optional uint32 index = 3; + + repeated SubnetRecord subnetRecords = 4; + repeated PropertyRecord propertyRecords = 5; + } + + message PackageRecord { + + optional string name = 1; + optional float pitch = 2; + optional float xMin = 3; + optional float yMin = 4; + optional float xMax = 5; + optional float yMax = 6; + optional string attributesIdString = 7; + + repeated PinRecord pinRecords = 8; + map pinRecordsByName = 9; + repeated PropertyRecord propertyRecords = 10; + + message PinRecord { + + enum Type { + THROUGH_HOLE = 0; + BLIND = 1; + SURFACE = 2; + }; + + enum ElectricalType { + ELECTRICAL = 0; + NON_ELECTRICAL = 1; + UNDEFINED = 2; + }; + + enum MountType { + SMT = 0; + RECOMMENDED_SMT_PAD = 1; + MT_THROUGH_HOLE = 2; + RECOMMENDED_THROUGH_HOLE = 3; + PRESSFIT = 4; + NON_BOARD = 5; + HOLE = 6; + MT_UNDEFINED = 7; // default + }; + + optional string name = 1; + optional Type type = 2; + optional float xCenter = 3; + optional float yCenter = 4; + optional float finishedHoleSize = 5; // unused, set to 0 + optional ElectricalType electricalType = 6; + optional MountType mountType = 7; + optional uint32 id = 8; + optional uint32 index = 9; + } + } + + optional string path = 1; + optional string units = 2; + optional string source = 3; + repeated string layerNames = 4; + repeated string attributeNames = 5; + repeated string attributeTextValues = 6; + repeated NetRecord netRecords = 7; + map netRecordsByName = 8; + repeated PackageRecord packageRecords = 9; + map packageRecordsByName = 10; +} \ No newline at end of file diff --git a/OdbDesignLib/string_trim.h b/OdbDesignLib/string_trim.h deleted file mode 100644 index 43d649f5..00000000 --- a/OdbDesignLib/string_trim.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -#include - - -namespace Odb::Lib -{ - // trim from start (in place) - std::string& ltrim(std::string& s); - // trim from end (in place) - std::string& rtrim(std::string& s); - // trim from both ends (in place) - std::string& trim(std::string& s); - - // trim from start (copying) - std::string ltrim_copy(std::string s); - // trim from end (copying) - std::string rtrim_copy(std::string s); - // trim from both ends (copying) - std::string trim_copy(std::string s); -} \ No newline at end of file diff --git a/OdbDesignLib/win.h b/OdbDesignLib/win.h new file mode 100644 index 00000000..b7fb5233 --- /dev/null +++ b/OdbDesignLib/win.h @@ -0,0 +1,6 @@ +#pragma once + + +#if defined (_MSC_VER) +# define _WIN32_WINNT 0x0601 +#endif diff --git a/OdbDesignServer/CMakeLists.txt b/OdbDesignServer/CMakeLists.txt index d877a636..0d10715c 100644 --- a/OdbDesignServer/CMakeLists.txt +++ b/OdbDesignServer/CMakeLists.txt @@ -1,24 +1,30 @@ # CMakeList.txt : CMake project for OdbDesignServer # -add_executable(OdbDesignServer "OdbDesignServer.cpp" "OdbDesignServer.h" "Controllers/RouteController.h" "Controllers/RouteController.cpp" "Controllers/HelloWorldController.h" "Controllers/HelloWorldController.cpp" "OdbDesignServerApp.h" "OdbDesignServerApp.cpp" "Controllers/StepsEdaDataController.cpp" "Controllers/StepsEdaDataController.h") +add_executable(OdbDesignServer "main.cpp" "Controllers/RouteController.h" "Controllers/RouteController.cpp" "Controllers/HelloWorldController.h" "Controllers/HelloWorldController.cpp" "OdbDesignServerApp.h" "OdbDesignServerApp.cpp" "Controllers/StepsEdaDataController.cpp" "Controllers/StepsEdaDataController.h" "OdbDesignServer.h" "OdbServerAppBase.h" "OdbServerAppBase.cpp") + +# link to zlib (required for Crow HTTP compression) +find_package(ZLIB REQUIRED) +target_link_libraries(OdbDesignServer PRIVATE ZLIB::ZLIB) # link to Crow -#set(CROW_FEATURES ssl compression) -#set(CROW_FEATURES "ssl;compression") -find_package(Crow REQUIRED) -target_link_libraries(OdbDesignServer PUBLIC Crow::Crow) +add_compile_definitions(CROW_ENABLE_COMPRESSION) +find_package(Crow CONFIG REQUIRED) +target_link_libraries(OdbDesignServer PRIVATE Crow::Crow) +# TODO: add POST_BUILD commands for Linux (dest. directory will be ${CMAKE_CURRENT_BINARY_DIR}) # copy templates directory to output directory add_custom_command( TARGET OdbDesignServer POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/OdbDesignServer/templates - ${CMAKE_CURRENT_BINARY_DIR}/templates) + #${CMAKE_CURRENT_BINARY_DIR}/templates) + ${PROJECT_BINARY_DIR}/templates) # copy designs directory to output directory add_custom_command( TARGET OdbDesignServer POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/OdbDesignServer/designs - ${CMAKE_CURRENT_BINARY_DIR}/designs) + #${CMAKE_CURRENT_BINARY_DIR}/designs) + ${PROJECT_BINARY_DIR}/designs) diff --git a/OdbDesignServer/Controllers/HelloWorldController.cpp b/OdbDesignServer/Controllers/HelloWorldController.cpp index 62785b6e..7476c9f7 100644 --- a/OdbDesignServer/Controllers/HelloWorldController.cpp +++ b/OdbDesignServer/Controllers/HelloWorldController.cpp @@ -1,24 +1,28 @@ #include "HelloWorldController.h" +#include "../OdbDesignServerApp.h" -HelloWorldController::HelloWorldController(crow::SimpleApp& crowApp) - : RouteController(crowApp) +namespace Odb::App::Server { -} + HelloWorldController::HelloWorldController(IOdbServerApp* pServerApp) + : RouteController(pServerApp) + { + } -void HelloWorldController::AddRoutes() -{ - // /helloworld - CROW_ROUTE(m_crowApp, "/helloworld")([]() { - //return "Hello world"; - auto page = crow::mustache::load_text("helloworld.html"); - return page; - }); + void HelloWorldController::register_routes() + { + // /helloworld + CROW_ROUTE(m_pServerApp->crow_app(), "/helloworld")([]() { + //return "Hello world"; + auto page = crow::mustache::load_text("helloworld.html"); + return page; + }); - // /hellodesign/ - CROW_ROUTE(m_crowApp, "/hellodesign/")([](std::string designName) { - auto page = crow::mustache::load("helloworld.html"); - crow::mustache::context ctx({ {"design", designName} }); - return page.render(ctx); - }); -} + // /hellodesign/ + CROW_ROUTE(m_pServerApp->crow_app(), "/hellodesign/")([](std::string designName) { + auto page = crow::mustache::load("helloworld.html"); + crow::mustache::context ctx({ {"design", designName} }); + return page.render(ctx); + }); + } +} \ No newline at end of file diff --git a/OdbDesignServer/Controllers/HelloWorldController.h b/OdbDesignServer/Controllers/HelloWorldController.h index 8c8c42a0..2b82cd25 100644 --- a/OdbDesignServer/Controllers/HelloWorldController.h +++ b/OdbDesignServer/Controllers/HelloWorldController.h @@ -1,14 +1,18 @@ #pragma once #include "RouteController.h" +#include "IOdbServerApp.h" +using namespace Odb::Lib; -class HelloWorldController : public RouteController +namespace Odb::App::Server { -public: - HelloWorldController(crow::SimpleApp& crowApp); - HelloWorldController(crow::SimpleApp& crowApp, const std::string& prefix); + class HelloWorldController : public RouteController + { + public: + HelloWorldController(IOdbServerApp* pServerApp); - void AddRoutes() override; + void register_routes() override; -}; + }; +} diff --git a/OdbDesignServer/Controllers/RouteController.cpp b/OdbDesignServer/Controllers/RouteController.cpp index 279112d1..181d65e1 100644 --- a/OdbDesignServer/Controllers/RouteController.cpp +++ b/OdbDesignServer/Controllers/RouteController.cpp @@ -1,8 +1,21 @@ #include "RouteController.h" +#include "crow_win.h" -RouteController::RouteController(crow::SimpleApp& crowApp) - : m_crowApp(crowApp) +namespace Odb::App::Server { - //AddRoutes(); + RouteController::RouteController(IOdbServerApp* pServerApp) + : m_pServerApp(pServerApp) + { + } + + void RouteController::register_route_handler(const std::string& route, TRouteHandlerFunction handler) + { + ////.template register_handler(m_pServerApp->crow_app(), handler); + //CROW_ROUTE(m_pServerApp->crow_app(), "/steps/edadata") + // ([&](const crow::request& req) + // { + // return handler(req); + // }); + } } diff --git a/OdbDesignServer/Controllers/RouteController.h b/OdbDesignServer/Controllers/RouteController.h index a0f0f28f..f858afb8 100644 --- a/OdbDesignServer/Controllers/RouteController.h +++ b/OdbDesignServer/Controllers/RouteController.h @@ -1,17 +1,28 @@ #pragma once #include "../OdbDesignServer.h" -#include "crow.h" +//#include "../OdbDesignServerApp.h" +#include "IOdbServerApp.h" +using namespace Odb::Lib; -class RouteController +namespace Odb::App::Server { -public: - RouteController(crow::SimpleApp& crowApp); + class RouteController + { + public: + RouteController(IOdbServerApp* pServerApp); - virtual void AddRoutes() = 0; - -protected: - crow::SimpleApp& m_crowApp; + virtual void register_routes() = 0; + + typedef std::vector> Vector; + + protected: + IOdbServerApp* m_pServerApp; + + typedef std::function TRouteHandlerFunction; + + void register_route_handler(const std::string& route, TRouteHandlerFunction handler); + }; +} -}; diff --git a/OdbDesignServer/Controllers/StepsEdaDataController.cpp b/OdbDesignServer/Controllers/StepsEdaDataController.cpp index 6c53de18..31a6f8bb 100644 --- a/OdbDesignServer/Controllers/StepsEdaDataController.cpp +++ b/OdbDesignServer/Controllers/StepsEdaDataController.cpp @@ -1,42 +1,76 @@ #include "StepsEdaDataController.h" #include "FileArchive.h" +#include "EdaDataFile.h" +#include "JsonCrowReturnable.h" +#include + +using namespace Odb::Lib; +using namespace Odb::Lib::FileModel::Design; +using namespace Utils; namespace Odb::App::Server { - - StepsEdaDataController::StepsEdaDataController(crow::SimpleApp& crowApp) - : RouteController(crowApp) + StepsEdaDataController::StepsEdaDataController(IOdbServerApp* pServerApp) + : RouteController(pServerApp) { } - void StepsEdaDataController::AddRoutes() + void StepsEdaDataController::register_routes() { // - // /steps/edadata/package_records + // /steps/edadata?design=sample_design&step=stepName // - CROW_ROUTE(m_crowApp, "/steps/edadata/package_records") - ([](const crow::request& req/*, - const crow::response resp*/) { - // /steps/edadata/package_records?design=sample_design + //app.route(url) + //app.route_dynamic(url) + + // TODO: figure out why capture here is weird (i.e. how to capture pServerApp so it can be used in the member fxn handler) + CROW_ROUTE(m_pServerApp->crow_app(), "/steps/eda_data") + ([&](const crow::request& req) + { + return this->steps_edadata_route_handler(req); + }); + + //register_route_handler("/steps/edadata/package_records", std::bind(&StepsEdaDataController::steps_edadata_route_handler, this, std::placeholders::_1)); + /*[&](const crow::request& req) + { + return steps_edadata_route_handler(req); + });*/ + } + + crow::response StepsEdaDataController::steps_edadata_route_handler(const crow::request& req) + { + auto designName = req.url_params.get("design"); + if (designName == nullptr || strlen(designName) == 0) + { + return crow::response(crow::status::BAD_REQUEST, "design name not specified"); + } - auto designName = req.url_params.get("design"); - if (designName) - { - Odb::Lib::FileModel::Design::FileArchive odbDesign(designName); - auto success = odbDesign.ParseFileModel(); - if (!success) - { - //return crow::response(crow::status::BAD_REQUEST); - //resp.end(); - } + auto stepName = req.url_params.get("step"); + if (stepName == nullptr || strlen(stepName) == 0) + { + return crow::response(crow::status::BAD_REQUEST, "step name not specified"); + } - //auto packageRecords = odbDesign.GetPackageRecords(); - //packageRecords. - } + auto pFileArchive = m_pServerApp->design_cache().GetFileArchive(designName); + if (pFileArchive == nullptr) + { + std::stringstream ss; + ss << "design: \"" << designName << "\" not found"; + return crow::response(crow::status::BAD_REQUEST, ss.str()); + } - return crow::response(crow::status::BAD_REQUEST); + auto stepsByName = pFileArchive->GetStepsByName(); + auto findIt = stepsByName.find(stepName); + if (findIt == stepsByName.end()) + { + std::stringstream ss; + ss << "step: \"" << stepName << "\" not found"; + return crow::response(crow::status::BAD_REQUEST, ss.str()); + } - }); + auto step = findIt->second; + auto edaDataFile = step->GetEdaDataFile(); + return crow::response(JsonCrowReturnable(edaDataFile)); } } diff --git a/OdbDesignServer/Controllers/StepsEdaDataController.h b/OdbDesignServer/Controllers/StepsEdaDataController.h index a5a04656..87332270 100644 --- a/OdbDesignServer/Controllers/StepsEdaDataController.h +++ b/OdbDesignServer/Controllers/StepsEdaDataController.h @@ -1,15 +1,22 @@ #pragma once #include "RouteController.h" +#include "crow_win.h" +#include "IOdbServerApp.h" +using namespace Odb::Lib; namespace Odb::App::Server { class StepsEdaDataController : public RouteController { public: - StepsEdaDataController(crow::SimpleApp& crowApp); + StepsEdaDataController(IOdbServerApp* pServerApp); + + void register_routes() override; + + private: + crow::response steps_edadata_route_handler(const crow::request& req); - void AddRoutes() override; }; } diff --git a/OdbDesignServer/OdbDesignServer.cpp b/OdbDesignServer/OdbDesignServer.cpp deleted file mode 100644 index e8b07577..00000000 --- a/OdbDesignServer/OdbDesignServer.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// OdbDesignServer.cpp : Source file for your target. -// - -#include "OdbDesignServer.h" -#include "OdbDesignServerApp.h" - - -int main(int argc, char* argv[]) -{ - return (int) Odb::App::Server::OdbDesignServerApp(argc, argv).Run(); -} \ No newline at end of file diff --git a/OdbDesignServer/OdbDesignServerApp.cpp b/OdbDesignServer/OdbDesignServerApp.cpp index cd57c06c..920c6c9e 100644 --- a/OdbDesignServer/OdbDesignServerApp.cpp +++ b/OdbDesignServer/OdbDesignServerApp.cpp @@ -1,60 +1,36 @@ #include "OdbDesignServerApp.h" #include "OdbDesign.h" #include "Controllers/HelloWorldController.h" - +#include "Controllers/StepsEdaDataController.h" namespace Odb::App::Server { - OdbDesignServerApp::OdbDesignServerApp(int argc, char* argv[]) - { - // save arguments in std::string vector - for (int i = 0; i < argc; i++) - { - m_vecArgv.push_back(argv[i]); - } + OdbDesignServerApp::OdbDesignServerApp(int argc, char* argv[]) + : OdbServerAppBase(argc, argv) + { } OdbDesignServerApp::~OdbDesignServerApp() - { - m_vecArgv.clear(); + { } Utils::ExitCode OdbDesignServerApp::Run() { - //m_crowApp.loglevel(crow::LogLevel::Debug); + // + // do any initialization here + // - // controllers/routes - HelloWorldController(m_crowApp).AddRoutes(); + return OdbServerAppBase::Run(); - // run the server - m_crowApp.port(18080).multithreaded().run(); - - return Utils::ExitCode::Success; + // + // do any cleanup here + // } - void DefineRoutes(crow::SimpleApp& app) + void OdbDesignServerApp::add_controllers() { - //app.loglevel(crow::LogLevel::Info); - - //CROW_ROUTE(app, "/helloworld")([]() { - // //return "Hello world"; - // auto page = crow::mustache::load_text("helloworld.html"); - // return page; - // }); - - //CROW_ROUTE(app, "/hellodesign/")([](std::string designName) { - // auto page = crow::mustache::load("helloworld.html"); - // crow::mustache::context ctx({ {"design", designName} }); - // return page.render(ctx); - // }); - - CROW_ROUTE(app, "/steps/edadata/package_records")([]() { - - // /steps/edadata/package_records?design=sample_design - - auto page = crow::mustache::load_text("helloworld.html"); - return page; - }); - } + m_vecControllers.push_back(std::make_shared(this)); + m_vecControllers.push_back(std::make_shared(this)); + } } \ No newline at end of file diff --git a/OdbDesignServer/OdbDesignServerApp.h b/OdbDesignServer/OdbDesignServerApp.h index d4af0be9..77499c55 100644 --- a/OdbDesignServer/OdbDesignServerApp.h +++ b/OdbDesignServer/OdbDesignServerApp.h @@ -1,27 +1,20 @@ #pragma once #include "OdbDesignServer.h" -#include "crow.h" -#include "ExitCode.h" -#include "DesignCache.h" -#include - +#include "OdbServerAppBase.h" namespace Odb::App::Server { - class OdbDesignServerApp + class OdbDesignServerApp : public OdbServerAppBase { public: OdbDesignServerApp(int argc, char* argv[]); - ~OdbDesignServerApp(); - - Utils::ExitCode Run(); - - private: - crow::SimpleApp m_crowApp; - Odb::Lib::DesignCache m_designCache; + ~OdbDesignServerApp(); + + ExitCode Run() override; - std::vector m_vecArgv; + protected: + void add_controllers() override; }; } diff --git a/OdbDesignServer/OdbServerAppBase.cpp b/OdbDesignServer/OdbServerAppBase.cpp new file mode 100644 index 00000000..1fe45e7e --- /dev/null +++ b/OdbDesignServer/OdbServerAppBase.cpp @@ -0,0 +1,40 @@ +#include "OdbServerAppBase.h" + +namespace Odb::App::Server +{ + OdbServerAppBase::OdbServerAppBase(int argc, char* argv[]) + : m_designCache("designs") + , m_commandLineArgs(argc, argv) + { + } + + OdbServerAppBase::~OdbServerAppBase() + { + m_vecControllers.clear(); + } + + Utils::ExitCode OdbServerAppBase::Run() + { + //m_crowApp.loglevel(crow::LogLevel::Debug) + m_crowApp.use_compression(crow::compression::algorithm::GZIP); + + // let subclasses add controller types + add_controllers(); + + // register all controllers' routes + register_routes(); + + // run the server + m_crowApp.port(18080).multithreaded().run(); + + return Utils::ExitCode::Success; + } + + void OdbServerAppBase::register_routes() + { + for (const auto& pController : m_vecControllers) + { + pController->register_routes(); + } + } +} \ No newline at end of file diff --git a/OdbDesignServer/OdbServerAppBase.h b/OdbDesignServer/OdbServerAppBase.h new file mode 100644 index 00000000..e7bf3566 --- /dev/null +++ b/OdbDesignServer/OdbServerAppBase.h @@ -0,0 +1,42 @@ +#pragma once + +#include "IOdbServerApp.h" +#include "crow_win.h" +#include "DesignCache.h" +#include "Logger.h" +#include "CommandLineArgs.h" +#include "Controllers/RouteController.h" + +using namespace Utils; +using namespace Odb::Lib; + +namespace Odb::App::Server +{ + class OdbServerAppBase : public IOdbServerApp + { + public: + OdbServerAppBase(int argc, char* argv[]); + virtual ~OdbServerAppBase(); + + static Logger m_logger; + + inline const CommandLineArgs& arguments() const override { return m_commandLineArgs; } + inline crow::SimpleApp& crow_app() override { return m_crowApp; } + inline DesignCache& design_cache() override { return m_designCache; } + + virtual Utils::ExitCode Run() override; + + protected: + DesignCache m_designCache; + crow::SimpleApp m_crowApp; + CommandLineArgs m_commandLineArgs; + RouteController::Vector m_vecControllers; + + // implement in subclasses to add route controllers + virtual void add_controllers() = 0; + + private: + void register_routes(); + + }; +} diff --git a/OdbDesignServer/main.cpp b/OdbDesignServer/main.cpp new file mode 100644 index 00000000..036df6da --- /dev/null +++ b/OdbDesignServer/main.cpp @@ -0,0 +1,13 @@ +// main.cpp : Source file for your target. +// + +#include "OdbDesignServer.h" +#include "OdbDesignServerApp.h" + +using namespace Odb::App::Server; + +int main(int argc, char* argv[]) +{ + OdbDesignServerApp serverApp(argc, argv); + return (int) serverApp.Run(); +} \ No newline at end of file diff --git a/README.md b/README.md index aa7d79ca..173645c2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,28 @@ # OdbDesign -A free open source cross-platform C++ library for parsing ODB++ Design archives and building net list product models exposed via a REST API, all packaged inside of a Docker image. +A free open source cross-platform C++ library for parsing ODB++ Design archives, accessing their data, and building net list product models. Exposed via a REST API and packaged inside of a Docker image. + +## Key Features + +OdbDesign ODB++ parser is differentiated from other offerings by three key features: + +1. Performance +1. Cross Platform Flexibility +1. Expertise + +### Performance + +OdbDesign is implemented in C++ and is designed and optimized to be fast. Unlike higher-level languages that use interpreters or virtual machines, that means it is compiled into native code for your machine, whether your platform is Windows, Linux, or Mac. The parser is also multi-threaded to take advantage of modern multi-core CPUs. + +### Cross-Platform Flexibility + +The library itself can run directly on all major platforms (i.e. Windows, Linux, and Mac) and also exposes a REST API so that parsed data can be accessed from any application or programming language that can connect to a REST API. The REST API and library are also exposed via a Docker image that can be run on any platform that supports Docker. + +Both options support running the parser on a different machine than the one running the application that needs the parsed data. This allows the parser to be run on a high-performance server or workstation while the application that needs the data runs on a low-power device like a Raspberry Pi, mobile device, or the web. + +### Expertise + +The maintainer has well over a decade of experience in the PCB Manufacting and hardware industry. Specifically he has worked on the development of ODB++ parsing and viewer applications for some of the established key players in the industry. Time spent working under the designer of the ODB++ specification has given him a unique perspective on the ODB++ format and how it is used in the industry. This experience is also leveraged to make the parser as fast and efficient as possible. ## Overview @@ -14,20 +36,42 @@ The diagram describes the current state of parser implementation and data availa ## Building from Source +### CMake C++ Project + +### Docker Image + ## Integration -There are two interfaces that allow use of the library in other applications. +There are four interfaces that allow use of the library in other applications. ### C++ Shared Library ### REST API +### Python Object Interface + +SWIG is used to create a Python interface to the C++ library. The interface is exposed as a Python package that can be installed using pip. Parsing is supported, but currently not all data is available to access via the Python interface. Using the Python interface for anything beyond basic parsing would require implementation of Python wrapper classes to hold the data you are interested in. A better route for Python integration is probably to use the REST API or to generate Python bindings automatically using the included Goolge Protobuf definitions. + +### Google Protobuf Protocol Buffers + +Data objects returned from the parser library support serialization to and from [Google Protobuf protocol buffers](https://protobuf.dev/). This allows the data to be easily shared with other applications and programming languages that support protocol buffers. This is a highly optimized binary encoding so it is fast and small. The protocol buffer definitions are included in the library so they can be used to generate code for other languages. + ## License This project is free and open source under the MIT [license](https://github.com/nam20485/OdbDesign/blob/c0c8b6e4b93e1c7d4d5e65c7ad25157c883f8bfb/LICENSE). ## Contact +If you are interested in using the parser in your application or code, or have any questions about it please do not hesistate to contact me. If you need support for integration of the parser into your own product and/or need its feature set extended, I am available for consulting at very reasonable fees. + +* [Email me (maintainer)](mailto:nmiller217@gmail.com?subject=OdbDesign) * [GitHub](https://github.com/nam20485/odbdesign) -* [Email Nathan (maintainer)](mailto:nmiller217@gmail.com?subject=OdbDesign) * [LinkedIn](https://www.linkedin.com/in/namiller/) + +## ODB++ + +* [ODB++ Format Home](https://odbplusplus.com/design/) +* [ODB++ Format Documentation & Resources](https://odbplusplus.com/design/our-resources/) +* [ODB++ Format Specification v8.1 update 3](https://odbplusplus.com//wp-content/uploads/sites/2/2021/02/odb_spec_user.pdf) + +_ODB++ is a registered trademark of Siemens and Mentor Graphics Corporation._ diff --git a/Utils/ArchiveExtractor.cpp b/Utils/ArchiveExtractor.cpp new file mode 100644 index 00000000..c59d19ed --- /dev/null +++ b/Utils/ArchiveExtractor.cpp @@ -0,0 +1,64 @@ +#include "ArchiveExtractor.h" +#include +#include "libarchive_extract.h" + + +namespace Utils +{ + ArchiveExtractor::ArchiveExtractor(const std::string& path) + : m_path(path) + { + } + + std::string ArchiveExtractor::GetPath() const + { + return m_path; + } + + std::string ArchiveExtractor::GetExtractedPath() const + { + return m_extractedPath; + } + + bool ArchiveExtractor::IsArchiveTypeSupported(const std::filesystem::path& file) + { + return true; + + //for (const auto& ext : SupportedExtensions) + //{ + // if (file.extension() == "."+ext) + // { + // return true; + // } + //} + + //return false; + } + + bool ArchiveExtractor::IsArchiveTypeSupported(const std::string& file) + { + return IsArchiveTypeSupported(std::filesystem::path(file)); + } + + bool ArchiveExtractor::Extract() + { + auto path = std::filesystem::path(m_path); + //auto extractionPath = path.replace_extension().string(); + auto extractionPath = path.parent_path().string(); + return Extract(extractionPath); + } + + bool ArchiveExtractor::Extract(const std::string& destinationPath) + { + if (extract(m_path.c_str(), destinationPath.c_str())) + { + std::filesystem::path p(destinationPath); + p /= std::filesystem::path(m_path).stem(); + m_extractedPath = p.string(); + + return true; + } + + return false; + } +} \ No newline at end of file diff --git a/Utils/ArchiveExtractor.h b/Utils/ArchiveExtractor.h new file mode 100644 index 00000000..0aceb526 --- /dev/null +++ b/Utils/ArchiveExtractor.h @@ -0,0 +1,32 @@ +#pragma once + +#include +#include +#include "utils_export.h" + + +namespace Utils +{ + class UTILS_EXPORT ArchiveExtractor + { + public: + ArchiveExtractor(const std::string& path); + //~ArchiveExtractor(); + + std::string GetPath() const; + std::string GetExtractedPath() const; + + static bool IsArchiveTypeSupported(const std::filesystem::path& file); + static bool IsArchiveTypeSupported(const std::string& file); + + bool Extract(); + bool Extract(const std::string& destinationPath); + + //static inline const std::string SupportedExtensions[] = { "tgz", "tar.gz", "gz", "zip" }; + + private: + std::string m_path; + std::string m_extractedPath; + + }; +} diff --git a/Utils/CMakeLists.txt b/Utils/CMakeLists.txt index 46f085b2..1daaed7b 100644 --- a/Utils/CMakeLists.txt +++ b/Utils/CMakeLists.txt @@ -1,7 +1,7 @@ # CMakeList.txt : CMake project for OdbDesignServer # -add_library(Utils SHARED "export.h" "Utils.cpp" "Utils.h" "ExitCode.h" "ThreadSafeQueue.h" "WorkQueueLoopThread.h" "Logger.h" "Logger.cpp") +add_library(Utils SHARED "utils_export.h" "ExitCode.h" "ThreadSafeQueue.h" "WorkQueueLoopThread.h" "Logger.h" "Logger.cpp" "CommandLineArgs.h" "CommandLineArgs.cpp" "bin2ascii.h" "ArchiveExtractor.cpp" "ArchiveExtractor.h" "libarchive_extract.cpp" "libarchive_extract.h" "str_trim.cpp" "str_trim.h" "IJsonable.h" "IJsonable.cpp" "CrowReturnable.h" "JsonCrowReturnable.h") # state that anybody linking to us needs to include the current source dir, # while we don't. @@ -9,3 +9,11 @@ target_include_directories(Utils INTERFACE $ $) + +# Link to LibArchive +#find_package(LibArchive REQUIRED) +#target_include_directories(OdbDesign PRIVATE ${LibArchive_INCLUDE_DIRS}) +#target_link_libraries(OdbDesign PUBLIC ${LibArchive_LIBRARIES}) + +find_package(LibArchive REQUIRED) +target_link_libraries(Utils PRIVATE LibArchive::LibArchive) # CMake >= 3.17 diff --git a/Utils/CommandLineArgs.cpp b/Utils/CommandLineArgs.cpp new file mode 100644 index 00000000..2cb9d4ce --- /dev/null +++ b/Utils/CommandLineArgs.cpp @@ -0,0 +1,19 @@ +#include "CommandLineArgs.h" + + +namespace Utils +{ + CommandLineArgs::CommandLineArgs(int argc, char* argv[]) + { + // save arguments in std::string vector + for (int i = 0; i < argc; i++) + { + m_vecArguments.push_back(argv[i]); + } + } + + CommandLineArgs::CommandLineArgs(const std::vector& vecArgv) + : m_vecArguments(vecArgv) + { + } +} \ No newline at end of file diff --git a/Utils/CommandLineArgs.h b/Utils/CommandLineArgs.h new file mode 100644 index 00000000..322d1879 --- /dev/null +++ b/Utils/CommandLineArgs.h @@ -0,0 +1,20 @@ +#pragma once + +#include +#include +#include "utils_export.h" + + +namespace Utils +{ + class UTILS_EXPORT CommandLineArgs + { + public: + CommandLineArgs(int argc, char* argv[]); + CommandLineArgs(const std::vector& vecArgv); + + protected: + std::vector m_vecArguments; + + }; +} diff --git a/Utils/CrowReturnable.h b/Utils/CrowReturnable.h new file mode 100644 index 00000000..947e9dc0 --- /dev/null +++ b/Utils/CrowReturnable.h @@ -0,0 +1,31 @@ +#pragma once + +#include "crow_win.h" + +namespace Utils +{ + template + class CrowReturnable : public crow::returnable + { + public: + CrowReturnable(const T& t, const std::string& contentType) + : crow::returnable(contentType) + , m_t(t) + {} + + protected: + const T& m_t; + + // Inherited via returnable + std::string dump() const override; + + virtual std::string to_string() const = 0; + + }; + + template + inline std::string CrowReturnable::dump() const + { + return to_string(); + } +} diff --git a/Utils/IJsonable.cpp b/Utils/IJsonable.cpp new file mode 100644 index 00000000..b9fe1d04 --- /dev/null +++ b/Utils/IJsonable.cpp @@ -0,0 +1 @@ +#include "IJsonable.h" \ No newline at end of file diff --git a/Utils/IJsonable.h b/Utils/IJsonable.h new file mode 100644 index 00000000..027205b4 --- /dev/null +++ b/Utils/IJsonable.h @@ -0,0 +1,21 @@ +#pragma once + +#include +#include "utils_export.h" + +namespace Utils +{ + class UTILS_EXPORT IJsonable + { + public: + virtual ~IJsonable() {} + + virtual std::string to_json() const = 0; + virtual void from_json(const std::string& json) = 0; + + protected: + // abstract class/interface + IJsonable() = default; + + }; +} diff --git a/Utils/JsonCrowReturnable.h b/Utils/JsonCrowReturnable.h new file mode 100644 index 00000000..4434e4ce --- /dev/null +++ b/Utils/JsonCrowReturnable.h @@ -0,0 +1,31 @@ +#pragma once + +#include "IJsonable.h" +#include "CrowReturnable.h" + +namespace Utils +{ + template + class JsonCrowReturnable : public Utils::CrowReturnable + { + public: + JsonCrowReturnable(const TJsonable& odbObject) + : Utils::CrowReturnable(odbObject, CONTENT_TYPE) + {} + + inline static const std::string CONTENT_TYPE = "application/json"; + + protected: + std::string to_string() const override; + + // TJsonable MUST derive from IJsonConvertable (must use this until template type contraints support is added) + static_assert(std::is_base_of::value, "template parameter type TJsonable must derive from IJsonConvertable interface class"); + + }; + + template + inline std::string JsonCrowReturnable::to_string() const + { + return this->m_t.to_json(); + } +} diff --git a/Utils/Logger.cpp b/Utils/Logger.cpp index 1a69f1dc..dcead657 100644 --- a/Utils/Logger.cpp +++ b/Utils/Logger.cpp @@ -4,6 +4,7 @@ namespace Utils { Logger::Logger() + : m_level(LogLevel::Info) { } diff --git a/Utils/Logger.h b/Utils/Logger.h index 83ad864b..de09923e 100644 --- a/Utils/Logger.h +++ b/Utils/Logger.h @@ -2,6 +2,7 @@ #include "WorkQueueLoopThread.h" #include +#include "utils_export.h" namespace Utils @@ -29,7 +30,7 @@ namespace Utils } }; - class Logger : public WorkQueueLoopThread + class UTILS_EXPORT Logger : public WorkQueueLoopThread { public: Logger(); diff --git a/Utils/Utils.cpp b/Utils/Utils.cpp deleted file mode 100644 index 880ef3d0..00000000 --- a/Utils/Utils.cpp +++ /dev/null @@ -1,4 +0,0 @@ -// Utils.cpp : Source file for your target. -// - -#include "Utils.h" diff --git a/Utils/Utils.h b/Utils/Utils.h deleted file mode 100644 index 3ac12db2..00000000 --- a/Utils/Utils.h +++ /dev/null @@ -1,3 +0,0 @@ -// Utils.h : Header file for your target. - -#pragma once diff --git a/Utils/WorkQueueLoopThread.h b/Utils/WorkQueueLoopThread.h index 2c01219f..97723afd 100644 --- a/Utils/WorkQueueLoopThread.h +++ b/Utils/WorkQueueLoopThread.h @@ -73,6 +73,17 @@ namespace Utils while (!_stopProcessingWorkItemsFlag.load()) { auto wait_result = _workItemQueue.wait(/*std::chrono::milliseconds(1)*/); + switch (wait_result) + { + case ThreadSafeQueue::wait_result::timed_out: + break; + case ThreadSafeQueue::wait_result::interrupted: + break; + case ThreadSafeQueue::wait_result::notified: + break; + default: + break; + } while (!_workItemQueue.empty()) { diff --git a/Utils/bin2ascii.h b/Utils/bin2ascii.h new file mode 100644 index 00000000..cc1692b8 --- /dev/null +++ b/Utils/bin2ascii.h @@ -0,0 +1,131 @@ +#pragma once + +#include +#include +#include "export.h" + + +// adapted from https://github.com/yinqiwen/pbjson/blob/5cb78413cb4d223e26a8c89d424b8c0623b79832/src/bin2ascii.h + +namespace Utils +{ + inline UTILS_EXPORT std::string hex2bin(const std::string& s) + { + if (s.size() % 2) + throw std::runtime_error("Odd hex data size"); + static const char lookup[] = "" + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0x00 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0x10 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0x20 + "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x80\x80\x80\x80\x80\x80" // 0x30 + "\x80\x0a\x0b\x0c\x0d\x0e\x0f\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0x40 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0x50 + "\x80\x0a\x0b\x0c\x0d\x0e\x0f\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0x60 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0x70 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0x80 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0x90 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0xa0 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0xb0 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0xc0 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0xd0 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0xe0 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0xf0 + ""; + std::string r; + r.reserve(s.size() / 2); + for (size_t i = 0; i < s.size(); i += 2) { + char hi = lookup[static_cast(s[i])]; + char lo = lookup[static_cast(s[i + 1])]; + if (0x80 & (hi | lo)) + throw std::runtime_error("Invalid hex data: " + s.substr(i, 6)); + r.push_back((hi << 4) | lo); + } + return r; + } + + inline UTILS_EXPORT std::string bin2hex(const std::string& s) + { + static const char lookup[] = "0123456789abcdef"; + std::string r; + r.reserve(s.size() * 2); + for (size_t i = 0; i < s.size(); i++) { + unsigned char hi = s[i] >> 4; + unsigned char lo = s[i] & 0xf; + r.push_back(lookup[hi]); + r.push_back(lookup[lo]); + } + return r; + } + + inline UTILS_EXPORT std::string b64_encode(const std::string& s) + { + typedef unsigned char u1; + static const char lookup[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + const u1* data = (const u1*)s.c_str(); + std::string r; + r.reserve(s.size() * 4 / 3 + 3); + for (size_t i = 0; i < s.size(); i += 3) { + unsigned n = data[i] << 16; + if (i + 1 < s.size()) n |= data[i + 1] << 8; + if (i + 2 < s.size()) n |= data[i + 2]; + + u1 n0 = (u1)(n >> 18) & 0x3f; + u1 n1 = (u1)(n >> 12) & 0x3f; + u1 n2 = (u1)(n >> 6) & 0x3f; + u1 n3 = (u1)(n) & 0x3f; + + r.push_back(lookup[n0]); + r.push_back(lookup[n1]); + if (i + 1 < s.size()) r.push_back(lookup[n2]); + if (i + 2 < s.size()) r.push_back(lookup[n3]); + } + for (size_t i = 0; i < (3 - s.size() % 3) % 3; i++) + r.push_back('='); + return r; + } + + inline UTILS_EXPORT std::string b64_decode(const std::string& s) + { + typedef unsigned char u1; + static const char lookup[] = "" + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0x00 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0x10 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x3e\x80\x80\x80\x3f" // 0x20 + "\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x80\x80\x80\x00\x80\x80" // 0x30 + "\x80\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e" // 0x40 + "\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x80\x80\x80\x80\x80" // 0x50 + "\x80\x1a\x1b\x1c\x1d\x1e\x1f\x20\x21\x22\x23\x24\x25\x26\x27\x28" // 0x60 + "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x80\x80\x80\x80\x80" // 0x70 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0x80 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0x90 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0xa0 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0xb0 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0xc0 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0xd0 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0xe0 + "\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80" // 0xf0 + ""; + std::string r; + if (!s.size()) return r; + if (s.size() % 4) + throw std::runtime_error("Invalid base64 data size"); + size_t pad = 0; + if (s[s.size() - 1] == '=') pad++; + if (s[s.size() - 2] == '=') pad++; + + r.reserve(s.size() * 3 / 4 + 3); + for (size_t i = 0; i < s.size(); i += 4) { + u1 n0 = lookup[(u1)s[i + 0]]; + u1 n1 = lookup[(u1)s[i + 1]]; + u1 n2 = lookup[(u1)s[i + 2]]; + u1 n3 = lookup[(u1)s[i + 3]]; + if (0x80 & (n0 | n1 | n2 | n3)) + throw std::runtime_error("Invalid hex data: " + s.substr(i, 4)); + unsigned n = (n0 << 18) | (n1 << 12) | (n2 << 6) | n3; + r.push_back((n >> 16) & 0xff); + if (s[i + 2] != '=') r.push_back((n >> 8) & 0xff); + if (s[i + 3] != '=') r.push_back((n) & 0xff); + } + return r; + } +} \ No newline at end of file diff --git a/Utils/libarchive_extract.cpp b/Utils/libarchive_extract.cpp new file mode 100644 index 00000000..42898e0e --- /dev/null +++ b/Utils/libarchive_extract.cpp @@ -0,0 +1,116 @@ +#include "libarchive_extract.h" +#include +#include +#include +#include + + +// from: https://github.com/libarchive/libarchive/wiki/Examples#user-content-A_Complete_Extractor + +namespace Utils +{ + int copy_data(struct archive* ar, struct archive* aw); + + const bool SECURE_EXTRACTION = true; + + bool extract(const char* filename, const char* destDir) + { + struct archive* a; + struct archive* ext; + struct archive_entry* entry; + int flags; + int r; + + /* Select which attributes we want to restore. */ + flags = ARCHIVE_EXTRACT_TIME; + flags |= ARCHIVE_EXTRACT_PERM; + flags |= ARCHIVE_EXTRACT_ACL; + flags |= ARCHIVE_EXTRACT_FFLAGS; + + if (SECURE_EXTRACTION) + { + flags |= ARCHIVE_EXTRACT_SECURE_SYMLINKS; + flags |= ARCHIVE_EXTRACT_SECURE_NODOTDOT; + flags |= ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS; + } + + a = archive_read_new(); + archive_read_support_format_all(a); + archive_read_support_filter_all(a); + //archive_read_support_format_tar(a); + //archive_read_support_filter_gzip(a); + ext = archive_write_disk_new(); + archive_write_disk_set_options(ext, flags); + archive_write_disk_set_standard_lookup(ext); + r = archive_read_open_filename(a, filename, 1024 * 10); + if (r) + { + return false; + } + + for (;;) { + r = archive_read_next_header(a, &entry); + if (r == ARCHIVE_EOF) + break; + if (r < ARCHIVE_OK) + fprintf(stderr, "%s\n", archive_error_string(a)); + if (r < ARCHIVE_WARN) + { + return false; + } + + // prepend destPath to beginning of entry to extract it in the destination path + auto entryPathname = archive_entry_pathname(entry); + std::filesystem::path entryDestinationPathname(destDir); + entryDestinationPathname /= entryPathname; + archive_entry_set_pathname(entry, entryDestinationPathname.string().c_str()); + + r = archive_write_header(ext, entry); + if (r < ARCHIVE_OK) + fprintf(stderr, "%s\n", archive_error_string(ext)); + else if (archive_entry_size(entry) > 0) { + r = copy_data(a, ext); + if (r < ARCHIVE_OK) + fprintf(stderr, "%s\n", archive_error_string(ext)); + if (r < ARCHIVE_WARN) + { + return false; + } + } + r = archive_write_finish_entry(ext); + if (r < ARCHIVE_OK) + fprintf(stderr, "%s\n", archive_error_string(ext)); + if (r < ARCHIVE_WARN) + { + return false; + } + } + archive_read_close(a); + archive_read_free(a); + archive_write_close(ext); + archive_write_free(ext); + + return true; + } + + int copy_data(struct archive* ar, struct archive* aw) + { + int r; + const void* buff; + size_t size; + la_int64_t offset; + + for (;;) { + r = archive_read_data_block(ar, &buff, &size, &offset); + if (r == ARCHIVE_EOF) + return (ARCHIVE_OK); + if (r < ARCHIVE_OK) + return (r); + r = archive_write_data_block(aw, buff, size, offset); + if (r < ARCHIVE_OK) { + fprintf(stderr, "%s\n", archive_error_string(aw)); + return (r); + } + } + } +} \ No newline at end of file diff --git a/Utils/libarchive_extract.h b/Utils/libarchive_extract.h new file mode 100644 index 00000000..f5f8b2f8 --- /dev/null +++ b/Utils/libarchive_extract.h @@ -0,0 +1,6 @@ +#pragma once + +namespace Utils +{ + bool extract(const char* filename, const char* destDir); +} diff --git a/OdbDesignLib/macros.h b/Utils/macros.h similarity index 100% rename from OdbDesignLib/macros.h rename to Utils/macros.h diff --git a/OdbDesignLib/string_trim.cpp b/Utils/str_trim.cpp similarity index 64% rename from OdbDesignLib/string_trim.cpp rename to Utils/str_trim.cpp index 9d228981..c20c6e59 100644 --- a/OdbDesignLib/string_trim.cpp +++ b/Utils/str_trim.cpp @@ -1,13 +1,13 @@ -#include "string_trim.h" +#include "str_trim.h" #include #include #include -namespace Odb::Lib +namespace Utils { // trim from start (in place) - std::string& ltrim(std::string& s) + std::string& str_ltrim(std::string& s) { auto it = std::find_if(s.begin(), s.end(), [](char c) { @@ -18,7 +18,7 @@ namespace Odb::Lib } // trim from end (in place) - std::string& rtrim(std::string& s) + std::string& str_rtrim(std::string& s) { auto it = std::find_if(s.rbegin(), s.rend(), [](char c) { @@ -29,29 +29,29 @@ namespace Odb::Lib } // trim from both ends (in place) - std::string& trim(std::string& s) + std::string& str_trim(std::string& s) { - return ltrim(rtrim(s)); + return str_ltrim(str_rtrim(s)); } // trim from start (copying) - std::string ltrim_copy(std::string s) + std::string str_ltrim_copy(std::string s) { auto copy(s); - return ltrim(copy); + return str_ltrim(copy); } // trim from end (copying) - std::string rtrim_copy(std::string s) + std::string str_rtrim_copy(std::string s) { auto copy(s); - return rtrim(copy); + return str_rtrim(copy); } // trim from both ends (copying) - std::string trim_copy(std::string s) + std::string str_trim_copy(std::string s) { auto copy(s); - return trim(copy); + return str_trim(copy); } } diff --git a/Utils/str_trim.h b/Utils/str_trim.h new file mode 100644 index 00000000..b85f4809 --- /dev/null +++ b/Utils/str_trim.h @@ -0,0 +1,22 @@ +#pragma once + +#include +#include "utils_export.h" + + +namespace Utils +{ + // trim from start (in place) + UTILS_EXPORT std::string& str_ltrim(std::string& s); + // trim from end (in place) + UTILS_EXPORT std::string& str_rtrim(std::string& s); + // trim from both ends (in place) + UTILS_EXPORT std::string& str_trim(std::string& s); + + // trim from start (copying) + UTILS_EXPORT std::string str_ltrim_copy(std::string s); + // trim from end (copying) + UTILS_EXPORT std::string str_rtrim_copy(std::string s); + // trim from both ends (copying) + UTILS_EXPORT std::string str_trim_copy(std::string s); +} \ No newline at end of file diff --git a/Utils/export.h b/Utils/utils_export.h similarity index 57% rename from Utils/export.h rename to Utils/utils_export.h index 2f93034a..6c0051b9 100644 --- a/Utils/export.h +++ b/Utils/utils_export.h @@ -1,12 +1,12 @@ #if defined(_WIN32) # if defined(Utils_EXPORTS) -# define DECLSPEC __declspec(dllexport) +# define UTILS_EXPORT __declspec(dllexport) # define EXPIMP_TEMPLATE # else -# define DECLSPEC __declspec(dllimport) +# define UTILS_EXPORT __declspec(dllimport) # //define EXPIMP_TEMPLATE extern # endif #else // non windows -# define DECLSPEC +# define UTILS_EXPORT #endif diff --git a/scripts/compile-protobuf.ps1 b/scripts/compile-protobuf.ps1 new file mode 100644 index 00000000..e053e9db --- /dev/null +++ b/scripts/compile-protobuf.ps1 @@ -0,0 +1,3 @@ +$PROTOC = 'C:\Source\github\nam20485\OdbDesign\out\build\x64-debug\vcpkg_installed\x64-windows\tools\protobuf\protoc' + +. $PROTOC --cpp_out=../proto *.proto diff --git a/vcpkg.json b/vcpkg.json index d24a8ae1..a68e4755 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,6 +1,13 @@ { "dependencies": [ "libarchive", - "crow" + "zlib", + "crow", + { + "name": "protobuf", + "features": [ + "zlib" + ] + } ] }