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 798 of file eagle_parser.h.

Constructor & Destructor Documentation

◆ EELEMENT()

EELEMENT::EELEMENT ( wxXmlNode *  aElement)

Definition at line 818 of file eagle_parser.cpp.

819 {
820  /*
821  <!ELEMENT element (attribute*, variant*)>
822  <!ATTLIST element
823  name %String; #REQUIRED
824  library %String; #REQUIRED
825  package %String; #REQUIRED
826  value %String; #REQUIRED
827  x %Coord; #REQUIRED
828  y %Coord; #REQUIRED
829  locked %Bool; "no"
830  smashed %Bool; "no"
831  rot %Rotation; "R0"
832  >
833  */
834 
835  // #REQUIRED
836  name = parseRequiredAttribute<wxString>( aElement, "name" );
837  library = parseRequiredAttribute<wxString>( aElement, "library" );
838  value = parseRequiredAttribute<wxString>( aElement, "value" );
839  std::string p = parseRequiredAttribute<std::string>( aElement, "package" );
840  ReplaceIllegalFileNameChars( &p, '_' );
841  package = wxString::FromUTF8( p.c_str() );
842 
843  x = parseRequiredAttribute<ECOORD>( aElement, "x" );
844  y = parseRequiredAttribute<ECOORD>( aElement, "y" );
845 
846  // optional
847  locked = parseOptionalAttribute<bool>( aElement, "locked" );
848  smashed = parseOptionalAttribute<bool>( aElement, "smashed" );
849  rot = parseOptionalAttribute<EROT>( aElement, "rot" );
850 }
opt_erot rot
Definition: eagle_parser.h:808
bool ReplaceIllegalFileNameChars(std::string *aName, int aReplaceChar)
Checks aName for illegal file name characters.
Definition: string.cpp:680
opt_bool smashed
Definition: eagle_parser.h:807
ECOORD y
Definition: eagle_parser.h:805
wxString value
Definition: eagle_parser.h:803
wxString name
Definition: eagle_parser.h:800
ECOORD x
Definition: eagle_parser.h:804
wxString library
Definition: eagle_parser.h:801
opt_bool locked
Definition: eagle_parser.h:806

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

Member Data Documentation

◆ library

wxString EELEMENT::library

Definition at line 801 of file eagle_parser.h.

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

◆ locked

opt_bool EELEMENT::locked

Definition at line 806 of file eagle_parser.h.

Referenced by EELEMENT().

◆ name

◆ package

wxString EELEMENT::package

Definition at line 802 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 807 of file eagle_parser.h.

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

◆ value

wxString EELEMENT::value

Definition at line 803 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: