![]() |
KiCad PCB EDA Suite
|
#include <errno.h>
#include <unordered_map>
#include <wx/xml/xml.h>
#include <wx/string.h>
#include <wx/filename.h>
#include <layers_id_colors_and_visibility.h>
#include <convert_to_biu.h>
#include <macros.h>
#include <trigo.h>
#include <kicad_string.h>
#include <common.h>
Go to the source code of this file.
Classes | |
struct | XML_PARSER_ERROR |
Class XML_PARSER_ERROR implements 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 |
Class XPATH keeps track of what we are working on within a PTREE. More... | |
class | OPTIONAL_XML_ATTRIBUTE< T > |
Class OPTIONAL_XML_ATTRIBUTE models an optional XML attribute. More... | |
struct | ECOORD |
struct | ENET |
Eagle net. More... | |
struct | EROT |
Eagle rotation. 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 | EATTR |
Class EATTR parses an Eagle "attribute" XML element. More... | |
struct | EDIMENSION |
Eagle dimension element. More... | |
struct | ETEXT |
Eagle text 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 | EVERTEX |
Eagle vertex. More... | |
struct | EPOLYGON |
Eagle polygon, without vertices which are parsed as needed. More... | |
struct | EHOLE |
Eagle hole element. More... | |
struct | EELEMENT |
Eagle element element. More... | |
struct | ELAYER |
struct | EAGLE_LAYER |
struct | EPART |
struct | EINSTANCE |
struct | EGATE |
struct | ECONNECT |
struct | EDEVICE |
struct | EDEVICE_SET |
Typedefs | |
typedef std::unordered_map< wxString, wxXmlNode * > | NODE_MAP |
typedef std::map< wxString, MODULE * > | MODULE_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 |
Functions | |
wxString | escapeName (const wxString &aNetName) |
More... | |
static wxXmlNode * | getChildrenNodes (NODE_MAP &aMap, const wxString &aName) |
template<typename T > | |
T | Convert (const wxString &aValue) |
Function Convert converts a wxString to a generic type T. More... | |
template<> | |
wxString | Convert< wxString > (const wxString &aValue) |
NODE_MAP | MapChildren (wxXmlNode *aCurrentNode) |
Function MapChildren provides an easy access to the children of an XML node via their names. More... | |
timestamp_t | EagleTimeStamp (wxXmlNode *aTree) |
More... | |
timestamp_t | EagleModuleTstamp (const wxString &aName, const wxString &aValue, int aUnit) |
More... | |
wxPoint | ConvertArcCenter (const wxPoint &aStart, const wxPoint &aEnd, double aAngle) |
More... | |
typedef std::map<wxString, EINSTANCE*> EINSTANCE_MAP |
Definition at line 52 of file eagle_parser.h.
Definition at line 53 of file eagle_parser.h.
typedef std::map<wxString, MODULE*> MODULE_MAP |
Definition at line 51 of file eagle_parser.h.
typedef std::unordered_map<wxString, wxXmlNode*> NODE_MAP |
Definition at line 48 of file eagle_parser.h.
typedef OPTIONAL_XML_ATTRIBUTE<bool> opt_bool |
Definition at line 383 of file eagle_parser.h.
typedef OPTIONAL_XML_ATTRIBUTE<double> opt_double |
Definition at line 382 of file eagle_parser.h.
typedef OPTIONAL_XML_ATTRIBUTE<ECOORD> opt_ecoord |
Definition at line 385 of file eagle_parser.h.
typedef OPTIONAL_XML_ATTRIBUTE<EROT> opt_erot |
Definition at line 384 of file eagle_parser.h.
typedef OPTIONAL_XML_ATTRIBUTE<int> opt_int |
Definition at line 381 of file eagle_parser.h.
typedef OPTIONAL_XML_ATTRIBUTE<wxString> opt_wxString |
Definition at line 379 of file eagle_parser.h.
T Convert | ( | const wxString & | aValue | ) |
Function Convert converts 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 175 of file eagle_parser.h.
wxString Convert< wxString > | ( | const wxString & | aValue | ) |
Definition at line 129 of file eagle_parser.cpp.
wxPoint ConvertArcCenter | ( | const wxPoint & | aStart, |
const wxPoint & | aEnd, | ||
double | aAngle | ||
) |
Convert an Eagle curve end to a KiCad center for S_ARC
Definition at line 280 of file eagle_parser.cpp.
References _, DEG2RAD(), dist, Format(), and THROW_IO_ERROR.
Referenced by EAGLE_PLUGIN::loadPlain(), EAGLE_PLUGIN::loadPolygon(), EAGLE_PLUGIN::loadSignals(), SCH_EAGLE_PLUGIN::loadSymbolWire(), EAGLE_PLUGIN::packagePolygon(), and EAGLE_PLUGIN::packageWire().
timestamp_t EagleModuleTstamp | ( | const wxString & | aName, |
const wxString & | aValue, | ||
int | aUnit | ||
) |
Computes module timestamp basing on its name, value and unit
Definition at line 270 of file eagle_parser.cpp.
Referenced by SCH_EAGLE_PLUGIN::loadInstance(), and SCH_EAGLE_PLUGIN::loadSchematic().
timestamp_t EagleTimeStamp | ( | wxXmlNode * | aTree | ) |
Make a unique time stamp
Definition at line 263 of file eagle_parser.cpp.
Referenced by EAGLE_PLUGIN::loadPlain(), EAGLE_PLUGIN::loadPolygon(), EAGLE_PLUGIN::loadSignals(), EAGLE_PLUGIN::packageCircle(), EAGLE_PLUGIN::packagePolygon(), EAGLE_PLUGIN::packageRectangle(), and EAGLE_PLUGIN::packageText().
wxString escapeName | ( | const wxString & | aNetName | ) |
Translates Eagle special characters to their counterparts in KiCad.
Definition at line 37 of file eagle_parser.cpp.
Referenced by SCH_EAGLE_PLUGIN::loadLabel(), SCH_EAGLE_PLUGIN::loadPlainText(), SCH_EAGLE_PLUGIN::loadSegments(), EAGLE_PLUGIN::loadSignals(), and SCH_EAGLE_PLUGIN::loadSymbol().
|
inlinestatic |
Definition at line 58 of file eagle_parser.h.
Referenced by SCH_EAGLE_PLUGIN::countNets(), EDEVICE::EDEVICE(), SCH_EAGLE_PLUGIN::loadLibrary(), SCH_EAGLE_PLUGIN::loadSchematic(), and SCH_EAGLE_PLUGIN::loadSheet().
NODE_MAP MapChildren | ( | wxXmlNode * | aCurrentNode | ) |
Function MapChildren provides 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 239 of file eagle_parser.cpp.
Referenced by EAGLE_PLUGIN::cacheLib(), SCH_EAGLE_PLUGIN::countNets(), EDEVICE::EDEVICE(), SCH_EAGLE_PLUGIN::Load(), EAGLE_PLUGIN::loadAllSections(), SCH_EAGLE_PLUGIN::loadDrawing(), SCH_EAGLE_PLUGIN::loadLibrary(), EAGLE_PLUGIN::loadLibrary(), SCH_EAGLE_PLUGIN::loadSchematic(), SCH_EAGLE_PLUGIN::loadSegments(), and SCH_EAGLE_PLUGIN::loadSheet().