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. | |
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 | 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 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 | SaveSymbol (const wxString &aLibraryPath, const 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 | SetLibTable (SYMBOL_LIB_TABLE *aTable) |
Some library plugins need to have access to their parent library table. | |
const wxString & | GetName () const |
Return a brief hard coded name for this IO interface. | |
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 void | Report (const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) |
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) |
bool | IsComponentPartVisible (const ASCH_OWNER_INTERFACE &aElem) const |
const ASCH_STORAGE_FILE * | GetFileFromStorage (const wxString &aFilename) const |
void | AddTextBox (const ASCH_TEXT_FRAME *aElem) |
void | AddLibTextBox (const ASCH_TEXT_FRAME *aElem, std::vector< LIB_SYMBOL * > &aSymbol=nullsym, std::vector< int > &aFontSize=nullint) |
void | ParseComponent (int aIndex, const std::map< wxString, wxString > &aProperties) |
void | 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 | ParseNoERC (const std::map< wxString, wxString > &aProperties) |
void | ParseNetLabel (const std::map< wxString, wxString > &aProperties) |
void | ParseBus (const std::map< wxString, wxString > &aProperties) |
void | ParseWire (const std::map< wxString, wxString > &aProperties) |
void | ParseJunction (const std::map< wxString, wxString > &aProperties) |
void | ParseImage (const std::map< wxString, wxString > &aProperties) |
void | ParseSheet (const std::map< wxString, wxString > &aProperties) |
void | ParseSheetName (const std::map< wxString, wxString > &aProperties) |
void | ParseFileName (const std::map< wxString, wxString > &aProperties) |
void | ParseDesignator (const std::map< wxString, wxString > &aProperties) |
void | ParseLibDesignator (const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym, std::vector< int > &aFontSize=nullint) |
void | ParseBusEntry (const std::map< wxString, wxString > &aProperties) |
void | ParseParameter (const std::map< wxString, wxString > &aProperties) |
void | ParseLibParameter (const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym, std::vector< int > &aFontSize=nullint) |
void | ParseImplementationList (int aIndex, const std::map< wxString, wxString > &aProperties) |
void | ParseImplementation (const std::map< wxString, wxString > &aProperties, std::vector< LIB_SYMBOL * > &aSymbol=nullsym) |
void | ParseLibHeader (const ALTIUM_COMPOUND_FILE &aAltiumSchFile, std::vector< int > &aFontSizes) |
std::map< wxString, LIB_SYMBOL * > | ParseLibFile (const ALTIUM_COMPOUND_FILE &aAltiumSchFile) |
std::vector< LIB_SYMBOL * > | ParseLibComponent (const std::map< wxString, wxString > &aProperties) |
void | 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) |
Definition at line 56 of file sch_io_altium.h.
SCH_IO_ALTIUM::SCH_IO_ALTIUM | ( | ) |
Definition at line 244 of file sch_io_altium.cpp.
References WXLOG_REPORTER::GetInstance(), m_harnessEntryParent, m_harnessOwnerIndexOffset, m_isIntLib, IO_BASE::m_reporter, m_rootSheet, and m_schematic.
SCH_IO_ALTIUM::~SCH_IO_ALTIUM | ( | ) |
Definition at line 257 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 1718 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), ASCH_TEXT_FRAME::Alignment, ASCH_TEXT_FRAME::AreaColor, ASCH_TEXT_FRAME::BorderColor, ASCH_TEXT_FRAME::BottomLeft, ASCH_TEXT_FRAME::FontID, GetColorFromInt(), GetRelativePosition(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, ASCH_TEXT_FRAME::isSolid, LAYER_DEVICE, m_libSymbols, IO_BASE::m_reporter, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, REPORTER::Report(), RPT_SEVERITY_DEBUG, EDA_SHAPE::SetEnd(), EDA_SHAPE::SetFillColor(), EDA_SHAPE::SetFilled(), EDA_SHAPE::SetFillMode(), EDA_TEXT::SetHorizJustify(), EDA_SHAPE::SetStart(), 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 1656 of file sch_io_altium.cpp.
References ASCH_TEXT_FRAME::Alignment, SCH_SCREEN::Append(), ASCH_TEXT_FRAME::AreaColor, ASCH_SHEET_FONT::Bold, ASCH_TEXT_FRAME::BorderColor, ASCH_TEXT_FRAME::BottomLeft, ASCH_TEXT_FRAME::FontID, fonts, GetColorFromInt(), getCurrentScreen(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, IS_NEW, ASCH_TEXT_FRAME::isSolid, ASCH_SHEET_FONT::Italic, m_altiumSheet, m_sheetOffset, EDA_TEXT::SetBold(), EDA_SHAPE::SetEnd(), EDA_SHAPE::SetFillColor(), EDA_SHAPE::SetFilled(), EDA_SHAPE::SetFillMode(), EDA_ITEM::SetFlags(), EDA_TEXT::SetHorizJustify(), EDA_TEXT::SetItalic(), EDA_SHAPE::SetStart(), SCH_SHAPE::SetStroke(), EDA_TEXT::SetText(), EDA_TEXT::SetTextSize(), ASCH_TEXT_FRAME::ShowBorder, ASCH_SHEET_FONT::Size, ASCH_TEXT_FRAME::Text, and ASCH_TEXT_FRAME::TopRight.
Referenced by ParseNote(), and ParseTextFrame().
|
virtualinherited |
Definition at line 131 of file io_base.cpp.
References _, PROGRESS_REPORTER::AdvancePhase(), PROGRESS_REPORTER::KeepRefreshing(), IO_BASE::m_progressReporter, and THROW_IO_ERROR.
Referenced by EAGLE_BASE::AdvanceProgressPhase().
|
overridevirtual |
Checks if this IO object can read the specified library file/directory.
If not overriden, extension check is used.
Reimplemented from IO_BASE.
Definition at line 302 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 293 of file sch_io_altium.cpp.
References SCH_IO::CanReadSchematicFile(), and checkFileHeader().
|
staticprivate |
Definition at line 287 of file sch_io_altium.cpp.
References isASCIIFile(), and isBinaryFile().
Referenced by CanReadLibrary(), and CanReadSchematicFile().
|
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, SCH_IO_KICAD_LEGACY, SCH_IO_KICAD_SEXPR, and PCB_IO_KICAD_SEXPR.
Definition at line 46 of file io_base.cpp.
References NOT_IMPLEMENTED.
|
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, SCH_IO_KICAD_LEGACY, SCH_IO_KICAD_SEXPR, PCB_IO_GEDA, PCB_IO_KICAD_LEGACY, and PCB_IO_KICAD_SEXPR.
Definition at line 52 of file io_base.cpp.
References NOT_IMPLEMENTED.
|
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 116 of file sch_io.cpp.
References NOT_IMPLEMENTED.
Referenced by LIB_BUFFER::SaveBuffer().
|
private |
Definition at line 4631 of file sch_io_altium.cpp.
References ensureLoadedLibrary(), m_libCache, and SYMBOL_LIB_TABLE::PropPowerSymsOnly.
Referenced by EnumerateSymbolLib().
|
private |
Definition at line 4521 of file sch_io_altium.cpp.
References getLibraryTimestamp(), m_isIntLib, m_libCache, m_libName, m_timestamps, ParseLibFile(), fontconfig::FONTCONFIG::SetReporter(), and THROW_IO_ERROR.
Referenced by doEnumerateSymbolLib(), and LoadSymbol().
|
overridevirtual |
Populate a list of LIB_SYMBOL aliases contained within the library aLibraryPath.
aSymbolList | is an array to populate with the LIB_SYMBOL pointers associated with the library. |
aLibraryPath | is a locator for the "library", usually a directory, file, or URL containing one or more LIB_SYMBOL objects. |
aProperties | is an associative array that can be used to tell the plugin anything needed about how to perform with respect to aLibraryPath. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. |
IO_ERROR | if the library cannot be found, the part library cannot be loaded. |
Reimplemented from SCH_IO.
Definition at line 4668 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 4656 of file sch_io_altium.cpp.
References doEnumerateSymbolLib().
|
private |
Definition at line 311 of file sch_io_altium.cpp.
References DEFAULT_PINNAME_SIZE, DEFAULT_PINNUM_SIZE, EDA_IU_SCALE::MilsToIU(), pin, schIUScale, SYMBOL::SetShowPinNames(), and SYMBOL::SetShowPinNumbers().
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 324 of file sch_io.h.
Referenced by SCH_IO::GetDefaultSymbolFields().
|
private |
Definition at line 515 of file sch_io_altium.cpp.
References SCH_SHEET_PATH::LastScreen(), and m_sheetPath.
Referenced by AddTextBox(), ParseAltiumSch(), ParseArc(), ParseASCIISchematic(), ParseBezier(), ParseBus(), ParseBusEntry(), ParseCircle(), ParseComponent(), ParseDesignator(), ParseEllipse(), ParseEllipticalArc(), ParseFileHeader(), ParseHarnessConnector(), ParseHarnessPort(), ParseImage(), ParseJunction(), ParseLabel(), ParseLine(), ParseNetLabel(), ParseNoERC(), ParsePieChart(), ParsePolygon(), ParsePolyline(), ParsePort(), ParsePowerPort(), ParseRectangle(), ParseRoundRectangle(), ParseSheet(), ParseSheetSymbol(), ParseSignalHarness(), and ParseWire().
|
private |
Definition at line 521 of file sch_io_altium.cpp.
References SCH_SHEET_PATH::Last(), and m_sheetPath.
Referenced by ParseASCIISchematic(), ParseFileHeader(), ParseHarnessConnector(), and ParseSheetSymbol().
|
inlinevirtualinherited |
Retrieves a list of (custom) field names that should be shown by default for this library in the symbol chooser.
This list should be a subset of the result returned by GetAvailableSymbolFields().
The preference for which fields to hide and show for a given library is stored on a per-library basis in a user's preferences (or in the project local settings for a project- local library). The set of fields returned by GetDefaultSymbolFields() will be used if this preference is missing.
aNames | will be filled with the custom field names that should be shown by default |
Reimplemented in SCH_IO_DATABASE, SCH_IO_HTTP_LIB, and SCH_IO_KICAD_SEXPR.
Definition at line 338 of file sch_io.h.
References SCH_IO::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 139 of file sch_io.cpp.
References NOT_IMPLEMENTED.
|
private |
Definition at line 1148 of file sch_io_altium.cpp.
References m_altiumStorage.
Referenced by ParseImage().
wxFileName SCH_IO_ALTIUM::getLibFileName | ( | ) |
Definition at line 376 of file sch_io_altium.cpp.
References getLibName(), PROJECT::GetProjectPath(), FILEEXT::KiCadSymbolLibFileExtension, m_schematic, and SCHEMATIC::Prj().
Referenced by LoadSchematicFile(), ParseASCIISchematic(), ParseFileHeader(), and ParsePowerPort().
wxString SCH_IO_ALTIUM::getLibName | ( | ) |
Definition at line 352 of file sch_io_altium.cpp.
References LIB_ID::FixIllegalChars(), SCH_SHEET::GetFileName(), PROJECT::GetProjectName(), m_libName, m_rootSheet, m_schematic, SCHEMATIC::Prj(), and UTF8::wx_str().
Referenced by getLibFileName(), LoadSchematicFile(), ParseComponent(), ParseLibComponent(), and ParsePowerPort().
|
inlineoverridevirtual |
Get the descriptor for the library container that this IO plugin operates on.
Implements IO_BASE.
Definition at line 67 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, and PCB_IO_KICAD_SEXPR.
Definition at line 106 of file io_base.h.
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 124 of file sch_io.cpp.
References IO_BASE::GetLibraryOptions().
|
private |
Definition at line 4510 of file sch_io_altium.cpp.
Referenced by ensureLoadedLibrary().
|
overridevirtual |
Return the modification hash from the library cache.
Implements SCH_IO.
Definition at line 267 of file sch_io_altium.cpp.
|
inlineinherited |
Return a brief hard coded name for this IO interface.
Definition at line 75 of file io_base.h.
Referenced by ParseLibFile().
|
inlineoverridevirtual |
Returns schematic file description for the SCH_IO.
Reimplemented from SCH_IO.
Definition at line 62 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.
|
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.
|
staticprivate |
Definition at line 280 of file sch_io_altium.cpp.
References IO_UTILS::fileStartsWithPrefix().
Referenced by checkFileHeader().
|
staticprivate |
Definition at line 273 of file sch_io_altium.cpp.
References IO_UTILS::COMPOUND_FILE_HEADER, and IO_UTILS::fileStartsWithBinaryHeader().
Referenced by checkFileHeader(), and ParseAltiumSch().
|
private |
Definition at line 1133 of file sch_io_altium.cpp.
References m_altiumComponents, m_altiumTemplates, ASCH_OWNER_INTERFACE::ownerindex, and ASCH_OWNER_INTERFACE::ownerpartdisplaymode.
Referenced by ParseArc(), ParseBezier(), ParseEllipticalArc(), ParseLine(), ParsePieChart(), ParsePin(), ParsePolygon(), ParsePolyline(), ParseRectangle(), and ParseRoundRectangle().
|
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 110 of file sch_io_altium.h.
|
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. |
aKiway | is the KIWAY object used to access the symbol libraries loaded by the project. |
aAppendToMe | is an existing SCH_SHEET to append to, but if NULL then this means "do not append, rather load anew". |
aProperties | is an associative array that can be used to tell the loader how to load the file, because it can take any number of additional named arguments that the plugin is known to support. These are tuning parameters for the import or load. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. |
IO_ERROR | if there is a problem loading, and its contents should say what went wrong, using line number and character offsets of the input file if possible. |
Reimplemented from SCH_IO.
Definition at line 385 of file sch_io_altium.cpp.
References SCH_SCREENS::ClearEditFlags(), SYMBOL_LIB_TABLE::Format(), SCH_SCREENS::GetFirst(), WXLOG_REPORTER::GetInstance(), getLibFileName(), getLibName(), SCH_LINE::GetLineWidth(), SCH_SCREENS::GetNext(), PROJECT::GetProjectFile(), PROJECT::GetProjectPath(), SCH_SHEET::GetScreen(), SYMBOL_LIB_TABLE::GetSymbolLibTableFileName(), SCH_SCREEN::GetUuid(), LIB_TABLE::HasLibrary(), LIB_TABLE::InsertRow(), SCH_LINE::IsBus(), SCHEMATIC::IsValid(), SCH_LINE::IsWire(), FILEEXT::KiCadSchematicFileExtension, SCH_SHEET_INSTANCE::m_PageNumber, SCH_SHEET_INSTANCE::m_Path, m_pi, m_rootSheet, m_schematic, SCH_SCREEN::m_sheetInstances, m_sheetPath, EDA_ITEM::m_Uuid, PROJECT_FILE::NetSettings(), ParseAltiumSch(), SCH_SHEET_PATH::Path(), SCHEMATIC::Prj(), SCH_SHEET_PATH::push_back(), SCHEMATIC::Root(), SCH_LINE_T, PROJECT_SCH::SchSymbolLibTable(), PROJECT::SetElem(), SCH_SCREEN::SetFileName(), SCH_SHEET::SetFileName(), SCH_SHEET_PATH::SetPageNumber(), fontconfig::FONTCONFIG::SetReporter(), SCHEMATIC::SetRoot(), SCH_SHEET::SetScreen(), PROJECT::SYMBOL_LIB_TABLE, and SCH_SCREENS::UpdateSymbolLinks().
|
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 4680 of file sch_io_altium.cpp.
References ensureLoadedLibrary(), and m_libCache.
void SCH_IO_ALTIUM::ParseAdditional | ( | const ALTIUM_COMPOUND_FILE & | aAltiumSchFile | ) |
Definition at line 673 of file sch_io_altium.cpp.
References ALTIUM_COMPOUND_FILE::FindStream(), ALTIUM_BINARY_PARSER::GetRemainingBytes(), ALTIUM_BINARY_PARSER::HasParsingError(), m_altiumHarnessPortsCurrentSheet, ParseHarnessPort(), ParseRecord(), 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 527 of file sch_io_altium.cpp.
References _, getCurrentScreen(), SCH_SHEET::GetFileName(), SCH_SHEET::GetName(), PROJECT::GetProjectPath(), SCH_SHEET::GetScreen(), isBinaryFile(), SCH_SCREEN::Items(), FILEEXT::KiCadSchematicFileExtension, IO_BASE::m_reporter, m_rootSheet, m_schematic, m_sheetPath, EE_RTREE::OfType(), ParseAdditional(), ParseAltiumSch(), ParseASCIISchematic(), ParseFileHeader(), ParseStorage(), SCH_SHEET_PATH::pop_back(), SCHEMATIC::Prj(), SCH_SHEET_PATH::push_back(), REPORTER::Report(), SCH_SHEET_T, SCH_SHEET::SearchHierarchy(), SCH_SCREEN::SetFileName(), SCH_SHEET::SetFileName(), SCH_SHEET::SetName(), SCH_SHEET::SetScreen(), THROW_IO_ERROR, and traceAltiumSch.
Referenced by LoadSchematicFile(), and ParseAltiumSch().
|
private |
Definition at line 2218 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), SCH_SCREEN::Append(), ASCH_BORDER_INTERFACE::Color, EDA_ANGLE::Cos(), DEGREES_T, getCurrentScreen(), SCH_SHAPE::GetPosition(), GetRelativePosition(), IsComponentPartVisible(), KiROUND(), LAYER_DEVICE, ASCH_ARC::m_Center, ASCH_ARC::m_EndAngle, m_libSymbols, ASCH_ARC::m_Radius, IO_BASE::m_reporter, m_sheetOffset, ASCH_ARC::m_StartAngle, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, REPORTER::Report(), RPT_SEVERITY_DEBUG, EDA_SHAPE::SetCenter(), EDA_SHAPE::SetEnd(), SetLibShapeFillAndColor(), SetLibShapeLine(), SCH_SHAPE::SetPosition(), 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 812 of file sch_io_altium.cpp.
References _, ALTIUM_ASCII_PARSER::CanRead(), fixupSymbolPinNameNumbers(), getCurrentScreen(), getCurrentSheet(), getLibFileName(), ALTIUM_ASCII_PARSER::HasParsingError(), m_altiumComponents, m_altiumHarnessPortsCurrentSheet, m_altiumImplementationList, m_altiumPortsCurrentSheet, m_altiumStorage, m_altiumTemplates, m_currentTitleBlock, m_libSymbols, m_pi, m_properties, m_symbols, ParseHarnessPort(), ParsePort(), ParseRecord(), 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 1797 of file sch_io_altium.cpp.
References _, LIB_SYMBOL::AddDrawItem(), SCH_SHAPE::AddPoint(), SCH_SCREEN::Append(), getCurrentScreen(), BEZIER_POLY::GetPoly(), GetRelativePosition(), EDA_SHAPE::GetWidth(), IS_NEW, IsComponentPartVisible(), LAYER_DEVICE, ASCH_BORDER_INTERFACE::LineWidth, m_libSymbols, IO_BASE::m_reporter, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ASCH_BEZIER::points, EDA_SHAPE::RebuildBezierToSegmentsPointsList(), REPORTER::Report(), RPT_SEVERITY_DEBUG, RPT_SEVERITY_WARNING, EDA_SHAPE::SetBezierC1(), EDA_SHAPE::SetBezierC2(), EDA_SHAPE::SetEnd(), SCH_LINE::SetEndPoint(), EDA_ITEM::SetFlags(), EDA_SHAPE::SetStart(), SCH_LINE::SetStroke(), SCH_SHAPE::SetStroke(), SCH_ITEM::SetUnit(), and ShouldPutItemOnSheet().
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 3687 of file sch_io_altium.cpp.
References SCH_SCREEN::Append(), getCurrentScreen(), IS_NEW, ASCH_BUS::lineWidth, m_sheetOffset, ASCH_BUS::points, SCH_LINE::SetEndPoint(), EDA_ITEM::SetFlags(), and SCH_LINE::SetLineWidth().
Referenced by ParseRecord().
|
private |
Definition at line 3985 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 2657 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), SCH_SCREEN::Append(), ASCH_FILL_INTERFACE::AreaColor, ASCH_ELLIPSE::Center, ASCH_BORDER_INTERFACE::Color, GetColorFromInt(), getCurrentScreen(), SCH_SHAPE::GetPosition(), GetRelativePosition(), ASCH_FILL_INTERFACE::IsSolid, LAYER_DEVICE, m_libSymbols, IO_BASE::m_reporter, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ASCH_ELLIPSE::Radius, REPORTER::Report(), RPT_SEVERITY_DEBUG, EDA_SHAPE::SetEnd(), EDA_SHAPE::SetFillColor(), EDA_SHAPE::SetFilled(), EDA_SHAPE::SetFillMode(), SetLibShapeFillAndColor(), SetLibShapeLine(), SCH_SHAPE::SetPosition(), SCH_SHAPE::SetStroke(), SCH_ITEM::SetUnit(), and ShouldPutItemOnSheet().
Referenced by ParseEllipse(), and ParseEllipticalArc().
|
private |
Definition at line 1165 of file sch_io_altium.cpp.
References _, AltiumToKiCadLibID(), SCH_SCREEN::Append(), ASCH_SYMBOL::componentdescription, ASCH_SYMBOL::currentpartid, DESCRIPTION_FIELD, ASCH_SYMBOL::displaymode, ASCH_SYMBOL::displaymodecount, getCurrentScreen(), SCH_SYMBOL::GetField(), SCH_SYMBOL::GetFields(), getLibName(), SCH_SHEET::GetName(), ASCH_SYMBOL::isMirrored, SCH_SHEET_PATH::Last(), ASCH_SYMBOL::libreference, ASCH_SYMBOL::location, m_altiumComponents, m_libSymbols, IO_BASE::m_reporter, m_sheetOffset, m_sheetPath, m_symbols, name, ASCH_SYMBOL::orientation, REPORTER::Report(), RPT_SEVERITY_ERROR, LIB_SYMBOL::SetDescription(), LIB_SYMBOL::SetLibId(), SCH_SYMBOL::SetLibId(), LIB_SYMBOL::SetName(), SCH_SYMBOL::SetPosition(), SCH_FIELD::SetText(), and SCH_ITEM::SetUnit().
Referenced by ParseRecord().
|
private |
Definition at line 3918 of file sch_io_altium.cpp.
References getCurrentScreen(), SCH_SYMBOL::GetField(), ASCH_DESIGNATOR::justification, ASCH_DESIGNATOR::location, m_libSymbols, IO_BASE::m_reporter, m_sheetOffset, m_sheetPath, m_symbols, ASCH_DESIGNATOR::orientation, ASCH_OWNER_INTERFACE::ownerindex, REFERENCE_FIELD, REPORTER::Report(), RPT_SEVERITY_DEBUG, SCH_FIELD::SetPosition(), SCH_SYMBOL::SetRef(), SetTextPositioning(), EDA_TEXT::SetVisible(), ASCH_DESIGNATOR::text, and VALUE_FIELD.
Referenced by ParseRecord().
|
private |
Definition at line 2514 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), SCH_SHAPE::AddPoint(), ANGLE_0, SCH_SCREEN::Append(), ASCH_FILL_INTERFACE::AreaColor, ASCH_ELLIPSE::Center, ASCH_BORDER_INTERFACE::Color, GetColorFromInt(), getCurrentScreen(), GetRelativePosition(), EDA_SHAPE::GetStart(), EDA_SHAPE::GetWidth(), ASCH_FILL_INTERFACE::IsSolid, ASCH_FILL_INTERFACE::IsTransparent, KiROUND(), LAYER_DEVICE, ASCH_BORDER_INTERFACE::LineWidth, m_libSymbols, IO_BASE::m_reporter, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ParseCircle(), ASCH_ELLIPSE::Radius, EDA_SHAPE::RebuildBezierToSegmentsPointsList(), REPORTER::Report(), RPT_SEVERITY_DEBUG, ASCH_ELLIPSE::SecondaryRadius, EDA_SHAPE::SetBezierC1(), EDA_SHAPE::SetBezierC2(), EDA_SHAPE::SetEnd(), EDA_SHAPE::SetFillColor(), EDA_SHAPE::SetFillMode(), SetLibShapeFillAndColor(), SetLibShapeLine(), EDA_SHAPE::SetStart(), SCH_SHAPE::SetStroke(), SCH_ITEM::SetUnit(), EDA_SHAPE::SetWidth(), ShouldPutItemOnSheet(), TransformEllipseToBeziers(), and KIGFX::COLOR4D::WithAlpha().
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 2326 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), ANGLE_0, SCH_SCREEN::Append(), DEGREES_T, getCurrentScreen(), GetRelativePosition(), IsComponentPartVisible(), KiROUND(), LAYER_DEVICE, ASCH_BORDER_INTERFACE::LineWidth, ASCH_ARC::m_Center, ASCH_ARC::m_EndAngle, m_libSymbols, ASCH_ARC::m_Radius, IO_BASE::m_reporter, ASCH_ARC::m_SecondaryRadius, m_sheetOffset, ASCH_ARC::m_StartAngle, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ParseCircle(), EDA_SHAPE::RebuildBezierToSegmentsPointsList(), REPORTER::Report(), RPT_SEVERITY_DEBUG, EDA_SHAPE::SetBezierC1(), EDA_SHAPE::SetBezierC2(), EDA_SHAPE::SetEnd(), SetLibShapeLine(), EDA_SHAPE::SetStart(), SCH_SHAPE::SetStroke(), SCH_ITEM::SetUnit(), ShouldPutItemOnSheet(), and TransformEllipseToBeziers().
Referenced by ParseLibFile().
void SCH_IO_ALTIUM::ParseFileHeader | ( | const ALTIUM_COMPOUND_FILE & | aAltiumSchFile | ) |
Definition at line 721 of file sch_io_altium.cpp.
References _, ALTIUM_COMPOUND_FILE::FindStream(), fixupSymbolPinNameNumbers(), getCurrentScreen(), getCurrentSheet(), getLibFileName(), ALTIUM_BINARY_PARSER::GetRemainingBytes(), ALTIUM_BINARY_PARSER::HasParsingError(), m_altiumComponents, m_altiumImplementationList, m_altiumPortsCurrentSheet, m_altiumTemplates, m_currentTitleBlock, m_libSymbols, m_pi, m_properties, 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 3893 of file sch_io_altium.cpp.
References ASCH_FILE_NAME::isHidden, ASCH_FILE_NAME::location, IO_BASE::m_reporter, m_sheetOffset, m_sheets, ASCH_FILE_NAME::orientation, ASCH_OWNER_INTERFACE::ownerindex, REPORTER::Report(), RPT_SEVERITY_DEBUG, SCH_FIELD::SetPosition(), SCH_FIELD::SetText(), SetTextPositioning(), EDA_TEXT::SetVisible(), SHEETFILENAME, and ASCH_FILE_NAME::text.
Referenced by ParseRecord().
|
private |
Definition at line 2822 of file sch_io_altium.cpp.
References SCH_SCREEN::Append(), ASCH_HARNESS_CONNECTOR::AreaColor, ASCH_HARNESS_CONNECTOR::Color, GetColorFromInt(), getCurrentScreen(), getCurrentSheet(), ASCH_HARNESS_CONNECTOR::Location, m_harnessEntryParent, m_harnessOwnerIndexOffset, IO_BASE::m_reporter, m_schematic, m_sheetOffset, m_sheetPath, m_sheets, ASCH_OWNER_INTERFACE::ownerindex, SCH_SHEET_PATH::push_back(), REPORTER::Report(), RPT_SEVERITY_DEBUG, SCH_SHEET::SetBackgroundColor(), SCH_SHEET::SetBorderColor(), SCH_SHEET_PATH::SetPageNumber(), SCH_SHEET::SetScreen(), ShouldPutItemOnSheet(), and ASCH_HARNESS_CONNECTOR::Size.
Referenced by ParseRecord().
|
private |
Definition at line 2859 of file sch_io_altium.cpp.
References SPIN_STYLE::BOTTOM, ASCH_HARNESS_ENTRY::DistanceFromTop, SPIN_STYLE::LEFT, m_harnessEntryParent, IO_BASE::m_reporter, m_sheets, ASCH_HARNESS_ENTRY::Name, REPORTER::Report(), SPIN_STYLE::RIGHT, RPT_SEVERITY_DEBUG, SCH_SHEET_PIN::SetPosition(), SCH_LABEL_BASE::SetShape(), SCH_SHEET_PIN::SetSide(), SCH_HIERLABEL::SetSpinStyle(), EDA_TEXT::SetText(), ASCH_HARNESS_ENTRY::Side, SPIN_STYLE::UP, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseRecord().
|
private |
Definition at line 3457 of file sch_io_altium.cpp.
References _, ASCH_PORT::Alignment, SCH_SCREEN::Append(), ASCH_SHEET_FONT::Bold, ASCH_PORT::FontID, fonts, GetColorFromInt(), getCurrentScreen(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_LEFT, GR_TEXT_H_ALIGN_RIGHT, HARNESS_PORT_COLOR_DEFAULT_BACKGROUND, HARNESS_PORT_COLOR_DEFAULT_OUTLINE, ASCH_PORT::Height, IS_NEW, ASCH_SHEET_FONT::Italic, ASCH_PORT::Location, m_altiumSheet, IO_BASE::m_reporter, m_sheetOffset, EDA_IU_SCALE::MilsToIU(), ASCH_PORT::Name, REPORTER::Report(), RPT_SEVERITY_WARNING, schIUScale, EDA_TEXT::SetBold(), EDA_SHAPE::SetEndX(), EDA_SHAPE::SetEndY(), EDA_SHAPE::SetFillColor(), EDA_SHAPE::SetFillMode(), EDA_ITEM::SetFlags(), EDA_TEXT::SetHorizJustify(), EDA_TEXT::SetItalic(), EDA_SHAPE::SetStartX(), EDA_SHAPE::SetStartY(), SCH_SHAPE::SetStroke(), EDA_TEXT::SetText(), EDA_TEXT::SetTextColor(), EDA_TEXT::SetTextSize(), ASCH_SHEET_FONT::Size, ASCH_PORT::TextColor, and ASCH_PORT::Width.
Referenced by ParseAdditional(), and ParseASCIISchematic().
|
private |
Definition at line 2909 of file sch_io_altium.cpp.
References _, ASCH_HARNESS_TYPE::Color, GetColorFromInt(), PROJECT::GetProjectPath(), FILEEXT::KiCadSchematicFileExtension, ASCH_HARNESS_TYPE::Location, m_harnessEntryParent, IO_BASE::m_reporter, m_schematic, m_sheetOffset, m_sheets, SCHEMATIC::Prj(), REPORTER::Report(), RPT_SEVERITY_DEBUG, RPT_SEVERITY_WARNING, SCH_SCREEN::SetFileName(), SCH_FIELD::SetPosition(), SCH_FIELD::SetText(), EDA_TEXT::SetTextColor(), SetTextPositioning(), EDA_TEXT::SetVisible(), SHEETFILENAME, SHEETNAME, and ASCH_HARNESS_TYPE::Text.
Referenced by ParseRecord().
|
private |
|
private |
Definition at line 3741 of file sch_io_altium.cpp.
References _, std::abs(), SCH_SCREEN::Append(), 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, IO_BASE::m_reporter, m_sheetOffset, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartid, REFERENCE_IMAGE::ReadImageFile(), REPORTER::Report(), RPT_SEVERITY_ERROR, REFERENCE_IMAGE::SetImageScale(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseRecord().
|
private |
Definition at line 4195 of file sch_io_altium.cpp.
References AltiumToKiCadLibID(), LIB_ID::Format(), ASCH_IMPLEMENTATION::isCurrent, ASCH_IMPLEMENTATION::libname, m_altiumImplementationList, m_isIntLib, m_libName, m_libSymbols, IO_BASE::m_reporter, m_symbols, ASCH_IMPLEMENTATION::name, ASCH_OWNER_INTERFACE::ownerindex, REPORTER::Report(), RPT_SEVERITY_DEBUG, SCH_SYMBOL::SetFootprintFieldText(), SCH_FIELD::SetText(), and ASCH_IMPLEMENTATION::type.
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 4186 of file sch_io_altium.cpp.
References m_altiumImplementationList, and ASCH_OWNER_INTERFACE::ownerindex.
Referenced by ParseRecord().
|
private |
Definition at line 3727 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 1533 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), AltiumSchSpecialStringsToKiCadVariables(), SCH_SCREEN::Append(), ASCH_SHEET_FONT::Bold, ASCH_LABEL::fontId, fonts, getCurrentScreen(), GetRelativePosition(), IS_NEW, ASCH_SHEET_FONT::Italic, ASCH_LABEL::justification, LAYER_DEVICE, ASCH_LABEL::location, m_altiumSheet, m_libSymbols, IO_BASE::m_reporter, m_sheetOffset, m_symbols, ASCH_LABEL::orientation, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, REPORTER::Report(), RPT_SEVERITY_DEBUG, EDA_TEXT::SetBold(), EDA_ITEM::SetFlags(), EDA_TEXT::SetItalic(), 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 4259 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::SetDescription(), LIB_SYMBOL::SetLibId(), LIB_SYMBOL::SetName(), and LIB_SYMBOL::SetUnitCount().
Referenced by ParseLibFile().
|
private |
Definition at line 3957 of file sch_io_altium.cpp.
References ASCH_DESIGNATOR::fontId, ASCH_DESIGNATOR::location, SCH_FIELD::SetPosition(), SCH_FIELD::SetText(), EDA_TEXT::SetTextSize(), and ASCH_DESIGNATOR::text.
Referenced by ParseLibFile().
|
private |
Definition at line 4289 of file sch_io_altium.cpp.
References _, LIB_SYMBOL::FixupDrawItems(), fixupSymbolPinNameNumbers(), ALTIUM_COMPOUND_FILE::GetLibSymbols(), IO_BASE::GetName(), ALTIUM_BINARY_PARSER::GetRemainingBytes(), EDA_TEXT::GetText(), LIB_SYMBOL::GetValueField(), ALTIUM_BINARY_PARSER::HasParsingError(), IO_BASE::m_reporter, name, ParseArc(), ParseBezier(), ParseEllipse(), ParseEllipticalArc(), ParseImplementation(), ParseLabel(), ParseLibComponent(), ParseLibDesignator(), ParseLibHeader(), ParseLibParameter(), ParseLine(), ParsePieChart(), ParsePin(), ParsePolygon(), ParsePolyline(), ParseRectangle(), ParseRoundRectangle(), ParseTextFrame(), 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(), REPORTER::Report(), RPT_SEVERITY_ERROR, SCH_FIELD::SetText(), split(), and THROW_IO_ERROR.
Referenced by ensureLoadedLibrary().
|
private |
Definition at line 4585 of file sch_io_altium.cpp.
References _, ALTIUM_COMPOUND_FILE::FindStream(), ALTIUM_BINARY_PARSER::GetRemainingBytes(), EDA_IU_SCALE::MilsToIU(), ALTIUM_BINARY_PARSER::ReadProperties(), ALTIUM_PROPS_UTILS::ReadString(), schIUScale, and THROW_IO_ERROR.
Referenced by ParseLibFile().
|
private |
Definition at line 4100 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, EDA_IU_SCALE::MilsToIU(), ASCH_PARAMETER::name, ASCH_PARAMETER::orientation, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartid, schIUScale, SCH_FIELD::SetText(), EDA_TEXT::SetTextPos(), SetTextPositioning(), EDA_TEXT::SetTextSize(), EDA_TEXT::SetVisible(), and ASCH_PARAMETER::text.
Referenced by ParseLibFile().
|
private |
Definition at line 2724 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), SCH_SHAPE::AddPoint(), SCH_SCREEN::Append(), ASCH_BORDER_INTERFACE::Color, GetColorFromInt(), getCurrentScreen(), GetPlotDashType(), GetRelativePosition(), IS_NEW, IsComponentPartVisible(), LAYER_DEVICE, ASCH_LINE::LineStyle, ASCH_BORDER_INTERFACE::LineWidth, m_libSymbols, IO_BASE::m_reporter, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ASCH_LINE::point1, ASCH_LINE::point2, REPORTER::Report(), RPT_SEVERITY_DEBUG, SCH_LINE::SetEndPoint(), EDA_ITEM::SetFlags(), SetLibShapeLine(), EDA_SHAPE::SetLineStyle(), SCH_LINE::SetStroke(), SCH_ITEM::SetUnit(), and ShouldPutItemOnSheet().
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 3671 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 3654 of file sch_io_altium.cpp.
References SCH_SCREEN::Append(), getCurrentScreen(), IS_NEW, ASCH_NO_ERC::isActive, ASCH_NO_ERC::location, m_sheetOffset, and EDA_ITEM::SetFlags().
Referenced by ParseRecord().
|
private |
Definition at line 1647 of file sch_io_altium.cpp.
References AddTextBox().
Referenced by ParseRecord().
|
private |
Definition at line 4002 of file sch_io_altium.cpp.
References SCH_SYMBOL::AddField(), AltiumSchSpecialStringsToKiCadVariables(), SCH_SYMBOL::FindField(), SCH_SYMBOL::GetField(), SCH_SYMBOL::GetFieldCount(), PROJECT::GetTextVars(), ASCH_PARAMETER::isHidden, ASCH_PARAMETER::justification, ASCH_PARAMETER::location, m_currentTitleBlock, m_libSymbols, m_schematic, m_sheetOffset, m_sheetPath, m_symbols, ASCH_PARAMETER::name, ASCH_PARAMETER::orientation, ASCH_OWNER_INTERFACE::ownerindex, SCHEMATIC::Prj(), SCH_SHEET_PATH::SetPageNumber(), SCH_FIELD::SetPosition(), SCH_FIELD::SetText(), SetTextPositioning(), EDA_TEXT::SetVisible(), ASCH_PARAMETER::text, and VALUE_FIELD.
Referenced by ParseRecord().
|
private |
Definition at line 2428 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), SCH_SHAPE::AddPoint(), SCH_SCREEN::Append(), EDA_ANGLE::Cos(), DEGREES_T, getCurrentScreen(), GetRelativePosition(), IS_NEW, IsComponentPartVisible(), KiROUND(), LAYER_DEVICE, ASCH_BORDER_INTERFACE::LineWidth, ASCH_ARC::m_Center, ASCH_ARC::m_EndAngle, m_libSymbols, ASCH_ARC::m_Radius, IO_BASE::m_reporter, m_sheetOffset, ASCH_ARC::m_StartAngle, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ParseArc(), REPORTER::Report(), RPT_SEVERITY_DEBUG, SCH_LINE::SetEndPoint(), EDA_ITEM::SetFlags(), SetLibShapeLine(), SCH_LINE::SetStroke(), SCH_ITEM::SetUnit(), ShouldPutItemOnSheet(), and EDA_ANGLE::Sin().
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 1257 of file sch_io_altium.cpp.
References _, LIB_SYMBOL::AddDrawItem(), AltiumPinNamesToKiCad(), ASCH_PIN_SYMBOL::CLOCK, DEFAULT_PINNAME_SIZE, DEFAULT_PINNUM_SIZE, ASCH_PIN::designator, ASCH_PIN::electrical, GetRelativePosition(), ASCH_PIN::hidden, IsComponentPartVisible(), ASCH_PIN::location, ASCH_PIN_SYMBOL::LOW_INPUT, ASCH_PIN_SYMBOL::LOW_OUTPUT, m_libSymbols, IO_BASE::m_reporter, m_sheetOffset, m_symbols, EDA_IU_SCALE::MilsToIU(), ASCH_PIN::name, ASCH_PIN_SYMBOL::NEGATED, ASCH_PIN::orientation, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, pin, ASCH_PIN::pinlength, REPORTER::Report(), RPT_SEVERITY_DEBUG, RPT_SEVERITY_WARNING, schIUScale, ASCH_PIN::showDesignator, ASCH_PIN::showPinName, ASCH_PIN::symbolInnerEdge, ASCH_PIN::symbolOuterEdge, ASCH_PIN_SYMBOL::UNKNOWN, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 2039 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), SCH_SHAPE::AddPoint(), SCH_SCREEN::Append(), ASCH_BORDER_INTERFACE::Color, STROKE_PARAMS::GetColor(), getCurrentScreen(), EDA_SHAPE::GetFillColor(), EDA_SHAPE::GetFillMode(), GetRelativePosition(), SCH_SHAPE::GetStroke(), IS_NEW, IsComponentPartVisible(), LAYER_DEVICE, m_libSymbols, IO_BASE::m_reporter, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ASCH_POLYGON::points, REPORTER::Report(), RPT_SEVERITY_DEBUG, EDA_ITEM::SetFlags(), SetLibShapeFillAndColor(), SetLibShapeLine(), SetSchShapeFillAndColor(), SetSchShapeLine(), SCH_SHAPE::SetStroke(), SCH_ITEM::SetUnit(), STROKE_PARAMS::SetWidth(), and ShouldPutItemOnSheet().
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 1962 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), SCH_SHAPE::AddPoint(), SCH_SCREEN::Append(), ASCH_BORDER_INTERFACE::Color, GetColorFromInt(), getCurrentScreen(), GetPlotDashType(), GetRelativePosition(), SCH_SHAPE::GetStroke(), IS_NEW, IsComponentPartVisible(), LAYER_DEVICE, ASCH_POLYLINE::LineStyle, ASCH_BORDER_INTERFACE::LineWidth, m_libSymbols, IO_BASE::m_reporter, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, ASCH_POLYLINE::Points, REPORTER::Report(), RPT_SEVERITY_DEBUG, 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 3523 of file sch_io_altium.cpp.
References _, SCH_SCREEN::Append(), SCH_LABEL_BASE::AutoplaceFields(), SPIN_STYLE::BOTTOM, getCurrentScreen(), SCH_LABEL_BASE::GetFields(), ASCH_PORT::HarnessType, ASCH_PORT::IOtype, IS_NEW, SCH_SCREEN::IsTerminalPoint(), LAYER_BUS, LAYER_WIRE, SPIN_STYLE::LEFT, ASCH_PORT::Location, m_altiumHarnessPortsCurrentSheet, IO_BASE::m_reporter, m_sheetOffset, EDA_IU_SCALE::MilsToIU(), ASCH_PORT::Name, REPORTER::Report(), SPIN_STYLE::RIGHT, RPT_SEVERITY_WARNING, schIUScale, SCH_LINE::SetEndPoint(), EDA_ITEM::SetFlags(), SCH_LINE::SetLineWidth(), SCH_LABEL_BASE::SetShape(), SCH_LABEL_BASE::SetSpinStyle(), ASCH_PORT::Style, SPIN_STYLE::UP, ASCH_PORT::Width, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseASCIISchematic(), and ParseFileHeader().
|
private |
Definition at line 3345 of file sch_io_altium.cpp.
References _, LIB_SYMBOL::AddDrawItem(), AltiumToKiCadLibID(), ANGLE_HORIZONTAL, ANGLE_VERTICAL, SCH_SCREEN::Append(), getCurrentScreen(), SCH_SYMBOL::GetField(), getLibFileName(), getLibName(), SCH_FIELD::GetPosition(), LIB_SYMBOL::GetReferenceField(), LIB_SYMBOL::GetValueField(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_H_ALIGN_RIGHT, HelperGeneratePowerPortGraphics(), ASCH_POWER_PORT::location, m_pi, m_powerSymbols, m_properties, IO_BASE::m_reporter, m_sheetOffset, m_sheetPath, ASCH_POWER_PORT::orientation, pin, REFERENCE_FIELD, REPORTER::Report(), RPT_SEVERITY_WARNING, LIB_SYMBOL::SetDescription(), 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(), LIB_SYMBOL::SetPower(), SCH_SYMBOL::SetRef(), SCH_FIELD::SetText(), EDA_TEXT::SetTextAngle(), SCH_SYMBOL::SetValueFieldText(), EDA_TEXT::SetVisible(), ASCH_POWER_PORT::showNetName, ASCH_POWER_PORT::style, ASCH_POWER_PORT::text, and VALUE_FIELD.
Referenced by ParseRecord().
void SCH_IO_ALTIUM::ParseRecord | ( | int | index, |
std::map< wxString, wxString > & | properties, | ||
const wxString & | aSectionName | ||
) |
Definition at line 926 of file sch_io_altium.cpp.
References _, m_altiumPortsCurrentSheet, m_harnessOwnerIndexOffset, IO_BASE::m_reporter, 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(), ALTIUM_PROPS_UTILS::ReadInt(), REPORTER::Report(), RPT_SEVERITY_ERROR, RPT_SEVERITY_INFO, and THROW_IO_ERROR.
Referenced by ParseAdditional(), ParseASCIISchematic(), and ParseFileHeader().
|
private |
Definition at line 2956 of file sch_io_altium.cpp.
References LIB_SYMBOL::AddDrawItem(), SCH_SCREEN::Append(), ASCH_RECTANGLE::BottomLeft, ASCH_BORDER_INTERFACE::Color, getCurrentScreen(), GetRelativePosition(), IS_NEW, IsComponentPartVisible(), LAYER_DEVICE, m_libSymbols, IO_BASE::m_reporter, m_sheetOffset, m_symbols, ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, REPORTER::Report(), RPT_SEVERITY_DEBUG, EDA_SHAPE::SetEnd(), EDA_ITEM::SetFlags(), SetLibShapeFillAndColor(), SetLibShapeLine(), SCH_SHAPE::SetPosition(), SetSchShapeFillAndColor(), SetSchShapeLine(), SCH_ITEM::SetUnit(), ShouldPutItemOnSheet(), and ASCH_RECTANGLE::TopRight.
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 2122 of file sch_io_altium.cpp.
References std::abs(), LIB_SYMBOL::AddDrawItem(), SCH_SCREEN::Append(), ASCH_ROUND_RECTANGLE::BottomLeft, ASCH_BORDER_INTERFACE::Color, ASCH_ROUND_RECTANGLE::CornerRadius, getCurrentScreen(), SCH_SHAPE::GetPosition(), GetRelativePosition(), IS_NEW, IsComponentPartVisible(), LAYER_DEVICE, m_libSymbols, IO_BASE::m_reporter, m_sheetOffset, m_symbols, SCH_SHAPE::Normalize(), ASCH_OWNER_INTERFACE::ownerindex, ASCH_OWNER_INTERFACE::ownerpartdisplaymode, ASCH_OWNER_INTERFACE::ownerpartid, REPORTER::Report(), RPT_SEVERITY_DEBUG, EDA_SHAPE::SetEnd(), EDA_ITEM::SetFlags(), SetLibShapeFillAndColor(), SetLibShapeLine(), SCH_SHAPE::SetPosition(), 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 3821 of file sch_io_altium.cpp.
References PAGE_INFO::Custom, getCurrentScreen(), PAGE_INFO::GetHeightIU(), EDA_IU_SCALE::IU_PER_MILS, EDA_IU_SCALE::IUToMils(), m_altiumSheet, m_sheetOffset, schIUScale, PAGE_INFO::SetCustomHeightMils(), PAGE_INFO::SetCustomWidthMils(), SCH_SCREEN::SetPageSettings(), and PAGE_INFO::SetType().
Referenced by ParseRecord().
|
private |
Definition at line 3064 of file sch_io_altium.cpp.
References SPIN_STYLE::BOTTOM, ASCH_SHEET_ENTRY::distanceFromTop, ASCH_SHEET_ENTRY::iotype, SPIN_STYLE::LEFT, IO_BASE::m_reporter, m_sheets, ASCH_SHEET_ENTRY::name, ASCH_OWNER_INTERFACE::ownerindex, REPORTER::Report(), SPIN_STYLE::RIGHT, RPT_SEVERITY_DEBUG, SCH_SHEET_PIN::SetPosition(), SCH_LABEL_BASE::SetShape(), SCH_SHEET_PIN::SetSide(), SCH_HIERLABEL::SetSpinStyle(), EDA_TEXT::SetText(), ASCH_SHEET_ENTRY::side, SPIN_STYLE::UP, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by ParseRecord().
|
private |
Definition at line 3870 of file sch_io_altium.cpp.
References ASCH_SHEET_NAME::isHidden, ASCH_SHEET_NAME::location, IO_BASE::m_reporter, m_sheetOffset, m_sheets, ASCH_SHEET_NAME::orientation, ASCH_OWNER_INTERFACE::ownerindex, REPORTER::Report(), RPT_SEVERITY_DEBUG, SCH_FIELD::SetPosition(), SCH_FIELD::SetText(), SetTextPositioning(), EDA_TEXT::SetVisible(), SHEETNAME, and ASCH_SHEET_NAME::text.
Referenced by ParseRecord().
|
private |
Definition at line 3028 of file sch_io_altium.cpp.
References SCH_SCREEN::Append(), ASCH_SHEET_SYMBOL::areacolor, ASCH_SHEET_SYMBOL::color, GetColorFromInt(), getCurrentScreen(), getCurrentSheet(), SCH_SHEET::GetScreen(), IS_NEW, ASCH_SHEET_SYMBOL::isSolid, ASCH_SHEET_SYMBOL::location, SCH_SHEET_INSTANCE::m_PageNumber, SCH_SHEET_INSTANCE::m_Path, m_rootSheet, SCH_SCREEN::m_sheetInstances, m_sheetOffset, m_sheetPath, m_sheets, SCH_SHEET_PATH::Path(), SCH_SHEET_PATH::push_back(), SCH_SHEET::SetBackgroundColor(), SCH_SHEET::SetBorderColor(), EDA_ITEM::SetFlags(), SCH_SHEET_PATH::SetPageNumber(), and ASCH_SHEET_SYMBOL::size.
Referenced by ParseRecord().
|
private |
Definition at line 2793 of file sch_io_altium.cpp.
References SCH_SHAPE::AddPoint(), SCH_SCREEN::Append(), ASCH_SIGNAL_HARNESS::Color, GetColorFromInt(), getCurrentScreen(), IS_NEW, ASCH_SIGNAL_HARNESS::LineWidth, IO_BASE::m_reporter, m_sheetOffset, ASCH_OWNER_INTERFACE::ownerindex, ASCH_SIGNAL_HARNESS::Points, REPORTER::Report(), RPT_SEVERITY_DEBUG, EDA_ITEM::SetFlags(), SCH_SHAPE::SetStroke(), and ShouldPutItemOnSheet().
Referenced by ParseRecord().
void SCH_IO_ALTIUM::ParseStorage | ( | const ALTIUM_COMPOUND_FILE & | aAltiumSchFile | ) |
Definition at line 639 of file sch_io_altium.cpp.
References _, ALTIUM_COMPOUND_FILE::FindStream(), ALTIUM_BINARY_PARSER::GetRemainingBytes(), ALTIUM_BINARY_PARSER::HasParsingError(), m_altiumStorage, IO_BASE::m_reporter, ALTIUM_PROPS_UTILS::ReadInt(), ALTIUM_BINARY_PARSER::ReadProperties(), ALTIUM_PROPS_UTILS::ReadString(), REPORTER::Report(), RPT_SEVERITY_ERROR, and THROW_IO_ERROR.
Referenced by ParseAltiumSch().
|
private |
Definition at line 1234 of file sch_io_altium.cpp.
References ASCH_TEMPLATE::filename, SCH_SHEET::GetName(), SCH_SHEET_PATH::Last(), m_altiumTemplates, and m_sheetPath.
Referenced by ParseRecord().
|
private |
Definition at line 1634 of file sch_io_altium.cpp.
References AddLibTextBox(), AddTextBox(), ASCH_OWNER_INTERFACE::ownerindex, and ShouldPutItemOnSheet().
Referenced by ParseLibFile(), and ParseRecord().
|
private |
Definition at line 3707 of file sch_io_altium.cpp.
References SCH_SCREEN::Append(), getCurrentScreen(), IS_NEW, m_sheetOffset, ASCH_WIRE::points, SCH_LINE::SetEndPoint(), and EDA_ITEM::SetFlags().
Referenced by ParseRecord().
|
virtualinherited |
Definition at line 122 of file io_base.cpp.
References IO_BASE::m_reporter, and REPORTER::Report().
Referenced by SCH_IO_EAGLE::loadInstance(), SCH_IO_EAGLE::loadLibrary(), and EAGLE_BASE::Report().
|
virtualinherited |
Reimplemented in SCH_IO_KICAD_LEGACY, and SCH_IO_KICAD_SEXPR.
Definition at line 61 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 74 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. The library is refreshed and the caller must update any LIB_SYMBOL pointers that may have changed. |
aProperties | is an associative array that can be used to tell the saver how to save the symbol, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL. |
IO_ERROR | if there is a problem saving. |
Reimplemented in SCH_IO_HTTP_LIB, SCH_IO_KICAD_LEGACY, and SCH_IO_KICAD_SEXPR.
Definition at line 108 of file sch_io.cpp.
References NOT_IMPLEMENTED.
Referenced by LIB_BUFFER::SaveBuffer().
|
inlinevirtualinherited |
Some library plugins need to have access to their parent library table.
aTable | is the table this plugin is registered within. |
Reimplemented in SCH_IO_DATABASE, and SCH_IO_HTTP_LIB.
|
inlinevirtualinherited |
Set an optional progress reporter.
Reimplemented in SCH_IO_CADSTAR_ARCHIVE.
Definition at line 85 of file io_base.h.
Referenced by PCB_CONTROL::AppendBoard().
|
inlinevirtualinherited |
Set an optional reporter for warnings/errors.
Reimplemented in SCH_IO_CADSTAR_ARCHIVE.
|
private |
Definition at line 1519 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, and SCH_IO_HTTP_LIB.
|
private |
Definition at line 209 of file sch_io_altium.h.
|
private |
Definition at line 211 of file sch_io_altium.h.
Referenced by IsComponentPartVisible(), ParseASCIISchematic(), ParseComponent(), ParseFileHeader(), and ParseImage().
|
private |
Definition at line 217 of file sch_io_altium.h.
Referenced by ParseAdditional(), ParseASCIISchematic(), and ParsePort().
|
private |
Definition at line 213 of file sch_io_altium.h.
Referenced by ParseASCIISchematic(), ParseFileHeader(), ParseImplementation(), and ParseImplementationList().
|
private |
Definition at line 214 of file sch_io_altium.h.
Referenced by ParseASCIISchematic(), ParseFileHeader(), and ParseRecord().
|
private |
Definition at line 202 of file sch_io_altium.h.
Referenced by AddTextBox(), ParseHarnessPort(), ParseLabel(), and ParseSheet().
|
private |
Definition at line 208 of file sch_io_altium.h.
Referenced by GetFileFromStorage(), ParseASCIISchematic(), and ParseStorage().
|
private |
Definition at line 212 of file sch_io_altium.h.
Referenced by IsComponentPartVisible(), ParseASCIISchematic(), ParseFileHeader(), ParseTemplate(), and ShouldPutItemOnSheet().
|
private |
Definition at line 198 of file sch_io_altium.h.
Referenced by ParseASCIISchematic(), ParseFileHeader(), and ParseParameter().
|
private |
Definition at line 235 of file sch_io_altium.h.
|
private |
Definition at line 221 of file sch_io_altium.h.
Referenced by ParseHarnessConnector(), ParseHarnessEntry(), ParseHarnessType(), and SCH_IO_ALTIUM().
|
private |
Definition at line 220 of file sch_io_altium.h.
Referenced by ParseHarnessConnector(), ParseRecord(), and SCH_IO_ALTIUM().
|
private |
Definition at line 193 of file sch_io_altium.h.
Referenced by ensureLoadedLibrary(), ParseImplementation(), and SCH_IO_ALTIUM().
|
private |
Definition at line 232 of file sch_io_altium.h.
Referenced by doEnumerateSymbolLib(), ensureLoadedLibrary(), LoadSymbol(), and ~SCH_IO_ALTIUM().
|
private |
Definition at line 192 of file sch_io_altium.h.
Referenced by ensureLoadedLibrary(), getLibName(), and ParseImplementation().
|
private |
Definition at line 205 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().
|
protectedinherited |
|
private |
Definition at line 195 of file sch_io_altium.h.
Referenced by LoadSchematicFile(), ParseASCIISchematic(), ParseFileHeader(), and ParsePowerPort().
|
private |
Definition at line 207 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 221 of file io_base.h.
Referenced by IO_BASE::AdvanceProgressPhase(), SCH_IO_KICAD_LEGACY::checkpoint(), SCH_IO_EAGLE::ensureLoadedLibrary(), SCH_IO_CADSTAR_ARCHIVE::ensureLoadedLibrary(), PCB_IO_ODBPP::ExportODB(), PCB_IO_IPC2581::generateAvlSection(), PCB_IO_IPC2581::generateBOMSection(), PCB_IO_IPC2581::generateContentSection(), PCB_IO_IPC2581::generateEcadSection(), PCB_IO_IPC2581::generateHistorySection(), PCB_IO_ALTIUM_CIRCUIT_STUDIO::LoadBoard(), PCB_IO_ALTIUM_CIRCUIT_MAKER::LoadBoard(), PCB_IO_ALTIUM_DESIGNER::LoadBoard(), PCB_IO_SOLIDWORKS::LoadBoard(), PCB_IO_CADSTAR_ARCHIVE::LoadBoard(), PCB_IO_EASYEDA::LoadBoard(), PCB_IO_EASYEDAPRO::LoadBoard(), PCB_IO_FABMASTER::LoadBoard(), PCB_IO_KICAD_SEXPR::LoadBoard(), SCH_IO_KICAD_LEGACY::loadFile(), SCH_IO_KICAD_SEXPR::loadFile(), SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile(), SCH_IO_EAGLE::LoadSchematicFile(), SCH_IO_LTSPICE::LoadSchematicFile(), PCB_IO_IPC2581::SaveBoard(), and SCH_IO_CADSTAR_ARCHIVE::SetProgressReporter().
|
private |
Definition at line 196 of file sch_io_altium.h.
Referenced by ParseASCIISchematic(), ParseFileHeader(), and ParsePowerPort().
|
protectedinherited |
Reporter to log errors/warnings to, may be nullptr.
Definition at line 218 of file io_base.h.
Referenced by AddLibTextBox(), SCH_IO_CADSTAR_ARCHIVE::ensureLoadedLibrary(), PCB_IO_ALTIUM_DESIGNER::FootprintLoad(), PCB_IO_ALTIUM_CIRCUIT_STUDIO::LoadBoard(), PCB_IO_ALTIUM_CIRCUIT_MAKER::LoadBoard(), PCB_IO_ALTIUM_DESIGNER::LoadBoard(), PCB_IO_SOLIDWORKS::LoadBoard(), SCH_IO_CADSTAR_ARCHIVE::LoadSchematicFile(), SCH_IO_LTSPICE::LoadSchematicFile(), ParseAltiumSch(), ParseArc(), ParseBezier(), ParseCircle(), ParseComponent(), ParseDesignator(), ParseEllipse(), ParseEllipticalArc(), ParseFileName(), ParseHarnessConnector(), ParseHarnessEntry(), ParseHarnessPort(), ParseHarnessType(), ParseImage(), ParseImplementation(), ParseLabel(), ParseLibFile(), ParseLine(), ParsePieChart(), ParsePin(), ParsePolygon(), ParsePolyline(), ParsePort(), ParsePowerPort(), ParseRecord(), ParseRectangle(), ParseRoundRectangle(), ParseSheetEntry(), ParseSheetName(), ParseSignalHarness(), ParseStorage(), PCB_IO_ALTIUM_DESIGNER::PCB_IO_ALTIUM_DESIGNER(), PCB_IO_SOLIDWORKS::PCB_IO_SOLIDWORKS(), IO_BASE::Report(), SCH_IO_ALTIUM(), SCH_IO_CADSTAR_ARCHIVE::SCH_IO_CADSTAR_ARCHIVE(), SCH_IO_EAGLE::SCH_IO_EAGLE(), SCH_IO_EASYEDA::SCH_IO_EASYEDA(), SCH_IO_EASYEDAPRO::SCH_IO_EASYEDAPRO(), SCH_IO_LTSPICE::SCH_IO_LTSPICE(), and SCH_IO_CADSTAR_ARCHIVE::SetReporter().
|
private |
Definition at line 189 of file sch_io_altium.h.
Referenced by getLibName(), LoadSchematicFile(), ParseAltiumSch(), ParseSheetSymbol(), and SCH_IO_ALTIUM().
|
private |
Definition at line 191 of file sch_io_altium.h.
Referenced by getLibFileName(), getLibName(), LoadSchematicFile(), ParseAltiumSch(), ParseHarnessConnector(), ParseHarnessType(), ParseParameter(), and SCH_IO_ALTIUM().
|
private |
Definition at line 201 of file sch_io_altium.h.
Referenced by AddLibTextBox(), AddTextBox(), ParseArc(), ParseBezier(), ParseBus(), ParseBusEntry(), ParseCircle(), ParseComponent(), ParseDesignator(), ParseEllipse(), ParseEllipticalArc(), ParseFileName(), ParseHarnessConnector(), ParseHarnessPort(), ParseHarnessType(), ParseImage(), ParseJunction(), ParseLabel(), ParseLine(), ParseNetLabel(), ParseNoERC(), ParseParameter(), ParsePieChart(), ParsePin(), ParsePolygon(), ParsePolyline(), ParsePort(), ParsePowerPort(), ParseRectangle(), ParseRoundRectangle(), ParseSheet(), ParseSheetName(), ParseSheetSymbol(), ParseSignalHarness(), and ParseWire().
|
private |
Definition at line 190 of file sch_io_altium.h.
Referenced by getCurrentScreen(), getCurrentSheet(), LoadSchematicFile(), ParseAltiumSch(), ParseComponent(), ParseDesignator(), ParseHarnessConnector(), ParseParameter(), ParsePowerPort(), ParseSheetSymbol(), and ParseTemplate().
|
private |
Definition at line 204 of file sch_io_altium.h.
Referenced by ParseFileName(), ParseHarnessConnector(), ParseHarnessEntry(), ParseHarnessType(), ParseSheetEntry(), ParseSheetName(), and ParseSheetSymbol().
|
private |
Definition at line 203 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 231 of file sch_io_altium.h.
Referenced by ensureLoadedLibrary().