KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SCH_EAGLE_PLUGIN Class Reference

A SCH_PLUGIN derivation for loading 6.x+ Eagle schematic files. More...

#include <sch_eagle_plugin.h>

Inheritance diagram for SCH_EAGLE_PLUGIN:
SCH_PLUGIN

Classes

struct  EAGLE_MISSING_CMP
 
struct  SEG_DESC
 Segments representing wires for intersection checking. More...
 

Public Member Functions

 SCH_EAGLE_PLUGIN ()
 
 ~SCH_EAGLE_PLUGIN ()
 
const wxString GetName () const override
 Return a brief hard coded name for this SCH_PLUGIN. More...
 
void SetReporter (REPORTER *aReporter) override
 Set an optional reporter for warnings/errors. More...
 
void SetProgressReporter (PROGRESS_REPORTER *aReporter) override
 Set an optional progress reporter. More...
 
const PLUGIN_FILE_DESC GetSchematicFileDesc () const override
 Returns schematic file description for the SCH_PLUGIN. More...
 
bool CanReadSchematicFile (const wxString &aFileName) const override
 Checks if this SCH_PLUGIN can read the specified schematic file. More...
 
bool CanReadLibrary (const wxString &aFileName) const override
 Checks if this SCH_PLUGIN can read the specified symbol library file. More...
 
int GetModifyHash () const override
 Return the modification hash from the library cache. More...
 
SCH_SHEETLoadSchematicFile (const wxString &aFileName, SCHEMATIC *aSchematic, SCH_SHEET *aAppendToMe=nullptr, const STRING_UTF8_MAP *aProperties=nullptr) override
 Load information from some input file format that this SCH_PLUGIN implementation knows about, into either a new SCH_SHEET or an existing one. More...
 
virtual const PLUGIN_FILE_DESC GetLibraryFileDesc () const
 Returns symbol library description for the SCH_PLUGIN. More...
 
virtual void SaveLibrary (const wxString &aFileName, const STRING_UTF8_MAP *aProperties=nullptr)
 
virtual void SaveSchematicFile (const wxString &aFileName, SCH_SHEET *aSheet, SCHEMATIC *aSchematic, const STRING_UTF8_MAP *aProperties=nullptr)
 Write aSchematic to a storage file in a format that this SCH_PLUGIN implementation knows about, or it can be used to write a portion of aSchematic to a special kind of export file. More...
 
virtual void EnumerateSymbolLib (wxArrayString &aSymbolNameList, const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr)
 Populate a list of LIB_SYMBOL alias names contained within the library aLibraryPath. More...
 
virtual void EnumerateSymbolLib (std::vector< LIB_SYMBOL * > &aSymbolList, const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr)
 Populate a list of LIB_SYMBOL aliases contained within the library aLibraryPath. More...
 
virtual LIB_SYMBOLLoadSymbol (const wxString &aLibraryPath, const wxString &aPartName, const STRING_UTF8_MAP *aProperties=nullptr)
 Load a LIB_SYMBOL object having aPartName from the aLibraryPath containing a library format that this SCH_PLUGIN knows about. More...
 
virtual void SaveSymbol (const wxString &aLibraryPath, const LIB_SYMBOL *aSymbol, const STRING_UTF8_MAP *aProperties=nullptr)
 Write aSymbol to an existing library located at aLibraryPath. More...
 
virtual void DeleteSymbol (const wxString &aLibraryPath, const wxString &aSymbolName, const STRING_UTF8_MAP *aProperties=nullptr)
 Delete the entire LIB_SYMBOL associated with aAliasName from the library aLibraryPath. More...
 
virtual void CreateSymbolLib (const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr)
 Create a new empty symbol library at aLibraryPath. More...
 
virtual bool DeleteSymbolLib (const wxString &aLibraryPath, const STRING_UTF8_MAP *aProperties=nullptr)
 Delete an existing symbol library and returns true if successful, or if library does not exist returns false, or throws an exception if library exists but is read only or cannot be deleted for some other reason. More...
 
virtual bool IsSymbolLibWritable (const wxString &aLibraryPath)
 Return true if the library at aLibraryPath is writable. More...
 
virtual void SymbolLibOptions (STRING_UTF8_MAP *aListToAppendTo) const
 Append supported SCH_PLUGIN options to aListToAppenTo along with internationalized descriptions. More...
 
virtual bool SupportsSubLibraries () const
 
virtual void GetSubLibraryNames (std::vector< wxString > &aNames)
 Retrieves a list of sub-libraries in this library. More...
 
virtual void GetAvailableSymbolFields (std::vector< wxString > &aNames)
 Retrieves a list of (custom) field names that are present on symbols in this library. More...
 
virtual void GetDefaultSymbolFields (std::vector< wxString > &aNames)
 Retrieves a list of (custom) field names that should be shown by default for this library in the symbol chooser. More...
 
virtual const wxString & GetError () const
 Return an error string to the caller. More...
 
virtual void SetLibTable (SYMBOL_LIB_TABLE *aTable)
 Some library plugins need to have access to their parent library table. More...
 

Public Attributes

const double ARC_ACCURACY = SCH_IU_PER_MM * 0.01
 

Static Protected Member Functions

static bool fileStartsWithPrefix (const wxString &aFilePath, const wxString &aPrefix, bool aIgnoreWhitespace)
 
static bool fileStartsWithBinaryHeader (const wxString &aFilePath, const std::vector< uint8_t > &aHeader)
 

Private Member Functions

void checkpoint ()
 
bool checkHeader (const wxString &aFileName) const
 
void loadDrawing (wxXmlNode *aDrawingNode)
 
void loadLayerDefs (wxXmlNode *aLayers)
 
void loadSchematic (wxXmlNode *aSchematicNode)
 
void loadSheet (wxXmlNode *aSheetNode, int sheetcount)
 
void loadInstance (wxXmlNode *aInstanceNode)
 
EAGLE_LIBRARYloadLibrary (wxXmlNode *aLibraryNode, EAGLE_LIBRARY *aEagleLib)
 
void countNets (wxXmlNode *aSchematicNode)
 
void moveLabels (SCH_LINE *aWire, const VECTOR2I &aNewEndPoint)
 Move any labels on the wire to the new end point of the wire. More...
 
void addBusEntries ()
 This function finds best way to place a bus entry symbol for when an Eagle wire segment ends on an Eagle bus segment. More...
 
SCH_LAYER_ID kiCadLayer (int aEagleLayer)
 Return the matching layer or return LAYER_NOTES. More...
 
std::pair< VECTOR2I, const SEG * > findNearestLinePoint (const VECTOR2I &aPoint, const std::vector< SEG > &aLines) const
 
void loadSegments (wxXmlNode *aSegmentsNode, const wxString &aNetName, const wxString &aNetClass)
 
SCH_SHAPEloadPolyLine (wxXmlNode *aPolygonNode)
 
SCH_ITEMloadWire (wxXmlNode *aWireNode, SEG &endpoints)
 
SCH_SHAPEloadCircle (wxXmlNode *aCircleNode)
 
SCH_SHAPEloadRectangle (wxXmlNode *aRectNode)
 
SCH_TEXTloadLabel (wxXmlNode *aLabelNode, const wxString &aNetName)
 
SCH_JUNCTIONloadJunction (wxXmlNode *aJunction)
 
SCH_TEXTloadPlainText (wxXmlNode *aSchText)
 
void loadFrame (wxXmlNode *aFrameNode, std::vector< SCH_ITEM * > &aItems)
 
bool loadSymbol (wxXmlNode *aSymbolNode, std::unique_ptr< LIB_SYMBOL > &aSymbol, EDEVICE *aDevice, int aGateNumber, const wxString &aGateName)
 
LIB_SHAPEloadSymbolCircle (std::unique_ptr< LIB_SYMBOL > &aSymbol, wxXmlNode *aCircleNode, int aGateNumber)
 
LIB_SHAPEloadSymbolRectangle (std::unique_ptr< LIB_SYMBOL > &aSymbol, wxXmlNode *aRectNode, int aGateNumber)
 
LIB_SHAPEloadSymbolPolyLine (std::unique_ptr< LIB_SYMBOL > &aSymbol, wxXmlNode *aPolygonNode, int aGateNumber)
 
LIB_ITEMloadSymbolWire (std::unique_ptr< LIB_SYMBOL > &aSymbol, wxXmlNode *aWireNode, int aGateNumber)
 
LIB_PINloadPin (std::unique_ptr< LIB_SYMBOL > &aSymbol, wxXmlNode *, EPIN *epin, int aGateNumber)
 
LIB_TEXTloadSymbolText (std::unique_ptr< LIB_SYMBOL > &aSymbol, wxXmlNode *aLibText, int aGateNumber)
 
void loadFrame (wxXmlNode *aFrameNode, std::vector< LIB_ITEM * > &aLines)
 
void loadTextAttributes (EDA_TEXT *aText, const ETEXT &aAttribs) const
 
void loadFieldAttributes (LIB_FIELD *aField, const LIB_TEXT *aText) const
 Move net labels that are detached from any wire to the nearest wire. More...
 
void adjustNetLabels ()
 
wxString translateEagleBusName (const wxString &aEagleName) const
 Translate an Eagle-style bus name into one that is KiCad-compatible. More...
 
wxString getLibName ()
 
wxFileName getLibFileName ()
 Checks if there are other wires or pins at the position of the tested pin. More...
 
bool checkConnections (const SCH_SYMBOL *aSymbol, const LIB_PIN *aPin) const
 
void addImplicitConnections (SCH_SYMBOL *aSymbol, SCH_SCREEN *aScreen, bool aUpdateSet)
 Create net labels to emulate implicit connections in Eagle. More...
 
bool netHasPowerDriver (SCH_LINE *aLine, const wxString &aNetName) const
 
SCH_SHEETgetCurrentSheet ()
 
SCH_SCREENgetCurrentScreen ()
 

Private Attributes

REPORTERm_reporter
 Reporter for warnings/errors. More...
 
std::map< wxString, EAGLE_MISSING_CMPm_missingCmps
 
SCH_SHEETm_rootSheet
 The root sheet of the schematic being loaded. More...
 
SCH_SHEET_PATH m_sheetPath
 The current sheet path of the schematic being loaded. More...
 
wxString m_version
 Eagle file version. More...
 
wxFileName m_filename
 
wxString m_libName
 Library name to save symbols. More...
 
SCHEMATICm_schematic
 Passed to Load(), the schematic object being loaded. More...
 
EPART_MAP m_partlist
 
std::map< wxString, EAGLE_LIBRARYm_eagleLibs
 
std::unordered_map< wxString, bool > m_userValue
 deviceset/@uservalue for device. More...
 
SCH_PLUGIN::SCH_PLUGIN_RELEASER m_pi
 PI to create KiCad symbol library. More...
 
std::unique_ptr< STRING_UTF8_MAPm_properties
 Library plugin properties. More...
 
PROGRESS_REPORTERm_progressReporter
 optional; may be nullptr More...
 
unsigned m_doneCount
 
unsigned m_lastProgressCount
 
unsigned m_totalCount
 for progress reporting More...
 
std::map< wxString, int > m_netCounts
 
std::map< int, SCH_LAYER_IDm_layerMap
 
std::map< wxString, wxString > m_powerPorts
 map from symbol reference to global label equivalent More...
 
std::vector< VECTOR2Im_wireIntersections
 Wires and labels of a single connection (segment in Eagle nomenclature) More...
 
std::vector< SEG_DESCm_segments
 Nets as defined in the <nets> sections of an Eagle schematic file. More...
 
std::map< wxString, ENETm_nets
 Positions of pins and wire endings mapped to its parent. More...
 
std::map< VECTOR2I, std::set< const EDA_ITEM * > > m_connPoints
 

Detailed Description

A SCH_PLUGIN derivation for loading 6.x+ Eagle schematic files.

As with all SCH_PLUGINs there is no UI dependencies i.e. windowing calls allowed.

Definition at line 81 of file sch_eagle_plugin.h.

Constructor & Destructor Documentation

◆ SCH_EAGLE_PLUGIN()

SCH_EAGLE_PLUGIN::SCH_EAGLE_PLUGIN ( )

◆ ~SCH_EAGLE_PLUGIN()

SCH_EAGLE_PLUGIN::~SCH_EAGLE_PLUGIN ( )

Definition at line 367 of file sch_eagle_plugin.cpp.

Member Function Documentation

◆ addBusEntries()

void SCH_EAGLE_PLUGIN::addBusEntries ( )
private

◆ addImplicitConnections()

void SCH_EAGLE_PLUGIN::addImplicitConnections ( SCH_SYMBOL aSymbol,
SCH_SCREEN aScreen,
bool  aUpdateSet 
)
private

Create net labels to emulate implicit connections in Eagle.

Each named power input pin creates an implicit connection in Eagle. To emulate this behavior one needs to attach global net labels to the mentioned pins. This is is also expected for the units that are not instantiated in the schematics, therefore such units need to be stored in order to create them at later stage.

Parameters
aSymbolis the symbol to process.
aScreenis the screen where net labels should be added.
aUpdateSetdecides whether the missing units data should be updated.

Definition at line 3357 of file sch_eagle_plugin.cpp.

References SCH_SCREEN::Append(), SPIN_STYLE::BOTTOM, checkConnections(), SCH_EAGLE_PLUGIN::EAGLE_MISSING_CMP::cmp, extractNetName(), SCH_SYMBOL::GetField(), SCH_SYMBOL::GetLibSymbolRef(), SCH_SYMBOL::GetPinPhysicalPosition(), EDA_TEXT::GetText(), SCH_SYMBOL::GetUnit(), SPIN_STYLE::LEFT, m_missingCmps, EDA_IU_SCALE::MilsToIU(), pin, REFERENCE_FIELD, SPIN_STYLE::RIGHT, schIUScale, SCH_LABEL_BASE::SetPosition(), SCH_GLOBALLABEL::SetSpinStyle(), EDA_TEXT::SetText(), EDA_TEXT::SetTextSize(), SCH_EAGLE_PLUGIN::EAGLE_MISSING_CMP::units, and SPIN_STYLE::UP.

Referenced by loadSchematic(), and loadSheet().

◆ adjustNetLabels()

◆ CanReadLibrary()

bool SCH_EAGLE_PLUGIN::CanReadLibrary ( const wxString &  aFileName) const
overridevirtual

Checks if this SCH_PLUGIN can read the specified symbol library file.

If not overriden, extension check is used.

Reimplemented from SCH_PLUGIN.

Definition at line 2725 of file sch_eagle_plugin.cpp.

References SCH_PLUGIN::CanReadLibrary(), and checkHeader().

◆ CanReadSchematicFile()

bool SCH_EAGLE_PLUGIN::CanReadSchematicFile ( const wxString &  aFileName) const
overridevirtual

Checks if this SCH_PLUGIN can read the specified schematic file.

If not overriden, extension check is used.

Reimplemented from SCH_PLUGIN.

Definition at line 2716 of file sch_eagle_plugin.cpp.

References SCH_PLUGIN::CanReadSchematicFile(), and checkHeader().

◆ checkConnections()

bool SCH_EAGLE_PLUGIN::checkConnections ( const SCH_SYMBOL aSymbol,
const LIB_PIN aPin 
) const
private

Definition at line 3339 of file sch_eagle_plugin.cpp.

References SCH_SYMBOL::GetPinPhysicalPosition(), and m_connPoints.

Referenced by addImplicitConnections().

◆ checkHeader()

bool SCH_EAGLE_PLUGIN::checkHeader ( const wxString &  aFileName) const
private

Definition at line 2734 of file sch_eagle_plugin.cpp.

References text.

Referenced by CanReadLibrary(), and CanReadSchematicFile().

◆ checkpoint()

◆ countNets()

void SCH_EAGLE_PLUGIN::countNets ( wxXmlNode *  aSchematicNode)
private

Definition at line 556 of file sch_eagle_plugin.cpp.

References getChildrenNodes(), m_netCounts, and MapChildren().

Referenced by loadSchematic().

◆ CreateSymbolLib()

void SCH_PLUGIN::CreateSymbolLib ( const wxString &  aLibraryPath,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Create a new empty symbol library at aLibraryPath.

It is an error to attempt to create an existing library or to attempt to create on a "read only" location.

Parameters
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing several footprints.
aPropertiesis an associative array that can be used to tell the library create function anything special, because it can take any number of additional named tuning arguments that the plugin is known to support. The caller continues to own this object (plugin may not delete it), and plugins should expect it to be optionally NULL.
Exceptions
IO_ERRORif there is a problem finding the library, or creating it.

Reimplemented in SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.

Definition at line 183 of file sch_plugin.cpp.

References NOT_IMPLEMENTED.

Referenced by SYMBOL_LIB_TABLE::CreateSymbolLib(), SYMBOL_EDIT_FRAME::ExportSymbol(), SCH_ALTIUM_PLUGIN::LoadSchematicFile(), CADSTAR_SCH_ARCHIVE_PLUGIN::LoadSchematicFile(), LoadSchematicFile(), and SCH_EASYEDAPRO_PLUGIN::LoadSchematicFile().

◆ DeleteSymbol()

void SCH_PLUGIN::DeleteSymbol ( const wxString &  aLibraryPath,
const wxString &  aSymbolName,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Delete the entire LIB_SYMBOL associated with aAliasName from the library aLibraryPath.

Parameters
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing several symbols.
aSymbolNameis the name of a LIB_SYMBOL associated with it's root LIB_SYMBOL object to delete from the specified library.
aPropertiesis 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.
Exceptions
IO_ERRORif there is a problem finding the alias or the library or deleting it.

Reimplemented in SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.

Definition at line 175 of file sch_plugin.cpp.

References NOT_IMPLEMENTED.

Referenced by SYMBOL_LIB_TABLE::DeleteSymbol(), and SYMBOL_LIBRARY_MANAGER::LIB_BUFFER::SaveBuffer().

◆ DeleteSymbolLib()

bool SCH_PLUGIN::DeleteSymbolLib ( const wxString &  aLibraryPath,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Delete an existing symbol library and returns true if successful, or if library does not exist returns false, or throws an exception if library exists but is read only or cannot be deleted for some other reason.

Parameters
aLibraryPathis a locator for the "library", usually a directory or file which will contain symbols.
aPropertiesis 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.
Returns
true if library deleted or false if library did not exist.
Exceptions
IO_ERRORif there is a problem deleting an existing library.

Reimplemented in SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.

Definition at line 190 of file sch_plugin.cpp.

References NOT_IMPLEMENTED.

Referenced by SYMBOL_LIB_TABLE::DeleteSymbolLib().

◆ EnumerateSymbolLib() [1/2]

void SCH_PLUGIN::EnumerateSymbolLib ( std::vector< LIB_SYMBOL * > &  aSymbolList,
const wxString &  aLibraryPath,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Populate a list of LIB_SYMBOL aliases contained within the library aLibraryPath.

Note
It is the responsibility of the caller to delete the returned object from the heap. Failure to do this will result in memory leaks.
Parameters
aSymbolListis an array to populate with the LIB_SYMBOL pointers associated with the library.
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing one or more LIB_SYMBOL objects.
aPropertiesis 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.
Exceptions
IO_ERRORif the library cannot be found, the part library cannot be loaded.

Reimplemented in SCH_ALTIUM_PLUGIN, CADSTAR_SCH_ARCHIVE_PLUGIN, SCH_DATABASE_PLUGIN, SCH_EASYEDA_PLUGIN, SCH_EASYEDAPRO_PLUGIN, SCH_HTTP_LIB_PLUGIN, SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.

Definition at line 150 of file sch_plugin.cpp.

References NOT_IMPLEMENTED.

◆ EnumerateSymbolLib() [2/2]

void SCH_PLUGIN::EnumerateSymbolLib ( wxArrayString &  aSymbolNameList,
const wxString &  aLibraryPath,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Populate a list of LIB_SYMBOL alias names contained within the library aLibraryPath.

Parameters
aSymbolNameListis an array to populate with the LIB_SYMBOL names associated with the library.
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing one or more LIB_SYMBOL objects.
aPropertiesis 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.
Exceptions
IO_ERRORif the library cannot be found, the part library cannot be loaded.

Reimplemented in SCH_ALTIUM_PLUGIN, CADSTAR_SCH_ARCHIVE_PLUGIN, SCH_DATABASE_PLUGIN, SCH_EASYEDA_PLUGIN, SCH_EASYEDAPRO_PLUGIN, SCH_HTTP_LIB_PLUGIN, SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.

Definition at line 141 of file sch_plugin.cpp.

References NOT_IMPLEMENTED.

Referenced by PANEL_SYM_LIB_TABLE::convertLibrary(), SYMBOL_LIB_TABLE::EnumerateSymbolLib(), SYMBOL_EDIT_FRAME::ImportSymbol(), SYMBOL_LIB_TABLE::LoadSymbolLib(), and SYMBOL_LIB_TABLE_ROW::Refresh().

◆ fileStartsWithBinaryHeader()

bool SCH_PLUGIN::fileStartsWithBinaryHeader ( const wxString &  aFilePath,
const std::vector< uint8_t > &  aHeader 
)
staticprotectedinherited

Definition at line 248 of file sch_plugin.cpp.

◆ fileStartsWithPrefix()

bool SCH_PLUGIN::fileStartsWithPrefix ( const wxString &  aFilePath,
const wxString &  aPrefix,
bool  aIgnoreWhitespace 
)
staticprotectedinherited

Definition at line 223 of file sch_plugin.cpp.

References text.

Referenced by SCH_LEGACY_PLUGIN::CanReadLibrary(), and SCH_LEGACY_PLUGIN::CanReadSchematicFile().

◆ findNearestLinePoint()

std::pair< VECTOR2I, const SEG * > SCH_EAGLE_PLUGIN::findNearestLinePoint ( const VECTOR2I aPoint,
const std::vector< SEG > &  aLines 
) const
private

Definition at line 1533 of file sch_eagle_plugin.cpp.

References std::abs(), VECTOR2< T >::x, and VECTOR2< T >::y.

Referenced by adjustNetLabels().

◆ GetAvailableSymbolFields()

virtual void SCH_PLUGIN::GetAvailableSymbolFields ( std::vector< wxString > &  aNames)
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.

Parameters
aNameswill be filled with any custom fields present in this library.

Reimplemented in CADSTAR_SCH_ARCHIVE_PLUGIN, SCH_DATABASE_PLUGIN, SCH_HTTP_LIB_PLUGIN, and SCH_SEXPR_PLUGIN.

Definition at line 477 of file sch_io_mgr.h.

Referenced by SYMBOL_LIB_TABLE_ROW::GetAvailableSymbolFields(), and SCH_PLUGIN::GetDefaultSymbolFields().

◆ getCurrentScreen()

SCH_SCREEN * SCH_EAGLE_PLUGIN::getCurrentScreen ( )
private

◆ getCurrentSheet()

SCH_SHEET * SCH_EAGLE_PLUGIN::getCurrentSheet ( )
private

Definition at line 134 of file sch_eagle_plugin.cpp.

References SCH_SHEET_PATH::Last(), and m_sheetPath.

Referenced by loadSheet().

◆ GetDefaultSymbolFields()

virtual void SCH_PLUGIN::GetDefaultSymbolFields ( std::vector< wxString > &  aNames)
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.

Parameters
aNameswill be filled with the custom field names that should be shown by default

Reimplemented in SCH_DATABASE_PLUGIN, SCH_HTTP_LIB_PLUGIN, and SCH_SEXPR_PLUGIN.

Definition at line 491 of file sch_io_mgr.h.

References SCH_PLUGIN::GetAvailableSymbolFields().

Referenced by SYMBOL_LIB_TABLE_ROW::GetDefaultSymbolFields().

◆ GetError()

const wxString & SCH_PLUGIN::GetError ( ) const
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.

Returns
an unformatted string containing errors if any.

Reimplemented in SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.

Definition at line 216 of file sch_plugin.cpp.

References NOT_IMPLEMENTED.

Referenced by KI_TEST::SCHEMATIC_TEST_FIXTURE::LoadSchematic(), SCH_EDIT_FRAME::LoadSheetFromFile(), and SCH_EDIT_FRAME::OpenProjectFiles().

◆ getLibFileName()

wxFileName SCH_EAGLE_PLUGIN::getLibFileName ( )
private

Checks if there are other wires or pins at the position of the tested pin.

Definition at line 172 of file sch_eagle_plugin.cpp.

References getLibName(), PROJECT::GetProjectPath(), KiCadSymbolLibFileExtension, m_schematic, and SCHEMATIC::Prj().

Referenced by loadLibrary(), loadSchematic(), and LoadSchematicFile().

◆ getLibName()

wxString SCH_EAGLE_PLUGIN::getLibName ( )
private

◆ GetLibraryFileDesc()

◆ GetModifyHash()

int SCH_EAGLE_PLUGIN::GetModifyHash ( ) const
overridevirtual

Return the modification hash from the library cache.

Note
This is temporary until the new s-expr file format is implement. The new file format will embed symbols instead of referencing them from the library. This function can be removed when the new file format is implemented.
Returns
the modification hash of the library cache.

Implements SCH_PLUGIN.

Definition at line 378 of file sch_eagle_plugin.cpp.

◆ GetName()

const wxString SCH_EAGLE_PLUGIN::GetName ( ) const
overridevirtual

Return a brief hard coded name for this SCH_PLUGIN.

Implements SCH_PLUGIN.

Definition at line 372 of file sch_eagle_plugin.cpp.

◆ GetSchematicFileDesc()

const PLUGIN_FILE_DESC SCH_EAGLE_PLUGIN::GetSchematicFileDesc ( ) const
inlineoverridevirtual

Returns schematic file description for the SCH_PLUGIN.

Reimplemented from SCH_PLUGIN.

Definition at line 98 of file sch_eagle_plugin.h.

References _HKI.

◆ GetSubLibraryNames()

virtual void SCH_PLUGIN::GetSubLibraryNames ( std::vector< wxString > &  aNames)
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.

Parameters
aNameswill be filled with a list of sub-libraries within this symbol library

Reimplemented in SCH_DATABASE_PLUGIN, and SCH_HTTP_LIB_PLUGIN.

Definition at line 466 of file sch_io_mgr.h.

Referenced by SYMBOL_LIB_TABLE_ROW::GetSubLibraryNames().

◆ IsSymbolLibWritable()

bool SCH_PLUGIN::IsSymbolLibWritable ( const wxString &  aLibraryPath)
virtualinherited

Return true if the library at aLibraryPath is writable.

(Often system libraries are read only because of where they are installed.)

Parameters
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing several symbols.
Exceptions
IO_ERRORif no library at aLibraryPath exists.

Reimplemented in SCH_ALTIUM_PLUGIN, CADSTAR_SCH_ARCHIVE_PLUGIN, SCH_DATABASE_PLUGIN, SCH_EASYEDA_PLUGIN, SCH_EASYEDAPRO_PLUGIN, SCH_HTTP_LIB_PLUGIN, SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.

Definition at line 197 of file sch_plugin.cpp.

References NOT_IMPLEMENTED.

Referenced by SYMBOL_LIB_TABLE::IsSymbolLibWritable(), and SYMBOL_LIB_TABLE::SaveSymbol().

◆ kiCadLayer()

SCH_LAYER_ID SCH_EAGLE_PLUGIN::kiCadLayer ( int  aEagleLayer)
private

Return the matching layer or return LAYER_NOTES.

Definition at line 225 of file sch_eagle_plugin.cpp.

References LAYER_NOTES, and m_layerMap.

Referenced by loadCircle(), loadPolyLine(), loadRectangle(), and loadWire().

◆ loadCircle()

SCH_SHAPE * SCH_EAGLE_PLUGIN::loadCircle ( wxXmlNode *  aCircleNode)
private

◆ loadDrawing()

void SCH_EAGLE_PLUGIN::loadDrawing ( wxXmlNode *  aDrawingNode)
private

Definition at line 529 of file sch_eagle_plugin.cpp.

References loadLayerDefs(), loadSchematic(), and MapChildren().

Referenced by LoadSchematicFile().

◆ loadFieldAttributes()

void SCH_EAGLE_PLUGIN::loadFieldAttributes ( LIB_FIELD aField,
const LIB_TEXT aText 
) const
private

◆ loadFrame() [1/2]

◆ loadFrame() [2/2]

◆ loadInstance()

◆ loadJunction()

SCH_JUNCTION * SCH_EAGLE_PLUGIN::loadJunction ( wxXmlNode *  aJunction)
private

Definition at line 1483 of file sch_eagle_plugin.cpp.

References ECOORD::ToSchUnits(), EJUNCTION::x, and EJUNCTION::y.

Referenced by loadSegments().

◆ loadLabel()

SCH_TEXT * SCH_EAGLE_PLUGIN::loadLabel ( wxXmlNode *  aLabelNode,
const wxString &  aNetName 
)
private

◆ loadLayerDefs()

void SCH_EAGLE_PLUGIN::loadLayerDefs ( wxXmlNode *  aLayers)
private

Layers in KiCad schematics are not actually layers, but abstract groups mainly used to decide item colors.

<layers> <layer number="90" name="Modules" color="5" fill="1" visible="yes" active="yes"> <layer number="91" name="Nets" color="2" fill="1" visible="yes" active="yes"> <layer number="92" name="Busses" color="1" fill="1" visible="yes" active="yes"> <layer number="93" name="Pins" color="2" fill="1" visible="no" active="yes"> <layer number="94" name="Symbols" color="4" fill="1" visible="yes" active="yes"> <layer number="95" name="Names" color="7" fill="1" visible="yes" active="yes"> <layer number="96" name="Values" color="7" fill="1" visible="yes" active="yes"> <layer number="97" name="Info" color="7" fill="1" visible="yes" active="yes"> <layer number="98" name="Guide" color="6" fill="1" visible="yes" active="yes"> </layers>

Definition at line 180 of file sch_eagle_plugin.cpp.

References LAYER_BUS, LAYER_NOTES, LAYER_WIRE, and m_layerMap.

Referenced by loadDrawing().

◆ loadLibrary()

◆ loadPin()

LIB_PIN * SCH_EAGLE_PLUGIN::loadPin ( std::unique_ptr< LIB_SYMBOL > &  aSymbol,
wxXmlNode *  aPin,
EPIN epin,
int  aGateNumber 
)
private

◆ loadPlainText()

SCH_TEXT * SCH_EAGLE_PLUGIN::loadPlainText ( wxXmlNode *  aSchText)
private

◆ loadPolyLine()

SCH_SHAPE * SCH_EAGLE_PLUGIN::loadPolyLine ( wxXmlNode *  aPolygonNode)
private

◆ loadRectangle()

SCH_SHAPE * SCH_EAGLE_PLUGIN::loadRectangle ( wxXmlNode *  aRectNode)
private

◆ loadSchematic()

◆ LoadSchematicFile()

SCH_SHEET * SCH_EAGLE_PLUGIN::LoadSchematicFile ( const wxString &  aFileName,
SCHEMATIC aSchematic,
SCH_SHEET aAppendToMe = nullptr,
const STRING_UTF8_MAP aProperties = nullptr 
)
overridevirtual

Load information from some input file format that this SCH_PLUGIN implementation knows about, into either a new SCH_SHEET or an existing one.

This may be used to load an entire new SCH_SHEET, or to augment an existing one if aAppendToMe is not NULL.

Parameters
aFileNameis the name of the file to use as input and may be foreign in nature or native in nature.
aKiwayis the KIWAY object used to access the symbol libraries loaded by the project.
aAppendToMeis an existing SCH_SHEET to append to, but if NULL then this means "do not append, rather load anew".
aPropertiesis 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.
Returns
the successfully loaded schematic, or the same one as aAppendToMe if aAppendToMe was not NULL, and the caller owns it.
Exceptions
IO_ERRORif 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.
Note
No check is being done here to see if the existing symbol library exists so this will overwrite the existing one.

Reimplemented from SCH_PLUGIN.

Definition at line 404 of file sch_eagle_plugin.cpp.

References _, SCH_PLUGIN::CreateSymbolLib(), PROJECT::ELEM_SYMBOL_LIB_TABLE, SYMBOL_LIB_TABLE::Format(), getLibFileName(), getLibName(), PROJECT::GetProjectPath(), SCH_SHEET::GetScreen(), SYMBOL_LIB_TABLE::GetSymbolLibTableFileName(), SCH_SCREEN::GetUuid(), LIB_TABLE::HasLibrary(), LIB_TABLE::InsertRow(), SCHEMATIC::IsValid(), PROGRESS_REPORTER::KeepRefreshing(), KiCadSchematicFileExtension, loadDrawing(), m_filename, m_pi, m_progressReporter, m_properties, m_rootSheet, m_schematic, EDA_ITEM::m_Uuid, m_version, MapChildren(), SCHEMATIC::Prj(), SCH_LEGACY_PLUGIN::PropBuffering, PROGRESS_REPORTER::Report(), SCHEMATIC::Root(), SCH_PLUGIN::SaveLibrary(), SCH_PLUGIN::SCH_PLUGIN_RELEASER::set(), PROJECT::SetElem(), SCH_SCREEN::SetFileName(), SCH_SHEET::SetFileName(), SCHEMATIC::SetRoot(), SCH_SHEET::SetScreen(), text, THROW_IO_ERROR, and SCH_SCREENS::UpdateSymbolLinks().

◆ loadSegments()

◆ loadSheet()

◆ LoadSymbol()

LIB_SYMBOL * SCH_PLUGIN::LoadSymbol ( const wxString &  aLibraryPath,
const wxString &  aPartName,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Load a LIB_SYMBOL object having aPartName from the aLibraryPath containing a library format that this SCH_PLUGIN knows about.

Parameters
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing several symbols.
aPartNameis the name of the LIB_SYMBOL to load.
aPropertiesis 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.
Returns
the part created on the heap if found caller shares it or NULL if not found.
Exceptions
IO_ERRORif the library cannot be found or read. No exception is thrown in the case where aAliasName cannot be found.

Reimplemented in SCH_ALTIUM_PLUGIN, CADSTAR_SCH_ARCHIVE_PLUGIN, SCH_DATABASE_PLUGIN, SCH_EASYEDA_PLUGIN, SCH_EASYEDAPRO_PLUGIN, SCH_HTTP_LIB_PLUGIN, SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.

Definition at line 159 of file sch_plugin.cpp.

References NOT_IMPLEMENTED.

Referenced by SYMBOL_EDIT_FRAME::ExportSymbol(), SYMBOL_EDIT_FRAME::ImportSymbol(), loadLibrary(), SYMBOL_LIB_TABLE::LoadSymbol(), SYMBOL_LIBRARY_MANAGER::LIB_BUFFER::SaveBuffer(), SYMBOL_LIBRARY_MANAGER::SaveLibrary(), and SYMBOL_LIB_TABLE::SaveSymbol().

◆ loadSymbol()

bool SCH_EAGLE_PLUGIN::loadSymbol ( wxXmlNode *  aSymbolNode,
std::unique_ptr< LIB_SYMBOL > &  aSymbol,
EDEVICE aDevice,
int  aGateNumber,
const wxString &  aGateName 
)
private

◆ loadSymbolCircle()

LIB_SHAPE * SCH_EAGLE_PLUGIN::loadSymbolCircle ( std::unique_ptr< LIB_SYMBOL > &  aSymbol,
wxXmlNode *  aCircleNode,
int  aGateNumber 
)
private

◆ loadSymbolPolyLine()

LIB_SHAPE * SCH_EAGLE_PLUGIN::loadSymbolPolyLine ( std::unique_ptr< LIB_SYMBOL > &  aSymbol,
wxXmlNode *  aPolygonNode,
int  aGateNumber 
)
private

◆ loadSymbolRectangle()

LIB_SHAPE * SCH_EAGLE_PLUGIN::loadSymbolRectangle ( std::unique_ptr< LIB_SYMBOL > &  aSymbol,
wxXmlNode *  aRectNode,
int  aGateNumber 
)
private

◆ loadSymbolText()

LIB_TEXT * SCH_EAGLE_PLUGIN::loadSymbolText ( std::unique_ptr< LIB_SYMBOL > &  aSymbol,
wxXmlNode *  aLibText,
int  aGateNumber 
)
private

Definition at line 2359 of file sch_eagle_plugin.cpp.

References interpretText(), loadTextAttributes(), ECOORD::ToSchUnits(), ETEXT::x, and ETEXT::y.

Referenced by loadSymbol().

◆ loadSymbolWire()

◆ loadTextAttributes()

◆ loadWire()

SCH_ITEM * SCH_EAGLE_PLUGIN::loadWire ( wxXmlNode *  aWireNode,
SEG endpoints 
)
private

◆ moveLabels()

void SCH_EAGLE_PLUGIN::moveLabels ( SCH_LINE aWire,
const VECTOR2I aNewEndPoint 
)
private

Move any labels on the wire to the new end point of the wire.

Definition at line 2756 of file sch_eagle_plugin.cpp.

References SCH_LINE::GetBoundingBox(), getCurrentScreen(), SCH_LINE::GetEndPoint(), SCH_LINE::GetStartPoint(), SCH_SCREEN::Items(), EE_RTREE::Overlapping(), and TestSegmentHit().

Referenced by addBusEntries().

◆ netHasPowerDriver()

bool SCH_EAGLE_PLUGIN::netHasPowerDriver ( SCH_LINE aLine,
const wxString &  aNetName 
) const
private

◆ SaveLibrary()

void SCH_PLUGIN::SaveLibrary ( const wxString &  aFileName,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

◆ SaveSchematicFile()

void SCH_PLUGIN::SaveSchematicFile ( const wxString &  aFileName,
SCH_SHEET aSheet,
SCHEMATIC aSchematic,
const STRING_UTF8_MAP aProperties = nullptr 
)
virtualinherited

Write aSchematic to a storage file in a format that this SCH_PLUGIN implementation knows about, or it can be used to write a portion of aSchematic to a special kind of export file.

Parameters
aFileNameis the name of a file to save to on disk.
aSheetis 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.
aSchematicis the SCHEMATIC object used to access any schematic-wide or project information needed to save the document.
aPropertiesis 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.
Exceptions
IO_ERRORif there is a problem saving or exporting.

Reimplemented in SCH_LEGACY_PLUGIN, and SCH_SEXPR_PLUGIN.

Definition at line 133 of file sch_plugin.cpp.

References NOT_IMPLEMENTED.

Referenced by DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged(), and SCH_EDIT_FRAME::saveSchematicFile().

◆ SaveSymbol()

void SCH_PLUGIN::SaveSymbol ( const wxString &  aLibraryPath,
const LIB_SYMBOL aSymbol,
const STRING_UTF8_MAP aProperties = nullptr 
)
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.

Parameters
aLibraryPathis a locator for the "library", usually a directory, file, or URL containing several symbols.
aSymbolis what to store in the library. The library is refreshed and the caller must update any LIB_SYMBOL pointers that may have changed.
aPropertiesis 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.
Exceptions
IO_ERRORif there is a problem saving.

Reimplemented in SCH_HTTP_LIB_PLUGIN, SCH_SEXPR_PLUGIN, and SCH_LEGACY_PLUGIN.

Definition at line 167 of file sch_plugin.cpp.

References NOT_IMPLEMENTED.

Referenced by PANEL_SYM_LIB_TABLE::convertLibrary(), SYMBOL_EDIT_FRAME::ExportSymbol(), SCH_EDITOR_CONTROL::ExportSymbolsToLibrary(), loadLibrary(), CADSTAR_SCH_ARCHIVE_PLUGIN::LoadSchematicFile(), SCH_EASYEDAPRO_PLUGIN::LoadSchematicFile(), SCH_ALTIUM_PLUGIN::ParseFileHeader(), SCH_ALTIUM_PLUGIN::ParsePowerPort(), SYMBOL_LIBRARY_MANAGER::LIB_BUFFER::SaveBuffer(), SYMBOL_LIBRARY_MANAGER::SaveLibrary(), SYMBOL_LIB_TABLE::SaveSymbol(), and SYMBOL_LIB_TABLE_RESCUER::WriteRescueLibrary().

◆ SetLibTable()

virtual void SCH_PLUGIN::SetLibTable ( SYMBOL_LIB_TABLE aTable)
inlinevirtualinherited

Some library plugins need to have access to their parent library table.

Parameters
aTableis the table this plugin is registered within.

Reimplemented in SCH_DATABASE_PLUGIN, and SCH_HTTP_LIB_PLUGIN.

Definition at line 510 of file sch_io_mgr.h.

Referenced by SYMBOL_LIB_TABLE::FindRow(), SYMBOL_LIB_TABLE::LoadSymbolLib(), and SYMBOL_LIB_TABLE_ROW::Refresh().

◆ SetProgressReporter()

void SCH_EAGLE_PLUGIN::SetProgressReporter ( PROGRESS_REPORTER aReporter)
inlineoverridevirtual

Set an optional progress reporter.

Reimplemented from SCH_PLUGIN.

Definition at line 93 of file sch_eagle_plugin.h.

References m_progressReporter.

◆ SetReporter()

void SCH_EAGLE_PLUGIN::SetReporter ( REPORTER aReporter)
inlineoverridevirtual

Set an optional reporter for warnings/errors.

Reimplemented from SCH_PLUGIN.

Definition at line 91 of file sch_eagle_plugin.h.

References m_reporter.

◆ SupportsSubLibraries()

virtual bool SCH_PLUGIN::SupportsSubLibraries ( ) const
inlinevirtualinherited
Returns
true if this plugin supports libraries that contain sub-libraries.

Reimplemented in SCH_DATABASE_PLUGIN, and SCH_HTTP_LIB_PLUGIN.

Definition at line 452 of file sch_io_mgr.h.

Referenced by SYMBOL_LIB_TABLE_ROW::SupportsSubLibraries().

◆ SymbolLibOptions()

void SCH_PLUGIN::SymbolLibOptions ( STRING_UTF8_MAP aListToAppendTo) const
virtualinherited

Append supported SCH_PLUGIN options to aListToAppenTo along with internationalized descriptions.

Options are typically appended so that a derived SCH_PLUGIN can call its base class function by the same name first, thus inheriting options declared there. (Some base class options could pertain to all Symbol*() functions in all derived SCH_PLUGINs.) Note that since aListToAppendTo is a PROPERTIES object, all options will be unique and last guy wins.

Parameters
aListToAppendToholds a tuple of
option
This eventually is what shows up into the fp-lib-table "options" field, possibly combined with others.
internationalized description
The internationalized description is displayed in DIALOG_PLUGIN_OPTIONS. It may be multi-line and be quite explanatory of the option.

In the future perhaps aListToAppendTo evolves to something capable of also holding a wxValidator for the cells in said dialog: http://forums.wxwidgets.org/viewtopic.php?t=23277&p=104180. This would require a 3 column list, and introducing wx GUI knowledge to SCH_PLUGIN, which has been avoided to date.

Reimplemented in CADSTAR_SCH_ARCHIVE_PLUGIN.

Definition at line 204 of file sch_plugin.cpp.

Referenced by SYMBOL_GRID_TRICKS::optionsEditor().

◆ translateEagleBusName()

wxString SCH_EAGLE_PLUGIN::translateEagleBusName ( const wxString &  aEagleName) const
private

Translate an Eagle-style bus name into one that is KiCad-compatible.

For vector buses such as A[7..0] this has no impact. For group buses, we translate from Eagle-style to KiCad-style.

Parameters
aEagleNameis the name of the bus from the Eagle schematic

Definition at line 3447 of file sch_eagle_plugin.cpp.

References NET_SETTINGS::ParseBusVector().

Referenced by loadSheet().

Member Data Documentation

◆ ARC_ACCURACY

const double SCH_EAGLE_PLUGIN::ARC_ACCURACY = SCH_IU_PER_MM * 0.01

Definition at line 84 of file sch_eagle_plugin.h.

Referenced by loadPolyLine(), and loadSymbolPolyLine().

◆ m_connPoints

std::map<VECTOR2I, std::set<const EDA_ITEM*> > SCH_EAGLE_PLUGIN::m_connPoints
private

Definition at line 280 of file sch_eagle_plugin.h.

Referenced by checkConnections(), loadSegments(), and loadSheet().

◆ m_doneCount

unsigned SCH_EAGLE_PLUGIN::m_doneCount
private

Definition at line 250 of file sch_eagle_plugin.h.

Referenced by checkpoint(), and loadSchematic().

◆ m_eagleLibs

std::map<wxString, EAGLE_LIBRARY> SCH_EAGLE_PLUGIN::m_eagleLibs
private

Definition at line 243 of file sch_eagle_plugin.h.

Referenced by loadInstance(), and loadSchematic().

◆ m_filename

wxFileName SCH_EAGLE_PLUGIN::m_filename
private

Definition at line 238 of file sch_eagle_plugin.h.

Referenced by LoadSchematicFile(), and loadSheet().

◆ m_lastProgressCount

unsigned SCH_EAGLE_PLUGIN::m_lastProgressCount
private

Definition at line 251 of file sch_eagle_plugin.h.

Referenced by checkpoint().

◆ m_layerMap

std::map<int, SCH_LAYER_ID> SCH_EAGLE_PLUGIN::m_layerMap
private

Definition at line 255 of file sch_eagle_plugin.h.

Referenced by kiCadLayer(), and loadLayerDefs().

◆ m_libName

wxString SCH_EAGLE_PLUGIN::m_libName
private

Library name to save symbols.

Definition at line 239 of file sch_eagle_plugin.h.

Referenced by getLibName().

◆ m_missingCmps

std::map<wxString, EAGLE_MISSING_CMP> SCH_EAGLE_PLUGIN::m_missingCmps
private

Definition at line 233 of file sch_eagle_plugin.h.

Referenced by addImplicitConnections(), and loadSchematic().

◆ m_netCounts

std::map<wxString, int> SCH_EAGLE_PLUGIN::m_netCounts
private

Definition at line 254 of file sch_eagle_plugin.h.

Referenced by countNets(), loadLabel(), and loadSegments().

◆ m_nets

std::map<wxString, ENET> SCH_EAGLE_PLUGIN::m_nets
private

Positions of pins and wire endings mapped to its parent.

Definition at line 277 of file sch_eagle_plugin.h.

◆ m_partlist

EPART_MAP SCH_EAGLE_PLUGIN::m_partlist
private

Definition at line 242 of file sch_eagle_plugin.h.

Referenced by loadInstance(), and loadSchematic().

◆ m_pi

SCH_PLUGIN::SCH_PLUGIN_RELEASER SCH_EAGLE_PLUGIN::m_pi
private

PI to create KiCad symbol library.

Definition at line 246 of file sch_eagle_plugin.h.

Referenced by loadLibrary(), loadSchematic(), and LoadSchematicFile().

◆ m_powerPorts

std::map<wxString, wxString> SCH_EAGLE_PLUGIN::m_powerPorts
private

map from symbol reference to global label equivalent

Wire intersection points, used for quick checks whether placing a net label in a particular place would short two nets.

Definition at line 256 of file sch_eagle_plugin.h.

Referenced by loadSegments().

◆ m_progressReporter

PROGRESS_REPORTER* SCH_EAGLE_PLUGIN::m_progressReporter
private

optional; may be nullptr

Definition at line 249 of file sch_eagle_plugin.h.

Referenced by checkpoint(), loadSchematic(), LoadSchematicFile(), and SetProgressReporter().

◆ m_properties

std::unique_ptr<STRING_UTF8_MAP> SCH_EAGLE_PLUGIN::m_properties
private

Library plugin properties.

Definition at line 247 of file sch_eagle_plugin.h.

Referenced by loadLibrary(), and LoadSchematicFile().

◆ m_reporter

REPORTER* SCH_EAGLE_PLUGIN::m_reporter
private

Reporter for warnings/errors.

Map references to missing symbol units data

Definition at line 230 of file sch_eagle_plugin.h.

Referenced by loadInstance(), SCH_EAGLE_PLUGIN(), and SetReporter().

◆ m_rootSheet

SCH_SHEET* SCH_EAGLE_PLUGIN::m_rootSheet
private

The root sheet of the schematic being loaded.

Definition at line 235 of file sch_eagle_plugin.h.

Referenced by getLibName(), loadSchematic(), LoadSchematicFile(), and SCH_EAGLE_PLUGIN().

◆ m_schematic

SCHEMATIC* SCH_EAGLE_PLUGIN::m_schematic
private

Passed to Load(), the schematic object being loaded.

Definition at line 240 of file sch_eagle_plugin.h.

Referenced by getLibFileName(), getLibName(), loadLibrary(), loadSchematic(), LoadSchematicFile(), and SCH_EAGLE_PLUGIN().

◆ m_segments

std::vector<SEG_DESC> SCH_EAGLE_PLUGIN::m_segments
private

Nets as defined in the <nets> sections of an Eagle schematic file.

Definition at line 274 of file sch_eagle_plugin.h.

Referenced by adjustNetLabels(), and loadSegments().

◆ m_sheetPath

SCH_SHEET_PATH SCH_EAGLE_PLUGIN::m_sheetPath
private

The current sheet path of the schematic being loaded.

Definition at line 236 of file sch_eagle_plugin.h.

Referenced by getCurrentScreen(), getCurrentSheet(), and loadSchematic().

◆ m_totalCount

unsigned SCH_EAGLE_PLUGIN::m_totalCount
private

for progress reporting

Definition at line 252 of file sch_eagle_plugin.h.

Referenced by checkpoint(), and loadSchematic().

◆ m_userValue

std::unordered_map<wxString, bool> SCH_EAGLE_PLUGIN::m_userValue
private

deviceset/@uservalue for device.

Definition at line 244 of file sch_eagle_plugin.h.

Referenced by loadLibrary().

◆ m_version

wxString SCH_EAGLE_PLUGIN::m_version
private

Eagle file version.

Definition at line 237 of file sch_eagle_plugin.h.

Referenced by LoadSchematicFile().

◆ m_wireIntersections

std::vector<VECTOR2I> SCH_EAGLE_PLUGIN::m_wireIntersections
private

Wires and labels of a single connection (segment in Eagle nomenclature)

Definition at line 261 of file sch_eagle_plugin.h.

Referenced by adjustNetLabels(), and loadSegments().


The documentation for this class was generated from the following files: