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 843 of file eagle_parser.cpp.

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

◆ x

◆ y

ECOORD EELEMENT::y

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