|
KiCad PCB EDA Suite
|
#include <sch_io_altium.h>
Public Member Functions | |
| SCH_IO_ALTIUM () | |
| ~SCH_IO_ALTIUM () | |
| const IO_BASE::IO_FILE_DESC | GetSchematicFileDesc () const override |
| Returns schematic file description for the SCH_IO. | |
| const IO_BASE::IO_FILE_DESC | GetLibraryDesc () const override |
| Get the descriptor for the library container that this IO plugin operates on. | |
| bool | CanReadSchematicFile (const wxString &aFileName) const override |
| Checks if this SCH_IO can read the specified schematic file. | |
| bool | CanReadLibrary (const wxString &aFileName) const override |
| Checks if this IO object can read the specified library file/directory. | |
| int | GetModifyHash () const override |
| Return the modification hash from the library cache. | |
| SCH_SHEET * | LoadSchematicFile (const wxString &aFileName, SCHEMATIC *aSchematic, SCH_SHEET *aAppendToMe=nullptr, const std::map< std::string, UTF8 > *aProperties=nullptr) override |
| Load information from some input file format that this SCH_IO implementation knows about, into either a new SCH_SHEET or an existing one. | |
| SCH_SHEET * | LoadSchematicProject (SCHEMATIC *aSchematic, const std::map< std::string, UTF8 > *aProperties) |
| void | EnumerateSymbolLib (wxArrayString &aSymbolNameList, const wxString &aLibraryPath, const std::map< std::string, UTF8 > *aProperties=nullptr) override |
| Populate a list of LIB_SYMBOL alias names contained within the library aLibraryPath. | |
| void | EnumerateSymbolLib (std::vector< LIB_SYMBOL * > &aSymbolList, const wxString &aLibraryPath, const std::map< std::string, UTF8 > *aProperties=nullptr) override |
| Populate a list of LIB_SYMBOL aliases contained within the library aLibraryPath. | |
| LIB_SYMBOL * | LoadSymbol (const wxString &aLibraryPath, const wxString &aAliasName, const std::map< std::string, UTF8 > *aProperties=nullptr) override |
| Load a LIB_SYMBOL object having aPartName from the aLibraryPath containing a library format that this SCH_IO knows about. | |
| bool | IsLibraryWritable (const wxString &aLibraryPath) override |
| Return true if the library at aLibraryPath is writable. | |
| wxString | getLibName () |
| wxFileName | getLibFileName () |
| void | ParseAltiumSch (const wxString &aFileName) |
| void | attachEmptySheetScreen (SCH_SHEET *aSheet, const wxString &aMissingFile) |
| Give a sheet whose source file is missing an empty screen with a file of its own; aMissingFile is empty for a converted signal harness. | |
| wxString | claimSheetFile (const wxString &aStem) |
| Claim a file in the project folder for a sheet screen that neither the root nor another sheet holds, suffixing aStem as needed. | |
| void | pruneCyclicSheets (const std::vector< SCH_SHEET * > &aCyclicSheets, SCH_SCREEN *aScreen) |
| Remove sheet symbols referencing a parse-stack file (an unrepresentable cycle), converting their pins to hierarchical labels and clearing their sheet-instance records. | |
| void | ParseStorage (const ALTIUM_COMPOUND_FILE &aAltiumSchFile) |
| void | ParseAdditional (const ALTIUM_COMPOUND_FILE &aAltiumSchFile) |
| void | ParseFileHeader (const ALTIUM_COMPOUND_FILE &aAltiumSchFile) |
| void | ParseASCIISchematic (const wxString &aFileName) |
| void | ParseRecord (int index, std::map< wxString, wxString > &properties, const wxString &aSectionName) |
| virtual void | SaveLibrary (const wxString &aFileName, const std::map< std::string, UTF8 > *aProperties=nullptr) |
| virtual std::vector< LIB_SYMBOL * > | GetImportedCachedLibrarySymbols () |
| Return the canonical symbol definitions produced by the last LoadSchematicFile(). | |
| virtual void | SaveSchematicFile (const wxString &aFileName, SCH_SHEET *aSheet, SCHEMATIC *aSchematic, const std::map< std::string, UTF8 > *aProperties=nullptr) |
| Write aSchematic to a storage file in a format that this SCH_IO implementation knows about, or it can be used to write a portion of aSchematic to a special kind of export file. | |
| virtual void | CheckLibrary (const wxString &aLibraryPath, const std::map< std::string, UTF8 > *aProperties=nullptr) |
| Validate that the library at aLibraryPath is reachable and well-formed, without necessarily loading symbol data. | |
| virtual void | SaveSymbol (const wxString &aLibraryPath, std::unique_ptr< LIB_SYMBOL > aSymbol, const std::map< std::string, UTF8 > *aProperties=nullptr) |
| Write aSymbol to an existing library located at aLibraryPath. | |
| virtual void | DeleteSymbol (const wxString &aLibraryPath, const wxString &aSymbolName, const std::map< std::string, UTF8 > *aProperties=nullptr) |
| Delete the entire LIB_SYMBOL associated with aAliasName from the library aLibraryPath. | |
| virtual void | GetLibraryOptions (std::map< std::string, UTF8 > *aListToAppendTo) const override |
| Append supported SCH_IO options to aListToAppenTo along with internationalized descriptions. | |
| virtual bool | SupportsSubLibraries () const |
| virtual void | GetSubLibraryNames (std::vector< wxString > &aNames) |
| Retrieves a list of sub-libraries in this library. | |
| virtual wxString | GetSubLibraryDescription (const wxString &aName) |
| Gets a description of a sublibrary. | |
| virtual void | GetAvailableSymbolFields (std::vector< wxString > &aNames) |
| Retrieves a list of (custom) field names that are present on symbols in this library. | |
| 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. | |
| virtual const wxString & | GetError () const |
| Return an error string to the caller. | |
| virtual void | SetLibraryManagerAdapter (SYMBOL_LIBRARY_ADAPTER *aAdapter) |
| Some library plugins need to interface with other loaded libraries. | |
| const wxString & | GetName () const |
| Return a brief hard coded name for this IO interface. | |
| virtual bool | IsPCB_IO () const |
| Work-around for lack of dynamic_cast across compile units on Mac. | |
| virtual void | SetReporter (REPORTER *aReporter) |
| Set an optional reporter for warnings/errors. | |
| virtual void | SetProgressReporter (PROGRESS_REPORTER *aReporter) |
| Set an optional progress reporter. | |
| virtual const IO_FILE_DESC | GetLibraryFileDesc () const |
| Get the descriptor for the individual library elements that this IO plugin operates on. | |
| virtual void | CreateLibrary (const wxString &aLibraryPath, const std::map< std::string, UTF8 > *aProperties=nullptr) |
| Create a new empty library at aLibraryPath empty. | |
| virtual bool | DeleteLibrary (const wxString &aLibraryPath, const std::map< std::string, UTF8 > *aProperties=nullptr) |
| Delete an existing library and returns true, 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. | |
| virtual bool | SupportsConfigurationDialog () const |
| virtual DIALOG_SHIM * | CreateConfigurationDialog (wxWindow *aParent, const wxString &aLibraryPath) |
| virtual void | Report (const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) const |
| virtual void | AdvanceProgressPhase () |
Protected Attributes | |
| wxString | m_name |
| Name of the IO loader. | |
| REPORTER * | m_reporter |
| Reporter to log errors/warnings to, may be nullptr. | |
| PROGRESS_REPORTER * | m_progressReporter |
| Progress reporter to track the progress of the operation, may be nullptr. | |
Private Member Functions | |
| SCH_SCREEN * | getCurrentScreen () |
| SCH_SHEET * | getCurrentSheet () |
| bool | ShouldPutItemOnSheet (int aOwnerindex) |
| const ASCH_STORAGE_FILE * | GetFileFromStorage (const wxString &aFilename) const |
| void | CreateAliases () |
| void | PostProcessBusLabels () |
| void | EnsureSheetSymbolNames () |
| wxFileName | ResolveSheetFileName (const wxString &aParentPath, const wxString &aSheetFileName) const |
| void | NormalizeRepeatedSheetInstances () |
| void | NameNetsAfterNetLabels () |
| Name power nets after their net labels, as Altium does unless Power Port Names Take Priority is set. | |
| 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 | ParseTemplate (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 | ParsePieChart (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 | ParsePortHelper (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) |
| CASE_INSENSITIVE_MAP< LIB_SYMBOL * > | ParseLibFile (const ALTIUM_COMPOUND_FILE &aAltiumSchFile) |
| std::vector< LIB_SYMBOL * > | ParseLibComponent (const std::map< wxString, wxString > &aProperties) |
| void | doEnumerateSymbolLib (const wxString &aLibraryPath, const std::map< std::string, UTF8 > *aProperties, std::function< void(const wxString &, LIB_SYMBOL *)> aInserter) |
| void | fixupSymbolPinNameNumbers (SYMBOL *aSymbol) |
| void | ensureLoadedLibrary (const wxString &aLibraryPath, const std::map< std::string, UTF8 > *aProperties) |
| long long | getLibraryTimestamp (const wxString &aLibraryPath) const |
Static Private Member Functions | |
| static bool | isBinaryFile (const wxString &aFileName) |
| static bool | isASCIIFile (const wxString &aFileName) |
| static bool | checkFileHeader (const wxString &aFileName) |
Friends | |
| struct | PARSE_FILE_GUARD |
Definition at line 72 of file sch_io_altium.h.
| SCH_IO_ALTIUM::SCH_IO_ALTIUM | ( | ) |
Definition at line 293 of file sch_io_altium.cpp.
References WXLOG_REPORTER::GetInstance(), m_harnessEntryParent, m_harnessOwnerIndexOffset, m_isIntLib, IO_BASE::m_reporter, m_rootSheet, m_schematic, and SCH_IO::SCH_IO().
| SCH_IO_ALTIUM::~SCH_IO_ALTIUM | ( | ) |
Definition at line 306 of file sch_io_altium.cpp.
References m_libCache, and name.
|
private |
Handle text frames that are in a library symbol, not on schematic
Definition at line 3257 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), ASCH_TEXT_FRAME::Alignment, AltiumEscapeTextVars(), ASCH_TEXT_FRAME::AreaColor, ASCH_TEXT_FRAME::BorderColor, ASCH_TEXT_FRAME::BottomLeft, CENTER, DEFAULT, FILLED_WITH_COLOR, ASCH_TEXT_FRAME::FontID, LIB_SYMBOL::GetBodyStyleCount(), GetColorFromInt(), GetRelativePosition(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, ASCH_TEXT_FRAME::isSolid, LAYER_DEVICE, LEFT, m_altiumComponents, m_errorMessages, m_libSymbols, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, RIGHT, RPT_SEVERITY_DEBUG, SCH_ITEM::SetBodyStyle(), EDA_SHAPE::SetEnd(), EDA_SHAPE::SetFillColor(), SCH_SHAPE::SetFilled(), EDA_SHAPE::SetFillMode(), EDA_TEXT::SetHorizJustify(), EDA_SHAPE::SetStart(), SCH_SHAPE::SetStroke(), EDA_TEXT::SetText(), EDA_TEXT::SetTextSize(), SCH_ITEM::SetUnit(), ASCH_TEXT_FRAME::ShowBorder, ASCH_TEXT_FRAME::Text, and ASCH_TEXT_FRAME::TopRight.
Referenced by ParseTextFrame().
|
private |
Definition at line 3197 of file sch_io_altium.cpp.
References ASCH_TEXT_FRAME::Alignment, AltiumEscapeTextVars(), SCH_SCREEN::Append(), ASCH_TEXT_FRAME::AreaColor, ASCH_SHEET_FONT::Bold, ASCH_TEXT_FRAME::BorderColor, ASCH_TEXT_FRAME::BottomLeft, CENTER, DEFAULT, FILLED_WITH_COLOR, 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, LEFT, m_altiumSheet, m_sheetOffset, RIGHT, EDA_TEXT::SetBold(), EDA_SHAPE::SetEnd(), EDA_SHAPE::SetFillColor(), SCH_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 |
Definition at line 133 of file io_base.cpp.
References m_progressReporter, and THROW_IO_CANCELLED.
| void SCH_IO_ALTIUM::attachEmptySheetScreen | ( | SCH_SHEET * | aSheet, |
| const wxString & | aMissingFile ) |
Give a sheet whose source file is missing an empty screen with a file of its own; aMissingFile is empty for a converted signal harness.
Definition at line 1905 of file sch_io_altium.cpp.
References KIID::AsString(), claimSheetFile(), SCH_SCREEN::GetFileName(), SCH_SHEET::GetName(), SCH_SHEET::GetScreen(), FILEEXT::KiCadSchematicFileExtension, m_missingScreens, m_schematic, EDA_ITEM::m_Uuid, ReplaceIllegalFileNameChars(), SCH_SCREEN::SetFileName(), SCH_SHEET::SetFileName(), and SCH_SHEET::SetScreen().
Referenced by ParseAltiumSch().
|
overridevirtual |
Checks if this IO object can read the specified library file/directory.
If not overridden, extension check is used.
Reimplemented from IO_BASE.
Definition at line 351 of file sch_io_altium.cpp.
References IO_BASE::CanReadLibrary(), and checkFileHeader().
|
overridevirtual |
Checks if this SCH_IO can read the specified schematic file.
If not overriden, extension check is used.
Reimplemented from SCH_IO.
Definition at line 342 of file sch_io_altium.cpp.
References SCH_IO::CanReadSchematicFile(), and checkFileHeader().
|
staticprivate |
Definition at line 336 of file sch_io_altium.cpp.
References isASCIIFile(), and isBinaryFile().
Referenced by CanReadLibrary(), and CanReadSchematicFile().
|
virtualinherited |
Validate that the library at aLibraryPath is reachable and well-formed, without necessarily loading symbol data.
This is used for editing library tables, where a full EnumerateSymbolLib can be expensive for some libraries (e.g. HTTP or Database) and should not be done just to check if the library is OK to use.
| 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 or is not well-formed. |
Reimplemented in SCH_IO_DATABASE, and SCH_IO_HTTP_LIB.
Definition at line 108 of file sch_io.cpp.
References EnumerateSymbolLib().
Referenced by SYMBOL_LIBRARY_ADAPTER::CheckLibrary().
| wxString SCH_IO_ALTIUM::claimSheetFile | ( | const wxString & | aStem | ) |
Claim a file in the project folder for a sheet screen that neither the root nor another sheet holds, suffixing aStem as needed.
Definition at line 1935 of file sch_io_altium.cpp.
References FILEEXT::KiCadSchematicFileExtension, m_rootSheetFile, m_schematic, and m_sheetFiles.
Referenced by attachEmptySheetScreen(), LoadSchematicProject(), and ParseAltiumSch().
|
private |
Definition at line 942 of file sch_io_altium.cpp.
References _, std::abs(), SCH_SCREEN::AddBusAlias(), SCH_SCREEN::Append(), center, BOX2< Vec >::Contains(), SCH_LINE::GetBoundingBox(), BOX2< Vec >::GetCenter(), SCH_LINE::GetConnectionPoints(), getCurrentScreen(), SCH_LINE::GetEndPoint(), SCH_LINE::GetLineColor(), SCH_LINE::GetLineWidth(), KIGEOM::GetOtherEnd(), SCH_TEXT::GetPosition(), SCH_LINE::GetSeg(), SCH_LINE::GetStartPoint(), EDA_TEXT::GetText(), GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, GR_TEXT_V_ALIGN_BOTTOM, SCH_LINE::HitTest(), IS_NEW, SCH_LINE::IsBus(), SCH_SCREEN::Items(), LAYER_BUS, m_altiumHarnesses, HARNESS::HARNESS_PORT::m_entryLocation, HARNESS::HARNESS_PORT::m_name, EDA_UNIT_UTILS::Mils2IU(), EE_RTREE::OfType(), EE_RTREE::Overlapping(), result, SCH_HIER_LABEL_T, SCH_LABEL_T, SCH_LINE_T, schIUScale, SCH_LINE::SetEndPoint(), EDA_ITEM::SetFlags(), EDA_TEXT::SetHorizJustify(), SCH_LINE::SetLineColor(), SCH_LINE::SetLineWidth(), SCH_LINE::SetStartPoint(), EDA_TEXT::SetText(), EDA_TEXT::SetVertJustify(), alg::signbit(), VECTOR2< T >::SquaredEuclideanNorm(), top(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseAdditional(), and ParseASCIISchematic().
|
inlinevirtualinherited |
| aLibraryPath | is the fully expanded path of the library to configure |
Reimplemented in SCH_IO_DATABASE.
|
virtualinherited |
Create a new empty library at aLibraryPath empty.
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 elements. |
| 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 IO is known to support. The caller continues to own this object (IO may not delete it), and IOs should expect it to be optionally NULL. |
| IO_ERROR | if there is a problem finding the library, or creating it. |
Reimplemented in DESIGN_BLOCK_IO, PCB_IO_KICAD_SEXPR, SCH_IO_KICAD_LEGACY, and SCH_IO_KICAD_SEXPR.
Definition at line 46 of file io_base.cpp.
References NOT_IMPLEMENTED.
Referenced by LIBRARY_MANAGER_ADAPTER::CreateLibrary().
|
virtualinherited |
Delete an existing library and returns true, 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 several elements. |
| 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 DESIGN_BLOCK_IO, PCB_IO_GEDA, PCB_IO_KICAD_LEGACY, PCB_IO_KICAD_SEXPR, SCH_IO_KICAD_LEGACY, and SCH_IO_KICAD_SEXPR.
Definition at line 53 of file io_base.cpp.
References NOT_IMPLEMENTED.
Referenced by LIBRARY_MANAGER_ADAPTER::DeleteLibrary().
|
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_IO_KICAD_LEGACY, and SCH_IO_KICAD_SEXPR.
Definition at line 132 of file sch_io.cpp.
References NOT_IMPLEMENTED.
Referenced by SYMBOL_LIBRARY_ADAPTER::DeleteSymbol(), and LIB_BUFFER::SaveBuffer().
|
private |
Definition at line 6361 of file sch_io_altium.cpp.
References ensureLoadedLibrary(), m_libCache, and SYMBOL_LIBRARY_ADAPTER::PropPowerSymsOnly.
Referenced by EnumerateSymbolLib(), and EnumerateSymbolLib().
|
private |
Definition at line 6250 of file sch_io_altium.cpp.
References _, getLibraryTimestamp(), L, m_isIntLib, m_libCache, m_libName, m_timestamps, ParseLibFile(), THROW_IO_ERROR, and THROW_IO_ERRORF.
Referenced by doEnumerateSymbolLib(), and LoadSymbol().
|
private |
Definition at line 1250 of file sch_io_altium.cpp.
References AltiumDeriveSheetName(), getCurrentScreen(), SCH_SHEET::GetName(), SCH_FIELD::GetText(), SCH_SCREEN::Items(), m_sheets, EE_RTREE::OfType(), SCH_SHEET_T, and SHEET_FILENAME.
Referenced by ParseASCIISchematic(), and ParseFileHeader().
|
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_IO.
Definition at line 6396 of file sch_io_altium.cpp.
References doEnumerateSymbolLib().
|
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_IO.
Definition at line 6385 of file sch_io_altium.cpp.
References doEnumerateSymbolLib().
Referenced by BOOST_AUTO_TEST_CASE().
|
private |
Definition at line 360 of file sch_io_altium.cpp.
References DEFAULT_PINNAME_SIZE, DEFAULT_PINNUM_SIZE, LIB_SYMBOL_T, pin, SCH_SYMBOL_T, schIUScale, SYMBOL::SetShowPinNames(), SYMBOL::SetShowPinNumbers(), and EDA_ITEM::Type().
Referenced by ParseASCIISchematic(), ParseFileHeader(), and ParseLibFile().
|
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 SCH_IO_CADSTAR_ARCHIVE, SCH_IO_DATABASE, SCH_IO_HTTP_LIB, and SCH_IO_KICAD_SEXPR.
Definition at line 357 of file sch_io.h.
Referenced by SYMBOL_LIBRARY_ADAPTER::GetAvailableExtraFields(), and GetDefaultSymbolFields().
|
private |
Definition at line 930 of file sch_io_altium.cpp.
References m_sheetPath.
Referenced by AddTextBox(), CreateAliases(), EnsureSheetSymbolNames(), LoadSchematicProject(), ParseAltiumSch(), ParseArc(), ParseASCIISchematic(), ParseBezier(), ParseBus(), ParseBusEntry(), ParseCircle(), ParseComponent(), ParseDesignator(), ParseEllipse(), ParseEllipticalArc(), ParseFileHeader(), ParseHarnessEntry(), ParseImage(), ParseJunction(), ParseLabel(), ParseLine(), ParseNetLabel(), ParseNoERC(), ParsePieChart(), ParsePolygon(), ParsePolyline(), ParsePortHelper(), ParsePowerPort(), ParseRectangle(), ParseRoundRectangle(), ParseSheet(), ParseSheetName(), ParseSheetSymbol(), ParseSignalHarness(), ParseWire(), and PostProcessBusLabels().
|
private |
Definition at line 936 of file sch_io_altium.cpp.
References m_sheetPath.
Referenced by ParseASCIISchematic(), ParseFileHeader(), 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_IO_DATABASE, SCH_IO_HTTP_LIB, and SCH_IO_KICAD_SEXPR.
Definition at line 371 of file sch_io.h.
References GetAvailableSymbolFields().
|
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_IO_HTTP_LIB, SCH_IO_KICAD_LEGACY, and SCH_IO_KICAD_SEXPR.
Definition at line 155 of file sch_io.cpp.
References NOT_IMPLEMENTED.
|
private |
Definition at line 2493 of file sch_io_altium.cpp.
References m_altiumStorage.
Referenced by ParseImage().
|
virtualinherited |
Return the canonical symbol definitions produced by the last LoadSchematicFile().
An importer implements this so a caller can materialize a project symbol library through SYMBOL_IMPORT_RECONCILER instead of the importer writing one itself. Ownership of the returned symbols passes to the caller.
Reimplemented in SCH_IO_CADSTAR_ARCHIVE, SCH_IO_EASYEDAPRO, and SCH_IO_EASYEDAPRO_V3.
Definition at line 76 of file sch_io.cpp.
References NOT_IMPLEMENTED.
Referenced by ReconcileImportedSymbols().
| wxFileName SCH_IO_ALTIUM::getLibFileName | ( | ) |
Definition at line 424 of file sch_io_altium.cpp.
References getLibName(), FILEEXT::KiCadSymbolLibFileExtension, and m_schematic.
| wxString SCH_IO_ALTIUM::getLibName | ( | ) |
Definition at line 400 of file sch_io_altium.cpp.
References LIB_ID::FixIllegalChars(), m_libName, m_rootSheet, m_schematic, and UTF8::wx_str().
Referenced by getLibFileName(), ParseComponent(), ParseLibComponent(), and ParsePowerPort().
|
inlineoverridevirtual |
Get the descriptor for the library container that this IO plugin operates on.
Implements IO_BASE.
Definition at line 83 of file sch_io_altium.h.
References _HKI.
|
inlinevirtualinherited |
Get the descriptor for the individual library elements that this IO plugin operates on.
For libraries where all the elements are in a single container (e.g. all elements in a single file), then this will return the descriptor from IO_BASE::GetLibraryDesc().
Reimplemented in PCB_IO_EASYEDA, PCB_IO_EASYEDAPRO, PCB_IO_GEDA, PCB_IO_KICAD_SEXPR, and PCB_IO_SPRINT_LAYOUT.
Definition at line 117 of file io_base.h.
References GetLibraryDesc().
Referenced by PCB_IO::CanReadFootprint().
|
overridevirtualinherited |
Append supported SCH_IO options to aListToAppenTo along with internationalized descriptions.
Options are typically appended so that a derived SCH_IO 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_IOs.) 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_IO, which has been avoided to date. |
Reimplemented from IO_BASE.
Reimplemented in SCH_IO_CADSTAR_ARCHIVE.
Definition at line 140 of file sch_io.cpp.
References IO_BASE::GetLibraryOptions().
|
private |
Definition at line 6239 of file sch_io_altium.cpp.
Referenced by ensureLoadedLibrary().
|
overridevirtual |
Return the modification hash from the library cache.
Implements SCH_IO.
Definition at line 316 of file sch_io_altium.cpp.
|
inlineinherited |
Return a brief hard coded name for this IO interface.
Definition at line 79 of file io_base.h.
References m_name.
Referenced by SCH_IO_EASYPC::convertComponent(), SCH_IO_EASYEDAPRO_V3::EnumerateSymbolLib(), PCB_IO_EASYPC::GetEnumeratedFootprint(), SCH_IO_EASYPC::LoadSchematicFile(), SCH_IO_EASYEDAPRO_V3::LoadSymbol(), SCH_IO_EASYPC::LoadSymbol(), SCH_IO_ALTIUM::ParseAltiumSch(), and SCH_IO_ALTIUM::ParseLibFile().
|
inlineoverridevirtual |
Returns schematic file description for the SCH_IO.
Reimplemented from SCH_IO.
Definition at line 78 of file sch_io_altium.h.
References _HKI.
|
inlinevirtualinherited |
Gets a description of a sublibrary.
Has no effect if SupportsSubLibraries() returns false.
| aName | contains the name of the sublibrary for which the description is retrieved |
Reimplemented in SCH_IO_HTTP_LIB.
Definition at line 346 of file sch_io.h.
Referenced by SYMBOL_LIBRARY_ADAPTER::GetSubLibraries().
|
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_IO_DATABASE, and SCH_IO_HTTP_LIB.
Definition at line 335 of file sch_io.h.
Referenced by SYMBOL_LIBRARY_ADAPTER::GetSubLibraries().
|
staticprivate |
Definition at line 329 of file sch_io_altium.cpp.
References IO_UTILS::fileStartsWithPrefix().
Referenced by checkFileHeader().
|
staticprivate |
Definition at line 322 of file sch_io_altium.cpp.
References IO_UTILS::COMPOUND_FILE_HEADER, and IO_UTILS::fileHasBinaryHeader().
Referenced by checkFileHeader(), and ParseAltiumSch().
|
inlineoverridevirtual |
Return true if the library at aLibraryPath is writable.
The system libraries are typically read only because of where they are installed..
| aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing several footprints. |
| IO_ERROR | if no library at aLibraryPath exists. |
Reimplemented from IO_BASE.
Definition at line 129 of file sch_io_altium.h.
|
inlinevirtualinherited |
Work-around for lack of dynamic_cast across compile units on Mac.
Reimplemented in PCB_IO.
Definition at line 84 of file io_base.h.
Referenced by FOOTPRINT_LIBRARY_ADAPTER::pcbplugin().
|
overridevirtual |
Load information from some input file format that this SCH_IO 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. |
| aSchematic | is the SCHEMATIC object to load the schematic into. |
| 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_IO.
Definition at line 544 of file sch_io_altium.cpp.
References SCH_SYMBOL::AddVariant(), AltiumPowerPortNamesTakePriority(), SCH_SCREEN::Append(), ApplyAltiumProjectParametersToProject(), SCH_SCREENS::ClearEditFlags(), ALTIUM_VARIANT_ENTRY::designator, SCH_GLOBALLABEL::GetField(), SCH_SYMBOL::GetField(), SCH_SYMBOL::GetFields(), SCH_SCREENS::GetFirst(), LOAD_INFO_REPORTER::GetInstance(), SCH_LINE::GetLineWidth(), SCH_SCREENS::GetNext(), SCH_SYMBOL::GetRef(), SCH_FIELD::GetText(), SCH_SYMBOL_VARIANT::InitializeAttributes(), INTERSHEET_REFS, SCH_LINE::IsBus(), SCHEMATIC::IsValid(), SCH_LINE::IsWire(), SCH_SCREEN::Items(), FILEEXT::KiCadSchematicFileExtension, LoadSchematicProject(), m_altiumSymbolToUid, VARIANT::m_DNP, m_errorMessages, VARIANT::m_ExcludedFromBOM, VARIANT::m_ExcludedFromPosFiles, VARIANT::m_Fields, m_loadedScreens, m_missingScreens, SCH_SHEET_INSTANCE::m_PageNumber, m_parsedFiles, m_parsingFiles, SCH_SHEET_INSTANCE::m_Path, m_projectDocuments, IO_BASE::m_reporter, m_rootFilepath, m_rootSheet, m_rootSheetFile, m_schematic, m_sheetFiles, SCH_SCREEN::m_sheetInstances, m_sheetPath, m_sheets, m_sheetSpecialStrings, m_subsheetFiles, m_unsetSheetParams, name, NameNetsAfterNetLabels(), niluuid, NormalizeRepeatedSheetInstances(), EE_RTREE::OfType(), ParseAltiumProjectParameters(), ParseAltiumProjectVariants(), ParseAltiumSch(), path, SCH_SHEET_PATH::push_back(), SCH_SCREEN::Remove(), SCH_SYMBOL::ResolveTextVar(), SCHEMATIC::Root(), SCH_HIER_LABEL_T, SCH_LINE_T, SCH_SHEET_T, SCH_SYMBOL_T, SCH_SCREEN::SetFileName(), SCH_SHEET_PATH::SetPageNumber(), SCH_LABEL_BASE::SetShape(), SCH_GLOBALLABEL::SetSpinStyle(), SCHEMATIC::SetTopLevelSheets(), EDA_TEXT::SetVisible(), text, ALTIUM_VARIANT_ENTRY::uniqueId, SCH_SCREENS::UpdateSymbolLinks(), and VALUE.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
| SCH_SHEET * SCH_IO_ALTIUM::LoadSchematicProject | ( | SCHEMATIC * | aSchematic, |
| const std::map< std::string, UTF8 > * | aProperties ) |
Definition at line 433 of file sch_io_altium.cpp.
References AltiumDeriveSheetName(), AltiumParseKey(), SCH_SCREEN::Append(), claimSheetFile(), getCurrentScreen(), m_loadedScreens, m_parsedFiles, m_projectDocuments, m_rootSheet, m_schematic, m_sheetPath, m_subsheetFiles, ParseAltiumSch(), path, project, SCH_SCREEN::Remove(), schIUScale, and SCH_SCREEN::SetFileName().
Referenced by LoadSchematicFile().
|
overridevirtual |
Load a LIB_SYMBOL object having aPartName from the aLibraryPath containing a library format that this SCH_IO 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_IO.
Definition at line 6408 of file sch_io_altium.cpp.
References ensureLoadedLibrary(), and m_libCache.
|
private |
Name power nets after their net labels, as Altium does unless Power Port Names Take Priority is set.
A power pin outranks a local label here, so the label becomes global wherever that cannot change connectivity.
Definition at line 1476 of file sch_io_altium.cpp.
References _, SCH_SCREEN::Append(), SPIN_STYLE::BOTTOM, candidates(), CTX_NETNAME, EscapeString(), SCH_GLOBALLABEL::GetField(), CONNECTION_GRAPH::GetNetMap(), EDA_TEXT::GetText(), INTERSHEET_REFS, SCH_PIN::IsGlobalPower(), itemNetCodes(), L_UNSPECIFIED, IO_BASE::m_reporter, m_schematic, SCH_LABEL_BASE::MirrorHorizontally(), SCH_LABEL_BASE::MirrorVertically(), name, CONNECTION_GRAPH::Recalculate(), SCH_SCREEN::Remove(), RPT_SEVERITY_DEBUG, RPT_SEVERITY_INFO, sameNets(), SCH_GLOBAL_LABEL_T, SCH_LABEL_T, SCH_PIN_T, EDA_TEXT::SetAttributes(), SCH_LABEL_BASE::SetShape(), SCH_GLOBALLABEL::SetSpinStyle(), EDA_TEXT::SetVisible(), text, UnescapeString(), and SPIN_STYLE::UP.
Referenced by LoadSchematicFile().
|
private |
Definition at line 1335 of file sch_io_altium.cpp.
References SCH_SYMBOL::AddSheetPathReferenceEntryIfMissing(), KIID_PATH::AsString(), SCH_SYMBOL::GetField(), SCH_SHEET::GetName(), SCH_SHEET_LIST::GetNextPageNumber(), SCH_FIELD::GetText(), SCH_SCREEN::Items(), SCH_SHEET_PATH::Last(), SCH_SHEET_PATH::LastScreen(), m_schematic, EE_RTREE::OfType(), SCH_SHEET_PATH::Path(), SCH_SHEET_PATH::pop_back(), REFERENCE, SCH_SYMBOL_T, SCH_SHEET_PATH::SetPageNumber(), and SCH_SYMBOL::SetRef().
Referenced by LoadSchematicFile().
| void SCH_IO_ALTIUM::ParseAdditional | ( | const ALTIUM_COMPOUND_FILE & | aAltiumSchFile | ) |
Definition at line 2017 of file sch_io_altium.cpp.
References CreateAliases(), ALTIUM_COMPOUND_FILE::FindStream(), ALTIUM_BINARY_PARSER::GetRemainingBytes(), ALTIUM_BINARY_PARSER::HasParsingError(), HEADER, index, m_altiumHarnesses, m_altiumHarnessPortsCurrentSheet, ParseHarnessPort(), ParseRecord(), PostProcessBusLabels(), ALTIUM_PROPS_UTILS::ReadInt(), ALTIUM_BINARY_PARSER::ReadProperties(), and THROW_IO_ERROR.
Referenced by ParseAltiumSch().
| void SCH_IO_ALTIUM::ParseAltiumSch | ( | const wxString & | aFileName | ) |
Definition at line 1659 of file sch_io_altium.cpp.
References _, AltiumDeriveSheetName(), AltiumParseKey(), attachEmptySheetScreen(), claimSheetFile(), BOX2< Vec >::GetBottom(), getCurrentScreen(), SCH_SCREEN::GetFileName(), SCH_SHEET::GetFileName(), IO_BASE::GetName(), SCH_SHEET::GetName(), SCH_SHEET::GetScreen(), BOX2< Vec >::GetTop(), isBinaryFile(), SCH_SCREEN::Items(), m_errorMessages, m_loadedScreens, m_parsedFiles, m_parsingFiles, IO_BASE::m_progressReporter, m_rootFilepath, m_schematic, m_sheetPath, m_sheets, m_subsheetFiles, BOX2< Vec >::Merge(), BOX2< Vec >::Offset(), EE_RTREE::OfType(), PARSE_FILE_GUARD, ParseAdditional(), ParseAltiumSch(), ParseASCIISchematic(), ParseFileHeader(), ParseStorage(), pruneCyclicSheets(), ResolveSheetFileName(), RPT_SEVERITY_INFO, RPT_SEVERITY_WARNING, SCH_SHEET_T, schIUScale, SCH_SCREEN::SetFileName(), SCH_SHEET::SetFileName(), SCH_SHEET::SetName(), SCH_SHEET::SetScreen(), THROW_IO_CANCELLED, THROW_IO_ERROR, and SCH_SCREEN::Update().
Referenced by LoadSchematicFile(), LoadSchematicProject(), and ParseAltiumSch().
|
private |
Definition at line 3817 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), SCH_SCREEN::Append(), ARC, center, CIRCLE, circle(), ASCH_BORDER_INTERFACE::Color, EDA_ANGLE::Cos(), DEGREES_T, LIB_SYMBOL::GetBodyStyleCount(), getCurrentScreen(), GetRelativePosition(), KiROUND(), LAYER_DEVICE, m_altiumComponents, ASCH_ARC::m_Center, ASCH_ARC::m_EndAngle, m_errorMessages, m_libSymbols, ASCH_ARC::m_Radius, m_sheetOffset, ASCH_ARC::m_StartAngle, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, RPT_SEVERITY_DEBUG, SCH_ITEM::SetBodyStyle(), EDA_SHAPE::SetCenter(), EDA_SHAPE::SetEnd(), SetLibShapeFillAndColor(), SetLibShapeLine(), SetSchShapeFillAndColor(), SetSchShapeLine(), EDA_SHAPE::SetStart(), SCH_ITEM::SetUnit(), ShouldPutItemOnSheet(), and EDA_ANGLE::Sin().
Referenced by ParseLibFile(), ParsePieChart(), and ParseRecord().
| void SCH_IO_ALTIUM::ParseASCIISchematic | ( | const wxString & | aFileName | ) |
Definition at line 2164 of file sch_io_altium.cpp.
References _, ALTIUM_ASCII_PARSER::CanRead(), CreateAliases(), EnsureSheetSymbolNames(), fixupSymbolPinNameNumbers(), getCurrentScreen(), getCurrentSheet(), ALTIUM_ASCII_PARSER::HasParsingError(), index, m_altiumComponents, m_altiumHarnesses, m_altiumHarnessPortsCurrentSheet, m_altiumImplementationList, m_altiumPortsCurrentSheet, m_altiumStorage, m_altiumTemplates, m_currentTitleBlock, m_libSymbols, m_symbols, ParseHarnessPort(), ParsePort(), ParseRecord(), PostProcessBusLabels(), ALTIUM_ASCII_PARSER::ReadProperties(), ALTIUM_PROPS_UTILS::ReadString(), EDA_ITEM::SetModified(), SCH_SCREEN::SetTitleBlock(), and THROW_IO_ERROR.
Referenced by ParseAltiumSch().
|
private |
Definition at line 3347 of file sch_io_altium.cpp.
References _, LIB_SYMBOL::AddDrawItem(), SCH_SHAPE::AddPoint(), SCH_SCREEN::Append(), ARC_LOW_DEF_MM, BEZIER, LIB_SYMBOL::GetBodyStyleCount(), getCurrentScreen(), BEZIER_POLY::GetPoly(), GetRelativePosition(), IS_NEW, LAYER_DEVICE, LAYER_NOTES, ASCH_BORDER_INTERFACE::LineWidth, m_altiumComponents, m_errorMessages, m_libSymbols, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ASCH_BEZIER::points, POLY, EDA_SHAPE::RebuildBezierToSegmentsPointsList(), RPT_SEVERITY_DEBUG, RPT_SEVERITY_WARNING, schIUScale, EDA_SHAPE::SetBezierC1(), EDA_SHAPE::SetBezierC2(), SCH_ITEM::SetBodyStyle(), EDA_SHAPE::SetEnd(), SCH_LINE::SetEndPoint(), EDA_ITEM::SetFlags(), EDA_SHAPE::SetStart(), SCH_LINE::SetStroke(), SCH_SHAPE::SetStroke(), SCH_ITEM::SetUnit(), ShouldPutItemOnSheet(), and SOLID.
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 5333 of file sch_io_altium.cpp.
References SCH_SCREEN::Append(), getCurrentScreen(), IS_NEW, LAYER_BUS, ASCH_BUS::lineWidth, m_sheetOffset, ASCH_BUS::points, SCH_LINE::SetEndPoint(), EDA_ITEM::SetFlags(), and SCH_LINE::SetLineWidth().
Referenced by ParseRecord().
|
private |
Definition at line 5710 of file sch_io_altium.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 ParseRecord().
|
private |
Definition at line 4320 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), SCH_SCREEN::Append(), ASCH_FILL_INTERFACE::AreaColor, ASCH_ELLIPSE::Center, center, CIRCLE, circle(), ASCH_BORDER_INTERFACE::Color, ELLIPSE, FILLED_WITH_COLOR, LIB_SYMBOL::GetBodyStyleCount(), GetColorFromInt(), getCurrentScreen(), GetRelativePosition(), ASCH_FILL_INTERFACE::IsSolid, LAYER_DEVICE, m_altiumComponents, m_errorMessages, m_libSymbols, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ASCH_ELLIPSE::Radius, RPT_SEVERITY_DEBUG, SetLibShapeFillAndColor(), SetLibShapeLine(), ShouldPutItemOnSheet(), and SOLID.
Referenced by ParseEllipse(), and ParseEllipticalArc().
|
private |
Definition at line 2510 of file sch_io_altium.cpp.
References _, AltiumToKiCadLibID(), SCH_SCREEN::Append(), ASCH_SYMBOL::componentdescription, ASCH_SYMBOL::currentpartid, DESCRIPTION, ASCH_SYMBOL::displaymode, ASCH_SYMBOL::displaymodecount, getCurrentScreen(), SCH_SYMBOL::GetField(), SCH_SYMBOL::GetFields(), getLibName(), SCH_SHEET::GetName(), LIB_SYMBOL::GetUnitCount(), ASCH_SYMBOL::isMirrored, ASCH_SYMBOL::libreference, ASCH_SYMBOL::location, m_altiumComponents, m_altiumSymbolToUid, m_errorMessages, m_libSymbols, m_sheetOffset, m_sheetPath, m_symbols, name, ASCH_SYMBOL::orientation, ASCH_SYMBOL::partcount, RPT_SEVERITY_ERROR, SCH_SYMBOL::SetBodyStyle(), LIB_SYMBOL::SetBodyStyleNames(), LIB_SYMBOL::SetDescription(), LIB_SYMBOL::SetLibId(), SCH_SYMBOL::SetLibId(), LIB_SYMBOL::SetName(), SCH_SYMBOL::SetOrientation(), SCH_SYMBOL::SetPosition(), SCH_FIELD::SetText(), SCH_ITEM::SetUnit(), LIB_SYMBOL::SetUnitCount(), ASCH_SYMBOL::sourcelibraryname, SYM_MIRROR_Y, SYM_ORIENT_0, SYM_ORIENT_180, SYM_ORIENT_270, SYM_ORIENT_90, and ASCH_SYMBOL::uniqueid.
Referenced by ParseRecord().
|
private |
Definition at line 5635 of file sch_io_altium.cpp.
References AdjustFieldForSymbolOrientation(), getCurrentScreen(), SCH_SYMBOL::GetField(), ASCH_DESIGNATOR::justification, ASCH_DESIGNATOR::location, m_altiumComponents, m_errorMessages, m_libSymbols, m_sheetOffset, m_sheetPath, m_symbols, ASCH_DESIGNATOR::orientation, ASCH_OWNER_INTERFACE::ownerindex, REFERENCE, RPT_SEVERITY_DEBUG, SCH_FIELD::SetPosition(), SCH_SYMBOL::SetRef(), SetTextPositioning(), EDA_TEXT::SetVisible(), ASCH_DESIGNATOR::text, and VALUE.
Referenced by ParseRecord().
|
private |
Definition at line 4157 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), SCH_SHAPE::AddPoint(), ANGLE_0, SCH_SCREEN::Append(), ARC_LOW_DEF_MM, ASCH_FILL_INTERFACE::AreaColor, BEZIER, ASCH_ELLIPSE::Center, ASCH_BORDER_INTERFACE::Color, ELLIPSE, FILLED_WITH_COLOR, LIB_SYMBOL::GetBodyStyleCount(), GetColorFromInt(), getCurrentScreen(), GetRelativePosition(), EDA_SHAPE::GetStart(), ASCH_FILL_INTERFACE::IsSolid, ASCH_FILL_INTERFACE::IsTransparent, KiROUND(), LAYER_DEVICE, ASCH_BORDER_INTERFACE::LineWidth, m_altiumComponents, m_errorMessages, m_libSymbols, m_sheetOffset, m_symbols, NO_FILL, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ParseCircle(), POLY, ASCH_ELLIPSE::Radius, EDA_SHAPE::RebuildBezierToSegmentsPointsList(), RPT_SEVERITY_DEBUG, schIUScale, ASCH_ELLIPSE::SecondaryRadius, EDA_SHAPE::SetBezierC1(), EDA_SHAPE::SetBezierC2(), SCH_ITEM::SetBodyStyle(), EDA_SHAPE::SetEnd(), EDA_SHAPE::SetFillColor(), EDA_SHAPE::SetFillMode(), SetLibShapeFillAndColor(), SetLibShapeLine(), EDA_SHAPE::SetStart(), SCH_SHAPE::SetStroke(), SCH_ITEM::SetUnit(), EDA_SHAPE::SetWidth(), ShouldPutItemOnSheet(), SOLID, TransformEllipseToBeziers(), and KIGFX::COLOR4D::WithAlpha().
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 3946 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), ANGLE_0, SCH_SCREEN::Append(), ARC_LOW_DEF_MM, BEZIER, DEGREES_T, ELLIPTICAL_ARC, LIB_SYMBOL::GetBodyStyleCount(), getCurrentScreen(), GetRelativePosition(), KiROUND(), LAYER_DEVICE, ASCH_BORDER_INTERFACE::LineWidth, m_altiumComponents, ASCH_ARC::m_Center, ASCH_ARC::m_EndAngle, m_errorMessages, m_libSymbols, ASCH_ARC::m_Radius, ASCH_ARC::m_SecondaryRadius, m_sheetOffset, ASCH_ARC::m_StartAngle, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ParseCircle(), EDA_SHAPE::RebuildBezierToSegmentsPointsList(), RPT_SEVERITY_DEBUG, schIUScale, EDA_SHAPE::SetBezierC1(), EDA_SHAPE::SetBezierC2(), SCH_ITEM::SetBodyStyle(), EDA_SHAPE::SetEnd(), SetLibShapeLine(), EDA_SHAPE::SetStart(), SCH_SHAPE::SetStroke(), SCH_ITEM::SetUnit(), ShouldPutItemOnSheet(), SOLID, and TransformEllipseToBeziers().
Referenced by ParseLibFile().
| void SCH_IO_ALTIUM::ParseFileHeader | ( | const ALTIUM_COMPOUND_FILE & | aAltiumSchFile | ) |
Definition at line 2071 of file sch_io_altium.cpp.
References _, EnsureSheetSymbolNames(), ALTIUM_COMPOUND_FILE::FindStream(), fixupSymbolPinNameNumbers(), getCurrentScreen(), getCurrentSheet(), ALTIUM_BINARY_PARSER::GetRemainingBytes(), ALTIUM_BINARY_PARSER::HasParsingError(), index, m_altiumComponents, m_altiumImplementationList, m_altiumPortsCurrentSheet, m_altiumTemplates, m_currentTitleBlock, m_libSymbols, m_symbols, ParsePort(), ParseRecord(), ALTIUM_BINARY_PARSER::ReadProperties(), ALTIUM_PROPS_UTILS::ReadString(), EDA_ITEM::SetModified(), SCH_SCREEN::SetTitleBlock(), and THROW_IO_ERROR.
Referenced by ParseAltiumSch().
|
private |
Definition at line 5610 of file sch_io_altium.cpp.
References BOTTOM_LEFT, ASCH_FILE_NAME::isHidden, ASCH_FILE_NAME::location, m_errorMessages, m_sheetOffset, m_sheets, ASCH_FILE_NAME::orientation, ASCH_OWNER_INTERFACE::ownerindex, RPT_SEVERITY_DEBUG, SCH_FIELD::SetPosition(), SCH_FIELD::SetText(), SetTextPositioning(), EDA_TEXT::SetVisible(), SHEET_FILENAME, and ASCH_FILE_NAME::text.
Referenced by ParseRecord().
|
private |
Definition at line 4504 of file sch_io_altium.cpp.
References _, BOTTOM, LEFT, m_altiumHarnesses, HARNESS::m_entry, m_errorMessages, ASCH_HARNESS_CONNECTOR::m_harnessConnectorSide, m_harnessEntryParent, m_harnessOwnerIndexOffset, ASCH_HARNESS_CONNECTOR::m_location, HARNESS::HARNESS_PORT::m_location, HARNESS::m_location, ASCH_HARNESS_CONNECTOR::m_primaryConnectionPosition, m_sheetOffset, ASCH_HARNESS_CONNECTOR::m_size, HARNESS::m_size, ASCH_OWNER_INTERFACE::ownerindex, RIGHT, RPT_SEVERITY_DEBUG, ShouldPutItemOnSheet(), TOP, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseRecord().
|
private |
Definition at line 4548 of file sch_io_altium.cpp.
References SCH_SCREEN::Append(), BOTTOM, ASCH_HARNESS_ENTRY::DistanceFromTop, getCurrentScreen(), SCH_BUS_ENTRY_BASE::GetPosition(), SCH_BUS_ENTRY_BASE::GetSize(), IS_NEW, LEFT, m_altiumHarnesses, HARNESS::HARNESS_PORT::m_entryLocation, m_errorMessages, HARNESS::HARNESS_PORT::m_harnessConnectorSide, m_harnessEntryParent, HARNESS::HARNESS_PORT::m_location, HARNESS::m_location, HARNESS::HARNESS_PORT::m_name, HARNESS::m_ports, HARNESS::HARNESS_PORT::m_primaryConnectionPosition, HARNESS::m_size, ASCH_HARNESS_ENTRY::Name, RIGHT, RPT_SEVERITY_DEBUG, EDA_ITEM::SetFlags(), ASCH_HARNESS_ENTRY::Side, TOP, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseRecord().
|
private |
Definition at line 5127 of file sch_io_altium.cpp.
References ParsePortHelper().
Referenced by ParseAdditional(), and ParseASCIISchematic().
|
private |
Definition at line 4603 of file sch_io_altium.cpp.
References m_altiumHarnesses, m_errorMessages, m_harnessEntryParent, HARNESS::m_name, RPT_SEVERITY_DEBUG, and ASCH_HARNESS_TYPE::Text.
Referenced by ParseRecord().
|
private |
|
private |
Definition at line 5385 of file sch_io_altium.cpp.
References _, std::abs(), SCH_SCREEN::Append(), center, ASCH_IMAGE::corner, ASCH_STORAGE_FILE::data, ASCH_IMAGE::embedimage, ASCH_IMAGE::filename, getCurrentScreen(), GetFileFromStorage(), REFERENCE_IMAGE::GetSize(), IS_NEW, ASCH_IMAGE::location, m_altiumComponents, m_errorMessages, m_sheetOffset, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartid, REFERENCE_IMAGE::ReadImageFile(), RPT_SEVERITY_ERROR, REFERENCE_IMAGE::SetImageScale(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseRecord().
|
private |
Definition at line 5933 of file sch_io_altium.cpp.
References AltiumToKiCadLibID(), FOOTPRINT, LIB_ID::Format(), ASCH_IMPLEMENTATION::isCurrent, ASCH_IMPLEMENTATION::libname, m_altiumImplementationList, m_errorMessages, m_isIntLib, m_libName, m_libSymbols, m_symbols, ASCH_IMPLEMENTATION::name, ASCH_OWNER_INTERFACE::ownerindex, RPT_SEVERITY_DEBUG, SCH_SYMBOL::SetFootprintFieldText(), and ASCH_IMPLEMENTATION::type.
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 5924 of file sch_io_altium.cpp.
References m_altiumImplementationList, and ASCH_OWNER_INTERFACE::ownerindex.
Referenced by ParseRecord().
|
private |
Definition at line 5371 of file sch_io_altium.cpp.
References SCH_SCREEN::Append(), getCurrentScreen(), IS_NEW, ASCH_JUNCTION::location, m_sheetOffset, and EDA_ITEM::SetFlags().
Referenced by ParseRecord().
|
private |
Handle labels that are in a library symbol, not on schematic
Definition at line 3041 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), AdjustTextForSymbolOrientation(), AltiumSchSpecialStringsToKiCadVariables(), SCH_SCREEN::Append(), ASCH_SHEET_FONT::Bold, ASCH_LABEL::fontId, fonts, LIB_SYMBOL::GetBodyStyleCount(), getCurrentScreen(), GetRelativePosition(), IS_NEW, ASCH_SHEET_FONT::Italic, ASCH_LABEL::justification, LAYER_DEVICE, ASCH_LABEL::location, m_altiumComponents, m_altiumSheet, m_errorMessages, m_libSymbols, m_sheetOffset, m_sheetSpecialStrings, m_symbols, name, ASCH_LABEL::orientation, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, RPT_SEVERITY_DEBUG, SCH_ITEM::SetBodyStyle(), EDA_TEXT::SetBold(), EDA_ITEM::SetFlags(), EDA_TEXT::SetItalic(), SCH_TEXT::SetPosition(), SetTextPositioning(), EDA_TEXT::SetTextSize(), SCH_ITEM::SetUnit(), ShouldPutItemOnSheet(), ASCH_SHEET_FONT::Size, and ASCH_LABEL::text.
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 5998 of file sch_io_altium.cpp.
References AltiumToKiCadLibID(), ASCH_SYMBOL::componentdescription, ASCH_SYMBOL::displaymodecount, getLibName(), LIB_SYMBOL::GetName(), ASCH_SYMBOL::libreference, ASCH_SYMBOL::partcount, LIB_SYMBOL::SetBodyStyleNames(), LIB_SYMBOL::SetDescription(), LIB_SYMBOL::SetLibId(), LIB_SYMBOL::SetName(), and LIB_SYMBOL::SetUnitCount().
Referenced by ParseLibFile().
|
private |
Definition at line 5679 of file sch_io_altium.cpp.
References ASCH_DESIGNATOR::fontId, ASCH_DESIGNATOR::justification, ASCH_DESIGNATOR::location, ASCH_DESIGNATOR::orientation, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, SCH_FIELD::SetPosition(), SCH_FIELD::SetText(), SetTextPositioning(), EDA_TEXT::SetTextSize(), and ASCH_DESIGNATOR::text.
Referenced by ParseLibFile().
|
private |
Definition at line 6029 of file sch_io_altium.cpp.
References _, ARC, BEZIER, COMPONENT, DESIGNATOR, ELLIPSE, ELLIPTICAL_ARC, LIB_SYMBOL::FixupDrawItems(), fixupSymbolPinNameNumbers(), ALTIUM_COMPOUND_FILE::GetLibSymbols(), IO_BASE::GetName(), ALTIUM_BINARY_PARSER::GetRemainingBytes(), SCH_FIELD::GetText(), LIB_SYMBOL::GetValueField(), ALTIUM_BINARY_PARSER::HasParsingError(), IEEE_SYMBOL, IMAGE, IMPL_PARAMS, IMPLEMENTATION, IMPLEMENTATION_LIST, LABEL, LINE, m_errorMessages, IO_BASE::m_reporter, MAP_DEFINER, MAP_DEFINER_LIST, name, PARAMETER, ParseArc(), ParseBezier(), ParseEllipse(), ParseEllipticalArc(), ParseImplementation(), ParseLabel(), ParseLibComponent(), ParseLibDesignator(), ParseLibHeader(), ParseLibParameter(), ParseLine(), ParsePieChart(), ParsePin(), ParsePolygon(), ParsePolyline(), ParseRectangle(), ParseRoundRectangle(), ParseTextFrame(), PIECHART, PIN, POLYGON, POLYLINE, ALTIUM_BINARY_READER::ReadByte(), ALTIUM_COMPRESSED_READER::ReadCompressedString(), ALTIUM_PROPS_UTILS::ReadInt(), ALTIUM_BINARY_READER::ReadInt16(), ALTIUM_BINARY_READER::ReadInt32(), ALTIUM_BINARY_PARSER::ReadProperties(), ALTIUM_BINARY_READER::ReadShortPascalString(), RECTANGLE, result, ROUND_RECTANGLE, RPT_SEVERITY_ACTION, RPT_SEVERITY_ERROR, LIB_SYMBOL::SetName(), SCH_FIELD::SetText(), split(), TEXT_FRAME, and THROW_IO_ERROR.
Referenced by ensureLoadedLibrary().
|
private |
Definition at line 6315 of file sch_io_altium.cpp.
References _, ALTIUM_COMPOUND_FILE::FindStream(), ALTIUM_BINARY_PARSER::GetRemainingBytes(), ALTIUM_BINARY_PARSER::ReadProperties(), ALTIUM_PROPS_UTILS::ReadString(), schIUScale, and THROW_IO_ERROR.
Referenced by ParseLibFile().
|
private |
Definition at line 5836 of file sch_io_altium.cpp.
References ALTIUM_COMPONENT_NONE, AltiumSchSpecialStringsToKiCadVariables(), DEFAULT_TEXT_SIZE, ASCH_PARAMETER::fontId, ASCH_PARAMETER::isHidden, ASCH_PARAMETER::justification, ASCH_PARAMETER::location, ASCH_PARAMETER::name, ASCH_PARAMETER::orientation, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, schIUScale, SCH_FIELD::SetText(), EDA_TEXT::SetTextPos(), SetTextPositioning(), EDA_TEXT::SetTextSize(), EDA_TEXT::SetVisible(), ASCH_PARAMETER::text, and USER.
Referenced by ParseLibFile().
|
private |
Definition at line 4399 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), SCH_SHAPE::AddPoint(), SCH_SCREEN::Append(), ASCH_BORDER_INTERFACE::Color, LIB_SYMBOL::GetBodyStyleCount(), GetColorFromInt(), getCurrentScreen(), GetPlotDashType(), GetRelativePosition(), IS_NEW, LAYER_DEVICE, LAYER_NOTES, LINE, ASCH_LINE::LineStyle, ASCH_BORDER_INTERFACE::LineWidth, m_altiumComponents, m_errorMessages, m_libSymbols, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ASCH_LINE::point1, ASCH_LINE::point2, POLY, RPT_SEVERITY_DEBUG, SCH_ITEM::SetBodyStyle(), SCH_LINE::SetEndPoint(), EDA_ITEM::SetFlags(), SetLibShapeLine(), EDA_SHAPE::SetLineStyle(), SCH_LINE::SetStroke(), SCH_ITEM::SetUnit(), and ShouldPutItemOnSheet().
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 5317 of file sch_io_altium.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 ParseRecord().
|
private |
Definition at line 5299 of file sch_io_altium.cpp.
References SCH_SCREEN::Append(), getCurrentScreen(), IS_NEW, ASCH_NO_ERC::isActive, ASCH_NO_ERC::location, m_sheetOffset, EDA_ITEM::SetFlags(), and ASCH_NO_ERC::suppressAll.
Referenced by ParseRecord().
|
private |
Definition at line 3188 of file sch_io_altium.cpp.
References AddTextBox().
Referenced by ParseRecord().
|
private |
Definition at line 5727 of file sch_io_altium.cpp.
References SCH_SYMBOL::AddField(), AdjustFieldForSymbolOrientation(), AltiumSchSpecialStringsToKiCadVariables(), SCH_SYMBOL::GetField(), ASCH_PARAMETER::isHidden, ASCH_PARAMETER::isShowName, ASCH_PARAMETER::justification, ASCH_PARAMETER::location, m_altiumComponents, m_currentTitleBlock, m_libSymbols, m_schematic, m_sheetOffset, m_sheetPath, m_symbols, m_unsetSheetParams, ASCH_PARAMETER::name, ASCH_PARAMETER::orientation, ASCH_OWNER_INTERFACE::ownerindex, SCH_FIELD::SetNameShown(), SCH_FIELD::SetPosition(), SCH_FIELD::SetText(), SetTextPositioning(), EDA_TEXT::SetVisible(), ASCH_PARAMETER::text, USER, and VALUE.
Referenced by ParseRecord().
|
private |
Definition at line 4063 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), SCH_SHAPE::AddPoint(), SCH_SCREEN::Append(), center, EDA_ANGLE::Cos(), DEGREES_T, LIB_SYMBOL::GetBodyStyleCount(), getCurrentScreen(), GetRelativePosition(), IS_NEW, KiROUND(), LAYER_DEVICE, LAYER_NOTES, LINE, ASCH_BORDER_INTERFACE::LineWidth, m_altiumComponents, ASCH_ARC::m_Center, ASCH_ARC::m_EndAngle, m_errorMessages, m_libSymbols, ASCH_ARC::m_Radius, m_sheetOffset, ASCH_ARC::m_StartAngle, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ParseArc(), POLY, RPT_SEVERITY_DEBUG, SCH_ITEM::SetBodyStyle(), SCH_LINE::SetEndPoint(), EDA_ITEM::SetFlags(), SetLibShapeLine(), SCH_LINE::SetStroke(), SCH_ITEM::SetUnit(), ShouldPutItemOnSheet(), EDA_ANGLE::Sin(), and SOLID.
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 2659 of file sch_io_altium.cpp.
References _, std::abs(), LIB_SYMBOL::AddDrawItem(), AltiumPinDesignatorToKiCad(), AltiumPinNamesToKiCad(), BIDI, ASCH_PIN_SYMBOL::CLOCK, CLOCK, CLOCK_LOW, DEFAULT_PINNAME_SIZE, DEFAULT_PINNUM_SIZE, ASCH_PIN::designator, DOWNWARDS, ASCH_PIN::electrical, LIB_SYMBOL::GetBodyStyleCount(), GetRelativePosition(), ASCH_PIN::hidden, INPUT_LOW, INVERTED, INVERTED_CLOCK, ASCH_PIN::kicadLocation, LEFTWARDS, LINE, ASCH_PIN::location, ASCH_PIN_SYMBOL::LOW_INPUT, ASCH_PIN_SYMBOL::LOW_OUTPUT, m_altiumComponents, m_errorMessages, m_libSymbols, m_sheetOffset, m_symbols, ASCH_PIN::name, ASCH_PIN_SYMBOL::NEGATED, OPEN_COLLECTOR, OPEN_EMITTER, ASCH_PIN::orientation, OUTPUT, OUTPUT_LOW, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, PASSIVE, pin, PIN_DOWN, PIN_INPUT, PIN_LEFT, PIN_RIGHT, PIN_UP, ASCH_PIN::pinlength, POWER, PT_BIDI, PT_INPUT, PT_OPENCOLLECTOR, PT_OPENEMITTER, PT_OUTPUT, PT_PASSIVE, PT_POWER_IN, PT_TRISTATE, PT_UNSPECIFIED, RIGHTWARDS, RPT_SEVERITY_DEBUG, RPT_SEVERITY_WARNING, schIUScale, ASCH_PIN::showDesignator, ASCH_PIN::showPinName, ASCH_PIN::symbolInnerEdge, ASCH_PIN::symbolOuterEdge, TRISTATE, UNKNOWN, ASCH_PIN_SYMBOL::UNKNOWN, UPWARDS, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 3619 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), SCH_SHAPE::AddPoint(), SCH_SCREEN::Append(), ASCH_BORDER_INTERFACE::Color, LIB_SYMBOL::GetBodyStyleCount(), STROKE_PARAMS::GetColor(), getCurrentScreen(), EDA_SHAPE::GetFillColor(), EDA_SHAPE::GetFillMode(), GetRelativePosition(), SCH_SHAPE::GetStroke(), IS_NEW, LAYER_DEVICE, m_altiumComponents, m_errorMessages, m_libSymbols, m_sheetOffset, m_symbols, NO_FILL, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ASCH_POLYGON::points, POLY, POLYGON, RPT_SEVERITY_DEBUG, SCH_ITEM::SetBodyStyle(), EDA_ITEM::SetFlags(), SetLibShapeFillAndColor(), SetLibShapeLine(), SetSchShapeFillAndColor(), SetSchShapeLine(), SCH_SHAPE::SetStroke(), SCH_ITEM::SetUnit(), STROKE_PARAMS::SetWidth(), and ShouldPutItemOnSheet().
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 3532 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), SCH_SHAPE::AddPoint(), SCH_SCREEN::Append(), ASCH_BORDER_INTERFACE::Color, LIB_SYMBOL::GetBodyStyleCount(), GetColorFromInt(), getCurrentScreen(), GetPlotDashType(), GetRelativePosition(), SCH_SHAPE::GetStroke(), IS_NEW, LAYER_DEVICE, ASCH_POLYLINE::LineStyle, ASCH_BORDER_INTERFACE::LineWidth, m_altiumComponents, m_errorMessages, m_libSymbols, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ASCH_POLYLINE::Points, POLY, POLYLINE, RPT_SEVERITY_DEBUG, SCH_ITEM::SetBodyStyle(), SCH_LINE::SetEndPoint(), EDA_ITEM::SetFlags(), SetLibShapeLine(), STROKE_PARAMS::SetLineStyle(), SCH_LINE::SetStartPoint(), SCH_LINE::SetStroke(), SCH_SHAPE::SetStroke(), SCH_ITEM::SetUnit(), and ShouldPutItemOnSheet().
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 5133 of file sch_io_altium.cpp.
References ASCH_PORT::HarnessType, m_altiumHarnessPortsCurrentSheet, and ParsePortHelper().
Referenced by ParseASCIISchematic(), and ParseFileHeader().
|
private |
Definition at line 5146 of file sch_io_altium.cpp.
References _, SCH_SCREEN::Append(), AUTOPLACE_AUTO, SCH_LABEL_BASE::AutoplaceFields(), BIDI, BOTTOM, SPIN_STYLE::BOTTOM, BOX2< Vec >::Contains(), end, getCurrentScreen(), ASCH_PORT::HarnessType, BOX2< Vec >::Inflate(), INTERSHEET_REFS, IO_INPUT, ASCH_PORT::IOtype, IS_NEW, SCH_SCREEN::IsTerminalPoint(), L_BIDI, L_INPUT, L_OUTPUT, L_UNSPECIFIED, LAYER_BUS, LAYER_WIRE, LEFT, SPIN_STYLE::LEFT, LEFT_RIGHT, ASCH_PORT::Location, m_altiumHarnesses, m_errorMessages, m_sheetOffset, ASCH_PORT::Name, NONE_HORIZONTAL, NONE_VERTICAL, OUTPUT, RIGHT, SPIN_STYLE::RIGHT, RPT_SEVERITY_WARNING, schIUScale, SCH_LINE::SetEndPoint(), EDA_ITEM::SetFlags(), SCH_LINE::SetLineWidth(), SCH_LABEL_BASE::SetShape(), SCH_LABEL_BASE::SetSpinStyle(), EDA_TEXT::SetVisible(), ASCH_PORT::Style, TOP, TOP_BOTTOM, UNSPECIFIED, SPIN_STYLE::UP, and ASCH_PORT::Width.
Referenced by ParseHarnessPort(), and ParsePort().
|
private |
Definition at line 5025 of file sch_io_altium.cpp.
References _, LIB_SYMBOL::AddDrawItem(), AltiumToKiCadLibID(), ANGLE_HORIZONTAL, ANGLE_VERTICAL, SCH_SCREEN::Append(), DOWNWARDS, getCurrentScreen(), SCH_SYMBOL::GetField(), getLibName(), SCH_FIELD::GetPosition(), LIB_SYMBOL::GetReferenceField(), LIB_SYMBOL::GetValueField(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_RIGHT, HelperGeneratePowerPortGraphics(), LEFTWARDS, ASCH_POWER_PORT::location, m_errorMessages, m_powerSymbols, IO_BASE::m_reporter, m_sheetOffset, m_sheetPath, ASCH_POWER_PORT::orientation, pin, PT_POWER_IN, REFERENCE, RIGHTWARDS, RPT_SEVERITY_WARNING, LIB_SYMBOL::SetDescription(), LIB_SYMBOL::SetGlobalPower(), EDA_TEXT::SetHorizJustify(), LIB_SYMBOL::SetKeyWords(), LIB_SYMBOL::SetLibId(), SCH_SYMBOL::SetLibId(), SCH_SYMBOL::SetLibSymbol(), LIB_SYMBOL::SetName(), SCH_SYMBOL::SetOrientation(), SCH_FIELD::SetPosition(), SCH_SYMBOL::SetPosition(), SCH_SYMBOL::SetRef(), SCH_FIELD::SetText(), EDA_TEXT::SetTextAngle(), SCH_SYMBOL::SetValueFieldText(), EDA_TEXT::SetVisible(), ASCH_POWER_PORT::showNetName, ASCH_POWER_PORT::style, SYM_ORIENT_0, SYM_ORIENT_180, SYM_ORIENT_270, SYM_ORIENT_90, ASCH_POWER_PORT::text, UPWARDS, and VALUE.
Referenced by ParseRecord().
| void SCH_IO_ALTIUM::ParseRecord | ( | int | index, |
| std::map< wxString, wxString > & | properties, | ||
| const wxString & | aSectionName ) |
Definition at line 2285 of file sch_io_altium.cpp.
References _, ARC, BEZIER, BLANKET, BUS, BUS_ENTRY, COMPILE_MASK, COMPONENT, DESIGNATOR, ELLIPSE, ELLIPTICAL_ARC, FILE_NAME, HARNESS_CONNECTOR, HARNESS_ENTRY, HARNESS_TYPE, HEADER, HYPERLINK, IEEE_SYMBOL, IMAGE, IMPL_PARAMS, IMPLEMENTATION, IMPLEMENTATION_LIST, index, JUNCTION, LABEL, LINE, m_altiumPortsCurrentSheet, m_errorMessages, m_harnessOwnerIndexOffset, MAP_DEFINER, MAP_DEFINER_LIST, NET_LABEL, NO_ERC, NOTE, PARAMETER, PARAMETER_SET, ParseArc(), ParseBezier(), ParseBus(), ParseBusEntry(), ParseComponent(), ParseDesignator(), ParseEllipse(), ParseFileName(), ParseHarnessConnector(), ParseHarnessEntry(), ParseHarnessType(), ParseImage(), ParseImplementation(), ParseImplementationList(), ParseJunction(), ParseLabel(), ParseLine(), ParseNetLabel(), ParseNoERC(), ParseNote(), ParseParameter(), ParsePieChart(), ParsePin(), ParsePolygon(), ParsePolyline(), ParsePowerPort(), ParseRectangle(), ParseRoundRectangle(), ParseSheet(), ParseSheetEntry(), ParseSheetName(), ParseSheetSymbol(), ParseSignalHarness(), ParseTemplate(), ParseTextFrame(), ParseWire(), PIECHART, PIN, POLYGON, POLYLINE, PORT, POWER_PORT, ALTIUM_PROPS_UTILS::ReadInt(), RECTANGLE, ROUND_RECTANGLE, RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, SHEET, SHEET_ENTRY, SHEET_NAME, SHEET_SYMBOL, SIGNAL_HARNESS, TEMPLATE, TEXT_FRAME, THROW_IO_ERROR, and WIRE.
Referenced by ParseAdditional(), ParseASCIISchematic(), and ParseFileHeader().
|
private |
Definition at line 4622 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), SCH_SCREEN::Append(), ASCH_RECTANGLE::BottomLeft, ASCH_BORDER_INTERFACE::Color, LIB_SYMBOL::GetBodyStyleCount(), getCurrentScreen(), GetRelativePosition(), IS_NEW, LAYER_DEVICE, m_altiumComponents, m_errorMessages, m_libSymbols, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, RECTANGLE, RPT_SEVERITY_DEBUG, SCH_ITEM::SetBodyStyle(), EDA_SHAPE::SetEnd(), EDA_ITEM::SetFlags(), SetLibShapeFillAndColor(), SetLibShapeLine(), SCH_SHAPE::SetPosition(), SetSchShapeFillAndColor(), SetSchShapeLine(), SCH_ITEM::SetUnit(), ShouldPutItemOnSheet(), and ASCH_RECTANGLE::TopRight.
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 3712 of file sch_io_altium.cpp.
References std::abs(), LIB_SYMBOL::AddDrawItem(), SCH_SCREEN::Append(), ASCH_ROUND_RECTANGLE::BottomLeft, center, CIRCLE, ASCH_BORDER_INTERFACE::Color, ASCH_ROUND_RECTANGLE::CornerRadius, LIB_SYMBOL::GetBodyStyleCount(), getCurrentScreen(), SCH_SHAPE::GetPosition(), GetRelativePosition(), IS_NEW, LAYER_DEVICE, m_altiumComponents, m_errorMessages, m_libSymbols, m_sheetOffset, m_symbols, SCH_SHAPE::Normalize(), ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, radius, RECTANGLE, ROUND_RECTANGLE, RPT_SEVERITY_DEBUG, SCH_ITEM::SetBodyStyle(), EDA_SHAPE::SetEnd(), EDA_ITEM::SetFlags(), SetLibShapeFillAndColor(), SetLibShapeLine(), SCH_SHAPE::SetPosition(), SetSchShapeFillAndColor(), SetSchShapeLine(), SCH_ITEM::SetUnit(), ShouldPutItemOnSheet(), ASCH_ROUND_RECTANGLE::TopRight, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 5510 of file sch_io_altium.cpp.
References A, A0, A1, A2, A3, A4, B, C, D, E, getCurrentScreen(), PAGE_INFO::GetHeightIU(), LEGAL, LETTER, m_altiumSheet, m_schematic, m_sheetOffset, ORCAD_A, ORCAD_B, ORCAD_C, ORCAD_D, ORCAD_E, PORTRAIT, schIUScale, PAGE_INFO::SetCustomHeightMils(), PAGE_INFO::SetCustomWidthMils(), SCH_SCREEN::SetPageSettings(), PAGE_INFO::SetType(), TABLOID, and User.
Referenced by ParseRecord().
|
private |
Definition at line 4740 of file sch_io_altium.cpp.
References BIDI, BOTTOM, SPIN_STYLE::BOTTOM, ASCH_SHEET_ENTRY::distanceFromTop, ASCH_SHEET_ENTRY::harnessType, IO_INPUT, ASCH_SHEET_ENTRY::iotype, L_BIDI, L_INPUT, L_OUTPUT, L_UNSPECIFIED, LEFT, SPIN_STYLE::LEFT, m_errorMessages, m_sheets, ASCH_SHEET_ENTRY::name, OUTPUT, ASCH_OWNER_INTERFACE::ownerindex, RIGHT, 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, TOP, UNSPECIFIED, SPIN_STYLE::UP, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseRecord().
|
private |
Definition at line 5564 of file sch_io_altium.cpp.
References BOTTOM_LEFT, getCurrentScreen(), SCH_SHEET::GetName(), ASCH_SHEET_NAME::isHidden, SCH_SCREEN::Items(), ASCH_SHEET_NAME::location, m_errorMessages, m_sheetOffset, m_sheets, EE_RTREE::OfType(), ASCH_SHEET_NAME::orientation, ASCH_OWNER_INTERFACE::ownerindex, RPT_SEVERITY_DEBUG, SCH_SHEET_T, SCH_FIELD::SetPosition(), SCH_FIELD::SetText(), SetTextPositioning(), EDA_TEXT::SetVisible(), SHEET_NAME, and ASCH_SHEET_NAME::text.
Referenced by ParseRecord().
|
private |
Definition at line 4704 of file sch_io_altium.cpp.
References SCH_SCREEN::Append(), ASCH_SHEET_SYMBOL::areacolor, ASCH_SHEET_SYMBOL::color, GetColorFromInt(), getCurrentScreen(), getCurrentSheet(), 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 ParseRecord().
|
private |
Definition at line 4476 of file sch_io_altium.cpp.
References SCH_SCREEN::Append(), ASCH_SIGNAL_HARNESS::color, GetColorFromInt(), getCurrentScreen(), IS_NEW, LAYER_BUS, ASCH_SIGNAL_HARNESS::lineWidth, m_errorMessages, m_sheetOffset, ASCH_OWNER_INTERFACE::ownerindex, ASCH_SIGNAL_HARNESS::points, RPT_SEVERITY_DEBUG, SCH_LINE::SetEndPoint(), EDA_ITEM::SetFlags(), SCH_LINE::SetStroke(), ShouldPutItemOnSheet(), and SOLID.
Referenced by ParseRecord().
| void SCH_IO_ALTIUM::ParseStorage | ( | const ALTIUM_COMPOUND_FILE & | aAltiumSchFile | ) |
Definition at line 1984 of file sch_io_altium.cpp.
References _, ALTIUM_COMPOUND_FILE::FindStream(), ALTIUM_BINARY_PARSER::GetRemainingBytes(), ALTIUM_BINARY_PARSER::HasParsingError(), m_altiumStorage, m_errorMessages, ALTIUM_PROPS_UTILS::ReadInt(), ALTIUM_BINARY_PARSER::ReadProperties(), ALTIUM_PROPS_UTILS::ReadString(), RPT_SEVERITY_ERROR, and THROW_IO_ERROR.
Referenced by ParseAltiumSch().
|
private |
Definition at line 2636 of file sch_io_altium.cpp.
References ASCH_TEMPLATE::filename, SCH_SHEET::GetName(), m_altiumTemplates, and m_sheetPath.
Referenced by ParseRecord().
|
private |
Definition at line 3175 of file sch_io_altium.cpp.
References AddLibTextBox(), AddTextBox(), ASCH_OWNER_INTERFACE::ownerindex, and ShouldPutItemOnSheet().
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 5352 of file sch_io_altium.cpp.
References SCH_SCREEN::Append(), getCurrentScreen(), IS_NEW, LAYER_WIRE, m_sheetOffset, ASCH_WIRE::points, SCH_LINE::SetEndPoint(), and EDA_ITEM::SetFlags().
Referenced by ParseRecord().
|
private |
Definition at line 1201 of file sch_io_altium.cpp.
References AltiumWrapBusLabel(), SCH_LABEL_BASE::GetBoundingBox(), getCurrentScreen(), SCH_TEXT::GetPosition(), EDA_TEXT::GetText(), SCH_LINE::HitTest(), SCH_LINE::IsBus(), SCH_CONNECTION::IsBusLabel(), SCH_SCREEN::Items(), EE_RTREE::OfType(), EE_RTREE::Overlapping(), SCH_LABEL_T, and SCH_LINE_T.
Referenced by ParseAdditional(), and ParseASCIISchematic().
| void SCH_IO_ALTIUM::pruneCyclicSheets | ( | const std::vector< SCH_SHEET * > & | aCyclicSheets, |
| SCH_SCREEN * | aScreen ) |
Remove sheet symbols referencing a parse-stack file (an unrepresentable cycle), converting their pins to hierarchical labels and clearing their sheet-instance records.
Definition at line 1950 of file sch_io_altium.cpp.
References SCH_SCREEN::Append(), SCH_SCREEN::DeleteItem(), m_rootSheet, SCH_SCREEN::m_sheetInstances, pin, SCH_LABEL_BASE::SetShape(), and SCH_HIERLABEL::SetSpinStyle().
Referenced by ParseAltiumSch().
|
virtualinherited |
Definition at line 124 of file io_base.cpp.
References m_reporter.
Referenced by PCB_IO_IPC2581::addShape(), PCB_IO_ODBPP::ConfigureExport(), SCH_IO_EASYEDAPRO_V3::EnumerateSymbolLib(), PCB_IO_ODBPP::ExportODB(), PCB_IO_IPC2581::generateBOMSection(), PCB_IO_IPC2581::generateComponents(), PCB_IO_IPC2581::generateLayerSetDrill(), PCB_IO_IPC2581::generateLayerSetNet(), PCB_IO_IPC2581::generateProfile(), PCB_IO::ImportFootprint(), PCB_IO_DIPTRACE::loadBoard(), PCB_IO_EASYEDAPRO_V3::loadBoard(), SCH_IO_EAGLE::loadInstance(), SCH_IO_EAGLE::loadLibrary(), PCB_IO_KICAD_LEGACY::loadPAD(), PCB_IO_EAGLE::loadPolygon(), SCH_IO_EASYEDAPRO_V3::LoadSchematicFile(), PCB_IO_KICAD_LEGACY::loadZONE_CONTAINER(), PCB_IO_EAGLE::packageCircle(), PCB_IO_EAGLE::packagePad(), PCB_IO_EAGLE::packagePolygon(), PCB_IO_EAGLE::packageRectangle(), PCB_IO_EAGLE::packageText(), PCB_IO_EAGLE::packageWire(), PCB_IO_GEDA::parseElement(), and SCH_IO_DATABASE::reportIssue().
|
private |
Definition at line 1280 of file sch_io_altium.cpp.
References m_projectDocuments.
Referenced by ParseAltiumSch().
|
virtualinherited |
Reimplemented in SCH_IO_KICAD_LEGACY, and SCH_IO_KICAD_SEXPR.
Definition at line 63 of file sch_io.cpp.
References NOT_IMPLEMENTED.
|
virtualinherited |
Write aSchematic to a storage file in a format that this SCH_IO 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_IO_KICAD_LEGACY, and SCH_IO_KICAD_SEXPR.
Definition at line 82 of file sch_io.cpp.
References NOT_IMPLEMENTED.
|
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. Ownership is transferred to the plugin, which may retain or destroy the symbol: the caller must not use it after this call. |
| 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_IO_HTTP_LIB, SCH_IO_KICAD_LEGACY, and SCH_IO_KICAD_SEXPR.
Definition at line 124 of file sch_io.cpp.
References NOT_IMPLEMENTED.
Referenced by LIB_BUFFER::SaveBuffer().
|
inlinevirtualinherited |
Some library plugins need to interface with other loaded libraries.
To do this, they receive a reference to the project-specific manager adapter.
Reimplemented in SCH_IO_DATABASE, and SCH_IO_HTTP_LIB.
|
inlinevirtualinherited |
Set an optional progress reporter.
Reimplemented in SCH_IO_CADSTAR_ARCHIVE.
Definition at line 94 of file io_base.h.
References m_progressReporter.
Referenced by PCB_CONTROL::AppendBoard(), GenerateIpc2581File(), and generateOneODBPackage().
|
inlinevirtualinherited |
Set an optional reporter for warnings/errors.
Reimplemented in SCH_IO_CADSTAR_ARCHIVE.
Definition at line 89 of file io_base.h.
References m_reporter.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), ExportOdb(), GenerateIpc2581File(), generateOneODBPackage(), KI_TEST::LoadBoardWithCapture(), SCH_IO_GEDA::loadDeferredSheets(), and SCH_IO_GEDA::LoadSchematicFile().
|
private |
Definition at line 3027 of file sch_io_altium.cpp.
References ALTIUM_COMPONENT_NONE, and m_altiumTemplates.
Referenced by ParseArc(), ParseBezier(), ParseCircle(), ParseEllipse(), ParseEllipticalArc(), ParseHarnessConnector(), ParseLabel(), ParseLine(), ParsePieChart(), ParsePolygon(), ParsePolyline(), ParseRectangle(), ParseRoundRectangle(), ParseSignalHarness(), and ParseTextFrame().
|
inlinevirtualinherited |
Reimplemented in SCH_IO_DATABASE.
|
inlinevirtualinherited |
Reimplemented in SCH_IO_DATABASE, and SCH_IO_HTTP_LIB.
Definition at line 321 of file sch_io.h.
Referenced by SYMBOL_LIBRARY_ADAPTER::SupportsSubLibraries().
|
friend |
Definition at line 318 of file sch_io_altium.h.
References PARSE_FILE_GUARD.
Referenced by PARSE_FILE_GUARD, and ParseAltiumSch().
|
private |
Definition at line 263 of file sch_io_altium.h.
|
private |
Definition at line 265 of file sch_io_altium.h.
Referenced by AddLibTextBox(), ParseArc(), ParseASCIISchematic(), ParseBezier(), ParseCircle(), ParseComponent(), ParseDesignator(), ParseEllipse(), ParseEllipticalArc(), ParseFileHeader(), ParseImage(), ParseLabel(), ParseLine(), ParseParameter(), ParsePieChart(), ParsePin(), ParsePolygon(), ParsePolyline(), ParseRectangle(), and ParseRoundRectangle().
|
private |
Definition at line 272 of file sch_io_altium.h.
Referenced by CreateAliases(), ParseAdditional(), ParseASCIISchematic(), ParseHarnessConnector(), ParseHarnessEntry(), ParseHarnessType(), and ParsePortHelper().
|
private |
Definition at line 271 of file sch_io_altium.h.
Referenced by ParseAdditional(), ParseASCIISchematic(), and ParsePort().
|
private |
Definition at line 267 of file sch_io_altium.h.
Referenced by ParseASCIISchematic(), ParseFileHeader(), ParseImplementation(), and ParseImplementationList().
|
private |
Definition at line 268 of file sch_io_altium.h.
Referenced by ParseASCIISchematic(), ParseFileHeader(), and ParseRecord().
|
private |
Definition at line 256 of file sch_io_altium.h.
Referenced by AddTextBox(), ParseLabel(), and ParseSheet().
|
private |
Definition at line 262 of file sch_io_altium.h.
Referenced by GetFileFromStorage(), ParseASCIISchematic(), and ParseStorage().
|
private |
Definition at line 285 of file sch_io_altium.h.
Referenced by LoadSchematicFile(), and ParseComponent().
|
private |
Definition at line 266 of file sch_io_altium.h.
Referenced by ParseASCIISchematic(), ParseFileHeader(), ParseTemplate(), and ShouldPutItemOnSheet().
|
private |
Definition at line 252 of file sch_io_altium.h.
Referenced by ParseASCIISchematic(), ParseFileHeader(), and ParseParameter().
|
private |
Definition at line 291 of file sch_io_altium.h.
Referenced by AddLibTextBox(), LoadSchematicFile(), ParseAltiumSch(), ParseArc(), ParseBezier(), ParseCircle(), ParseComponent(), ParseDesignator(), ParseEllipse(), ParseEllipticalArc(), ParseFileName(), ParseHarnessConnector(), ParseHarnessEntry(), ParseHarnessType(), ParseImage(), ParseImplementation(), ParseLabel(), ParseLibFile(), ParseLine(), ParsePieChart(), ParsePin(), ParsePolygon(), ParsePolyline(), ParsePortHelper(), ParsePowerPort(), ParseRecord(), ParseRectangle(), ParseRoundRectangle(), ParseSheetEntry(), ParseSheetName(), ParseSignalHarness(), and ParseStorage().
|
private |
Definition at line 282 of file sch_io_altium.h.
|
private |
Definition at line 276 of file sch_io_altium.h.
Referenced by ParseHarnessConnector(), ParseHarnessEntry(), ParseHarnessType(), and SCH_IO_ALTIUM().
|
private |
Definition at line 275 of file sch_io_altium.h.
Referenced by ParseHarnessConnector(), ParseRecord(), and SCH_IO_ALTIUM().
|
private |
Definition at line 250 of file sch_io_altium.h.
Referenced by ensureLoadedLibrary(), ParseImplementation(), and SCH_IO_ALTIUM().
|
private |
Definition at line 279 of file sch_io_altium.h.
Referenced by doEnumerateSymbolLib(), ensureLoadedLibrary(), LoadSymbol(), and ~SCH_IO_ALTIUM().
|
private |
Definition at line 249 of file sch_io_altium.h.
Referenced by ensureLoadedLibrary(), getLibName(), and ParseImplementation().
|
private |
Definition at line 259 of file sch_io_altium.h.
Referenced by AddLibTextBox(), ParseArc(), ParseASCIISchematic(), ParseBezier(), ParseCircle(), ParseComponent(), ParseDesignator(), ParseEllipse(), ParseEllipticalArc(), ParseFileHeader(), ParseImplementation(), ParseLabel(), ParseLine(), ParseParameter(), ParsePieChart(), ParsePin(), ParsePolygon(), ParsePolyline(), ParseRectangle(), and ParseRoundRectangle().
|
private |
Definition at line 298 of file sch_io_altium.h.
Referenced by LoadSchematicFile(), LoadSchematicProject(), and ParseAltiumSch().
|
private |
Definition at line 301 of file sch_io_altium.h.
Referenced by attachEmptySheetScreen(), and LoadSchematicFile().
|
protectedinherited |
Name of the IO loader.
Definition at line 239 of file io_base.h.
Referenced by PCB_IO_IPC2581::generateBOMSection(), GetName(), IO_BASE(), and PCB_IO_IPC2581::pinName().
|
private |
Definition at line 310 of file sch_io_altium.h.
Referenced by LoadSchematicFile(), LoadSchematicProject(), and ParseAltiumSch().
|
private |
Definition at line 295 of file sch_io_altium.h.
Referenced by LoadSchematicFile(), and ParseAltiumSch().
|
private |
Definition at line 261 of file sch_io_altium.h.
Referenced by ParsePowerPort().
|
protectedinherited |
Progress reporter to track the progress of the operation, may be nullptr.
Definition at line 245 of file io_base.h.
Referenced by AdvanceProgressPhase(), SCH_IO_KICAD_LEGACY::checkpoint(), SCH_IO_CADSTAR_ARCHIVE::ensureLoadedLibrary(), SCH_IO_EAGLE::ensureLoadedLibrary(), PCB_IO_ODBPP::ExportODB(), PCB_IO_IPC2581::generateComponents(), PCB_IO_IPC2581::generateLayerFeatures(), PCB_IO_IPC2581::generatePhyNetGroup(), IO_BASE(), PCB_IO_ALTIUM_CIRCUIT_MAKER::loadBoard(), PCB_IO_ALTIUM_CIRCUIT_STUDIO::loadBoard(), PCB_IO_ALTIUM_DESIGNER::loadBoard(), PCB_IO_CADSTAR_ARCHIVE::loadBoard(), PCB_IO_DIPTRACE::loadBoard(), PCB_IO_EASYEDA::loadBoard(), PCB_IO_EASYEDAPRO::loadBoard(), PCB_IO_EASYEDAPRO_V3::loadBoard(), PCB_IO_EASYPC::loadBoard(), PCB_IO_FABMASTER::loadBoard(), PCB_IO_KICAD_SEXPR::loadBoard(), PCB_IO_PADS::loadBoard(), PCB_IO_PADS_BINARY::loadBoard(), PCB_IO_SOLIDWORKS::loadBoard(), PCB_IO_TARGET3001::loadBoard(), PCB_IO_ALLEGRO::LoadBoardFromData(), SCH_IO_KICAD_LEGACY::loadFile(), SCH_IO_KICAD_SEXPR::loadFile(), SCH_IO_ORCAD::loadOlbSymbols(), SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile(), SCH_IO_DIPTRACE::LoadSchematicFile(), SCH_IO_EAGLE::LoadSchematicFile(), SCH_IO_EASYPC::LoadSchematicFile(), SCH_IO_LTSPICE::LoadSchematicFile(), SCH_IO_ORCAD::LoadSchematicFile(), SCH_IO_PADS::LoadSchematicFile(), SCH_IO_TARGET3001::LoadSchematicFile(), SCH_IO_ALTIUM::ParseAltiumSch(), PCB_IO_IPC2581::reportPhase(), PCB_IO_IPC2581::SaveBoard(), SetProgressReporter(), SCH_IO_CADSTAR_ARCHIVE::SetProgressReporter(), and PCB_IO_IPC2581::tickProgress().
|
private |
Definition at line 316 of file sch_io_altium.h.
Referenced by LoadSchematicFile(), LoadSchematicProject(), and ResolveSheetFileName().
|
protectedinherited |
Reporter to log errors/warnings to, may be nullptr.
Definition at line 242 of file io_base.h.
Referenced by SCH_IO_EASYPC::convertComponent(), PCB_IO_CADSTAR_ARCHIVE::ensureLoadedLibrary(), SCH_IO_CADSTAR_ARCHIVE::ensureLoadedLibrary(), SCH_IO_GEDA::flushPendingComponent(), PCB_IO_ALTIUM_DESIGNER::FootprintLoad(), SCH_IO_GEDA::getOrLoadSymbol(), SCH_IO_GEDA::importHierarchicalSheet(), IO_BASE(), PCB_IO_EASYPC::library(), SCH_IO_EASYPC::library(), SCH_IO_PADS::loadBinarySchematicFile(), PCB_IO_ALTIUM_CIRCUIT_MAKER::loadBoard(), PCB_IO_ALTIUM_CIRCUIT_STUDIO::loadBoard(), PCB_IO_ALTIUM_DESIGNER::loadBoard(), PCB_IO_CADSTAR_ARCHIVE::loadBoard(), PCB_IO_EASYPC::loadBoard(), PCB_IO_FABMASTER::loadBoard(), PCB_IO_PADS::loadBoard(), PCB_IO_PADS_BINARY::loadBoard(), PCB_IO_PCAD::loadBoard(), PCB_IO_SOLIDWORKS::loadBoard(), PCB_IO_TARGET3001::loadBoard(), PCB_IO_ALLEGRO::LoadBoardFromData(), PCB_IO_PADS::loadCopperShapes(), PCB_IO_PADS_BINARY::loadCopperShapes(), SCH_IO_GEDA::loadDeferredSheets(), PCB_IO_PADS::loadFootprints(), PCB_IO_PADS_BINARY::loadFootprints(), SCH_IO_ORCAD::loadOlbSymbols(), SCH_IO_ALTIUM::LoadSchematicFile(), SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile(), SCH_IO_DIPTRACE::LoadSchematicFile(), SCH_IO_EASYPC::LoadSchematicFile(), SCH_IO_GEDA::LoadSchematicFile(), SCH_IO_LTSPICE::LoadSchematicFile(), SCH_IO_ORCAD::LoadSchematicFile(), SCH_IO_PADS::LoadSchematicFile(), SCH_IO_TARGET3001::LoadSchematicFile(), PCB_IO_PADS::loadTracksAndVias(), PCB_IO_PADS_BINARY::loadTracksAndVias(), PCB_IO_PADS::loadZones(), PCB_IO_PADS_BINARY::loadZones(), SCH_IO_ALTIUM::NameNetsAfterNetLabels(), SCH_IO_ALTIUM::ParseLibFile(), SCH_IO_ALTIUM::ParsePowerPort(), SCH_IO_PCAD::populateScreen(), Report(), PCB_IO_AUTOTRAX::reporter(), SCH_IO_ALTIUM::SCH_IO_ALTIUM(), SCH_IO_CADSTAR_ARCHIVE::SCH_IO_CADSTAR_ARCHIVE(), SCH_IO_DIPTRACE::SCH_IO_DIPTRACE(), SCH_IO_EASYEDA::SCH_IO_EASYEDA(), SCH_IO_EASYPC::SCH_IO_EASYPC(), SCH_IO_LTSPICE::SCH_IO_LTSPICE(), SCH_IO_ORCAD::SCH_IO_ORCAD(), SCH_IO_TARGET3001::SCH_IO_TARGET3001(), SetReporter(), and SCH_IO_CADSTAR_ARCHIVE::SetReporter().
|
private |
Definition at line 244 of file sch_io_altium.h.
Referenced by LoadSchematicFile(), and ParseAltiumSch().
|
private |
Definition at line 245 of file sch_io_altium.h.
Referenced by getLibName(), LoadSchematicFile(), LoadSchematicProject(), ParseSheetSymbol(), pruneCyclicSheets(), and SCH_IO_ALTIUM().
|
private |
Definition at line 307 of file sch_io_altium.h.
Referenced by claimSheetFile(), and LoadSchematicFile().
|
private |
Definition at line 248 of file sch_io_altium.h.
Referenced by attachEmptySheetScreen(), claimSheetFile(), getLibFileName(), getLibName(), LoadSchematicFile(), LoadSchematicProject(), NameNetsAfterNetLabels(), NormalizeRepeatedSheetInstances(), ParseAltiumSch(), ParseParameter(), ParseSheet(), and SCH_IO_ALTIUM().
|
private |
Definition at line 304 of file sch_io_altium.h.
Referenced by claimSheetFile(), and LoadSchematicFile().
|
private |
Definition at line 255 of file sch_io_altium.h.
Referenced by AddLibTextBox(), AddTextBox(), ParseArc(), ParseBezier(), ParseBus(), ParseBusEntry(), ParseCircle(), ParseComponent(), ParseDesignator(), ParseEllipse(), ParseEllipticalArc(), ParseFileName(), ParseHarnessConnector(), ParseImage(), ParseJunction(), ParseLabel(), ParseLine(), ParseNetLabel(), ParseNoERC(), ParseParameter(), ParsePieChart(), ParsePin(), ParsePolygon(), ParsePolyline(), ParsePortHelper(), ParsePowerPort(), ParseRectangle(), ParseRoundRectangle(), ParseSheet(), ParseSheetName(), ParseSheetSymbol(), ParseSignalHarness(), and ParseWire().
|
private |
Definition at line 246 of file sch_io_altium.h.
Referenced by getCurrentScreen(), getCurrentSheet(), LoadSchematicFile(), LoadSchematicProject(), ParseAltiumSch(), ParseComponent(), ParseDesignator(), ParseParameter(), ParsePowerPort(), ParseSheetSymbol(), and ParseTemplate().
|
private |
Definition at line 258 of file sch_io_altium.h.
Referenced by EnsureSheetSymbolNames(), LoadSchematicFile(), ParseAltiumSch(), ParseFileName(), ParseSheetEntry(), ParseSheetName(), and ParseSheetSymbol().
|
private |
Definition at line 288 of file sch_io_altium.h.
Referenced by LoadSchematicFile(), and ParseLabel().
|
private |
Definition at line 313 of file sch_io_altium.h.
Referenced by LoadSchematicFile(), LoadSchematicProject(), and ParseAltiumSch().
|
private |
Definition at line 257 of file sch_io_altium.h.
Referenced by AddLibTextBox(), ParseArc(), ParseASCIISchematic(), ParseBezier(), ParseCircle(), ParseComponent(), ParseDesignator(), ParseEllipse(), ParseEllipticalArc(), ParseFileHeader(), ParseImplementation(), ParseLabel(), ParseLine(), ParseParameter(), ParsePieChart(), ParsePin(), ParsePolygon(), ParsePolyline(), ParseRectangle(), and ParseRoundRectangle().
|
private |
Definition at line 278 of file sch_io_altium.h.
Referenced by ensureLoadedLibrary().
|
private |
Definition at line 247 of file sch_io_altium.h.
Referenced by LoadSchematicFile(), and ParseParameter().