diff --git a/OdbDesignLib/EdaDataFile.cpp b/OdbDesignLib/EdaDataFile.cpp index ffbb24e5..dcc119de 100644 --- a/OdbDesignLib/EdaDataFile.cpp +++ b/OdbDesignLib/EdaDataFile.cpp @@ -349,13 +349,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) { @@ -369,17 +369,17 @@ namespace Odb::Lib::FileModel::Design // subnet type lineStream >> token; - if (token == "VIA") + if (token == NetRecord::SubnetRecord::RECORD_TYPE_VIA_TOKEN) { pCurrentSubnetRecord = std::make_shared(); pCurrentSubnetRecord->type = NetRecord::SubnetRecord::Type::Via; } - else if (token == "TRC") + else if (token == NetRecord::SubnetRecord::RECORD_TYPE_TRACE_TOKEN) { pCurrentSubnetRecord = std::make_shared(); 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; @@ -425,7 +425,7 @@ namespace Odb::Lib::FileModel::Design // fill size lineStream >> std::dynamic_pointer_cast(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; diff --git a/OdbDesignLib/EdaDataFile.h b/OdbDesignLib/EdaDataFile.h index 864d37d7..04fb9051 100644 --- a/OdbDesignLib/EdaDataFile.h +++ b/OdbDesignLib/EdaDataFile.h @@ -82,6 +82,13 @@ namespace Odb::Lib::FileModel::Design Type type; FeatureIdRecord::Vector m_featureIdRecords; + + 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"; + }; // SubnetRecord struct DECLSPEC ToeprintSubnetRecord : public SubnetRecord, public IProtoBuffable @@ -244,7 +251,7 @@ 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 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";