KiCad PCB EDA Suite
eagle_plugin.cpp File Reference
#include <errno.h>
#include <wx/string.h>
#include <wx/xml/xml.h>
#include <common.h>
#include <macros.h>
#include <fctsys.h>
#include <trigo.h>
#include <geometry/geometry_utils.h>
#include <kicad_string.h>
#include <properties.h>
#include <wx/filename.h>
#include <class_board.h>
#include <class_module.h>
#include <class_track.h>
#include <class_edge_mod.h>
#include <class_zone.h>
#include <class_pcb_text.h>
#include <class_dimension.h>
#include <eagle_plugin.h>

Go to the source code of this file.

Typedefs

typedef MODULE_MAP::iterator MODULE_ITER
 
typedef MODULE_MAP::const_iterator MODULE_CITER
 

Functions

static int parseEagle (const wxString &aDistance)
 Parse an eagle distance which is either mm, or mils if there is "mil" suffix. More...
 
static wxString makeKey (const wxString &aFirst, const wxString &aSecond)
 Assemble a two part key as a simple concatenation of aFirst and aSecond parts, using a separator. More...
 

Typedef Documentation

typedef MODULE_MAP::const_iterator MODULE_CITER

Definition at line 82 of file eagle_plugin.cpp.

typedef MODULE_MAP::iterator MODULE_ITER

Definition at line 81 of file eagle_plugin.cpp.

Function Documentation

static wxString makeKey ( const wxString &  aFirst,
const wxString &  aSecond 
)
static

Assemble a two part key as a simple concatenation of aFirst and aSecond parts, using a separator.

Definition at line 100 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadElements(), EAGLE_PLUGIN::loadLibrary(), and EAGLE_PLUGIN::loadSignals().

101 {
102  wxString key = aFirst + '\x02' + aSecond;
103  return key;
104 }
static int parseEagle ( const wxString &  aDistance)
static

Parse an eagle distance which is either mm, or mils if there is "mil" suffix.

Return is in BIU.

Definition at line 87 of file eagle_plugin.cpp.

References ECOORD::ToPcbUnits().

Referenced by ERULES::parse().

88 {
89  ECOORD::EAGLE_UNIT unit = ( aDistance.npos != aDistance.find( "mil" ) )
90  ? ECOORD::EAGLE_UNIT::EU_MIL : ECOORD::EAGLE_UNIT::EU_MM;
91 
92  ECOORD coord( aDistance, unit );
93 
94  return coord.ToPcbUnits();
95 }