KiCad PCB EDA Suite
|
#include <sch_altium_plugin.h>
Public Member Functions | |
SCH_ALTIUM_PLUGIN () | |
~SCH_ALTIUM_PLUGIN () | |
const wxString | GetName () const override |
Return a brief hard coded name for this SCH_PLUGIN. More... | |
void | SetReporter (REPORTER *aReporter) override |
Set an optional reporter for warnings/errors. More... | |
const PLUGIN_FILE_DESC | GetSchematicFileDesc () const override |
Returns schematic file description for the SCH_PLUGIN. More... | |
const PLUGIN_FILE_DESC | GetLibraryFileDesc () const override |
Returns symbol library description for the SCH_PLUGIN. More... | |
int | GetModifyHash () const override |
Return the modification hash from the library cache. More... | |
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, into either a new SCH_SHEET or an existing one. More... | |
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. More... | |
void | EnumerateSymbolLib (std::vector< LIB_SYMBOL * > &aSymbolList, const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr) override |
Populate a list of LIB_SYMBOL aliases contained within the library aLibraryPath. More... | |
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 SCH_PLUGIN knows about. More... | |
bool | IsSymbolLibWritable (const wxString &aLibraryPath) override |
Return true if the library at aLibraryPath is writable. More... | |
wxString | getLibName () |
wxFileName | getLibFileName () |
void | ParseAltiumSch (const wxString &aFileName) |
void | ParseStorage (const ALTIUM_COMPOUND_FILE &aAltiumSchFile) |
void | ParseAdditional (const ALTIUM_COMPOUND_FILE &aAltiumSchFile) |
void | ParseFileHeader (const ALTIUM_COMPOUND_FILE &aAltiumSchFile) |
virtual void | SetProgressReporter (PROGRESS_REPORTER *aReporter) |
Set an optional progress reporter. More... | |
virtual bool | CanReadSchematicFile (const wxString &aFileName) const |
Checks if this SCH_PLUGIN can read the specified schematic file. More... | |
virtual bool | CanReadLibrary (const wxString &aFileName) const |
Checks if this SCH_PLUGIN can read the specified symbol library file. More... | |
virtual void | SaveLibrary (const wxString &aFileName, const STRING_UTF8_MAP *aProperties=nullptr) |
virtual void | SaveSchematicFile (const wxString &aFileName, SCH_SHEET *aSheet, SCHEMATIC *aSchematic, const STRING_UTF8_MAP *aProperties=nullptr) |
Write aSchematic to a storage file in a format that this SCH_PLUGIN implementation knows about, or it can be used to write a portion of aSchematic to a special kind of export file. More... | |
virtual void | SaveSymbol (const wxString &aLibraryPath, const LIB_SYMBOL *aSymbol, const STRING_UTF8_MAP *aProperties=nullptr) |
Write aSymbol to an existing library located at aLibraryPath. More... | |
virtual void | DeleteSymbol (const wxString &aLibraryPath, const wxString &aSymbolName, const STRING_UTF8_MAP *aProperties=nullptr) |
Delete the entire LIB_SYMBOL associated with aAliasName from the library aLibraryPath. More... | |
virtual void | CreateSymbolLib (const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr) |
Create a new empty symbol library at aLibraryPath. More... | |
virtual bool | DeleteSymbolLib (const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr) |
Delete an existing symbol library and returns true if successful, or if library does not exist returns false, or throws an exception if library exists but is read only or cannot be deleted for some other reason. More... | |
virtual void | SymbolLibOptions (STRING_UTF8_MAP *aListToAppendTo) const |
Append supported SCH_PLUGIN options to aListToAppenTo along with internationalized descriptions. More... | |
virtual bool | SupportsSubLibraries () const |
virtual void | GetSubLibraryNames (std::vector< wxString > &aNames) |
Retrieves a list of sub-libraries in this library. More... | |
virtual void | GetAvailableSymbolFields (std::vector< wxString > &aNames) |
Retrieves a list of (custom) field names that are present on symbols in this library. More... | |
virtual void | GetDefaultSymbolFields (std::vector< wxString > &aNames) |
Retrieves a list of (custom) field names that should be shown by default for this library in the symbol chooser. More... | |
virtual const wxString & | GetError () const |
Return an error string to the caller. More... | |
virtual void | SetLibTable (SYMBOL_LIB_TABLE *aTable) |
Some library plugins need to have access to their parent library table. More... | |
Static Protected Member Functions | |
static bool | fileStartsWithPrefix (const wxString &aFilePath, const wxString &aPrefix, bool aIgnoreWhitespace) |
static bool | fileStartsWithBinaryHeader (const wxString &aFilePath, const std::vector< uint8_t > &aHeader) |
Private Member Functions | |
SCH_SCREEN * | getCurrentScreen () |
SCH_SHEET * | getCurrentSheet () |
bool | IsComponentPartVisible (int aOwnerindex, int aOwnerpartdisplaymode) const |
const ASCH_STORAGE_FILE * | GetFileFromStorage (const wxString &aFilename) const |
void | AddTextBox (const ASCH_TEXT_FRAME *aElem) |
void | AddLibTextBox (const ASCH_TEXT_FRAME *aElem, std::vector< LIB_SYMBOL * > &aSymbol=nullsym, std::vector< int > &aFontSize=nullint) |
void | ParseComponent (int aIndex, const std::map< wxString, wxString > &aProperties) |
void | ParsePin (const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym) |
void | ParseLabel (const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym, std::vector< int > &aFontSize=nullint) |
void | ParseTextFrame (const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym, std::vector< int > &aFontSize=nullint) |
void | ParseNote (const std::map< wxString, wxString > &aProperties) |
void | ParseBezier (const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym) |
void | ParsePolyline (const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym) |
void | ParsePolygon (const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym) |
void | ParseRoundRectangle (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 | ParseEllipticalArc (const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym) |
void | ParseEllipse (const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym) |
void | ParseCircle (const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym) |
void | ParseLine (const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym) |
void | ParseSignalHarness (const std::map< wxString, wxString > &aProperties) |
void | ParseHarnessConnector (int aIndex, const std::map< wxString, wxString > &aProperties) |
void | ParseHarnessEntry (const std::map< wxString, wxString > &aProperties) |
void | ParseHarnessType (const std::map< wxString, wxString > &aProperties) |
void | ParseHarnessPort (const ASCH_PORT &aElem) |
void | ParseHyperlink (const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym) |
void | ParseRectangle (const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym) |
void | ParseSheetSymbol (int aIndex, const std::map< wxString, wxString > &aProperties) |
void | ParseSheetEntry (const std::map< wxString, wxString > &aProperties) |
void | ParsePowerPort (const std::map< wxString, wxString > &aProperties) |
void | ParsePort (const ASCH_PORT &aElem) |
void | ParseNoERC (const std::map< wxString, wxString > &aProperties) |
void | ParseNetLabel (const std::map< wxString, wxString > &aProperties) |
void | ParseBus (const std::map< wxString, wxString > &aProperties) |
void | ParseWire (const std::map< wxString, wxString > &aProperties) |
void | ParseJunction (const std::map< wxString, wxString > &aProperties) |
void | ParseImage (const std::map< wxString, wxString > &aProperties) |
void | ParseSheet (const std::map< wxString, wxString > &aProperties) |
void | ParseSheetName (const std::map< wxString, wxString > &aProperties) |
void | ParseFileName (const std::map< wxString, wxString > &aProperties) |
void | ParseDesignator (const std::map< wxString, wxString > &aProperties) |
void | ParseLibDesignator (const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym, std::vector< int > &aFontSize=nullint) |
void | ParseBusEntry (const std::map< wxString, wxString > &aProperties) |
void | ParseParameter (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) |
void | ParseImplementationList (int aIndex, const std::map< wxString, wxString > &aProperties) |
void | ParseImplementation (const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym) |
void | ParseLibHeader (const ALTIUM_COMPOUND_FILE &aAltiumSchFile, std::vector< int > &aFontSizes) |
std::map< wxString, LIB_SYMBOL * > | ParseLibFile (const ALTIUM_COMPOUND_FILE &aAltiumSchFile) |
std::vector< LIB_SYMBOL * > | ParseLibComponent (const std::map< wxString, wxString > &aProperties) |
void | ensureLoadedLibrary (const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties) |
long long | getLibraryTimestamp (const wxString &aLibraryPath) const |
Definition at line 52 of file sch_altium_plugin.h.
SCH_ALTIUM_PLUGIN::SCH_ALTIUM_PLUGIN | ( | ) |
Definition at line 224 of file sch_altium_plugin.cpp.
References WXLOG_REPORTER::GetInstance(), m_harnessEntryParent, m_harnessOwnerIndexOffset, m_reporter, m_rootSheet, and m_schematic.
SCH_ALTIUM_PLUGIN::~SCH_ALTIUM_PLUGIN | ( | ) |
Definition at line 235 of file sch_altium_plugin.cpp.
References m_libCache, and name.
|
private |
Handle text frames that are in a library symbol, not on schematic
Definition at line 1387 of file sch_altium_plugin.cpp.
References LIB_SYMBOL::AddDrawItem(), ASCH_TEXT_FRAME::Alignment, ASCH_TEXT_FRAME::AreaColor, ASCH_TEXT_FRAME::BorderColor, ASCH_TEXT_FRAME::BottomLeft, ASCH_TEXT_FRAME::FontID, GetColorFromInt(), GetLibEditPosition(), GetRelativePosition(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, ASCH_TEXT_FRAME::isSolid, m_libSymbols, m_reporter, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, REPORTER::Report(), RPT_SEVERITY_DEBUG, EDA_SHAPE::SetEnd(), EDA_SHAPE::SetFillColor(), EDA_SHAPE::SetFilled(), EDA_SHAPE::SetFillMode(), EDA_TEXT::SetHorizJustify(), EDA_SHAPE::SetStart(), LIB_SHAPE::SetStroke(), EDA_TEXT::SetText(), EDA_TEXT::SetTextSize(), LIB_ITEM::SetUnit(), ASCH_TEXT_FRAME::ShowBorder, ASCH_TEXT_FRAME::Text, and ASCH_TEXT_FRAME::TopRight.
Referenced by ParseTextFrame().
|
private |
Definition at line 1324 of file sch_altium_plugin.cpp.
References ASCH_TEXT_FRAME::Alignment, SCH_SCREEN::Append(), ASCH_TEXT_FRAME::AreaColor, ASCH_SHEET_FONT::Bold, ASCH_TEXT_FRAME::BorderColor, ASCH_TEXT_FRAME::BottomLeft, ASCH_TEXT_FRAME::FontID, fonts, GetColorFromInt(), getCurrentScreen(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, IS_NEW, ASCH_TEXT_FRAME::isSolid, ASCH_SHEET_FONT::Italic, m_altiumSheet, m_sheetOffset, EDA_TEXT::SetBold(), EDA_SHAPE::SetEnd(), EDA_SHAPE::SetFillColor(), EDA_SHAPE::SetFilled(), EDA_SHAPE::SetFillMode(), EDA_ITEM::SetFlags(), EDA_TEXT::SetHorizJustify(), EDA_TEXT::SetItalic(), EDA_SHAPE::SetStart(), SCH_SHAPE::SetStroke(), EDA_TEXT::SetText(), EDA_TEXT::SetTextSize(), ASCH_TEXT_FRAME::ShowBorder, ASCH_SHEET_FONT::Size, ASCH_TEXT_FRAME::Text, and ASCH_TEXT_FRAME::TopRight.
Referenced by ParseNote(), and ParseTextFrame().
|
virtualinherited |
Checks if this SCH_PLUGIN can read the specified symbol library file.
If not overriden, extension check is used.
Reimplemented in SCH_EAGLE_PLUGIN, SCH_EASYEDA_PLUGIN, and SCH_LEGACY_PLUGIN.
Definition at line 69 of file sch_plugin.cpp.
References SCH_PLUGIN::GetLibraryFileDesc(), PLUGIN_FILE_DESC::m_ExtensionsInDir, PLUGIN_FILE_DESC::m_FileExtensions, and PLUGIN_FILE_DESC::m_IsFile.
Referenced by SCH_EAGLE_PLUGIN::CanReadLibrary(), SCH_LEGACY_PLUGIN::CanReadLibrary(), and SCH_IO_MGR::GuessPluginTypeFromLibPath().
|
virtualinherited |
Checks if this SCH_PLUGIN can read the specified schematic file.
If not overriden, extension check is used.
Reimplemented in SCH_EAGLE_PLUGIN, SCH_EASYEDA_PLUGIN, SCH_EASYEDAPRO_PLUGIN, and SCH_LEGACY_PLUGIN.
Definition at line 53 of file sch_plugin.cpp.
References SCH_PLUGIN::GetSchematicFileDesc(), and PLUGIN_FILE_DESC::m_FileExtensions.
Referenced by SCH_EAGLE_PLUGIN::CanReadSchematicFile(), SCH_EASYEDA_PLUGIN::CanReadSchematicFile(), SCH_LEGACY_PLUGIN::CanReadSchematicFile(), SCH_IO_MGR::GuessPluginTypeFromSchPath(), and SCH_EDIT_FRAME::OnImportProject().
|
virtualinherited |
Create a new empty symbol library at aLibraryPath.
It is an error to attempt to create an existing library or to attempt to create on a "read only" location.
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several footprints. |
aProperties | is an associative array that can be used to tell the library create function anything special, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. |
IO_ERROR | if there is a problem finding the library, or creating it. |
Reimplemented in SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.
Definition at line 183 of file sch_plugin.cpp.
References NOT_IMPLEMENTED.
Referenced by SYMBOL_LIB_TABLE::CreateSymbolLib(), SYMBOL_EDIT_FRAME::ExportSymbol(), LoadSchematicFile(), CADSTAR_SCH_ARCHIVE_PLUGIN::LoadSchematicFile(), SCH_EAGLE_PLUGIN::LoadSchematicFile(), and SCH_EASYEDAPRO_PLUGIN::LoadSchematicFile().
|
virtualinherited |
Delete the entire LIB_SYMBOL associated with aAliasName from the library aLibraryPath.
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several symbols. |
aSymbolName | is the name of a LIB_SYMBOL associated with it's root LIB_SYMBOL object to delete from the specified library. |
aProperties | is an associative array that can be used to tell the library delete function anything special, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. |
IO_ERROR | if there is a problem finding the alias or the library or deleting it. |
Reimplemented in SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.
Definition at line 175 of file sch_plugin.cpp.
References NOT_IMPLEMENTED.
Referenced by SYMBOL_LIB_TABLE::DeleteSymbol(), and SYMBOL_LIBRARY_MANAGER::LIB_BUFFER::SaveBuffer().
|
virtualinherited |
Delete an existing symbol library and returns true if successful, or if library does not exist returns false, or throws an exception if library exists but is read only or cannot be deleted for some other reason.
aLibraryPath | is a locator for the "library", usually a directory or file which will contain symbols. |
aProperties | is an associative array that can be used to tell the library delete implementation function anything special, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. |
IO_ERROR | if there is a problem deleting an existing library. |
Reimplemented in SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.
Definition at line 190 of file sch_plugin.cpp.
References NOT_IMPLEMENTED.
Referenced by SYMBOL_LIB_TABLE::DeleteSymbolLib().
|
private |
Definition at line 3993 of file sch_altium_plugin.cpp.
References getLibraryTimestamp(), m_libCache, m_libName, m_timestamps, ParseLibFile(), and THROW_IO_ERROR.
Referenced by EnumerateSymbolLib(), and LoadSymbol().
|
overridevirtual |
Populate a list of LIB_SYMBOL aliases contained within the library aLibraryPath.
aSymbolList | is an array to populate with the LIB_SYMBOL pointers associated with the library. |
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing one or more LIB_SYMBOL objects. |
aProperties | is an associative array that can be used to tell the plugin anything needed about how to perform with respect to aLibraryPath. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. |
IO_ERROR | if the library cannot be found, the part library cannot be loaded. |
Reimplemented from SCH_PLUGIN.
Definition at line 4089 of file sch_altium_plugin.cpp.
References ensureLoadedLibrary(), and m_libCache.
|
overridevirtual |
Populate a list of LIB_SYMBOL alias names contained within the library aLibraryPath.
aSymbolNameList | is an array to populate with the LIB_SYMBOL names associated with the library. |
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing one or more LIB_SYMBOL objects. |
aProperties | is an associative array that can be used to tell the plugin anything needed about how to perform with respect to aLibraryPath. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. |
IO_ERROR | if the library cannot be found, the part library cannot be loaded. |
Reimplemented from SCH_PLUGIN.
Definition at line 4072 of file sch_altium_plugin.cpp.
References ensureLoadedLibrary(), and m_libCache.
|
staticprotectedinherited |
Definition at line 248 of file sch_plugin.cpp.
|
staticprotectedinherited |
Definition at line 223 of file sch_plugin.cpp.
References text.
Referenced by SCH_LEGACY_PLUGIN::CanReadLibrary(), and SCH_LEGACY_PLUGIN::CanReadSchematicFile().
|
inlinevirtualinherited |
Retrieves a list of (custom) field names that are present on symbols in this library.
The plugin is responsible for guaranteeing that this list contains the set of unique custom field names present on any symbols contained in the library.
The required KiCad fields are not included in this list.
aNames | will be filled with any custom fields present in this library. |
Reimplemented in CADSTAR_SCH_ARCHIVE_PLUGIN, SCH_DATABASE_PLUGIN, SCH_HTTP_LIB_PLUGIN, and SCH_SEXPR_PLUGIN.
Definition at line 477 of file sch_io_mgr.h.
Referenced by SYMBOL_LIB_TABLE_ROW::GetAvailableSymbolFields(), and SCH_PLUGIN::GetDefaultSymbolFields().
|
private |
Definition at line 388 of file sch_altium_plugin.cpp.
References SCH_SHEET_PATH::LastScreen(), and m_sheetPath.
Referenced by AddTextBox(), ParseAltiumSch(), ParseArc(), ParseBezier(), ParseBus(), ParseBusEntry(), ParseCircle(), ParseComponent(), ParseDesignator(), ParseEllipse(), ParseEllipticalArc(), ParseFileHeader(), ParseHarnessConnector(), ParseHarnessPort(), ParseImage(), ParseJunction(), ParseLabel(), ParseLine(), ParseNetLabel(), ParseNoERC(), ParsePolygon(), ParsePolyline(), ParsePort(), ParsePowerPort(), ParseRectangle(), ParseRoundRectangle(), ParseSheet(), ParseSheetSymbol(), ParseSignalHarness(), and ParseWire().
|
private |
Definition at line 394 of file sch_altium_plugin.cpp.
References SCH_SHEET_PATH::Last(), and m_sheetPath.
Referenced by ParseFileHeader(), ParseHarnessConnector(), and ParseSheetSymbol().
|
inlinevirtualinherited |
Retrieves a list of (custom) field names that should be shown by default for this library in the symbol chooser.
This list should be a subset of the result returned by GetAvailableSymbolFields().
The preference for which fields to hide and show for a given library is stored on a per-library basis in a user's preferences (or in the project local settings for a project- local library). The set of fields returned by GetDefaultSymbolFields() will be used if this preference is missing.
aNames | will be filled with the custom field names that should be shown by default |
Reimplemented in SCH_DATABASE_PLUGIN, SCH_HTTP_LIB_PLUGIN, and SCH_SEXPR_PLUGIN.
Definition at line 491 of file sch_io_mgr.h.
References SCH_PLUGIN::GetAvailableSymbolFields().
Referenced by SYMBOL_LIB_TABLE_ROW::GetDefaultSymbolFields().
|
virtualinherited |
Return an error string to the caller.
This is useful for schematic loaders that can load partial schematics where throwing an exception would be problematic such as the KiCad legacy plugin.
Reimplemented in SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.
Definition at line 216 of file sch_plugin.cpp.
References NOT_IMPLEMENTED.
Referenced by KI_TEST::SCHEMATIC_TEST_FIXTURE::LoadSchematic(), SCH_EDIT_FRAME::LoadSheetFromFile(), and SCH_EDIT_FRAME::OpenProjectFiles().
|
private |
Definition at line 865 of file sch_altium_plugin.cpp.
References m_altiumStorage.
Referenced by ParseImage().
wxFileName SCH_ALTIUM_PLUGIN::getLibFileName | ( | ) |
Definition at line 283 of file sch_altium_plugin.cpp.
References getLibName(), PROJECT::GetProjectPath(), KiCadSymbolLibFileExtension, m_schematic, and SCHEMATIC::Prj().
Referenced by LoadSchematicFile(), ParseFileHeader(), and ParsePowerPort().
wxString SCH_ALTIUM_PLUGIN::getLibName | ( | ) |
Definition at line 259 of file sch_altium_plugin.cpp.
References LIB_ID::FixIllegalChars(), SCH_SHEET::GetFileName(), PROJECT::GetProjectName(), m_libName, m_rootSheet, m_schematic, SCHEMATIC::Prj(), and UTF8::wx_str().
Referenced by getLibFileName(), LoadSchematicFile(), ParseComponent(), ParseLibComponent(), and ParsePowerPort().
|
inlineoverridevirtual |
Returns symbol library description for the SCH_PLUGIN.
Reimplemented from SCH_PLUGIN.
Definition at line 67 of file sch_altium_plugin.h.
References _HKI.
|
private |
Definition at line 3982 of file sch_altium_plugin.cpp.
Referenced by ensureLoadedLibrary().
|
overridevirtual |
Return the modification hash from the library cache.
Implements SCH_PLUGIN.
Definition at line 253 of file sch_altium_plugin.cpp.
|
overridevirtual |
Return a brief hard coded name for this SCH_PLUGIN.
Implements SCH_PLUGIN.
Definition at line 247 of file sch_altium_plugin.cpp.
Referenced by ParseLibFile().
|
inlineoverridevirtual |
Returns schematic file description for the SCH_PLUGIN.
Reimplemented from SCH_PLUGIN.
Definition at line 62 of file sch_altium_plugin.h.
References _HKI.
|
inlinevirtualinherited |
Retrieves a list of sub-libraries in this library.
Some types of symbol library support sub-libraries, which are a single-level organizational hierarchy that is implementation-defined per plugin. Most of KiCad ignores sub-libraries and treats the hierarchy between library and symbol as flat, but the sub-libraries are used for sorting and grouping symbols in the symbol chooser.
Has no effect if SupportsSubLibraries() returns false.
aNames | will be filled with a list of sub-libraries within this symbol library |
Reimplemented in SCH_DATABASE_PLUGIN, and SCH_HTTP_LIB_PLUGIN.
Definition at line 466 of file sch_io_mgr.h.
Referenced by SYMBOL_LIB_TABLE_ROW::GetSubLibraryNames().
|
private |
Definition at line 854 of file sch_altium_plugin.cpp.
References m_altiumComponents.
Referenced by ParseArc(), ParseBezier(), ParseEllipticalArc(), ParseLine(), ParsePin(), ParsePolygon(), ParsePolyline(), ParseRectangle(), and ParseRoundRectangle().
|
inlineoverridevirtual |
Return true if the library at aLibraryPath is writable.
(Often system libraries are read only because of where they are installed.)
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several symbols. |
IO_ERROR | if no library at aLibraryPath exists. |
Reimplemented from SCH_PLUGIN.
Definition at line 112 of file sch_altium_plugin.h.
|
overridevirtual |
Load information from some input file format that this SCH_PLUGIN implementation knows about, into either a new SCH_SHEET or an existing one.
This may be used to load an entire new SCH_SHEET, or to augment an existing one if aAppendToMe is not NULL.
aFileName | is the name of the file to use as input and may be foreign in nature or native in nature. |
aKiway | is the KIWAY object used to access the symbol libraries loaded by the project. |
aAppendToMe | is an existing SCH_SHEET to append to, but if NULL then this means "do not append, rather load anew". |
aProperties | is an associative array that can be used to tell the loader how to load the file, because it can take any number of additional named arguments that the plugin is known to support. These are tuning parameters for the import or load. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. |
IO_ERROR | if there is a problem loading, and its contents should say what went wrong, using line number and character offsets of the input file if possible. |
Reimplemented from SCH_PLUGIN.
Definition at line 291 of file sch_altium_plugin.cpp.
References SCH_SCREENS::ClearEditFlags(), SCH_PLUGIN::CreateSymbolLib(), PROJECT::ELEM_SYMBOL_LIB_TABLE, SYMBOL_LIB_TABLE::Format(), getLibFileName(), getLibName(), PROJECT::GetProjectPath(), SCH_SHEET::GetScreen(), SYMBOL_LIB_TABLE::GetSymbolLibTableFileName(), SCH_SCREEN::GetUuid(), LIB_TABLE::HasLibrary(), LIB_TABLE::InsertRow(), SCHEMATIC::IsValid(), KiCadSchematicFileExtension, SCH_SHEET_INSTANCE::m_PageNumber, SCH_SHEET_INSTANCE::m_Path, m_pi, m_rootSheet, m_schematic, SCH_SCREEN::m_sheetInstances, m_sheetPath, EDA_ITEM::m_Uuid, ParseAltiumSch(), SCH_SHEET_PATH::Path(), SCHEMATIC::Prj(), SCH_SHEET_PATH::push_back(), SCHEMATIC::Root(), SCH_PLUGIN::SaveLibrary(), SCH_PLUGIN::SCH_PLUGIN_RELEASER::set(), PROJECT::SetElem(), SCH_SCREEN::SetFileName(), SCH_SHEET::SetFileName(), SCH_SHEET_PATH::SetPageNumber(), SCHEMATIC::SetRoot(), SCH_SHEET::SetScreen(), and SCH_SCREENS::UpdateSymbolLinks().
|
overridevirtual |
Load a LIB_SYMBOL object having aPartName from the aLibraryPath containing a library format that this SCH_PLUGIN knows about.
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several symbols. |
aPartName | is the name of the LIB_SYMBOL to load. |
aProperties | is an associative array that can be used to tell the loader implementation to do something special, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. |
IO_ERROR | if the library cannot be found or read. No exception is thrown in the case where aAliasName cannot be found. |
Reimplemented from SCH_PLUGIN.
Definition at line 4104 of file sch_altium_plugin.cpp.
References ensureLoadedLibrary(), and m_libCache.
void SCH_ALTIUM_PLUGIN::ParseAdditional | ( | const ALTIUM_COMPOUND_FILE & | aAltiumSchFile | ) |
Definition at line 518 of file sch_altium_plugin.cpp.
References _, ALTIUM_COMPOUND_FILE::FindStream(), ALTIUM_PARSER::GetRemainingBytes(), ALTIUM_PARSER::HasParsingError(), m_altiumHarnessPortsCurrentSheet, m_reporter, ParseHarnessConnector(), ParseHarnessEntry(), ParseHarnessPort(), ParseHarnessType(), ParseSignalHarness(), ALTIUM_PARSER::ReadInt(), ALTIUM_PARSER::ReadProperties(), REPORTER::Report(), RPT_SEVERITY_ERROR, and THROW_IO_ERROR.
Referenced by ParseAltiumSch().
void SCH_ALTIUM_PLUGIN::ParseAltiumSch | ( | const wxString & | aFileName | ) |
Definition at line 400 of file sch_altium_plugin.cpp.
References _, getCurrentScreen(), SCH_SHEET::GetFileName(), SCH_SHEET::GetName(), PROJECT::GetProjectPath(), SCH_SHEET::GetScreen(), SCH_SCREEN::Items(), KiCadSchematicFileExtension, m_reporter, m_rootSheet, m_schematic, m_sheetPath, EE_RTREE::OfType(), ParseAdditional(), ParseAltiumSch(), ParseFileHeader(), ParseStorage(), SCH_SHEET_PATH::pop_back(), SCHEMATIC::Prj(), SCH_SHEET_PATH::push_back(), REPORTER::Report(), SCH_SHEET_T, SCH_SHEET::SearchHierarchy(), SCH_SCREEN::SetFileName(), SCH_SHEET::SetFileName(), SCH_SHEET::SetName(), SCH_SHEET::SetScreen(), and THROW_IO_ERROR.
Referenced by LoadSchematicFile(), and ParseAltiumSch().
|
private |
Definition at line 1873 of file sch_altium_plugin.cpp.
References LIB_SYMBOL::AddDrawItem(), ALTIUM_COMPONENT_NONE, SCH_SCREEN::Append(), EDA_ANGLE::Cos(), DEGREES_T, getCurrentScreen(), GetLibEditPosition(), LIB_SHAPE::GetPosition(), SCH_SHAPE::GetPosition(), GetRelativePosition(), IsComponentPartVisible(), KiROUND(), ASCH_BORDER_INTERFACE::LineWidth, ASCH_ARC::m_Center, ASCH_ARC::m_EndAngle, m_libSymbols, ASCH_ARC::m_Radius, m_reporter, m_sheetOffset, ASCH_ARC::m_StartAngle, m_symbols, EDA_ANGLE::Normalize(), ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, REPORTER::Report(), RPT_SEVERITY_DEBUG, EDA_SHAPE::SetArcAngleAndEnd(), EDA_SHAPE::SetCenter(), EDA_SHAPE::SetEnd(), SetLibShapeLine(), SCH_SHAPE::SetPosition(), LIB_SHAPE::SetPosition(), EDA_SHAPE::SetStart(), SCH_SHAPE::SetStroke(), LIB_ITEM::SetUnit(), and EDA_ANGLE::Sin().
Referenced by ParseFileHeader(), and ParseLibFile().
|
private |
Definition at line 1466 of file sch_altium_plugin.cpp.
References _, LIB_SYMBOL::AddDrawItem(), LIB_SHAPE::AddPoint(), ALTIUM_COMPONENT_NONE, SCH_SCREEN::Append(), getCurrentScreen(), GetLibEditPosition(), BEZIER_POLY::GetPoly(), GetRelativePosition(), IS_NEW, IsComponentPartVisible(), ASCH_BORDER_INTERFACE::LineWidth, m_libSymbols, m_reporter, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ASCH_BEZIER::points, REPORTER::Report(), RPT_SEVERITY_DEBUG, RPT_SEVERITY_WARNING, EDA_SHAPE::SetBezierC1(), EDA_SHAPE::SetBezierC2(), EDA_SHAPE::SetEnd(), SCH_LINE::SetEndPoint(), EDA_ITEM::SetFlags(), EDA_SHAPE::SetStart(), LIB_SHAPE::SetStroke(), SCH_LINE::SetStroke(), and LIB_ITEM::SetUnit().
Referenced by ParseFileHeader(), and ParseLibFile().
|
private |
Definition at line 3230 of file sch_altium_plugin.cpp.
References SCH_SCREEN::Append(), getCurrentScreen(), IS_NEW, ASCH_BUS::lineWidth, m_sheetOffset, ASCH_BUS::points, SCH_LINE::SetEndPoint(), EDA_ITEM::SetFlags(), and SCH_LINE::SetLineWidth().
Referenced by ParseFileHeader().
|
private |
Definition at line 3525 of file sch_altium_plugin.cpp.
References SCH_SCREEN::Append(), ASCH_BUS_ENTRY::corner, getCurrentScreen(), IS_NEW, ASCH_BUS_ENTRY::location, m_sheetOffset, EDA_ITEM::SetFlags(), SCH_BUS_ENTRY_BASE::SetSize(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseFileHeader().
|
private |
Definition at line 2208 of file sch_altium_plugin.cpp.
References LIB_SYMBOL::AddDrawItem(), ALTIUM_COMPONENT_NONE, SCH_SCREEN::Append(), ASCH_FILL_INTERFACE::AreaColor, ASCH_ELLIPSE::Center, ASCH_BORDER_INTERFACE::Color, GetColorFromInt(), getCurrentScreen(), GetLibEditPosition(), LIB_SHAPE::GetPosition(), SCH_SHAPE::GetPosition(), GetRelativePosition(), ASCH_FILL_INTERFACE::IsSolid, m_libSymbols, m_reporter, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ASCH_ELLIPSE::Radius, REPORTER::Report(), RPT_SEVERITY_DEBUG, EDA_SHAPE::SetEnd(), EDA_SHAPE::SetFillColor(), EDA_SHAPE::SetFilled(), EDA_SHAPE::SetFillMode(), SetLibShapeFillAndColor(), SetLibShapeLine(), SCH_SHAPE::SetPosition(), LIB_SHAPE::SetPosition(), SCH_SHAPE::SetStroke(), and LIB_ITEM::SetUnit().
Referenced by ParseEllipse().
|
private |
Definition at line 882 of file sch_altium_plugin.cpp.
References _, AltiumToKiCadLibID(), SCH_SCREEN::Append(), ASCH_SYMBOL::componentdescription, ASCH_SYMBOL::currentpartid, getCurrentScreen(), getLibName(), SCH_SHEET::GetName(), ASCH_SYMBOL::isMirrored, SCH_SHEET_PATH::Last(), ASCH_SYMBOL::libreference, ASCH_SYMBOL::location, m_altiumComponents, m_libSymbols, m_reporter, m_sheetOffset, m_sheetPath, m_symbols, name, ASCH_SYMBOL::orientation, REPORTER::Report(), RPT_SEVERITY_ERROR, LIB_SYMBOL::SetDescription(), LIB_SYMBOL::SetLibId(), SCH_SYMBOL::SetLibId(), LIB_SYMBOL::SetName(), SCH_SYMBOL::SetPosition(), and SCH_SYMBOL::SetUnit().
Referenced by ParseFileHeader().
|
private |
Definition at line 3458 of file sch_altium_plugin.cpp.
References getCurrentScreen(), SCH_SYMBOL::GetField(), ASCH_DESIGNATOR::justification, ASCH_DESIGNATOR::location, m_libSymbols, m_reporter, m_sheetOffset, m_sheetPath, m_symbols, ASCH_DESIGNATOR::orientation, ASCH_OWNER_INTERFACE::ownerindex, REFERENCE_FIELD, REPORTER::Report(), RPT_SEVERITY_DEBUG, SCH_FIELD::SetPosition(), SCH_SYMBOL::SetRef(), SetTextPositioning(), EDA_TEXT::SetVisible(), ASCH_DESIGNATOR::text, and VALUE_FIELD.
Referenced by ParseFileHeader().
|
private |
Definition at line 2080 of file sch_altium_plugin.cpp.
References LIB_SYMBOL::AddDrawItem(), LIB_SHAPE::AddPoint(), ALTIUM_COMPONENT_NONE, SCH_SCREEN::Append(), ASCH_FILL_INTERFACE::AreaColor, ASCH_ELLIPSE::Center, ASCH_BORDER_INTERFACE::Color, GetColorFromInt(), getCurrentScreen(), GetLibEditPosition(), GetRelativePosition(), EDA_SHAPE::GetWidth(), ASCH_FILL_INTERFACE::IsSolid, KiROUND(), ASCH_BORDER_INTERFACE::LineWidth, EDA_ANGLE::m_Angle0, m_libSymbols, m_reporter, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ParseCircle(), ASCH_ELLIPSE::Radius, EDA_SHAPE::RebuildBezierToSegmentsPointsList(), REPORTER::Report(), RPT_SEVERITY_DEBUG, ASCH_ELLIPSE::SecondaryRadius, EDA_SHAPE::SetBezierC1(), EDA_SHAPE::SetBezierC2(), EDA_SHAPE::SetEnd(), EDA_SHAPE::SetFillColor(), EDA_SHAPE::SetFilled(), EDA_SHAPE::SetFillMode(), SetLibShapeFillAndColor(), SetLibShapeLine(), EDA_SHAPE::SetStart(), SCH_SHAPE::SetStroke(), LIB_ITEM::SetUnit(), and TransformEllipseToBeziers().
Referenced by ParseFileHeader(), and ParseLibFile().
|
private |
Definition at line 1986 of file sch_altium_plugin.cpp.
References LIB_SYMBOL::AddDrawItem(), ALTIUM_COMPONENT_NONE, SCH_SCREEN::Append(), DEGREES_T, getCurrentScreen(), GetLibEditPosition(), GetRelativePosition(), IsComponentPartVisible(), KiROUND(), ASCH_BORDER_INTERFACE::LineWidth, EDA_ANGLE::m_Angle0, ASCH_ARC::m_Center, ASCH_ARC::m_EndAngle, m_libSymbols, ASCH_ARC::m_Radius, m_reporter, ASCH_ARC::m_SecondaryRadius, m_sheetOffset, ASCH_ARC::m_StartAngle, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, EDA_SHAPE::RebuildBezierToSegmentsPointsList(), REPORTER::Report(), RPT_SEVERITY_DEBUG, EDA_SHAPE::SetBezierC1(), EDA_SHAPE::SetBezierC2(), EDA_SHAPE::SetEnd(), SetLibShapeLine(), EDA_SHAPE::SetStart(), SCH_SHAPE::SetStroke(), LIB_ITEM::SetUnit(), and TransformEllipseToBeziers().
Referenced by ParseLibFile().
void SCH_ALTIUM_PLUGIN::ParseFileHeader | ( | const ALTIUM_COMPOUND_FILE & | aAltiumSchFile | ) |
Definition at line 594 of file sch_altium_plugin.cpp.
References _, ALTIUM_COMPOUND_FILE::FindStream(), getCurrentScreen(), getCurrentSheet(), getLibFileName(), ALTIUM_PARSER::GetRemainingBytes(), ALTIUM_PARSER::HasParsingError(), m_altiumComponents, m_altiumPortsCurrentSheet, m_currentTitleBlock, m_harnessOwnerIndexOffset, m_libSymbols, m_pi, m_properties, m_reporter, m_symbols, ParseArc(), ParseBezier(), ParseBus(), ParseBusEntry(), ParseComponent(), ParseDesignator(), ParseEllipse(), ParseFileName(), ParseImage(), ParseImplementation(), ParseImplementationList(), ParseJunction(), ParseLabel(), ParseLine(), ParseNetLabel(), ParseNoERC(), ParseNote(), ParseParameter(), ParsePin(), ParsePolygon(), ParsePolyline(), ParsePort(), ParsePowerPort(), ParseRectangle(), ParseRoundRectangle(), ParseSheet(), ParseSheetEntry(), ParseSheetName(), ParseSheetSymbol(), ParseTextFrame(), ParseWire(), ALTIUM_PARSER::ReadInt(), ALTIUM_PARSER::ReadProperties(), REPORTER::Report(), RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, SCH_PLUGIN::SaveSymbol(), EDA_ITEM::SetModified(), SCH_SCREEN::SetTitleBlock(), and THROW_IO_ERROR.
Referenced by ParseAltiumSch().
|
private |
Definition at line 3433 of file sch_altium_plugin.cpp.
References ASCH_FILE_NAME::isHidden, ASCH_FILE_NAME::location, m_reporter, m_sheetOffset, m_sheets, ASCH_FILE_NAME::orientation, ASCH_OWNER_INTERFACE::ownerindex, REPORTER::Report(), RPT_SEVERITY_DEBUG, SCH_FIELD::SetPosition(), SCH_FIELD::SetText(), SetTextPositioning(), EDA_TEXT::SetVisible(), SHEETFILENAME, and ASCH_FILE_NAME::text.
Referenced by ParseFileHeader().
|
private |
Definition at line 2371 of file sch_altium_plugin.cpp.
References ALTIUM_COMPONENT_NONE, SCH_SCREEN::Append(), ASCH_HARNESS_CONNECTOR::AreaColor, ASCH_HARNESS_CONNECTOR::Color, GetColorFromInt(), getCurrentScreen(), getCurrentSheet(), ASCH_HARNESS_CONNECTOR::Location, m_harnessEntryParent, m_harnessOwnerIndexOffset, m_reporter, m_schematic, m_sheetOffset, m_sheetPath, m_sheets, ASCH_OWNER_INTERFACE::ownerpartid, SCH_SHEET_PATH::push_back(), REPORTER::Report(), RPT_SEVERITY_DEBUG, SCH_SHEET::SetBackgroundColor(), SCH_SHEET::SetBorderColor(), SCH_SHEET_PATH::SetPageNumber(), SCH_SHEET::SetScreen(), and ASCH_HARNESS_CONNECTOR::Size.
Referenced by ParseAdditional().
|
private |
Definition at line 2408 of file sch_altium_plugin.cpp.
References SPIN_STYLE::BOTTOM, ASCH_HARNESS_ENTRY::DistanceFromTop, SPIN_STYLE::LEFT, m_harnessEntryParent, m_reporter, m_sheets, ASCH_HARNESS_ENTRY::Name, REPORTER::Report(), SPIN_STYLE::RIGHT, RPT_SEVERITY_DEBUG, SCH_SHEET_PIN::SetPosition(), SCH_LABEL_BASE::SetShape(), SCH_SHEET_PIN::SetSide(), SCH_HIERLABEL::SetSpinStyle(), EDA_TEXT::SetText(), ASCH_HARNESS_ENTRY::Side, SPIN_STYLE::UP, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseAdditional().
|
private |
Definition at line 2993 of file sch_altium_plugin.cpp.
References _, ASCH_PORT::Alignment, SCH_SCREEN::Append(), ASCH_SHEET_FONT::Bold, ASCH_PORT::FontID, fonts, GetColorFromInt(), getCurrentScreen(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, HARNESS_PORT_COLOR_DEFAULT_BACKGROUND, HARNESS_PORT_COLOR_DEFAULT_OUTLINE, ASCH_PORT::Height, IS_NEW, ASCH_SHEET_FONT::Italic, ASCH_PORT::Location, m_altiumSheet, m_reporter, m_sheetOffset, EDA_IU_SCALE::MilsToIU(), ASCH_PORT::Name, REPORTER::Report(), RPT_SEVERITY_WARNING, schIUScale, EDA_TEXT::SetBold(), EDA_SHAPE::SetEndX(), EDA_SHAPE::SetEndY(), EDA_SHAPE::SetFillColor(), EDA_SHAPE::SetFillMode(), EDA_ITEM::SetFlags(), EDA_TEXT::SetHorizJustify(), EDA_TEXT::SetItalic(), EDA_SHAPE::SetStartX(), EDA_SHAPE::SetStartY(), SCH_SHAPE::SetStroke(), EDA_TEXT::SetText(), EDA_TEXT::SetTextColor(), EDA_TEXT::SetTextSize(), ASCH_SHEET_FONT::Size, ASCH_PORT::TextColor, and ASCH_PORT::Width.
Referenced by ParseAdditional().
|
private |
Definition at line 2458 of file sch_altium_plugin.cpp.
References _, ASCH_HARNESS_TYPE::Color, GetColorFromInt(), PROJECT::GetProjectPath(), KiCadSchematicFileExtension, ASCH_HARNESS_TYPE::Location, m_harnessEntryParent, m_reporter, m_schematic, m_sheetOffset, m_sheets, SCHEMATIC::Prj(), REPORTER::Report(), RPT_SEVERITY_DEBUG, RPT_SEVERITY_WARNING, SCH_SCREEN::SetFileName(), SCH_FIELD::SetPosition(), SCH_FIELD::SetText(), EDA_TEXT::SetTextColor(), SetTextPositioning(), EDA_TEXT::SetVisible(), SHEETFILENAME, SHEETNAME, and ASCH_HARNESS_TYPE::Text.
Referenced by ParseAdditional().
|
private |
|
private |
Definition at line 3284 of file sch_altium_plugin.cpp.
References _, std::abs(), SCH_SCREEN::Append(), ASCH_IMAGE::corner, ASCH_STORAGE_FILE::data, ASCH_IMAGE::embedimage, ASCH_IMAGE::filename, getCurrentScreen(), GetFileFromStorage(), IS_NEW, ASCH_IMAGE::location, m_altiumComponents, m_reporter, m_sheetOffset, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartid, REPORTER::Report(), RPT_SEVERITY_ERROR, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseFileHeader().
|
private |
Definition at line 3723 of file sch_altium_plugin.cpp.
References AltiumToKiCadLibID(), LIB_ID::Format(), ASCH_IMPLEMENTATION::isCurrent, ASCH_IMPLEMENTATION::libname, m_altiumImplementationList, m_libSymbols, m_reporter, m_symbols, ASCH_IMPLEMENTATION::name, ASCH_OWNER_INTERFACE::ownerindex, REPORTER::Report(), RPT_SEVERITY_DEBUG, SCH_SYMBOL::SetFootprintFieldText(), EDA_TEXT::SetText(), and ASCH_IMPLEMENTATION::type.
Referenced by ParseFileHeader(), and ParseLibFile().
|
private |
Definition at line 3714 of file sch_altium_plugin.cpp.
References m_altiumImplementationList, and ASCH_OWNER_INTERFACE::ownerindex.
Referenced by ParseFileHeader().
|
private |
Definition at line 3270 of file sch_altium_plugin.cpp.
References SCH_SCREEN::Append(), getCurrentScreen(), IS_NEW, ASCH_JUNCTION::location, m_sheetOffset, and EDA_ITEM::SetFlags().
Referenced by ParseFileHeader().
|
private |
Handle labels that are in a library symbol, not on schematic
Definition at line 1208 of file sch_altium_plugin.cpp.
References LIB_SYMBOL::AddDrawItem(), ALTIUM_COMPONENT_NONE, AltiumSpecialStringsToKiCadVariables(), SCH_SCREEN::Append(), ASCH_SHEET_FONT::Bold, ASCH_LABEL::fontId, fonts, getCurrentScreen(), GetLibEditPosition(), GetRelativePosition(), IS_NEW, ASCH_SHEET_FONT::Italic, ASCH_LABEL::justification, ASCH_LABEL::location, m_altiumSheet, m_libSymbols, m_reporter, m_sheetOffset, m_symbols, ASCH_LABEL::orientation, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, REPORTER::Report(), RPT_SEVERITY_DEBUG, EDA_TEXT::SetBold(), EDA_ITEM::SetFlags(), EDA_TEXT::SetItalic(), LIB_ITEM::SetPosition(), EDA_TEXT::SetText(), SetTextPositioning(), EDA_TEXT::SetTextSize(), LIB_ITEM::SetUnit(), ASCH_SHEET_FONT::Size, and ASCH_LABEL::text.
Referenced by ParseFileHeader(), and ParseLibFile().
|
private |
Definition at line 3783 of file sch_altium_plugin.cpp.
References AltiumToKiCadLibID(), ASCH_SYMBOL::componentdescription, ASCH_SYMBOL::displaymodecount, getLibName(), LIB_SYMBOL::GetName(), ASCH_SYMBOL::libreference, ASCH_SYMBOL::partcount, LIB_SYMBOL::SetDescription(), LIB_SYMBOL::SetLibId(), LIB_SYMBOL::SetName(), and LIB_SYMBOL::SetUnitCount().
Referenced by ParseLibFile().
|
private |
Definition at line 3497 of file sch_altium_plugin.cpp.
References ASCH_DESIGNATOR::fontId, GetLibEditPosition(), ASCH_DESIGNATOR::location, LIB_ITEM::SetPosition(), EDA_TEXT::SetText(), EDA_TEXT::SetTextSize(), and ASCH_DESIGNATOR::text.
Referenced by ParseLibFile().
|
private |
Definition at line 3811 of file sch_altium_plugin.cpp.
References _, LIB_SYMBOL::FixupDrawItems(), ALTIUM_COMPOUND_FILE::GetLibSymbols(), GetName(), ALTIUM_PARSER::GetRemainingBytes(), EDA_TEXT::GetText(), LIB_SYMBOL::GetValueField(), ALTIUM_PARSER::HasParsingError(), m_reporter, name, ParseArc(), ParseBezier(), ParseEllipse(), ParseEllipticalArc(), ParseImplementation(), ParseLabel(), ParseLibComponent(), ParseLibDesignator(), ParseLibHeader(), ParseLibParameter(), ParseLine(), ParsePin(), ParsePolygon(), ParsePolyline(), ParseRectangle(), ParseRoundRectangle(), ParseTextFrame(), ALTIUM_BINARY_READER::ReadByte(), ALTIUM_PARSER::ReadInt(), ALTIUM_BINARY_READER::ReadInt16(), ALTIUM_BINARY_READER::ReadInt32(), ALTIUM_BINARY_READER::ReadPascalString(), ALTIUM_PARSER::ReadProperties(), REPORTER::Report(), RPT_SEVERITY_ERROR, EDA_TEXT::SetText(), split(), and THROW_IO_ERROR.
Referenced by ensureLoadedLibrary().
|
private |
Definition at line 4027 of file sch_altium_plugin.cpp.
References _, ALTIUM_COMPOUND_FILE::FindStream(), ALTIUM_PARSER::GetRemainingBytes(), EDA_IU_SCALE::MilsToIU(), ALTIUM_PARSER::ReadProperties(), ALTIUM_PARSER::ReadString(), schIUScale, and THROW_IO_ERROR.
Referenced by ParseLibFile().
|
private |
Definition at line 3640 of file sch_altium_plugin.cpp.
References AltiumSpecialStringsToKiCadVariables(), ASCH_PARAMETER::fontId, GetLibEditPosition(), ASCH_PARAMETER::isHidden, ASCH_PARAMETER::justification, ASCH_PARAMETER::location, ASCH_PARAMETER::name, ASCH_PARAMETER::orientation, ASCH_OWNER_INTERFACE::ownerpartid, EDA_TEXT::SetText(), EDA_TEXT::SetTextPos(), SetTextPositioning(), EDA_TEXT::SetTextSize(), EDA_TEXT::SetVisible(), and ASCH_PARAMETER::text.
Referenced by ParseLibFile().
|
private |
Definition at line 2274 of file sch_altium_plugin.cpp.
References LIB_SYMBOL::AddDrawItem(), LIB_SHAPE::AddPoint(), ALTIUM_COMPONENT_NONE, SCH_SCREEN::Append(), ASCH_BORDER_INTERFACE::Color, GetColorFromInt(), getCurrentScreen(), GetLibEditPosition(), GetPlotDashType(), GetRelativePosition(), IS_NEW, IsComponentPartVisible(), ASCH_LINE::LineStyle, ASCH_BORDER_INTERFACE::LineWidth, m_libSymbols, m_reporter, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ASCH_LINE::point1, ASCH_LINE::point2, REPORTER::Report(), RPT_SEVERITY_DEBUG, SCH_LINE::SetEndPoint(), EDA_ITEM::SetFlags(), SetLibShapeLine(), EDA_SHAPE::SetLineStyle(), SCH_LINE::SetStroke(), and LIB_ITEM::SetUnit().
Referenced by ParseFileHeader(), and ParseLibFile().
|
private |
Definition at line 3214 of file sch_altium_plugin.cpp.
References SCH_SCREEN::Append(), getCurrentScreen(), IS_NEW, ASCH_NET_LABEL::justification, ASCH_NET_LABEL::location, m_sheetOffset, ASCH_NET_LABEL::orientation, EDA_ITEM::SetFlags(), SetTextPositioning(), and ASCH_NET_LABEL::text.
Referenced by ParseFileHeader().
|
private |
Definition at line 3197 of file sch_altium_plugin.cpp.
References SCH_SCREEN::Append(), getCurrentScreen(), IS_NEW, ASCH_NO_ERC::isActive, ASCH_NO_ERC::location, m_sheetOffset, and EDA_ITEM::SetFlags().
Referenced by ParseFileHeader().
|
private |
Definition at line 1315 of file sch_altium_plugin.cpp.
References AddTextBox().
Referenced by ParseFileHeader().
|
private |
Definition at line 3542 of file sch_altium_plugin.cpp.
References SCH_SYMBOL::AddField(), ALTIUM_COMPONENT_NONE, AltiumSpecialStringsToKiCadVariables(), SCH_SYMBOL::FindField(), SCH_SYMBOL::GetField(), SCH_SYMBOL::GetFieldCount(), PROJECT::GetTextVars(), ASCH_PARAMETER::isHidden, ASCH_PARAMETER::justification, ASCH_PARAMETER::location, m_currentTitleBlock, m_libSymbols, m_schematic, m_sheetOffset, m_sheetPath, m_symbols, ASCH_PARAMETER::name, ASCH_PARAMETER::orientation, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartid, SCHEMATIC::Prj(), SCH_SHEET_PATH::SetPageNumber(), SCH_FIELD::SetPosition(), SCH_FIELD::SetText(), SetTextPositioning(), EDA_TEXT::SetVisible(), ASCH_PARAMETER::text, and VALUE_FIELD.
Referenced by ParseFileHeader().
|
private |
Definition at line 946 of file sch_altium_plugin.cpp.
References _, LIB_SYMBOL::AddDrawItem(), AltiumPinNamesToKiCad(), ASCH_PIN_SYMBOL::CLOCK, DEFAULT_PINNAME_SIZE, DEFAULT_PINNUM_SIZE, ASCH_PIN::designator, ASCH_PIN::electrical, GetRelativePosition(), ASCH_PIN::hidden, IsComponentPartVisible(), ASCH_PIN::location, ASCH_PIN_SYMBOL::LOW_INPUT, ASCH_PIN_SYMBOL::LOW_OUTPUT, m_libSymbols, m_reporter, m_sheetOffset, m_symbols, EDA_IU_SCALE::MilsToIU(), ASCH_PIN::name, ASCH_PIN_SYMBOL::NEGATED, ASCH_PIN::orientation, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, pin, ASCH_PIN::pinlength, REPORTER::Report(), RPT_SEVERITY_DEBUG, RPT_SEVERITY_WARNING, schIUScale, ASCH_PIN::showDesignator, ASCH_PIN::showPinName, ASCH_PIN::symbolInnerEdge, ASCH_PIN::symbolOuterEdge, ASCH_PIN_SYMBOL::UNKNOWN, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseFileHeader(), and ParseLibFile().
|
private |
Definition at line 1700 of file sch_altium_plugin.cpp.
References LIB_SYMBOL::AddDrawItem(), LIB_SHAPE::AddPoint(), SCH_SHAPE::AddPoint(), ALTIUM_COMPONENT_NONE, SCH_SCREEN::Append(), ASCH_BORDER_INTERFACE::Color, STROKE_PARAMS::GetColor(), getCurrentScreen(), EDA_SHAPE::GetFillColor(), EDA_SHAPE::GetFillMode(), GetLibEditPosition(), GetRelativePosition(), LIB_SHAPE::GetStroke(), IS_NEW, IsComponentPartVisible(), m_libSymbols, m_reporter, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ASCH_POLYGON::points, REPORTER::Report(), RPT_SEVERITY_DEBUG, EDA_ITEM::SetFlags(), SetLibShapeFillAndColor(), SetLibShapeLine(), SetSchShapeFillAndColor(), SetSchShapeLine(), LIB_SHAPE::SetStroke(), LIB_ITEM::SetUnit(), and STROKE_PARAMS::SetWidth().
Referenced by ParseFileHeader(), and ParseLibFile().
|
private |
Definition at line 1630 of file sch_altium_plugin.cpp.
References LIB_SYMBOL::AddDrawItem(), LIB_SHAPE::AddPoint(), SCH_SHAPE::AddPoint(), ALTIUM_COMPONENT_NONE, SCH_SCREEN::Append(), ASCH_BORDER_INTERFACE::Color, GetColorFromInt(), getCurrentScreen(), GetLibEditPosition(), GetPlotDashType(), GetRelativePosition(), LIB_SHAPE::GetStroke(), IS_NEW, IsComponentPartVisible(), ASCH_POLYLINE::LineStyle, ASCH_BORDER_INTERFACE::LineWidth, m_libSymbols, m_reporter, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ASCH_POLYLINE::Points, REPORTER::Report(), RPT_SEVERITY_DEBUG, EDA_ITEM::SetFlags(), SetLibShapeLine(), STROKE_PARAMS::SetPlotStyle(), LIB_SHAPE::SetStroke(), SCH_SHAPE::SetStroke(), and LIB_ITEM::SetUnit().
Referenced by ParseFileHeader(), and ParseLibFile().
|
private |
Definition at line 3057 of file sch_altium_plugin.cpp.
References _, SCH_SCREEN::Append(), SCH_LABEL_BASE::AutoplaceFields(), SPIN_STYLE::BOTTOM, getCurrentScreen(), SCH_LABEL_BASE::GetFields(), ASCH_PORT::HarnessType, ASCH_PORT::IOtype, IS_NEW, SCH_SCREEN::IsTerminalPoint(), LAYER_BUS, LAYER_WIRE, SPIN_STYLE::LEFT, ASCH_PORT::Location, m_altiumHarnessPortsCurrentSheet, m_reporter, m_sheetOffset, EDA_IU_SCALE::MilsToIU(), ASCH_PORT::Name, REPORTER::Report(), SPIN_STYLE::RIGHT, RPT_SEVERITY_WARNING, schIUScale, SCH_LINE::SetEndPoint(), EDA_ITEM::SetFlags(), SCH_LINE::SetLineWidth(), SCH_LABEL_BASE::SetShape(), SCH_LABEL_BASE::SetSpinStyle(), ASCH_PORT::Style, SPIN_STYLE::UP, ASCH_PORT::Width, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseFileHeader().
|
private |
Definition at line 2895 of file sch_altium_plugin.cpp.
References _, LIB_SYMBOL::AddDrawItem(), AltiumToKiCadLibID(), ANGLE_HORIZONTAL, ANGLE_VERTICAL, SCH_SCREEN::Append(), getCurrentScreen(), SCH_SYMBOL::GetField(), getLibFileName(), getLibName(), LIB_FIELD::GetPosition(), LIB_SYMBOL::GetReferenceField(), LIB_SYMBOL::GetValueField(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_RIGHT, HelperGeneratePowerPortGraphics(), ASCH_POWER_PORT::location, m_pi, m_powerSymbols, m_properties, m_reporter, m_sheetOffset, m_sheetPath, ASCH_POWER_PORT::orientation, pin, REPORTER::Report(), RPT_SEVERITY_WARNING, SCH_PLUGIN::SaveSymbol(), LIB_SYMBOL::SetDescription(), EDA_TEXT::SetHorizJustify(), LIB_SYMBOL::SetKeyWords(), LIB_SYMBOL::SetLibId(), SCH_SYMBOL::SetLibId(), SCH_SYMBOL::SetLibSymbol(), LIB_SYMBOL::SetName(), SCH_SYMBOL::SetOrientation(), LIB_ITEM::SetPosition(), SCH_FIELD::SetPosition(), SCH_SYMBOL::SetPosition(), LIB_SYMBOL::SetPower(), SCH_SYMBOL::SetRef(), EDA_TEXT::SetText(), EDA_TEXT::SetTextAngle(), SCH_SYMBOL::SetValueFieldText(), EDA_TEXT::SetVisible(), ASCH_POWER_PORT::showNetName, ASCH_POWER_PORT::style, ASCH_POWER_PORT::text, and VALUE_FIELD.
Referenced by ParseFileHeader().
|
private |
Definition at line 2504 of file sch_altium_plugin.cpp.
References LIB_SYMBOL::AddDrawItem(), ALTIUM_COMPONENT_NONE, SCH_SCREEN::Append(), ASCH_RECTANGLE::BottomLeft, ASCH_BORDER_INTERFACE::Color, getCurrentScreen(), GetLibEditPosition(), GetRelativePosition(), IS_NEW, IsComponentPartVisible(), m_libSymbols, m_reporter, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, REPORTER::Report(), RPT_SEVERITY_DEBUG, EDA_SHAPE::SetEnd(), EDA_ITEM::SetFlags(), SetLibShapeFillAndColor(), SetLibShapeLine(), SCH_SHAPE::SetPosition(), LIB_SHAPE::SetPosition(), SetSchShapeFillAndColor(), SetSchShapeLine(), LIB_ITEM::SetUnit(), and ASCH_RECTANGLE::TopRight.
Referenced by ParseFileHeader(), and ParseLibFile().
|
private |
Definition at line 1780 of file sch_altium_plugin.cpp.
References std::abs(), LIB_SYMBOL::AddDrawItem(), ALTIUM_COMPONENT_NONE, SCH_SCREEN::Append(), ASCH_ROUND_RECTANGLE::BottomLeft, ASCH_BORDER_INTERFACE::Color, ASCH_ROUND_RECTANGLE::CornerRadius, getCurrentScreen(), GetLibEditPosition(), LIB_SHAPE::GetPosition(), GetRelativePosition(), IS_NEW, IsComponentPartVisible(), m_libSymbols, m_reporter, m_sheetOffset, m_symbols, LIB_SHAPE::Normalize(), ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, REPORTER::Report(), RPT_SEVERITY_DEBUG, EDA_SHAPE::SetEnd(), EDA_ITEM::SetFlags(), SetLibShapeFillAndColor(), SetLibShapeLine(), SCH_SHAPE::SetPosition(), LIB_SHAPE::SetPosition(), SetSchShapeFillAndColor(), SetSchShapeLine(), LIB_ITEM::SetUnit(), ASCH_ROUND_RECTANGLE::TopRight, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseFileHeader(), and ParseLibFile().
|
private |
Definition at line 3361 of file sch_altium_plugin.cpp.
References PAGE_INFO::Custom, getCurrentScreen(), PAGE_INFO::GetHeightIU(), EDA_IU_SCALE::IU_PER_MILS, EDA_IU_SCALE::IUToMils(), m_altiumSheet, m_sheetOffset, schIUScale, PAGE_INFO::SetCustomHeightMils(), PAGE_INFO::SetCustomWidthMils(), SCH_SCREEN::SetPageSettings(), and PAGE_INFO::SetType().
Referenced by ParseFileHeader().
|
private |
Definition at line 2614 of file sch_altium_plugin.cpp.
References SPIN_STYLE::BOTTOM, ASCH_SHEET_ENTRY::distanceFromTop, ASCH_SHEET_ENTRY::iotype, SPIN_STYLE::LEFT, m_reporter, m_sheets, ASCH_SHEET_ENTRY::name, ASCH_OWNER_INTERFACE::ownerindex, REPORTER::Report(), SPIN_STYLE::RIGHT, RPT_SEVERITY_DEBUG, SCH_SHEET_PIN::SetPosition(), SCH_LABEL_BASE::SetShape(), SCH_SHEET_PIN::SetSide(), SCH_HIERLABEL::SetSpinStyle(), EDA_TEXT::SetText(), ASCH_SHEET_ENTRY::side, SPIN_STYLE::UP, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseFileHeader().
|
private |
Definition at line 3410 of file sch_altium_plugin.cpp.
References ASCH_SHEET_NAME::isHidden, ASCH_SHEET_NAME::location, m_reporter, m_sheetOffset, m_sheets, ASCH_SHEET_NAME::orientation, ASCH_OWNER_INTERFACE::ownerindex, REPORTER::Report(), RPT_SEVERITY_DEBUG, SCH_FIELD::SetPosition(), SCH_FIELD::SetText(), SetTextPositioning(), EDA_TEXT::SetVisible(), SHEETNAME, and ASCH_SHEET_NAME::text.
Referenced by ParseFileHeader().
|
private |
Definition at line 2576 of file sch_altium_plugin.cpp.
References SCH_SCREEN::Append(), ASCH_SHEET_SYMBOL::areacolor, ASCH_SHEET_SYMBOL::color, GetColorFromInt(), getCurrentScreen(), getCurrentSheet(), SCH_SHEET::GetScreen(), IS_NEW, ASCH_SHEET_SYMBOL::isSolid, ASCH_SHEET_SYMBOL::location, SCH_SHEET_INSTANCE::m_PageNumber, SCH_SHEET_INSTANCE::m_Path, m_rootSheet, SCH_SCREEN::m_sheetInstances, m_sheetOffset, m_sheetPath, m_sheets, SCH_SHEET_PATH::Path(), SCH_SHEET_PATH::push_back(), SCH_SHEET::SetBackgroundColor(), SCH_SHEET::SetBorderColor(), EDA_ITEM::SetFlags(), SCH_SHEET_PATH::SetPageNumber(), and ASCH_SHEET_SYMBOL::size.
Referenced by ParseFileHeader().
|
private |
Definition at line 2342 of file sch_altium_plugin.cpp.
References SCH_SHAPE::AddPoint(), ALTIUM_COMPONENT_NONE, SCH_SCREEN::Append(), ASCH_SIGNAL_HARNESS::Color, GetColorFromInt(), getCurrentScreen(), IS_NEW, ASCH_SIGNAL_HARNESS::LineWidth, m_reporter, m_sheetOffset, ASCH_OWNER_INTERFACE::ownerpartid, ASCH_SIGNAL_HARNESS::Points, REPORTER::Report(), RPT_SEVERITY_DEBUG, EDA_ITEM::SetFlags(), and SCH_SHAPE::SetStroke().
Referenced by ParseAdditional().
void SCH_ALTIUM_PLUGIN::ParseStorage | ( | const ALTIUM_COMPOUND_FILE & | aAltiumSchFile | ) |
Definition at line 482 of file sch_altium_plugin.cpp.
References _, ALTIUM_COMPOUND_FILE::FindStream(), ALTIUM_PARSER::GetRemainingBytes(), ALTIUM_PARSER::HasParsingError(), m_altiumStorage, m_reporter, ALTIUM_PARSER::ReadInt(), ALTIUM_PARSER::ReadProperties(), ALTIUM_PARSER::ReadString(), REPORTER::Report(), RPT_SEVERITY_ERROR, and THROW_IO_ERROR.
Referenced by ParseAltiumSch().
|
private |
Definition at line 1304 of file sch_altium_plugin.cpp.
References AddLibTextBox(), AddTextBox(), ALTIUM_COMPONENT_NONE, and ASCH_OWNER_INTERFACE::ownerpartid.
Referenced by ParseFileHeader(), and ParseLibFile().
|
private |
Definition at line 3250 of file sch_altium_plugin.cpp.
References SCH_SCREEN::Append(), getCurrentScreen(), IS_NEW, ASCH_WIRE::lineWidth, m_sheetOffset, ASCH_WIRE::points, SCH_LINE::SetEndPoint(), EDA_ITEM::SetFlags(), and SCH_LINE::SetLineWidth().
Referenced by ParseFileHeader().
|
virtualinherited |
Reimplemented in SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.
Definition at line 120 of file sch_plugin.cpp.
References NOT_IMPLEMENTED.
Referenced by SCH_EAGLE_PLUGIN::loadSchematic(), LoadSchematicFile(), CADSTAR_SCH_ARCHIVE_PLUGIN::LoadSchematicFile(), SCH_EAGLE_PLUGIN::LoadSchematicFile(), SCH_EASYEDAPRO_PLUGIN::LoadSchematicFile(), SYMBOL_LIBRARY_MANAGER::SaveLibrary(), and SYMBOL_LIB_TABLE_RESCUER::WriteRescueLibrary().
|
virtualinherited |
Write aSchematic to a storage file in a format that this SCH_PLUGIN implementation knows about, or it can be used to write a portion of aSchematic to a special kind of export file.
aFileName | is the name of a file to save to on disk. |
aSheet | is the class SCH_SHEET in memory document tree from which to extract information when writing to aFileName. The caller continues to own the SCHEMATIC, and the plugin should refrain from modifying the SCHEMATIC if possible. |
aSchematic | is the SCHEMATIC object used to access any schematic-wide or project information needed to save the document. |
aProperties | is an associative array that can be used to tell the saver how to save the file, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. Set the #PropSaveCurrentSheetOnly property to only save the current sheet. Otherwise, all hierarchical sheets are saved. |
IO_ERROR | if there is a problem saving or exporting. |
Reimplemented in SCH_LEGACY_PLUGIN, and SCH_SEXPR_PLUGIN.
Definition at line 133 of file sch_plugin.cpp.
References NOT_IMPLEMENTED.
Referenced by DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged(), and SCH_EDIT_FRAME::saveSchematicFile().
|
virtualinherited |
Write aSymbol to an existing library located at aLibraryPath.
If a LIB_SYMBOL by the same name already exists or there are any conflicting alias names, the new LIB_SYMBOL will silently overwrite any existing aliases and/or part because libraries cannot have duplicate alias names. It is the responsibility of the caller to check the library for conflicts before saving.
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several symbols. |
aSymbol | is what to store in the library. The library is refreshed and the caller must update any LIB_SYMBOL pointers that may have changed. |
aProperties | is an associative array that can be used to tell the saver how to save the symbol, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. |
IO_ERROR | if there is a problem saving. |
Reimplemented in SCH_HTTP_LIB_PLUGIN, SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.
Definition at line 167 of file sch_plugin.cpp.
References NOT_IMPLEMENTED.
Referenced by PANEL_SYM_LIB_TABLE::convertLibrary(), SYMBOL_EDIT_FRAME::ExportSymbol(), SCH_EDITOR_CONTROL::ExportSymbolsToLibrary(), SCH_EAGLE_PLUGIN::loadLibrary(), CADSTAR_SCH_ARCHIVE_PLUGIN::LoadSchematicFile(), SCH_EASYEDAPRO_PLUGIN::LoadSchematicFile(), ParseFileHeader(), ParsePowerPort(), SYMBOL_LIBRARY_MANAGER::LIB_BUFFER::SaveBuffer(), SYMBOL_LIBRARY_MANAGER::SaveLibrary(), SYMBOL_LIB_TABLE::SaveSymbol(), and SYMBOL_LIB_TABLE_RESCUER::WriteRescueLibrary().
|
inlinevirtualinherited |
Some library plugins need to have access to their parent library table.
aTable | is the table this plugin is registered within. |
Reimplemented in SCH_DATABASE_PLUGIN, and SCH_HTTP_LIB_PLUGIN.
Definition at line 510 of file sch_io_mgr.h.
Referenced by SYMBOL_LIB_TABLE::FindRow(), SYMBOL_LIB_TABLE::LoadSymbolLib(), and SYMBOL_LIB_TABLE_ROW::Refresh().
|
inlinevirtualinherited |
Set an optional progress reporter.
Reimplemented in CADSTAR_SCH_ARCHIVE_PLUGIN, SCH_EAGLE_PLUGIN, SCH_EASYEDA_PLUGIN, SCH_EASYEDAPRO_PLUGIN, SCH_SEXPR_PLUGIN, SCH_LEGACY_PLUGIN, and SCH_LTSPICE_PLUGIN.
Definition at line 163 of file sch_io_mgr.h.
Referenced by SCH_EDIT_FRAME::importFile(), and SCH_EDIT_FRAME::OpenProjectFiles().
|
inlineoverridevirtual |
Set an optional reporter for warnings/errors.
Reimplemented from SCH_PLUGIN.
Definition at line 60 of file sch_altium_plugin.h.
References m_reporter.
|
inlinevirtualinherited |
Reimplemented in SCH_DATABASE_PLUGIN, and SCH_HTTP_LIB_PLUGIN.
Definition at line 452 of file sch_io_mgr.h.
Referenced by SYMBOL_LIB_TABLE_ROW::SupportsSubLibraries().
|
virtualinherited |
Append supported SCH_PLUGIN options to aListToAppenTo along with internationalized descriptions.
Options are typically appended so that a derived SCH_PLUGIN can call its base class function by the same name first, thus inheriting options declared there. (Some base class options could pertain to all Symbol*() functions in all derived SCH_PLUGINs.) Note that since aListToAppendTo is a PROPERTIES object, all options will be unique and last guy wins.
aListToAppendTo | holds a tuple of
In the future perhaps aListToAppendTo evolves to something capable of also holding a wxValidator for the cells in said dialog: http://forums.wxwidgets.org/viewtopic.php?t=23277&p=104180. This would require a 3 column list, and introducing wx GUI knowledge to SCH_PLUGIN, which has been avoided to date. |
Reimplemented in CADSTAR_SCH_ARCHIVE_PLUGIN.
Definition at line 204 of file sch_plugin.cpp.
Referenced by SYMBOL_GRID_TRICKS::optionsEditor().
|
private |
Definition at line 204 of file sch_altium_plugin.h.
|
private |
Definition at line 206 of file sch_altium_plugin.h.
Referenced by IsComponentPartVisible(), ParseComponent(), ParseFileHeader(), and ParseImage().
|
private |
Definition at line 211 of file sch_altium_plugin.h.
Referenced by ParseAdditional(), and ParsePort().
|
private |
Definition at line 207 of file sch_altium_plugin.h.
Referenced by ParseImplementation(), and ParseImplementationList().
|
private |
Definition at line 208 of file sch_altium_plugin.h.
Referenced by ParseFileHeader().
|
private |
Definition at line 197 of file sch_altium_plugin.h.
Referenced by AddTextBox(), ParseHarnessPort(), ParseLabel(), and ParseSheet().
|
private |
Definition at line 203 of file sch_altium_plugin.h.
Referenced by GetFileFromStorage(), and ParseStorage().
|
private |
Definition at line 193 of file sch_altium_plugin.h.
Referenced by ParseFileHeader(), and ParseParameter().
|
private |
Definition at line 225 of file sch_altium_plugin.h.
|
private |
Definition at line 215 of file sch_altium_plugin.h.
Referenced by ParseHarnessConnector(), ParseHarnessEntry(), ParseHarnessType(), and SCH_ALTIUM_PLUGIN().
|
private |
Definition at line 214 of file sch_altium_plugin.h.
Referenced by ParseFileHeader(), ParseHarnessConnector(), and SCH_ALTIUM_PLUGIN().
|
private |
Definition at line 222 of file sch_altium_plugin.h.
Referenced by ensureLoadedLibrary(), EnumerateSymbolLib(), LoadSymbol(), and ~SCH_ALTIUM_PLUGIN().
|
private |
Definition at line 188 of file sch_altium_plugin.h.
Referenced by ensureLoadedLibrary(), and getLibName().
|
private |
Definition at line 200 of file sch_altium_plugin.h.
Referenced by AddLibTextBox(), ParseArc(), ParseBezier(), ParseCircle(), ParseComponent(), ParseDesignator(), ParseEllipse(), ParseEllipticalArc(), ParseFileHeader(), ParseImplementation(), ParseLabel(), ParseLine(), ParseParameter(), ParsePin(), ParsePolygon(), ParsePolyline(), ParseRectangle(), and ParseRoundRectangle().
|
private |
Definition at line 190 of file sch_altium_plugin.h.
Referenced by LoadSchematicFile(), ParseFileHeader(), and ParsePowerPort().
|
private |
Definition at line 202 of file sch_altium_plugin.h.
Referenced by ParsePowerPort().
|
private |
Definition at line 191 of file sch_altium_plugin.h.
Referenced by ParseFileHeader(), and ParsePowerPort().
|
private |
Definition at line 183 of file sch_altium_plugin.h.
Referenced by AddLibTextBox(), ParseAdditional(), ParseAltiumSch(), ParseArc(), ParseBezier(), ParseCircle(), ParseComponent(), ParseDesignator(), ParseEllipse(), ParseEllipticalArc(), ParseFileHeader(), ParseFileName(), ParseHarnessConnector(), ParseHarnessEntry(), ParseHarnessPort(), ParseHarnessType(), ParseImage(), ParseImplementation(), ParseLabel(), ParseLibFile(), ParseLine(), ParsePin(), ParsePolygon(), ParsePolyline(), ParsePort(), ParsePowerPort(), ParseRectangle(), ParseRoundRectangle(), ParseSheetEntry(), ParseSheetName(), ParseSignalHarness(), ParseStorage(), SCH_ALTIUM_PLUGIN(), and SetReporter().
|
private |
Definition at line 185 of file sch_altium_plugin.h.
Referenced by getLibName(), LoadSchematicFile(), ParseAltiumSch(), ParseSheetSymbol(), and SCH_ALTIUM_PLUGIN().
|
private |
Definition at line 187 of file sch_altium_plugin.h.
Referenced by getLibFileName(), getLibName(), LoadSchematicFile(), ParseAltiumSch(), ParseHarnessConnector(), ParseHarnessType(), ParseParameter(), and SCH_ALTIUM_PLUGIN().
|
private |
Definition at line 196 of file sch_altium_plugin.h.
Referenced by AddLibTextBox(), AddTextBox(), ParseArc(), ParseBezier(), ParseBus(), ParseBusEntry(), ParseCircle(), ParseComponent(), ParseDesignator(), ParseEllipse(), ParseEllipticalArc(), ParseFileName(), ParseHarnessConnector(), ParseHarnessPort(), ParseHarnessType(), ParseImage(), ParseJunction(), ParseLabel(), ParseLine(), ParseNetLabel(), ParseNoERC(), ParseParameter(), ParsePin(), ParsePolygon(), ParsePolyline(), ParsePort(), ParsePowerPort(), ParseRectangle(), ParseRoundRectangle(), ParseSheet(), ParseSheetName(), ParseSheetSymbol(), ParseSignalHarness(), and ParseWire().
|
private |
Definition at line 186 of file sch_altium_plugin.h.
Referenced by getCurrentScreen(), getCurrentSheet(), LoadSchematicFile(), ParseAltiumSch(), ParseComponent(), ParseDesignator(), ParseHarnessConnector(), ParseParameter(), ParsePowerPort(), and ParseSheetSymbol().
|
private |
Definition at line 199 of file sch_altium_plugin.h.
Referenced by ParseFileName(), ParseHarnessConnector(), ParseHarnessEntry(), ParseHarnessType(), ParseSheetEntry(), ParseSheetName(), and ParseSheetSymbol().
|
private |
Definition at line 198 of file sch_altium_plugin.h.
Referenced by AddLibTextBox(), ParseArc(), ParseBezier(), ParseCircle(), ParseComponent(), ParseDesignator(), ParseEllipse(), ParseEllipticalArc(), ParseFileHeader(), ParseImplementation(), ParseLabel(), ParseLine(), ParseParameter(), ParsePin(), ParsePolygon(), ParsePolyline(), ParseRectangle(), and ParseRoundRectangle().
|
private |
Definition at line 221 of file sch_altium_plugin.h.
Referenced by ensureLoadedLibrary().