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 <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
 
typedef std::vector< ZONE_CONTAINER * > ZONES
 non-owning container More...
 

Functions

static int parseEagle (const wxString &aDistance)
 Parse an eagle distance which is either mm, or mils if there is "mil" suffix. More...
 
static string makeKey (const string &aFirst, const string &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 81 of file eagle_plugin.cpp.

typedef MODULE_MAP::iterator MODULE_ITER

Definition at line 80 of file eagle_plugin.cpp.

typedef std::vector<ZONE_CONTAINER*> ZONES

non-owning container

Definition at line 1705 of file eagle_plugin.cpp.

Function Documentation

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

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

Definition at line 99 of file eagle_plugin.cpp.

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

100 {
101  string key = aFirst + '\x02' + aSecond;
102  return key;
103 }
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 86 of file eagle_plugin.cpp.

References ECOORD::ToPcbUnits().

Referenced by ERULES::parse().

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