11#include "../FileModel/Design/FileArchive.h"
12#include "../FileModel/Design/EdaDataFile.h"
13#include "../Text/Utf8Sanitizer.h"
25 m_componentsByName.clear();
29 m_packagesByName.clear();
31 m_partsByName.clear();
41 return m_productModel;
61 return m_packagesByName;
71 return m_componentsByName;
76 auto findIt = m_componentsByName.find(refDes);
77 if (findIt != m_componentsByName.end())
79 return findIt->second;
97 auto findIt = m_netsByName.find(name);
98 if (findIt != m_netsByName.end())
100 return findIt->second;
107 return GetNet(NONE_NET_NAME);
112 auto pFileModel = std::make_shared<FileModel::Design::FileArchive>(path);
113 if (pFileModel->ParseFileModel())
115 return Build(pFileModel);
120 bool Design::Build(std::shared_ptr<FileModel::Design::FileArchive> pFileModel)
122 if (pFileModel ==
nullptr)
return false;
124 m_pFileModel = pFileModel;
130 if (! BuildNets())
return false;
131 if (! BuildPackages())
return false;
132 if (! BuildAllParts())
return false;
133 if (! BuildAllComponents())
return false;
136 if (! BuildPlacementsFromComponentsFiles())
return false;
142 if (CLIP_FILEMODEL_AFTER_BUILD)
157 m_pFileModel =
nullptr;
168 std::unique_ptr<Odb::Lib::Protobuf::ProductModel::Design>
Design::to_protobuf(
bool includeNormalizedLists)
const
170 auto pDesignMsg = std::make_unique<Odb::Lib::Protobuf::ProductModel::Design>();
174 if (m_pFileModel !=
nullptr)
176 pDesignMsg->mutable_filemodel()->CopyFrom(*m_pFileModel->to_protobuf());
179 if (includeNormalizedLists)
181 for (
const auto& pNet : m_nets)
183 pDesignMsg->add_nets()->CopyFrom(*pNet->to_protobuf());
188 for (
const auto& pPackage : m_packages)
190 pDesignMsg->add_packages()->CopyFrom(*pPackage->to_protobuf());
195 for (
const auto& pComponent : m_components)
197 pDesignMsg->add_components()->CopyFrom(*pComponent->to_protobuf());
202 for (
const auto& pPart : m_parts)
204 pDesignMsg->add_parts()->CopyFrom(*pPart->to_protobuf());
213 FillConnectivityMessage(pDesignMsg->mutable_connectivity());
223 void Design::FillConnectivityMessage(Protobuf::ProductModel::Connectivity* pConnectivityMsg)
const
242 for (
const auto& pNet : m_nets)
244 if (!index.
hasNoneNet && pNet->GetName() == NONE_NET_NAME)
254 for (
const auto& pNet : m_nets)
261 for (
const auto& pPinConnection : pNet->GetPinConnections())
263 const auto& pComponent = pPinConnection->GetComponent();
264 const auto& pPin = pPinConnection->GetPin();
265 if (pComponent ==
nullptr || pPin ==
nullptr)
continue;
267 index.
edgesByRefDes[pComponent->GetRefDes()][pPin->GetIndex()] =
277 for (
const auto& pinAndEdge : refDesAndPins.second)
279 index.
membersByNet[pinAndEdge.second.net][refDesAndPins.first].push_back(pinAndEdge.first);
287 for (std::size_t netIndex = 0; netIndex < m_nets.size(); ++netIndex)
295 for (std::size_t packageIndex = 0; packageIndex < m_packages.size(); ++packageIndex)
311 for (std::size_t componentIndex = 0; componentIndex < m_components.size(); ++componentIndex)
323 const auto& pNet = m_nets[netIndex];
324 auto pNetEntryMsg = connectivityMsg.add_nets();
325 pNetEntryMsg->set_ordinal(pNet->GetIndex());
334 const auto& pPackage = m_packages[packageIndex];
335 auto pPackagePinsMsg = connectivityMsg.add_packages();
337 for (
const auto& pPin : pPackage->GetPins())
339 auto pPackagePinMsg = pPackagePinsMsg->add_pins();
340 pPackagePinMsg->set_number(pPin->GetIndex());
347 auto pNetMembersMsg = connectivityMsg.add_netmembers();
348 pNetMembersMsg->set_net(netMembersIt->first);
349 for (
const auto& refDesAndPins : netMembersIt->second)
351 auto pMemberMsg = pNetMembersMsg->add_members();
353 for (
const auto pinNumber : refDesAndPins.second)
355 pMemberMsg->add_pin(pinNumber);
362 using ConnectivityMsg = Protobuf::ProductModel::Connectivity;
368 const auto& pComponent = m_components[componentIndex];
369 auto pPlacedComponentMsg = connectivityMsg.add_components();
371 const auto id = pComponent->GetId();
374 pPlacedComponentMsg->set_id(*
id);
376 pPlacedComponentMsg->set_side(
static_cast<Odb::Lib::Protobuf::BoardSide
>(pComponent->GetSide()));
378 const auto& pPackage = pComponent->GetPackage();
379 if (pPackage ==
nullptr)
return;
382 const auto findEdgesIt = index.
edgesByRefDes.find(pComponent->GetRefDes());
383 for (
const auto& pPin : pPackage->GetPins())
385 auto pComponentPinMsg = pPlacedComponentMsg->add_pins();
386 pComponentPinMsg->set_number(pPin->GetIndex());
389 auto pConnectionMsg = pComponentPinMsg->mutable_connection();
392 const auto findEdgeIt = findEdgesIt->second.find(pPin->GetIndex());
393 if (findEdgeIt != findEdgesIt->second.end())
395 pConnectionMsg->set_kind(ConnectivityMsg::Connection::CONNECTED);
396 pConnectionMsg->set_net(findEdgeIt->second.net);
397 pConnectionMsg->add_subnets(findEdgeIt->second.subnet);
401 pConnectionMsg->set_kind(ConnectivityMsg::Connection::UNCONNECTED);
407 m_name = message.name();
408 m_productModel = message.productmodel();
410 m_pFileModel = std::make_shared<FileModel::Design::FileArchive>();
411 m_pFileModel->from_protobuf(message.filemodel());
413 for (
const auto& pNetMsg : message.nets())
415 auto pNet = std::make_shared<Net>(
"", -1);
416 pNet->from_protobuf(pNetMsg);
417 m_nets.push_back(pNet);
420 for (
const auto& kvNetMsg : message.netsbyname())
422 auto pNet = std::make_shared<Net>(
"", -1);
423 pNet->from_protobuf(kvNetMsg.second);
424 m_netsByName[kvNetMsg.first] = pNet;
427 for (
const auto& pPackageMsg : message.packages())
429 auto pPackage = std::make_shared<Package>(
"", -1);
430 pPackage->from_protobuf(pPackageMsg);
431 m_packages.push_back(pPackage);
434 for (
const auto& kvPackageMsg : message.packagesbyname())
436 auto pPackage = std::make_shared<Package>(
"", -1);
437 pPackage->from_protobuf(kvPackageMsg.second);
438 m_packagesByName[kvPackageMsg.first] = pPackage;
441 for (
const auto& pComponentMsg : message.components())
443 auto pComponent = std::make_shared<Component>(
"",
"",
nullptr, -1,
BoardSide::BsNone,
nullptr);
444 pComponent->from_protobuf(pComponentMsg);
445 m_components.push_back(pComponent);
448 for (
const auto& kvComponentMsg : message.componentsbyname())
450 auto pComponent = std::make_shared<Component>(
"",
"",
nullptr, -1,
BoardSide::BsNone,
nullptr);
451 pComponent->from_protobuf(kvComponentMsg.second);
452 m_componentsByName[kvComponentMsg.first] = pComponent;
455 for (
const auto& pPartMsg : message.parts())
457 auto pPart = std::make_shared<Part>(
"");
458 pPart->from_protobuf(pPartMsg);
459 m_parts.push_back(pPart);
462 for (
const auto& kvPartMsg : message.partsbyname())
464 auto pPart = std::make_shared<Part>(
"");
465 pPart->from_protobuf(kvPartMsg.second);
466 m_partsByName[kvPartMsg.first] = pPart;
493 constexpr std::uint64_t FEATURE_RECORD_WIRE_BYTES = 128;
494 constexpr std::uint64_t COMPONENT_WIRE_BYTES = 768;
495 constexpr std::uint64_t NET_WIRE_BYTES = 128;
496 constexpr std::uint64_t PACKAGE_WIRE_BYTES = 256;
499 constexpr std::uint64_t FEATURE_ID_RECORD_WIRE_BYTES = 16;
502 constexpr std::uint64_t NETLIST_NET_WIRE_BYTES = 64;
503 constexpr std::uint64_t NETLIST_POINT_WIRE_BYTES = 64;
506 constexpr std::uint64_t ATTRIBUTE_ENTRY_WIRE_BYTES = 64;
508 constexpr std::uint64_t PROPERTY_RECORD_WIRE_BYTES = 64;
510 constexpr std::uint64_t TOOL_RECORD_WIRE_BYTES = 64;
513 constexpr std::uint64_t PART_WIRE_BYTES = 128;
517 constexpr std::uint64_t MISC_DESIGN_ALLOWANCE_BYTES = 256 * 1024;
518 constexpr std::uint64_t MISC_STEP_ALLOWANCE_BYTES = 64 * 1024;
520 std::uint64_t featureCount = 0;
521 std::uint64_t componentCount = 0;
522 std::uint64_t netCount = 0;
523 std::uint64_t packageCount = 0;
524 std::uint64_t featureIdCount = 0;
525 std::uint64_t netlistNetCount = 0;
526 std::uint64_t netlistPointCount = 0;
527 std::uint64_t attributeEntryCount = 0;
528 std::uint64_t propertyRecordCount = 0;
529 std::uint64_t toolCount = 0;
530 std::uint64_t stepCount = 0;
532 if (m_pFileModel !=
nullptr)
534 attributeEntryCount += m_pFileModel->GetMiscAttrListFile().GetAttributes().size();
536 for (
const auto& kvSymbolsDirectory : m_pFileModel->GetSymbolsDirectoriesByName())
538 const auto& pSymbolsDirectory = kvSymbolsDirectory.second;
539 featureCount += pSymbolsDirectory->GetFeaturesFile().GetFeatureRecords().size();
540 attributeEntryCount += pSymbolsDirectory->GetAttrListFile().GetAttributes().size();
543 for (
const auto& kvStep : m_pFileModel->GetStepsByName())
545 const auto& pStep = kvStep.second;
547 featureCount += pStep->GetProfileFile().GetFeatureRecords().size();
548 attributeEntryCount += pStep->GetAttrListFile().GetAttributes().size();
550 const auto& edaDataFile = pStep->GetEdaDataFile();
551 netCount += edaDataFile.GetNetRecords().size();
552 packageCount += edaDataFile.GetPackageRecords().size();
553 attributeEntryCount += edaDataFile.GetLayerNames().size()
554 + edaDataFile.GetAttributeNames().size()
555 + edaDataFile.GetAttributeTextValues().size();
556 propertyRecordCount += edaDataFile.GetPropertyRecords().size()
557 + edaDataFile.GetFeatureGroupRecords().size();
558 for (
const auto& pNetRecord : edaDataFile.GetNetRecords())
560 for (
const auto& pSubnetRecord : pNetRecord->m_subnetRecords)
562 featureIdCount += pSubnetRecord->m_featureIdRecords.size();
564 attributeEntryCount += pNetRecord->GetAttributeLookupTable().size();
566 for (
const auto& pPackageRecord : edaDataFile.GetPackageRecords())
568 attributeEntryCount += pPackageRecord->GetAttributeLookupTable().size();
571 for (
const auto& kvNetlist : pStep->GetNetlistsByName())
573 netlistNetCount += kvNetlist.second->GetNetRecords().size();
574 netlistPointCount += kvNetlist.second->GetNetPointRecords().size();
577 for (
const auto& kvLayer : pStep->GetLayersByName())
579 const auto& pLayer = kvLayer.second;
580 featureCount += pLayer->GetFeaturesFile().GetFeatureRecords().size();
581 componentCount += pLayer->GetComponentsFile().GetComponentRecords().size();
582 attributeEntryCount += pLayer->GetAttrListFile().GetAttributes().size();
583 toolCount += pLayer->GetToolsFile().GetTools().size();
588 auto estimate = featureCount * FEATURE_RECORD_WIRE_BYTES
589 + componentCount * COMPONENT_WIRE_BYTES
590 + netCount * NET_WIRE_BYTES
591 + packageCount * PACKAGE_WIRE_BYTES
592 + featureIdCount * FEATURE_ID_RECORD_WIRE_BYTES
593 + netlistNetCount * NETLIST_NET_WIRE_BYTES
594 + netlistPointCount * NETLIST_POINT_WIRE_BYTES
595 + attributeEntryCount * ATTRIBUTE_ENTRY_WIRE_BYTES
596 + propertyRecordCount * PROPERTY_RECORD_WIRE_BYTES
597 + toolCount * TOOL_RECORD_WIRE_BYTES
598 + MISC_DESIGN_ALLOWANCE_BYTES + stepCount * MISC_STEP_ALLOWANCE_BYTES;
600 if (includeNormalizedLists)
605 estimate += netCount * NET_WIRE_BYTES
606 + componentCount * COMPONENT_WIRE_BYTES
607 + packageCount * PACKAGE_WIRE_BYTES
608 + m_parts.size() * PART_WIRE_BYTES;
614 bool Design::BuildAllComponents()
616 if (m_pFileModel ==
nullptr)
return false;
617 const auto& steps = m_pFileModel->GetStepsByName();
618 if (steps.empty())
return false;
619 auto& pStepDirectory = steps.begin()->second;
622 auto pTopComponentsFile = pStepDirectory->GetTopComponentsFile();
623 if (pTopComponentsFile ==
nullptr)
return false;
624 if (! BuildComponents(pTopComponentsFile))
return false;
627 auto pBottomComponentsFile = pStepDirectory->GetBottomComponentsFile();
628 if (pBottomComponentsFile ==
nullptr)
return false;
629 if (!BuildComponents(pBottomComponentsFile))
return false;
637 for (
const auto& pComponentRecord : componentRecords)
639 auto& pPackage = m_packages[pComponentRecord->pkgRef];
640 auto index = pComponentRecord->index;
641 auto& pPart = m_partsByName[pComponentRecord->partName];
642 auto pComponent = std::make_shared<Component>(pComponentRecord->compName, pComponentRecord->partName, pPackage, index, pComponentsFile->
GetSide(), pPart, pComponentRecord->id);
644 m_components.push_back(pComponent);
645 m_componentsByName[pComponent->GetRefDes()] = pComponent;
651 bool Design::BuildVias()
656 bool Design::BuildNets()
658 if (m_pFileModel ==
nullptr)
return false;
660 const auto& steps = m_pFileModel->GetStepsByName();
661 if (steps.empty())
return false;
663 auto& pStepDirectory = steps.begin()->second;
664 const auto& edaData = pStepDirectory->GetEdaDataFile();
665 const auto& netRecords = edaData.GetNetRecords();
667 for (
const auto& pNetRecord : netRecords)
669 auto pNet = std::make_shared<Net>(pNetRecord->name, pNetRecord->index);
670 m_nets.push_back(pNet);
671 m_netsByName[pNet->GetName()] = pNet;
677 bool Design::BuildPackages()
679 if (m_pFileModel ==
nullptr)
return false;
681 const auto& steps = m_pFileModel->GetStepsByName();
682 if (steps.empty())
return false;
684 auto& pStepDirectory = steps.begin()->second;
685 const auto& edaData = pStepDirectory->GetEdaDataFile();
686 const auto& packageRecords = edaData.GetPackageRecords();
688 for (
const auto& pPackageRecord : packageRecords)
690 auto index = pPackageRecord->index;
691 auto pPackage = std::make_shared<Package>(pPackageRecord->name, index);
693 for (
const auto& pPinRecord : pPackageRecord->m_pinRecords)
696 pPackage->AddPin(pPinRecord->name);
699 m_packages.push_back(pPackage);
700 m_packagesByName[pPackage->GetName()] = pPackage;
706 bool Design::BuildAllParts()
708 if (m_pFileModel ==
nullptr)
return false;
710 const auto& steps = m_pFileModel->GetStepsByName();
711 if (steps.empty())
return false;
713 auto& pStepDirectory = steps.begin()->second;
715 auto pTopComponentsFile = pStepDirectory->GetTopComponentsFile();
716 if (pTopComponentsFile ==
nullptr)
return false;
717 if (! BuildParts(pTopComponentsFile))
return false;
719 auto pBottomComponentsFile = pStepDirectory->GetBottomComponentsFile();
720 if (pBottomComponentsFile ==
nullptr)
return false;
721 if (! BuildParts(pBottomComponentsFile))
return false;
729 for (
const auto& pComponentRecord : componentRecords)
731 auto& partName = pComponentRecord->partName;
732 auto findIt = m_partsByName.find(partName);
733 if (findIt == m_partsByName.end())
735 auto pPart = std::make_shared<Part>(partName);
736 m_parts.push_back(pPart);
737 m_partsByName[partName] = pPart;
744 bool Design::BuildPlacementsFromComponentsFiles()
746 if (m_pFileModel ==
nullptr)
return false;
748 const auto& steps = m_pFileModel->GetStepsByName();
749 if (steps.empty())
return false;
752 auto& pStepDirectory = steps.begin()->second;
754 auto pTopComponentsFile = pStepDirectory->GetTopComponentsFile();
755 if (pTopComponentsFile ==
nullptr)
return false;
756 if (! BuildPlacementsFromComponentsFile(pTopComponentsFile))
return false;
758 auto pBottomComponentsFile = pStepDirectory->GetBottomComponentsFile();
759 if (pBottomComponentsFile ==
nullptr)
return false;
760 if (!BuildPlacementsFromComponentsFile(pBottomComponentsFile))
return false;
768 for (
const auto& pComponentRecord : componentRecords)
770 const auto& toeprintRecords = pComponentRecord->m_toeprintRecords;
771 for (
const auto& pToeprintRecord : toeprintRecords)
773 auto& toeprintName = pToeprintRecord->name;
774 auto pinNumber = pToeprintRecord->pinNumber;
775 auto netNumber = pToeprintRecord->netNumber;
776 auto subnetNumber = pToeprintRecord->subnetNumber;
777 auto& refDes = pComponentRecord->compName;
780 if (netNumber !=
static_cast<unsigned int>(-1))
782 if (!CreatePinConnection(refDes, netNumber, pinNumber, toeprintName, subnetNumber))
return false;
790 bool Design::CreatePinConnection(
const std::string& refDes,
unsigned int netNumber,
unsigned int pinNumber,
const std::string& pinName,
unsigned int subnetNumber)
792 if (netNumber < m_nets.size())
794 auto& pComponent = m_componentsByName[refDes];
795 if (pComponent ==
nullptr)
return false;
797 auto pPin = pComponent->GetPackage()->GetPin(pinNumber);
798 if (pPin ==
nullptr)
return false;
800 auto& pNet = m_nets[netNumber];
801 if (pNet ==
nullptr)
return false;
803 if (!pNet->AddPinConnection(pComponent, pPin, subnetNumber))
return false;
808 logwarn(
"netNumber out of range: " + std::to_string(netNumber) +
", size = " + std::to_string(m_nets.size()));
814 bool Design::BuildNoneNet()
816 auto pStepDirectory = m_pFileModel->GetStepDirectory();
817 if (pStepDirectory ==
nullptr)
return false;
819 const auto& edaData = pStepDirectory->GetEdaDataFile();
820 auto findIt = edaData.GetNetRecordsByName().find(NONE_NET_NAME);
821 if (findIt == edaData.GetNetRecordsByName().end())
return false;
823 auto& pNoneNet = findIt->second;
824 if (pNoneNet ==
nullptr)
return false;
826 if (!CreateNetConnections(pNoneNet, pStepDirectory))
return false;
831 bool Design::BreakSinglePinNets()
834 if (pNoneNet ==
nullptr)
return false;
836 auto& pinConnections = pNoneNet->GetPinConnections();
837 while (!pinConnections.empty())
839 const auto& pExistingPinConnection = pinConnections.back();
841 std::string newNetName =
"$NC_" + pExistingPinConnection->GetComponent()->GetRefDes() +
"_" + pExistingPinConnection->GetPin()->GetName();
842 auto pNewNet = std::make_shared<Net>(newNetName, -1);
843 pNewNet->AddPinConnection(pExistingPinConnection->GetComponent(), pExistingPinConnection->GetPin());
844 m_nets.push_back(pNewNet);
845 m_netsByName[pNewNet->GetName()] = pNewNet;
847 pinConnections.pop_back();
854 bool Design::CreateNetConnections(
const std::shared_ptr<Odb::Lib::FileModel::Design::EdaDataFile::NetRecord>& pNetRecord,
const std::shared_ptr<FileModel::Design::StepDirectory>& pStepDirectory)
856 for (
const auto& pSubnetRecord : pNetRecord->m_subnetRecords)
860 const FileModel::Design::ComponentsFile* pComponentsFileToUse =
nullptr;
862 auto side = pSubnetRecord->side;
865 pComponentsFileToUse = pStepDirectory->GetTopComponentsFile();
869 pComponentsFileToUse = pStepDirectory->GetBottomComponentsFile();
872 if (pComponentsFileToUse ==
nullptr)
return false;
874 auto componentNumber = pSubnetRecord->componentNumber;
875 if (componentNumber >= pComponentsFileToUse->GetComponentRecords().size())
return false;
877 auto& pComponentRecord = pComponentsFileToUse->GetComponentRecords()[componentNumber];
878 if (pComponentRecord ==
nullptr)
return false;
880 auto toeprintNumber = pSubnetRecord->toeprintNumber;
881 if (toeprintNumber >= pComponentRecord->m_toeprintRecords.size())
return false;
883 auto& pToeprintRecord = pComponentRecord->m_toeprintRecords[toeprintNumber];
884 if (pToeprintRecord ==
nullptr)
return false;
886 auto& toeprintName = pToeprintRecord->name;
887 auto pinNumber = pToeprintRecord->pinNumber;
888 auto netNumber = pToeprintRecord->netNumber;
889 auto& refDes = pComponentRecord->compName;
892 if (!CreatePinConnection(refDes, netNumber, pinNumber, toeprintName))
return false;
BoardSide GetSide() const
const ComponentRecord::Vector & GetComponentRecords() const
std::map< std::string, std::shared_ptr< Component > > StringMap
std::vector< std::shared_ptr< Component > > Vector
std::uint64_t EstimateWireSizeBytes(bool includeNormalizedLists=false) const
const Component::Vector & GetComponents() const
std::shared_ptr< Net > GetNoneNet() const
const Part::StringMap & GetPartsByName() const
std::shared_ptr< Net > GetNet(const std::string &name) const
bool Build(std::string path)
const Net::Vector & GetNets() const
void FillConnectivityPackagePins(Protobuf::ProductModel::Connectivity &connectivityMsg) const
const Package::StringMap & GetPackagesByName() const
void AddConnectivityNetEntry(std::size_t netIndex, Protobuf::ProductModel::Connectivity &connectivityMsg) const
void FillConnectivityNetEntries(Protobuf::ProductModel::Connectivity &connectivityMsg) const
const Component::StringMap & GetComponentsByName() const
ConnectivityIndex BuildConnectivityIndex() const
void AddConnectivityPackagePinEntry(std::size_t packageIndex, Protobuf::ProductModel::Connectivity &connectivityMsg) const
const Package::Vector & GetPackages() const
void FillConnectivityPlacedComponents(const ConnectivityIndex &index, Protobuf::ProductModel::Connectivity &connectivityMsg) const
void AddConnectivityNetMemberEntry(const ConnectivityIndex &index, ConnectivityIndex::MembersByNetConstIt netMembersIt, Protobuf::ProductModel::Connectivity &connectivityMsg) const
const Part::Vector & GetParts() const
std::shared_ptr< FileModel::Design::FileArchive > GetFileModel() const
const Net::StringMap GetNetsByName() const
void FillConnectivityNetMembers(const ConnectivityIndex &index, Protobuf::ProductModel::Connectivity &connectivityMsg) const
std::shared_ptr< Component > GetComponent(const std::string &refDes) const
std::unique_ptr< Protobuf::ProductModel::Design > to_protobuf() const override
const std::string & GetName() const
const std::string & GetProductModel() const
void AddConnectivityPlacedComponentEntry(const ConnectivityIndex &index, std::size_t componentIndex, Protobuf::ProductModel::Connectivity &connectivityMsg) const
void from_protobuf(const Protobuf::ProductModel::Design &message) override
std::vector< std::shared_ptr< Net > > Vector
std::map< std::string, std::shared_ptr< Net > > StringMap
std::map< std::string, std::shared_ptr< Package > > StringMap
std::vector< std::shared_ptr< Package > > Vector
std::map< std::string, std::shared_ptr< Part > > StringMap
std::vector< std::shared_ptr< Part > > Vector
void FillProtobufMapWithSanitizedKeys(TPbMap &pbMap, const TEntries &entries)
void AssertAllStringFieldsAreValidUtf8(const google::protobuf::Message &msg, std::string_view msgName)
Debug-only assertion to verify all string fields in a message are valid UTF-8.
std::string ToUtf8(std::string_view input)
Converts input to valid UTF-8.
std::map< unsigned int, std::map< std::string, std::vector< unsigned int > > >::const_iterator MembersByNetConstIt
std::map< unsigned int, std::map< std::string, std::vector< unsigned int > > > membersByNet
std::map< std::string, std::map< unsigned int, Edge > > edgesByRefDes
unsigned int noneNetOrdinal