| 
    KiCad PCB EDA Suite
    
   | 
 
#include <map>#include <memory>#include <optional>#include <unordered_map>#include <wx/xml/xml.h>#include <wx/string.h>#include <wx/filename.h>#include <layer_ids.h>#include <trigo.h>#include <core/wx_stl_compat.h>#include <widgets/report_severity.h>Go to the source code of this file.
Classes | |
| struct | XML_PARSER_ERROR | 
| Implement a simple wrapper around runtime_error to isolate the errors thrown by the Eagle XML parser.  More... | |
| struct | TRIPLET | 
| segment (element) of our XPATH into the Eagle XML document tree in PTREE form.  More... | |
| class | XPATH | 
| Keep track of what we are working on within a PTREE.  More... | |
| class | OPTIONAL_XML_ATTRIBUTE< T > | 
| Model an optional XML attribute.  More... | |
| struct | EAGLE_BASE | 
| struct | EURN | 
| Container that parses Eagle library file "urn" definitions.  More... | |
| struct | EDESCRIPTION | 
| struct | ECOORD | 
| struct | ENET | 
| Eagle net.  More... | |
| struct | EROT | 
| Eagle rotation.  More... | |
| struct | EVERTEX | 
| Eagle vertex.  More... | |
| struct | EWIRE | 
| Eagle wire.  More... | |
| struct | EJUNCTION | 
| Eagle Junction.  More... | |
| struct | ELABEL | 
| Eagle label.  More... | |
| struct | EVIA | 
| Eagle via.  More... | |
| struct | ECIRCLE | 
| Eagle circle.  More... | |
| struct | ERECT | 
| Eagle XML rectangle in binary.  More... | |
| struct | ESPLINE | 
| struct | EATTR | 
| Parse an Eagle "attribute" XML element.  More... | |
| struct | EDIMENSION | 
| Eagle dimension element.  More... | |
| struct | ETEXT | 
| Eagle text element.  More... | |
| struct | EFRAME | 
| Parse an Eagle frame element.  More... | |
| struct | EPAD_COMMON | 
| Structure holding common properties for through-hole and SMD pads.  More... | |
| struct | EPAD | 
| Eagle thru hole pad.  More... | |
| struct | ESMD | 
| Eagle SMD pad.  More... | |
| struct | EPIN | 
| Eagle pin element.  More... | |
| struct | EPOLYGON | 
| Eagle polygon, without vertices which are parsed as needed.  More... | |
| struct | EHOLE | 
| Eagle hole element.  More... | |
| struct | EVARIANT | 
| struct | EPINMAP | 
| struct | EPINMAPPING | 
| struct | EMODEL | 
| struct | ESPICE | 
| struct | EELEMENT | 
| Eagle element element.  More... | |
| struct | ELAYER | 
| struct | EAGLE_LAYER | 
| struct | EGATE | 
| struct | EPART | 
| struct | EINSTANCE | 
| struct | ECONNECT | 
| struct | ETECHNOLOGY | 
| struct | EPACKAGE3DINST | 
| struct | EDEVICE | 
| struct | EDEVICE_SET | 
| struct | ECLASS | 
| struct | EPORT | 
| struct | EVARIANTDEF | 
| struct | ESCHEMATIC_GROUP | 
| struct | EPLAIN | 
| struct | EMODULEINST | 
| struct | EPINREF | 
| struct | EPORTREF | 
| struct | EPROBE | 
| struct | ESEGMENT | 
| struct | EBUS | 
| struct | ESHEET | 
| struct | EMODULE | 
| struct | ENOTE | 
| struct | ECOMPATIBILITY | 
| struct | ESETTING | 
| struct | EGRID | 
| struct | EFILTER | 
| struct | EPACKAGE | 
| struct | EPACKAGEINSTANCE | 
| struct | EPACKAGE3D | 
| struct | ESYMBOL | 
| struct | ELIBRARY | 
| struct | EAPPROVED | 
| struct | ESCHEMATIC | 
| struct | EDRAWING | 
| struct | EAGLE_DOC | 
Typedefs | |
| typedef std::unordered_map< wxString, wxXmlNode * > | NODE_MAP | 
| typedef std::map< wxString, EINSTANCE * > | EINSTANCE_MAP | 
| typedef std::map< wxString, std::unique_ptr< EPART > > | EPART_MAP | 
| typedef OPTIONAL_XML_ATTRIBUTE< wxString > | opt_wxString | 
| typedef OPTIONAL_XML_ATTRIBUTE< int > | opt_int | 
| typedef OPTIONAL_XML_ATTRIBUTE< double > | opt_double | 
| typedef OPTIONAL_XML_ATTRIBUTE< bool > | opt_bool | 
| typedef OPTIONAL_XML_ATTRIBUTE< EROT > | opt_erot | 
| typedef OPTIONAL_XML_ATTRIBUTE< ECOORD > | opt_ecoord | 
| typedef OPTIONAL_XML_ATTRIBUTE< EURN > | opt_eurn | 
Functions | |
| wxString | escapeName (const wxString &aNetName) | 
| Translates Eagle special characters to their counterparts in KiCad.   | |
| wxString | interpretText (const wxString &aText) | 
| Interprets special characters in Eagle text and converts them to KiCAD notation.   | |
| bool | substituteVariable (wxString *aText) | 
| Translates Eagle special text reference to a KiCad variable reference.   | |
| wxString | convertDescription (wxString aDescr) | 
| Converts Eagle's HTML description into KiCad description format.   | |
| static wxXmlNode * | getChildrenNodes (NODE_MAP &aMap, const wxString &aName) | 
| template<typename T> | |
| T | Convert (const wxString &aValue) | 
| Convert a wxString to a generic type T.   | |
| template<> | |
| wxString | Convert< wxString > (const wxString &aValue) | 
| size_t | GetNodeCount (const wxXmlNode *aNode) | 
| Fetch the number of XML nodes within aNode.   | |
| NODE_MAP | MapChildren (wxXmlNode *aCurrentNode) | 
| Provide an easy access to the children of an XML node via their names.   | |
| VECTOR2I | ConvertArcCenter (const VECTOR2I &aStart, const VECTOR2I &aEnd, double aAngle) | 
| Convert an Eagle curve end to a KiCad center for S_ARC.   | |
| typedef std::map<wxString, EINSTANCE*> EINSTANCE_MAP | 
Definition at line 55 of file eagle_parser.h.
Definition at line 56 of file eagle_parser.h.
| typedef std::unordered_map<wxString, wxXmlNode*> NODE_MAP | 
Definition at line 54 of file eagle_parser.h.
| typedef OPTIONAL_XML_ATTRIBUTE<bool> opt_bool | 
Definition at line 394 of file eagle_parser.h.
| typedef OPTIONAL_XML_ATTRIBUTE<double> opt_double | 
Definition at line 393 of file eagle_parser.h.
| typedef OPTIONAL_XML_ATTRIBUTE<ECOORD> opt_ecoord | 
Definition at line 396 of file eagle_parser.h.
| typedef OPTIONAL_XML_ATTRIBUTE<EROT> opt_erot | 
Definition at line 395 of file eagle_parser.h.
| typedef OPTIONAL_XML_ATTRIBUTE<EURN> opt_eurn | 
Definition at line 397 of file eagle_parser.h.
| typedef OPTIONAL_XML_ATTRIBUTE<int> opt_int | 
Definition at line 392 of file eagle_parser.h.
| typedef OPTIONAL_XML_ATTRIBUTE<wxString> opt_wxString | 
Definition at line 391 of file eagle_parser.h.
Convert a wxString to a generic type T.
| aValue | is a wxString containing the value that will be converted to type T. | 
| XML_PARSER_ERROR | - an exception is thrown if the parsing fails or if the conversion to type T is unknown. | 
Definition at line 186 of file eagle_parser.h.
References T.
Referenced by parseRequiredAttribute(), SCH_SYMBOL::SCH_SYMBOL(), and OPTIONAL_XML_ATTRIBUTE< wxString >::Set().
| wxString Convert< wxString > | ( | const wxString & | aValue | ) | 
Definition at line 353 of file eagle_parser.cpp.
Convert an Eagle curve end to a KiCad center for S_ARC.
Definition at line 514 of file eagle_parser.cpp.
References _, center, DEG2RAD(), THROW_IO_ERROR, VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by PCB_IO_EAGLE::loadPlain(), PCB_IO_EAGLE::loadPolygon(), PCB_IO_EAGLE::loadSignals(), SCH_IO_EAGLE::loadSymbolWire(), SCH_IO_EAGLE::loadWire(), PCB_IO_EAGLE::packagePolygon(), and PCB_IO_EAGLE::packageWire().
| wxString convertDescription | ( | wxString | aDescr | ) | 
Converts Eagle's HTML description into KiCad description format.
Definition at line 155 of file eagle_parser.cpp.
References RemoveHTMLTags().
Referenced by SCH_IO_EAGLE::loadLibrary(), and PCB_IO_EAGLE::makeFootprint().
| wxString escapeName | ( | const wxString & | aNetName | ) | 
Translates Eagle special characters to their counterparts in KiCad.
Definition at line 47 of file eagle_parser.cpp.
References ConvertToNewOverbarNotation().
Referenced by SCH_IO_EAGLE::loadLabel(), SCH_IO_EAGLE::loadPlainText(), SCH_IO_EAGLE::loadSegments(), PCB_IO_EAGLE::loadSignals(), and SCH_IO_EAGLE::loadSymbol().
      
  | 
  inlinestatic | 
Definition at line 70 of file eagle_parser.h.
| size_t GetNodeCount | ( | const wxXmlNode * | aNode | ) | 
Fetch the number of XML nodes within aNode.
| aNode | is the parent node of the children to count. | 
Definition at line 185 of file eagle_parser.cpp.
References PROF_TIMER::msecs(), PROF_TIMER::Stop(), and traceEagleIo.
Referenced by SCH_IO_EAGLE::LoadSchematicFile().
| wxString interpretText | ( | const wxString & | aText | ) | 
Interprets special characters in Eagle text and converts them to KiCAD notation.
Definition at line 57 of file eagle_parser.cpp.
References substituteVariable(), and text.
Referenced by PCB_IO_EAGLE::loadPlain(), SCH_IO_EAGLE::loadPlainText(), SCH_IO_EAGLE::loadSymbolText(), and PCB_IO_EAGLE::packageText().
| NODE_MAP MapChildren | ( | wxXmlNode * | aCurrentNode | ) | 
Provide an easy access to the children of an XML node via their names.
| currentNode | is a pointer to a wxXmlNode, whose children will be mapped. | 
Definition at line 490 of file eagle_parser.cpp.
Referenced by PCB_IO_EAGLE::cacheLib(), PCB_IO_EAGLE::loadAllSections(), and PCB_IO_EAGLE::loadLibrary().
| bool substituteVariable | ( | wxString * | aText | ) | 
Translates Eagle special text reference to a KiCad variable reference.
Definition at line 124 of file eagle_parser.cpp.
Referenced by interpretText().