KiCad PCB EDA Suite
EWIRE Struct Reference

Eagle wire. More...

Public Types

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

Public Member Functions

 EWIRE (CPTREE &aWire)
 Constructor EWIRE converts a "wire"'s xml attributes ( &ltwire&gt ) to binary without additional conversion. More...
 

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 252 of file eagle_plugin.cpp.

Member Enumeration Documentation

anonymous enum
Enumerator
CONTINUOUS 
LONGDASH 
SHORTDASH 
DASHDOT 

Definition at line 262 of file eagle_plugin.cpp.

anonymous enum
Enumerator
FLAT 
ROUND 

Definition at line 272 of file eagle_plugin.cpp.

272  {
273  FLAT,
274  ROUND,
275  };

Constructor & Destructor Documentation

EWIRE::EWIRE ( CPTREE aWire)

Constructor EWIRE converts a "wire"'s xml attributes ( &ltwire&gt ) to binary without additional conversion.

This result is an EWIRE with the &ltwire&gt textual data merely converted to binary.

Definition at line 287 of file eagle_plugin.cpp.

References CONTINUOUS, DASHDOT, FLAT, LONGDASH, ROUND, and SHORTDASH.

288 {
289  CPTREE& attribs = aWire.get_child( "<xmlattr>" );
290 
291  /*
292  <!ELEMENT wire EMPTY>
293  <!ATTLIST wire
294  x1 %Coord; #REQUIRED
295  y1 %Coord; #REQUIRED
296  x2 %Coord; #REQUIRED
297  y2 %Coord; #REQUIRED
298  width %Dimension; #REQUIRED
299  layer %Layer; #REQUIRED
300  extent %Extent; #IMPLIED -- only applicable for airwires --
301  style %WireStyle; "continuous"
302  curve %WireCurve; "0"
303  cap %WireCap; "round" -- only applicable if 'curve' is not zero --
304  >
305  */
306 
307  x1 = attribs.get<double>( "x1" );
308  y1 = attribs.get<double>( "y1" );
309  x2 = attribs.get<double>( "x2" );
310  y2 = attribs.get<double>( "y2" );
311  width = attribs.get<double>( "width" );
312  layer = attribs.get<int>( "layer" );
313 
314  curve = attribs.get_optional<double>( "curve" );
315 
316  opt_string s = attribs.get_optional<string>( "style" );
317  if( s )
318  {
319  if( !s->compare( "continuous" ) )
321  else if( !s->compare( "longdash" ) )
323  else if( !s->compare( "shortdash" ) )
325  else if( !s->compare( "dashdot" ) )
327  }
328 
329  s = attribs.get_optional<string>( "cap" );
330  if( s )
331  {
332  if( !s->compare( "round" ) )
333  cap = EWIRE::ROUND;
334  else if( !s->compare( "flat" ) )
335  cap = EWIRE::FLAT;
336  }
337  // ignoring extent
338 }
double width
opt_double curve
range is -359.9..359.9
opt_int cap
const PTREE CPTREE
Definition: eagle_plugin.h:63
double y2
double x2
opt_int style
LAYER_NUM layer
double x1
double y1

Member Data Documentation

opt_int EWIRE::cap

Definition at line 276 of file eagle_plugin.cpp.

opt_double EWIRE::curve

range is -359.9..359.9

Definition at line 269 of file eagle_plugin.cpp.

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

opt_int EWIRE::style

Definition at line 268 of file eagle_plugin.cpp.

double EWIRE::width

Definition at line 258 of file eagle_plugin.cpp.

Referenced by 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 file: