KiCad PCB EDA Suite
CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION Struct Reference

#include <cadstar_pcb_archive_parser.h>

Inheritance diagram for CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION:

Public Member Functions

void Parse (XNODE *aNode, PARSER_CONTEXT *aContext) override
 

Public Attributes

PAD_ID ID
 
PADCODE_ID PadCode = wxEmptyString
 If not empty, override padcode. More...
 
bool OverrideExits = false
 
PAD_EXITS Exits
 
bool OverrideSide = false
 
PAD_SIDE Side
 
bool OverrideOrientation = false
 
long OrientAngle = 0
 

Detailed Description

Definition at line 880 of file cadstar_pcb_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
override

Definition at line 1789 of file cadstar_pcb_archive_parser.cpp.

1790 {
1791  wxASSERT( aNode->GetName() == wxT( "PADEXCEPTION" ) );
1792 
1793  ID = GetXmlAttributeIDLong( aNode, 0 );
1794 
1795  XNODE* cNode = aNode->GetChildren();
1796 
1797  for( ; cNode; cNode = cNode->GetNext() )
1798  {
1799  wxString cNodeName = cNode->GetName();
1800 
1801  if( cNodeName == wxT( "PADCODEREF" ) )
1802  {
1803  PadCode = GetXmlAttributeIDString( cNode, 0 );
1804  }
1805  else if( cNodeName == wxT( "EXITS" ) )
1806  {
1807  OverrideExits = true;
1808  Exits.Parse( cNode, aContext );
1809  }
1810  else if( cNodeName == wxT( "SIDE" ) )
1811  {
1812  OverrideSide = true;
1813  Side = GetPadSide( GetXmlAttributeIDString( cNode, 0 ) );
1814  }
1815  else if( cNodeName == wxT( "ORIENT" ) )
1816  {
1817  OverrideOrientation = true;
1818  OrientAngle = GetXmlAttributeIDLong( cNode, 0 );
1819  }
1820  else
1821  {
1822  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
1823  }
1824  }
1825 }
PADCODE_ID PadCode
If not empty, override padcode.
static PAD_SIDE GetPadSide(const wxString &aPadSideString)
XNODE * GetChildren() const
Definition: xnode.h:62
static long GetXmlAttributeIDLong(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
Hold an XML or S-expression element.
Definition: xnode.h:43
XNODE * GetNext() const
Definition: xnode.h:67
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)

References XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_PCB_ARCHIVE_PARSER::GetPadSide(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDLong(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString(), and THROW_UNKNOWN_NODE_IO_ERROR.

Referenced by CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT::Parse().

Member Data Documentation

◆ Exits

PAD_EXITS CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::Exits

◆ ID

PAD_ID CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::ID

◆ OrientAngle

long CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::OrientAngle = 0

◆ OverrideExits

bool CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::OverrideExits = false

◆ OverrideOrientation

bool CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::OverrideOrientation = false

◆ OverrideSide

bool CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::OverrideSide = false

◆ PadCode

PADCODE_ID CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::PadCode = wxEmptyString

If not empty, override padcode.

Definition at line 883 of file cadstar_pcb_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::loadComponents().

◆ Side

PAD_SIDE CADSTAR_PCB_ARCHIVE_PARSER::PADEXCEPTION::Side

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