KiCad PCB EDA Suite
EELEMENT Struct Reference

Eagle element element. More...

Public Member Functions

 EELEMENT (CPTREE &aElement)
 

Public Attributes

string name
 
string library
 
string package
 
string value
 
double x
 
double y
 
opt_bool locked
 
opt_bool smashed
 
opt_erot rot
 

Detailed Description

Eagle element element.

Definition at line 929 of file eagle_plugin.cpp.

Constructor & Destructor Documentation

EELEMENT::EELEMENT ( CPTREE aElement)

Definition at line 944 of file eagle_plugin.cpp.

References parseOptionalBool(), parseOptionalEROT(), and ReplaceIllegalFileNameChars().

945 {
946  CPTREE& attribs = aElement.get_child( "<xmlattr>" );
947 
948  /*
949  <!ELEMENT element (attribute*, variant*)>
950  <!ATTLIST element
951  name %String; #REQUIRED
952  library %String; #REQUIRED
953  package %String; #REQUIRED
954  value %String; #REQUIRED
955  x %Coord; #REQUIRED
956  y %Coord; #REQUIRED
957  locked %Bool; "no"
958  smashed %Bool; "no"
959  rot %Rotation; "R0"
960  >
961  */
962 
963  // #REQUIRED
964  name = attribs.get<string>( "name" );
965  library = attribs.get<string>( "library" );
966  value = attribs.get<string>( "value" );
967 
968  package = attribs.get<string>( "package" );
970 
971  x = attribs.get<double>( "x" );
972  y = attribs.get<double>( "y" );
973 
974  // optional
975  locked = parseOptionalBool( attribs, "locked" );
976  smashed = parseOptionalBool( attribs, "smashed" );
977  rot = parseOptionalEROT( attribs );
978 }
string package
string name
const PTREE CPTREE
Definition: eagle_plugin.h:63
static opt_erot parseOptionalEROT(CPTREE &attribs)
Eagle "rot" fields are optional, handle that by returning opt_erot.
opt_erot rot
bool ReplaceIllegalFileNameChars(std::string *aName, int aReplaceChar)
Function ReplaceIllegalFileNameChars checks aName for illegal file name characters.
Definition: string.cpp:483
opt_bool smashed
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 value
string library
opt_bool locked

Member Data Documentation

string EELEMENT::library

Definition at line 932 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadElements().

opt_bool EELEMENT::locked

Definition at line 937 of file eagle_plugin.cpp.

string EELEMENT::name

Definition at line 931 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadElements().

string EELEMENT::package

Definition at line 933 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadElements().

opt_erot EELEMENT::rot

Definition at line 939 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::orientModuleAndText().

opt_bool EELEMENT::smashed

Definition at line 938 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadElements().

string EELEMENT::value

Definition at line 934 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadElements().

double EELEMENT::x

Definition at line 935 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadElements().

double EELEMENT::y

Definition at line 936 of file eagle_plugin.cpp.

Referenced by EAGLE_PLUGIN::loadElements().


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