Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align PortSymbol naming; Derive from StructSymbol #119

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ set(SOURCES
${LIB_SRC_DIR}/Structures/StructGraphicOleEmbedInst.cpp
${LIB_SRC_DIR}/Structures/StructGraphicPolygonInst.cpp
${LIB_SRC_DIR}/Structures/StructGraphicPolylineInst.cpp
${LIB_SRC_DIR}/Structures/StructHierarchicSymbol.cpp
${LIB_SRC_DIR}/Structures/StructLibraryPart.cpp
${LIB_SRC_DIR}/Structures/StructNetDbIdMapping.cpp
${LIB_SRC_DIR}/Structures/StructOffPageConnector.cpp
Expand All @@ -68,6 +67,7 @@ set(SOURCES
${LIB_SRC_DIR}/Structures/StructPartInst.cpp
${LIB_SRC_DIR}/Structures/StructPinShapeSymbol.cpp
${LIB_SRC_DIR}/Structures/StructPort.cpp
${LIB_SRC_DIR}/Structures/StructPortSymbol.cpp
${LIB_SRC_DIR}/Structures/StructSthInHierarchy1.cpp
${LIB_SRC_DIR}/Structures/StructSthInHierarchy2.cpp
${LIB_SRC_DIR}/Structures/StructSthInHierarchy3.cpp
Expand Down
10 changes: 5 additions & 5 deletions repos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ repositories:
- errors: 0
options: null
path: ./library/GATE.OLB
- errors: 9
- errors: 1
options: null
path: ./library/CAPSYM.OLB
- errors: 681
Expand Down Expand Up @@ -684,7 +684,7 @@ repositories:
- errors: 0
options: null
path: ./orcad capture/unsorted/_archive/BusDriverTransceiver.olb
- errors: 9
- errors: 1
options: null
path: ./orcad capture/unsorted/_archive/capsym.olb
- errors: 0
Expand Down Expand Up @@ -1434,7 +1434,7 @@ repositories:
- errors: 1
options: null
path: ./orcad capture/unsorted/_archive/pspice/analog.olb
- errors: 1
- errors: 0
options: null
path: ./orcad capture/unsorted/_archive/pspice/anl_misc.olb
- errors: 0
Expand Down Expand Up @@ -1473,7 +1473,7 @@ repositories:
- errors: 0
options: null
path: ./orcad capture/unsorted/_archive/pspice/darlngtn.olb
- errors: 3
- errors: 0
options: null
path: ./orcad capture/unsorted/_archive/pspice/dataconv.olb
- errors: 1
Expand Down Expand Up @@ -1575,7 +1575,7 @@ repositories:
- errors: 0
options: null
path: ./orcad capture/unsorted/_archive/pspice/fairchild.olb
- errors: 13
- errors: 12
options: null
path: ./orcad capture/unsorted/_archive/pspice/filtsub.olb
- errors: 0
Expand Down
4 changes: 2 additions & 2 deletions src/RecordFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include "Structures/StructGraphicOleEmbedInst.hpp"
#include "Structures/StructGraphicPolygonInst.hpp"
#include "Structures/StructGraphicPolylineInst.hpp"
#include "Structures/StructHierarchicSymbol.hpp"
#include "Structures/StructLibraryPart.hpp"
#include "Structures/StructNetDbIdMapping.hpp"
#include "Structures/StructOffPageConnector.hpp"
Expand All @@ -49,6 +48,7 @@
#include "Structures/StructPartInst.hpp"
#include "Structures/StructPinShapeSymbol.hpp"
#include "Structures/StructPort.hpp"
#include "Structures/StructPortSymbol.hpp"
#include "Structures/StructSthInHierarchy1.hpp"
#include "Structures/StructSthInHierarchy2.hpp"
#include "Structures/StructSthInHierarchy3.hpp"
Expand Down Expand Up @@ -99,7 +99,7 @@ std::unique_ptr<Record> RecordFactory::build(StreamContext& aCtx, Structure aStr
case Structure::PinShapeSymbol: return std::make_unique<StructPinShapeSymbol>(aCtx); break;
case Structure::PlacedInstance: return std::make_unique<StructPartInst>(aCtx); break;
case Structure::Port: return std::make_unique<StructPort>(aCtx); break;
case Structure::PortSymbol: return std::make_unique<StructHierarchicSymbol>(aCtx); break;
case Structure::PortSymbol: return std::make_unique<StructPortSymbol>(aCtx); break;
case Structure::SthInHierarchy1: return std::make_unique<StructSthInHierarchy1>(aCtx); break;
case Structure::SthInHierarchy2: return std::make_unique<StructSthInHierarchy2>(aCtx); break;
case Structure::SthInHierarchy3: return std::make_unique<StructSthInHierarchy3>(aCtx); break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#include <nameof.hpp>

#include "General.hpp"
#include "Structures/StructHierarchicSymbol.hpp"
#include "Structures/StructLibraryPart.hpp"
#include "Structures/StructPortSymbol.hpp"


void StructHierarchicSymbol::read(FileFormatVersion /* aVersion */)
void StructPortSymbol::read(FileFormatVersion /* aVersion */)
{
auto& ds = mCtx.mDs;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef STRUCTHIERARCHICSYMBOL_HPP
#define STRUCTHIERARCHICSYMBOL_HPP
#ifndef STRUCTPORTSYMBOL_HPP
#define STRUCTPORTSYMBOL_HPP


#include <cstdint>
Expand All @@ -11,14 +11,14 @@
#include <nameof.hpp>

#include "General.hpp"
#include "Record.hpp"
#include "Structures/StructSymbol.hpp"


class StructHierarchicSymbol : public Record
class StructPortSymbol : public StructSymbol
{
public:

StructHierarchicSymbol(StreamContext& aCtx) : Record{aCtx}
StructPortSymbol(StreamContext& aCtx) : StructSymbol{aCtx}
{ }

std::string to_string() const override;
Expand All @@ -38,7 +38,7 @@ class StructHierarchicSymbol : public Record


[[maybe_unused]]
static std::string to_string(const StructHierarchicSymbol& aObj)
static std::string to_string(const StructPortSymbol& aObj)
{
std::string str;

Expand All @@ -48,19 +48,19 @@ static std::string to_string(const StructHierarchicSymbol& aObj)
}


inline std::string StructHierarchicSymbol::to_string() const
inline std::string StructPortSymbol::to_string() const
{
return ::to_string(*this);
}


[[maybe_unused]]
static std::ostream& operator<<(std::ostream& aOs, const StructHierarchicSymbol& aVal)
static std::ostream& operator<<(std::ostream& aOs, const StructPortSymbol& aVal)
{
aOs << to_string(aVal);

return aOs;
}


#endif // STRUCTHIERARCHICSYMBOL_HPP
#endif // STRUCTPORTSYMBOL_HPP
4 changes: 2 additions & 2 deletions src/VisitorPattern.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class StructGraphicLineInst;
class StructGraphicOleEmbedInst;
class StructGraphicPolygonInst;
class StructGraphicPolylineInst;
class StructHierarchicSymbol;
class StructLibraryPart;
class StructNetDbIdMapping;
class StructOffPageConnector;
Expand All @@ -59,6 +58,7 @@ class StructPartCell;
class StructPartInst;
class StructPinShapeSymbol;
class StructPort;
class StructPortSymbol;
class StructSthInHierarchy1;
class StructSthInHierarchy2;
class StructSthInHierarchy3;
Expand Down Expand Up @@ -131,7 +131,6 @@ class Visitor
virtual void visit(const StructGraphicOleEmbedInst& aObj) = 0;
virtual void visit(const StructGraphicPolygonInst& aObj) = 0;
virtual void visit(const StructGraphicPolylineInst& aObj) = 0;
virtual void visit(const StructHierarchicSymbol& aObj) = 0;
virtual void visit(const StructLibraryPart& aObj) = 0;
virtual void visit(const StructNetDbIdMapping& aObj) = 0;
virtual void visit(const StructOffPageConnector& aObj) = 0;
Expand All @@ -141,6 +140,7 @@ class Visitor
virtual void visit(const StructPartInst& aObj) = 0;
virtual void visit(const StructPinShapeSymbol& aObj) = 0;
virtual void visit(const StructPort& aObj) = 0;
virtual void visit(const StructPortSymbol& aObj) = 0;
virtual void visit(const StructSthInHierarchy1& aObj) = 0;
virtual void visit(const StructSthInHierarchy2& aObj) = 0;
virtual void visit(const StructSthInHierarchy3& aObj) = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/XmlExporter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class XmlExporter : public Visitor
virtual void visit(const StructGraphicOleEmbedInst& /* aObj */) override { }
virtual void visit(const StructGraphicPolygonInst& /* aObj */) override { }
virtual void visit(const StructGraphicPolylineInst& /* aObj */) override { }
virtual void visit(const StructHierarchicSymbol& /* aObj */) override { }
virtual void visit(const StructLibraryPart& aObj) override;
virtual void visit(const StructNetDbIdMapping& /* aObj */) override { }
virtual void visit(const StructOffPageConnector& /* aObj */) override { }
Expand All @@ -107,6 +106,7 @@ class XmlExporter : public Visitor
virtual void visit(const StructPartInst& /* aObj */) override { }
virtual void visit(const StructPinShapeSymbol& /* aObj */) override { }
virtual void visit(const StructPort& /* aObj */) override { }
virtual void visit(const StructPortSymbol& /* aObj */) override { }
virtual void visit(const StructSthInHierarchy1& /* aObj */) override { }
virtual void visit(const StructSthInHierarchy2& /* aObj */) override { }
virtual void visit(const StructSthInHierarchy3& /* aObj */) override { }
Expand Down
Loading