KiCad PCB EDA Suite
ESMD Struct Reference

Eagle SMD pad. More...

Public Member Functions

 ESMD (CPTREE &aSMD)
 

Public Attributes

string name
 
double x
 
double y
 
double dx
 
double dy
 
int layer
 
opt_int roundness
 
opt_erot rot
 
opt_bool stop
 
opt_bool thermals
 
opt_bool cream
 

Detailed Description

Eagle SMD pad.

Definition at line 751 of file eagle_plugin.cpp.

Constructor & Destructor Documentation

ESMD::ESMD ( CPTREE aSMD)

Definition at line 768 of file eagle_plugin.cpp.

References parseOptionalBool(), and parseOptionalEROT().

769 {
770  CPTREE& attribs = aSMD.get_child( "<xmlattr>" );
771 
772  /*
773  <!ATTLIST smd
774  name %String; #REQUIRED
775  x %Coord; #REQUIRED
776  y %Coord; #REQUIRED
777  dx %Dimension; #REQUIRED
778  dy %Dimension; #REQUIRED
779  layer %Layer; #REQUIRED
780  roundness %Int; "0"
781  rot %Rotation; "R0"
782  stop %Bool; "yes"
783  thermals %Bool; "yes"
784  cream %Bool; "yes"
785  >
786  */
787 
788  // DTD #REQUIRED, throw exception if not found
789  name = attribs.get<string>( "name" );
790  x = attribs.get<double>( "x" );
791  y = attribs.get<double>( "y" );
792  dx = attribs.get<double>( "dx" );
793  dy = attribs.get<double>( "dy" );
794  layer = attribs.get<int>( "layer" );
795  rot = parseOptionalEROT( attribs );
796 
797  roundness = attribs.get_optional<int>( "roundness" );
798  thermals = parseOptionalBool( attribs, "thermals" );
799  stop = parseOptionalBool( attribs, "stop" );
800  thermals = parseOptionalBool( attribs, "thermals" );
801  cream = parseOptionalBool( attribs, "cream" );
802 }
opt_bool stop
double y
string name
const PTREE CPTREE
Definition: eagle_plugin.h:63
double x
static opt_erot parseOptionalEROT(CPTREE &attribs)
Eagle "rot" fields are optional, handle that by returning opt_erot.
opt_bool thermals
double dx
static opt_bool parseOptionalBool(CPTREE &attribs, const char *aName)
Function parseOptionalBool returns an opt_bool and sets it true or false according to the presence an...
int layer
double dy
opt_int roundness
opt_erot rot
opt_bool cream

Member Data Documentation

opt_bool ESMD::cream

Definition at line 763 of file eagle_plugin.cpp.

double ESMD::dx

Definition at line 756 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::packageSMD().

double ESMD::dy

Definition at line 757 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::packageSMD().

int ESMD::layer

Definition at line 758 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::packageSMD().

string ESMD::name

Definition at line 753 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::packageSMD().

opt_erot ESMD::rot

Definition at line 760 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::packageSMD().

opt_int ESMD::roundness

Definition at line 759 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::packageSMD().

opt_bool ESMD::stop

Definition at line 761 of file eagle_plugin.cpp.

opt_bool ESMD::thermals

Definition at line 762 of file eagle_plugin.cpp.

double ESMD::x

Definition at line 754 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::packageSMD().

double ESMD::y

Definition at line 755 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::packageSMD().


The documentation for this struct was generated from the following file: