KiCad PCB EDA Suite
ELAYER Struct Reference

Public Member Functions

 ELAYER (CPTREE &aLayer)
 

Public Attributes

int number
 
string name
 
int color
 
int fill
 
opt_bool visible
 
opt_bool active
 

Detailed Description

Definition at line 981 of file eagle_plugin.cpp.

Constructor & Destructor Documentation

ELAYER::ELAYER ( CPTREE aLayer)

Definition at line 993 of file eagle_plugin.cpp.

References parseOptionalBool().

994 {
995  CPTREE& attribs = aLayer.get_child( "<xmlattr>" );
996 
997  /*
998  <!ELEMENT layer EMPTY>
999  <!ATTLIST layer
1000  number %Layer; #REQUIRED
1001  name %String; #REQUIRED
1002  color %Int; #REQUIRED
1003  fill %Int; #REQUIRED
1004  visible %Bool; "yes"
1005  active %Bool; "yes"
1006  >
1007  */
1008 
1009  number = attribs.get<int>( "number" );
1010  name = attribs.get<string>( "name" );
1011  color = attribs.get<int>( "color" );
1012  fill = 1; // Temporary value.
1013  visible = parseOptionalBool( attribs, "visible" );
1014  active = parseOptionalBool( attribs, "active" );
1015 }
const PTREE CPTREE
Definition: eagle_plugin.h:63
opt_bool visible
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...
string name
opt_bool active

Member Data Documentation

opt_bool ELAYER::active

Definition at line 988 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadLayerDefs().

int ELAYER::color

Definition at line 985 of file eagle_plugin.cpp.

int ELAYER::fill

Definition at line 986 of file eagle_plugin.cpp.

string ELAYER::name

Definition at line 984 of file eagle_plugin.cpp.

int ELAYER::number

Definition at line 983 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadLayerDefs().

opt_bool ELAYER::visible

Definition at line 987 of file eagle_plugin.cpp.


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