KiCad PCB EDA Suite
EELEMENT Struct Reference

Eagle element element. More...

#include <eagle_parser.h>

Public Member Functions

 EELEMENT (wxXmlNode *aElement)
 

Public Attributes

wxString name
 
wxString library
 
wxString package
 
wxString value
 
ECOORD x
 
ECOORD y
 
opt_bool locked
 
opt_bool smashed
 
opt_erot rot
 

Detailed Description

Eagle element element.

Definition at line 810 of file eagle_parser.h.

Constructor & Destructor Documentation

◆ EELEMENT()

EELEMENT::EELEMENT ( wxXmlNode *  aElement)

Definition at line 846 of file eagle_parser.cpp.

847 {
848  /*
849  <!ELEMENT element (attribute*, variant*)>
850  <!ATTLIST element
851  name %String; #REQUIRED
852  library %String; #REQUIRED
853  package %String; #REQUIRED
854  value %String; #REQUIRED
855  x %Coord; #REQUIRED
856  y %Coord; #REQUIRED
857  locked %Bool; "no"
858  smashed %Bool; "no"
859  rot %Rotation; "R0"
860  >
861  */
862 
863  // #REQUIRED
864  name = parseRequiredAttribute<wxString>( aElement, wxT( "name" ) );
865  library = parseRequiredAttribute<wxString>( aElement, wxT( "library" ) );
866  value = parseRequiredAttribute<wxString>( aElement, wxT( "value" ) );
867  std::string p = parseRequiredAttribute<std::string>( aElement, wxT( "package" ) );
868  ReplaceIllegalFileNameChars( &p, '_' );
869  package = wxString::FromUTF8( p.c_str() );
870 
871  x = parseRequiredAttribute<ECOORD>( aElement, wxT( "x" ) );
872  y = parseRequiredAttribute<ECOORD>( aElement, wxT( "y" ) );
873 
874  // optional
875  locked = parseOptionalAttribute<bool>( aElement, wxT( "locked" ) );
876  smashed = parseOptionalAttribute<bool>( aElement, wxT( "smashed" ) );
877  rot = parseOptionalAttribute<EROT>( aElement, wxT( "rot" ) );
878 }
opt_erot rot
Definition: eagle_parser.h:820
opt_bool smashed
Definition: eagle_parser.h:819
ECOORD y
Definition: eagle_parser.h:817
wxString value
Definition: eagle_parser.h:815
bool ReplaceIllegalFileNameChars(std::string *aName, int aReplaceChar)
Checks aName for illegal file name characters.
wxString name
Definition: eagle_parser.h:812
ECOORD x
Definition: eagle_parser.h:816
wxString library
Definition: eagle_parser.h:813
opt_bool locked
Definition: eagle_parser.h:818

References library, locked, name, ReplaceIllegalFileNameChars(), rot, smashed, value, x, and y.

Member Data Documentation

◆ library

wxString EELEMENT::library

Definition at line 813 of file eagle_parser.h.

Referenced by EELEMENT(), EPART::EPART(), and EAGLE_PLUGIN::loadElements().

◆ locked

opt_bool EELEMENT::locked

Definition at line 818 of file eagle_parser.h.

Referenced by EELEMENT().

◆ name

◆ package

wxString EELEMENT::package

Definition at line 814 of file eagle_parser.h.

Referenced by EDEVICE::EDEVICE(), and EAGLE_PLUGIN::loadElements().

◆ rot

opt_erot EELEMENT::rot

◆ smashed

opt_bool EELEMENT::smashed

Definition at line 819 of file eagle_parser.h.

Referenced by EELEMENT(), EINSTANCE::EINSTANCE(), and EAGLE_PLUGIN::loadElements().

◆ value

wxString EELEMENT::value

Definition at line 815 of file eagle_parser.h.

Referenced by ECLASS::ECLASS(), EELEMENT(), EPART::EPART(), and EAGLE_PLUGIN::loadElements().

◆ x

◆ y

ECOORD EELEMENT::y

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