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

ECOORD x1
 
ECOORD y1
 
ECOORD x2
 
ECOORD y2
 
ECOORD 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 490 of file eagle_parser.h.

Member Enumeration Documentation

anonymous enum
Enumerator
CONTINUOUS 
LONGDASH 
SHORTDASH 
DASHDOT 

Definition at line 500 of file eagle_parser.h.

anonymous enum
Enumerator
FLAT 
ROUND 

Definition at line 510 of file eagle_parser.h.

510  {
511  FLAT,
512  ROUND,
513  };

Constructor & Destructor Documentation

EWIRE::EWIRE ( wxXmlNode *  aWire)

Definition at line 296 of file eagle_parser.cpp.

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

297 {
298  /*
299  <!ELEMENT wire EMPTY>
300  <!ATTLIST wire
301  x1 %Coord; #REQUIRED
302  y1 %Coord; #REQUIRED
303  x2 %Coord; #REQUIRED
304  y2 %Coord; #REQUIRED
305  width %Dimension; #REQUIRED
306  layer %Layer; #REQUIRED
307  extent %Extent; #IMPLIED -- only applicable for airwires --
308  style %WireStyle; "continuous"
309  curve %WireCurve; "0"
310  cap %WireCap; "round" -- only applicable if 'curve' is not zero --
311  >
312  */
313 
314  x1 = parseRequiredAttribute<ECOORD>( aWire, "x1" );
315  y1 = parseRequiredAttribute<ECOORD>( aWire, "y1" );
316  x2 = parseRequiredAttribute<ECOORD>( aWire, "x2" );
317  y2 = parseRequiredAttribute<ECOORD>( aWire, "y2" );
318  width = parseRequiredAttribute<ECOORD>( aWire, "width" );
319  layer = parseRequiredAttribute<int>( aWire, "layer" );
320  curve = parseOptionalAttribute<double>( aWire, "curve" );
321 
322  opt_string s = parseOptionalAttribute<string>( aWire, "style" );
323 
324  if( s == "continuous" )
326  else if( s == "longdash" )
328  else if( s == "shortdash" )
330  else if( s == "dashdot" )
332 
333  s = parseOptionalAttribute<string>( aWire, "cap" );
334 
335  if( s == "round" )
336  cap = EWIRE::ROUND;
337  else if( s == "flat" )
338  cap = EWIRE::FLAT;
339 }
opt_double curve
range is -359.9..359.9
Definition: eagle_parser.h:507
opt_int cap
Definition: eagle_parser.h:514
ECOORD width
Definition: eagle_parser.h:496
ECOORD y1
Definition: eagle_parser.h:493
opt_int style
Definition: eagle_parser.h:506
LAYER_NUM layer
Definition: eagle_parser.h:497
ECOORD y2
Definition: eagle_parser.h:495
ECOORD x1
Definition: eagle_parser.h:492
ECOORD x2
Definition: eagle_parser.h:494

Member Data Documentation

opt_int EWIRE::cap

Definition at line 514 of file eagle_parser.h.

Referenced by EWIRE().

opt_double EWIRE::curve

range is -359.9..359.9

Definition at line 507 of file eagle_parser.h.

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

opt_int EWIRE::style

Definition at line 506 of file eagle_parser.h.

Referenced by EWIRE().

ECOORD EWIRE::width

Definition at line 496 of file eagle_parser.h.

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


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