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

Constructor & Destructor Documentation

EELEMENT::EELEMENT ( wxXmlNode *  aElement)

Definition at line 809 of file eagle_parser.cpp.

References name, and ReplaceIllegalFileNameChars().

810 {
811  /*
812  <!ELEMENT element (attribute*, variant*)>
813  <!ATTLIST element
814  name %String; #REQUIRED
815  library %String; #REQUIRED
816  package %String; #REQUIRED
817  value %String; #REQUIRED
818  x %Coord; #REQUIRED
819  y %Coord; #REQUIRED
820  locked %Bool; "no"
821  smashed %Bool; "no"
822  rot %Rotation; "R0"
823  >
824  */
825 
826  // #REQUIRED
827  name = parseRequiredAttribute<wxString>( aElement, "name" );
828  library = parseRequiredAttribute<wxString>( aElement, "library" );
829  value = parseRequiredAttribute<wxString>( aElement, "value" );
830  std::string p = parseRequiredAttribute<std::string>( aElement, "package" );
831  ReplaceIllegalFileNameChars( &p, '_' );
832  package = wxString::FromUTF8( p.c_str() );
833 
834  x = parseRequiredAttribute<ECOORD>( aElement, "x" );
835  y = parseRequiredAttribute<ECOORD>( aElement, "y" );
836 
837  // optional
838  locked = parseOptionalAttribute<bool>( aElement, "locked" );
839  smashed = parseOptionalAttribute<bool>( aElement, "smashed" );
840  rot = parseOptionalAttribute<EROT>( aElement, "rot" );
841 }
opt_erot rot
Definition: eagle_parser.h:802
bool ReplaceIllegalFileNameChars(std::string *aName, int aReplaceChar)
Function ReplaceIllegalFileNameChars checks aName for illegal file name characters.
Definition: string.cpp:483
opt_bool smashed
Definition: eagle_parser.h:801
ECOORD y
Definition: eagle_parser.h:799
wxString value
Definition: eagle_parser.h:797
wxString name
Definition: eagle_parser.h:794
ECOORD x
Definition: eagle_parser.h:798
wxString library
Definition: eagle_parser.h:795
opt_bool locked
Definition: eagle_parser.h:800

Member Data Documentation

wxString EELEMENT::library

Definition at line 795 of file eagle_parser.h.

Referenced by EAGLE_PLUGIN::loadElements().

opt_bool EELEMENT::locked

Definition at line 800 of file eagle_parser.h.

wxString EELEMENT::name

Definition at line 794 of file eagle_parser.h.

Referenced by EAGLE_PLUGIN::loadElements().

wxString EELEMENT::package

Definition at line 796 of file eagle_parser.h.

Referenced by EAGLE_PLUGIN::loadElements().

opt_erot EELEMENT::rot

Definition at line 802 of file eagle_parser.h.

Referenced by EAGLE_PLUGIN::orientModuleAndText().

opt_bool EELEMENT::smashed

Definition at line 801 of file eagle_parser.h.

Referenced by EAGLE_PLUGIN::loadElements().

wxString EELEMENT::value

Definition at line 797 of file eagle_parser.h.

Referenced by EAGLE_PLUGIN::loadElements().

ECOORD EELEMENT::x

Definition at line 798 of file eagle_parser.h.

Referenced by EAGLE_PLUGIN::loadElements().

ECOORD EELEMENT::y

Definition at line 799 of file eagle_parser.h.

Referenced by EAGLE_PLUGIN::loadElements().


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