KiCad PCB EDA Suite
EWIRE Struct Reference

Eagle wire. More...

#include <eagle_parser.h>

Public Types

enum  { CONTINUOUS, LONGDASH, SHORTDASH, DASHDOT }
 
enum  { FLAT, ROUND }
 

Public Member Functions

 EWIRE (wxXmlNode *aWire)
 

Public Attributes

double x1
 
double y1
 
double x2
 
double y2
 
double width
 
LAYER_NUM layer
 
opt_int style
 
opt_double curve
 range is -359.9..359.9 More...
 
opt_int cap
 

Detailed Description

Eagle wire.

Definition at line 395 of file eagle_parser.h.

Member Enumeration Documentation

anonymous enum
Enumerator
CONTINUOUS 
LONGDASH 
SHORTDASH 
DASHDOT 

Definition at line 405 of file eagle_parser.h.

anonymous enum
Enumerator
FLAT 
ROUND 

Definition at line 415 of file eagle_parser.h.

415  {
416  FLAT,
417  ROUND,
418  };

Constructor & Destructor Documentation

EWIRE::EWIRE ( wxXmlNode *  aWire)

Definition at line 139 of file eagle_parser.cpp.

References cap, CONTINUOUS, curve, DASHDOT, FLAT, layer, LONGDASH, ROUND, SHORTDASH, style, width, x1, x2, y1, and y2.

140 {
141  /*
142  <!ELEMENT wire EMPTY>
143  <!ATTLIST wire
144  x1 %Coord; #REQUIRED
145  y1 %Coord; #REQUIRED
146  x2 %Coord; #REQUIRED
147  y2 %Coord; #REQUIRED
148  width %Dimension; #REQUIRED
149  layer %Layer; #REQUIRED
150  extent %Extent; #IMPLIED -- only applicable for airwires --
151  style %WireStyle; "continuous"
152  curve %WireCurve; "0"
153  cap %WireCap; "round" -- only applicable if 'curve' is not zero --
154  >
155  */
156 
157  x1 = parseRequiredAttribute<double>( aWire, "x1" );
158  y1 = parseRequiredAttribute<double>( aWire, "y1" );
159  x2 = parseRequiredAttribute<double>( aWire, "x2" );
160  y2 = parseRequiredAttribute<double>( aWire, "y2" );
161  width = parseRequiredAttribute<double>( aWire, "width" );
162  layer = parseRequiredAttribute<int>( aWire, "layer" );
163  curve = parseOptionalAttribute<double>( aWire, "curve" );
164 
165  opt_string s = parseOptionalAttribute<string>( aWire, "style" );
166 
167  if( s == "continuous" )
169  else if( s == "longdash" )
171  else if( s == "shortdash" )
173  else if( s == "dashdot" )
175 
176  s = parseOptionalAttribute<string>( aWire, "cap" );
177 
178  if( s == "round" )
179  cap = EWIRE::ROUND;
180  else if( s == "flat" )
181  cap = EWIRE::FLAT;
182 }
double width
Definition: eagle_parser.h:401
opt_double curve
range is -359.9..359.9
Definition: eagle_parser.h:412
opt_int cap
Definition: eagle_parser.h:419
double y2
Definition: eagle_parser.h:400
double x2
Definition: eagle_parser.h:399
opt_int style
Definition: eagle_parser.h:411
LAYER_NUM layer
Definition: eagle_parser.h:402
double x1
Definition: eagle_parser.h:397
double y1
Definition: eagle_parser.h:398

Member Data Documentation

opt_int EWIRE::cap

Definition at line 419 of file eagle_parser.h.

Referenced by EWIRE().

opt_double EWIRE::curve

range is -359.9..359.9

Definition at line 412 of file eagle_parser.h.

Referenced by EWIRE(), EAGLE_PLUGIN::loadPlain(), and EAGLE_PLUGIN::packageWire().

opt_int EWIRE::style

Definition at line 411 of file eagle_parser.h.

Referenced by EWIRE().

double EWIRE::width

Definition at line 401 of file eagle_parser.h.

Referenced by EWIRE(), EAGLE_PLUGIN::loadSignals(), and EAGLE_PLUGIN::packageWire().

double EWIRE::x1
double EWIRE::x2
double EWIRE::y1
double EWIRE::y2

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