25#ifndef _SCH_ALTIUM_PLUGIN_H_
26#define _SCH_ALTIUM_PLUGIN_H_
31#include <wx/filename.h>
58 const wxString
GetName()
const override;
70 {
"SchLib",
"IntLib" } );
90 const wxString& aLibraryPath,
94 const wxString& aLibraryPath,
98 const wxString& aAliasName,
140 void ParseComponent(
int aIndex,
const std::map<wxString, wxString>& aProperties );
141 void ParsePin(
const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol =
nullsym);
142 void ParseLabel(
const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol =
nullsym, std::vector<int>& aFontSize =
nullint );
143 void ParseTextFrame(
const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol =
nullsym, std::vector<int>& aFontSize =
nullint );
144 void ParseNote(
const std::map<wxString, wxString>& aProperties );
145 void ParseBezier(
const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol =
nullsym);
146 void ParsePolyline(
const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol =
nullsym);
147 void ParsePolygon(
const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol =
nullsym);
149 void ParseArc(
const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol =
nullsym);
151 void ParseEllipse(
const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol =
nullsym);
152 void ParseCircle(
const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol =
nullsym);
153 void ParseLine(
const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol =
nullsym);
160 void ParseRectangle(
const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol =
nullsym);
161 void ParseSheetSymbol(
int aIndex,
const std::map<wxString, wxString>& aProperties );
162 void ParseSheetEntry(
const std::map<wxString, wxString>& aProperties );
163 void ParsePowerPort(
const std::map<wxString, wxString>& aProperties );
165 void ParseNoERC(
const std::map<wxString, wxString>& aProperties );
166 void ParseNetLabel(
const std::map<wxString, wxString>& aProperties );
167 void ParseBus(
const std::map<wxString, wxString>& aProperties );
168 void ParseWire(
const std::map<wxString, wxString>& aProperties );
169 void ParseJunction(
const std::map<wxString, wxString>& aProperties );
170 void ParseImage(
const std::map<wxString, wxString>& aProperties );
171 void ParseSheet(
const std::map<wxString, wxString>& aProperties );
172 void ParseSheetName(
const std::map<wxString, wxString>& aProperties );
173 void ParseFileName(
const std::map<wxString, wxString>& aProperties );
174 void ParseDesignator(
const std::map<wxString, wxString>& aProperties );
175 void ParseLibDesignator(
const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol =
nullsym, std::vector<int>& aFontSize =
nullint );
176 void ParseBusEntry(
const std::map<wxString, wxString>& aProperties );
177 void ParseParameter(
const std::map<wxString, wxString>& aProperties );
178 void ParseLibParameter(
const std::map<wxString, wxString>& aProperties, std::vector<LIB_SYMBOL*>& aSymbol =
nullsym, std::vector<int>& aFontSize =
nullint );
184 std::vector<LIB_SYMBOL*>
ParseLibComponent(
const std::map<wxString, wxString>& aProperties );
229 std::map<wxString, std::map<wxString, LIB_SYMBOL*>>
m_libCache;
232 std::vector<std::pair<wxString, int>>
m_fonts;
Define a library symbol object.
A pure virtual class used to derive REPORTER objects from.
Holds all the data relating to one schematic.
void ParseEllipse(const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym)
void ParseLibHeader(const ALTIUM_COMPOUND_FILE &aAltiumSchFile, std::vector< int > &aFontSizes)
std::unique_ptr< ASCH_SHEET > m_altiumSheet
void ParseImplementationList(int aIndex, const std::map< wxString, wxString > &aProperties)
void ParsePolygon(const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym)
std::vector< ASCH_PORT > m_altiumHarnessPortsCurrentSheet
void ParseLabel(const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym, std::vector< int > &aFontSize=nullint)
void ParseCircle(const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym)
void ParseArc(const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym)
void ParseStorage(const ALTIUM_COMPOUND_FILE &aAltiumSchFile)
std::map< int, int > m_altiumImplementationList
void AddTextBox(const ASCH_TEXT_FRAME *aElem)
void ParseSheetEntry(const std::map< wxString, wxString > &aProperties)
const wxString GetName() const override
Return a brief hard coded name for this SCH_PLUGIN.
void ParsePolyline(const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym)
int GetModifyHash() const override
Return the modification hash from the library cache.
void EnumerateSymbolLib(wxArrayString &aSymbolNameList, const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr) override
Populate a list of LIB_SYMBOL alias names contained within the library aLibraryPath.
void ParseComponent(int aIndex, const std::map< wxString, wxString > &aProperties)
std::map< wxString, LIB_SYMBOL * > m_powerSymbols
void AddLibTextBox(const ASCH_TEXT_FRAME *aElem, std::vector< LIB_SYMBOL * > &aSymbol=nullsym, std::vector< int > &aFontSize=nullint)
wxFileName getLibFileName()
void ParseImage(const std::map< wxString, wxString > &aProperties)
void ParseNetLabel(const std::map< wxString, wxString > &aProperties)
void ParseBusEntry(const std::map< wxString, wxString > &aProperties)
void ParsePin(const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym)
void ParseLibDesignator(const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym, std::vector< int > &aFontSize=nullint)
LIB_SYMBOL * LoadSymbol(const wxString &aLibraryPath, const wxString &aAliasName, const STRING_UTF8_MAP *aProperties=nullptr) override
Load a LIB_SYMBOL object having aPartName from the aLibraryPath containing a library format that this...
void ParseSheetName(const std::map< wxString, wxString > &aProperties)
void ParseBus(const std::map< wxString, wxString > &aProperties)
void ParseAdditional(const ALTIUM_COMPOUND_FILE &aAltiumSchFile)
void ParseDesignator(const std::map< wxString, wxString > &aProperties)
void ParseSheetSymbol(int aIndex, const std::map< wxString, wxString > &aProperties)
std::vector< LIB_SYMBOL * > ParseLibComponent(const std::map< wxString, wxString > &aProperties)
bool IsComponentPartVisible(int aOwnerindex, int aOwnerpartdisplaymode) const
void ParseAltiumSch(const wxString &aFileName)
void ParsePort(const ASCH_PORT &aElem)
bool IsSymbolLibWritable(const wxString &aLibraryPath) override
Return true if the library at aLibraryPath is writable.
void ParsePowerPort(const std::map< wxString, wxString > &aProperties)
std::unique_ptr< STRING_UTF8_MAP > m_properties
void SetReporter(REPORTER *aReporter) override
Set an optional reporter for warnings/errors.
void ParseWire(const std::map< wxString, wxString > &aProperties)
SCH_SCREEN * getCurrentScreen()
std::vector< ASCH_STORAGE_FILE > m_altiumStorage
std::map< int, LIB_SYMBOL * > m_libSymbols
void ParseSignalHarness(const std::map< wxString, wxString > &aProperties)
void ParseLibParameter(const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym, std::vector< int > &aFontSize=nullint)
std::unique_ptr< TITLE_BLOCK > m_currentTitleBlock
const PLUGIN_FILE_DESC GetSchematicFileDesc() const override
Returns schematic file description for the SCH_PLUGIN.
long long getLibraryTimestamp(const wxString &aLibraryPath) const
SCH_SHEET_PATH m_sheetPath
void ensureLoadedLibrary(const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties)
void ParseHarnessType(const std::map< wxString, wxString > &aProperties)
const ASCH_STORAGE_FILE * GetFileFromStorage(const wxString &aFilename) const
const PLUGIN_FILE_DESC GetLibraryFileDesc() const override
Returns symbol library description for the SCH_PLUGIN.
void ParseLine(const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym)
void ParseHyperlink(const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym)
SCH_SHEET * getCurrentSheet()
std::vector< std::pair< wxString, int > > m_fonts
SCH_SHEET * LoadSchematicFile(const wxString &aFileName, SCHEMATIC *aSchematic, SCH_SHEET *aAppendToMe=nullptr, const STRING_UTF8_MAP *aProperties=nullptr) override
Load information from some input file format that this SCH_PLUGIN implementation knows about,...
bool CanReadLibrary(const wxString &aFileName) const override
Checks if this SCH_PLUGIN can read the specified symbol library file.
void ParseParameter(const std::map< wxString, wxString > &aProperties)
std::vector< ASCH_ADDITIONAL_FILE > m_altiumAdditional
SCH_PLUGIN::SCH_PLUGIN_RELEASER m_pi
void ParseEllipticalArc(const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym)
void ParseHarnessConnector(int aIndex, const std::map< wxString, wxString > &aProperties)
void ParseRectangle(const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym)
void ParseTextFrame(const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym, std::vector< int > &aFontSize=nullint)
std::vector< ASCH_PORT > m_altiumPortsCurrentSheet
void ParseSheet(const std::map< wxString, wxString > &aProperties)
int m_harnessOwnerIndexOffset
void ParseImplementation(const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym)
bool CanReadSchematicFile(const wxString &aFileName) const override
Checks if this SCH_PLUGIN can read the specified schematic file.
void ParseJunction(const std::map< wxString, wxString > &aProperties)
void ParseFileHeader(const ALTIUM_COMPOUND_FILE &aAltiumSchFile)
void ParseNoERC(const std::map< wxString, wxString > &aProperties)
std::map< wxString, std::map< wxString, LIB_SYMBOL * > > m_libCache
std::map< wxString, long long > m_timestamps
void ParseRoundRectangle(const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym)
std::map< int, ASCH_SYMBOL > m_altiumComponents
void ParseNote(const std::map< wxString, wxString > &aProperties)
static bool checkFileHeader(const wxString &aFileName)
std::map< int, SCH_SYMBOL * > m_symbols
std::map< wxString, LIB_SYMBOL * > ParseLibFile(const ALTIUM_COMPOUND_FILE &aAltiumSchFile)
void ParseBezier(const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym)
void ParseHarnessPort(const ASCH_PORT &aElem)
void ParseFileName(const std::map< wxString, wxString > &aProperties)
std::map< int, SCH_SHEET * > m_sheets
void ParseHarnessEntry(const std::map< wxString, wxString > &aProperties)
Helper object to release a SCH_PLUGIN in the context of a potential thrown exception through its dest...
Base class that schematic file and library loading and saving plugins should derive from.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
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.
static std::vector< int > nullint
static std::vector< LIB_SYMBOL * > nullsym
SCH_ALTIUM_PLUGIN is a SCH_PLUGIN derivation for loading Altium .SchDoc schematic files.
Container that describes file type info.