25 #ifndef _SCH_ALTIUM_PLUGIN_H_ 26 #define _SCH_ALTIUM_PLUGIN_H_ 30 #include <wx/filename.h> 31 #include <wx/gdicmn.h> 42 class CompoundFileReader;
57 const wxString
GetName()
const override;
69 const PROPERTIES* aProperties =
nullptr )
override;
71 bool CheckHeader(
const wxString& aFileName )
override;
108 void ParseStorage(
const CFB::CompoundFileReader& aReader );
115 void ParseComponent(
int aIndex,
const std::map<wxString, wxString>& aProperties );
116 void ParsePin(
const std::map<wxString, wxString>& aProperties );
117 void ParseLabel(
const std::map<wxString, wxString>& aProperties );
118 void ParseTextFrame(
const std::map<wxString, wxString>& aProperties );
119 void ParseNote(
const std::map<wxString, wxString>& aProperties );
120 void ParseBezier(
const std::map<wxString, wxString>& aProperties );
121 void ParsePolyline(
const std::map<wxString, wxString>& aProperties );
122 void ParsePolygon(
const std::map<wxString, wxString>& aProperties );
124 void ParseArc(
const std::map<wxString, wxString>& aProperties );
125 void ParseLine(
const std::map<wxString, wxString>& aProperties );
126 void ParseRectangle(
const std::map<wxString, wxString>& aProperties );
127 void ParseSheetSymbol(
int aIndex,
const std::map<wxString, wxString>& aProperties );
128 void ParseSheetEntry(
const std::map<wxString, wxString>& aProperties );
129 void ParsePowerPort(
const std::map<wxString, wxString>& aProperties );
131 void ParseNoERC(
const std::map<wxString, wxString>& aProperties );
132 void ParseNetLabel(
const std::map<wxString, wxString>& aProperties );
133 void ParseBus(
const std::map<wxString, wxString>& aProperties );
134 void ParseWire(
const std::map<wxString, wxString>& aProperties );
135 void ParseJunction(
const std::map<wxString, wxString>& aProperties );
136 void ParseImage(
const std::map<wxString, wxString>& aProperties );
137 void ParseSheet(
const std::map<wxString, wxString>& aProperties );
138 void ParseSheetName(
const std::map<wxString, wxString>& aProperties );
139 void ParseFileName(
const std::map<wxString, wxString>& aProperties );
140 void ParseDesignator(
const std::map<wxString, wxString>& aProperties );
141 void ParseBusEntry(
const std::map<wxString, wxString>& aProperties );
142 void ParseParameter(
const std::map<wxString, wxString>& aProperties );
174 #endif // _SCH_ALTIUM_PLUGIN_H_ void ParsePort(const ASCH_PORT &aElem)
std::unique_ptr< PROPERTIES > m_properties
void SetReporter(REPORTER *aReporter) override
Set an optional reporter for warnings/errors.
void ParseLabel(const std::map< wxString, wxString > &aProperties)
void ParseBezier(const std::map< wxString, wxString > &aProperties)
std::map< int, ASCH_SYMBOL > m_altiumComponents
std::vector< ASCH_STORAGE_FILE > m_altiumStorage
void ParsePowerPort(const std::map< wxString, wxString > &aProperties)
void ParseJunction(const std::map< wxString, wxString > &aProperties)
Holds all the data relating to one schematic.
void ParseImplementation(const std::map< wxString, wxString > &aProperties)
void ParseParameter(const std::map< wxString, wxString > &aProperties)
SCH_SHEET * Load(const wxString &aFileName, SCHEMATIC *aSchematic, SCH_SHEET *aAppendToMe=nullptr, const PROPERTIES *aProperties=nullptr) override
Load information from some input file format that this SCH_PLUGIN implementation knows about,...
void ParseRoundRectangle(const std::map< wxString, wxString > &aProperties)
const wxString GetName() const override
Return a brief hard coded name for this SCH_PLUGIN.
std::map< wxString, LIB_SYMBOL * > m_powerSymbols
void ParseBusEntry(const std::map< wxString, wxString > &aProperties)
void ParseSheet(const std::map< wxString, wxString > &aProperties)
void ParsePolygon(const std::map< wxString, wxString > &aProperties)
A pure virtual class used to derive REPORTER objects from.
A name/value tuple with unique names and optional values.
Hold the information shown in the lower right corner of a plot, printout, or editing view.
std::map< int, SCH_SHEET * > m_sheets
void ParseRectangle(const std::map< wxString, wxString > &aProperties)
void ParsePolyline(const std::map< wxString, wxString > &aProperties)
void ParseImage(const std::map< wxString, wxString > &aProperties)
std::vector< ASCH_PORT > m_altiumPortsCurrentSheet
Base class that schematic file and library loading and saving plugins should derive from.
void ParseLine(const std::map< wxString, wxString > &aProperties)
std::map< int, SCH_SYMBOL * > m_symbols
wxFileName getLibFileName()
std::unique_ptr< ASCH_SHEET > m_altiumSheet
void ParseSheetEntry(const std::map< wxString, wxString > &aProperties)
int GetModifyHash() const override
Return the modification hash from the library cache.
std::map< int, LIB_SYMBOL * > m_libSymbols
void ParseFileName(const std::map< wxString, wxString > &aProperties)
SCH_ALTIUM_PLUGIN is a SCH_PLUGIN derivation for loading Altium .SchDoc schematic files.
void ParseNoERC(const std::map< wxString, wxString > &aProperties)
const ASCH_STORAGE_FILE * GetFileFromStorage(const wxString &aFilename) const
SCH_SHEET * m_currentSheet
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Helper object to release a SCH_PLUGIN in the context of a potential thrown exception through its dest...
const wxString GetLibraryFileExtension() const override
Return the library file extension for the SCH_PLUGIN object.
void ParseComponent(int aIndex, const std::map< wxString, wxString > &aProperties)
void ParseFileHeader(const CFB::CompoundFileReader &aReader)
void ParseSheetSymbol(int aIndex, const std::map< wxString, wxString > &aProperties)
void ParseNote(const std::map< wxString, wxString > &aProperties)
void ParseWire(const std::map< wxString, wxString > &aProperties)
void ParseSheetName(const std::map< wxString, wxString > &aProperties)
const wxString GetFileExtension() const override
Return the file extension for the SCH_PLUGIN.
void ParseArc(const std::map< wxString, wxString > &aProperties)
void ParseTextFrame(const std::map< wxString, wxString > &aProperties)
void ParseBus(const std::map< wxString, wxString > &aProperties)
void ParseImplementationList(int aIndex, const std::map< wxString, wxString > &aProperties)
void ParseAltiumSch(const wxString &aFileName)
void ParseDesignator(const std::map< wxString, wxString > &aProperties)
bool CheckHeader(const wxString &aFileName) override
Return true if the first line in aFileName begins with the expected header.
void ParsePin(const std::map< wxString, wxString > &aProperties)
std::map< int, int > m_altiumImplementationList
SCH_PLUGIN::SCH_PLUGIN_RELEASER m_pi
void ParseStorage(const CFB::CompoundFileReader &aReader)
void ParseNetLabel(const std::map< wxString, wxString > &aProperties)
bool IsComponentPartVisible(int aOwnerindex, int aOwnerpartdisplaymode) const
std::unique_ptr< TITLE_BLOCK > m_currentTitleBlock