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:
CADSTAR_ARCHIVE_PARSER::PARSER

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 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

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}
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
static long GetXmlAttributeIDLong(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
static PAD_SIDE GetPadSide(const wxString &aPadSideString)
Hold an XML or S-expression element.
Definition: xnode.h:44
XNODE * GetChildren() const
Definition: xnode.h:62
XNODE * GetNext() const
Definition: xnode.h:67
PADCODE_ID PadCode
If not empty, override padcode.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override

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: