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

Constructor & Destructor Documentation

EELEMENT::EELEMENT ( wxXmlNode *  aElement)

Definition at line 811 of file eagle_parser.cpp.

References EPAD_COMMON::name, ReplaceIllegalFileNameChars(), EPAD_COMMON::rot, EPAD_COMMON::x, and EPAD_COMMON::y.

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

Member Data Documentation

wxString EELEMENT::library

Definition at line 799 of file eagle_parser.h.

Referenced by EAGLE_PLUGIN::loadElements().

opt_bool EELEMENT::locked

Definition at line 804 of file eagle_parser.h.

wxString EELEMENT::name

Definition at line 798 of file eagle_parser.h.

Referenced by EAGLE_PLUGIN::loadElements().

wxString EELEMENT::package

Definition at line 800 of file eagle_parser.h.

Referenced by EAGLE_PLUGIN::loadElements().

opt_erot EELEMENT::rot

Definition at line 806 of file eagle_parser.h.

Referenced by EAGLE_PLUGIN::orientModuleAndText().

opt_bool EELEMENT::smashed

Definition at line 805 of file eagle_parser.h.

Referenced by EAGLE_PLUGIN::loadElements().

wxString EELEMENT::value

Definition at line 801 of file eagle_parser.h.

Referenced by EAGLE_PLUGIN::loadElements().

ECOORD EELEMENT::x

Definition at line 802 of file eagle_parser.h.

Referenced by EAGLE_PLUGIN::loadElements().

ECOORD EELEMENT::y

Definition at line 803 of file eagle_parser.h.

Referenced by EAGLE_PLUGIN::loadElements().


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