KiCad PCB EDA Suite
CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD Struct Reference

#include <cadstar_pcb_archive_parser.h>

Inheritance diagram for CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

PAD_ID ID
 
POINT Position
 Pad position within the component's coordinate frame. More...
 
PADCODE_ID PadCodeID
 
PAD_SIDE Side
 See PAD_SIDE. More...
 
long OrientAngle = 0
 
PAD_EXITS Exits
 See PAD_EXITS. More...
 
wxString Identifier
 This is an identifier that is displayed to the user. More...
 
bool FirstPad = false
 From CADSTAR Help: "Only one pad can have this property; if an existing pad in the design already has this property it will be removed from the existing pad when this new pad is added. More...
 
bool PCBonlyPad = false
 From CADSTAR Help: "The PCB Only Pad property can be used to stop ECO Update, Back Annotation, and Design Comparison incorrectly acting on mechanical pads / components that only appear in the PCB design. More...
 

Detailed Description

Definition at line 525 of file cadstar_pcb_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 1164 of file cadstar_pcb_archive_parser.cpp.

1165{
1166 wxASSERT( aNode->GetName() == wxT( "PAD" ) );
1167
1168 ID = GetXmlAttributeIDLong( aNode, 0 );
1169 PadCodeID = GetXmlAttributeIDString( aNode, 2 );
1170 Side = GetPadSide( GetXmlAttributeIDString( aNode, 3 ) );
1171
1172 XNODE* cNode = aNode->GetChildren();
1173 wxString location = wxString::Format( wxT( "PAD %ld" ), ID );
1174
1175 if( !cNode )
1176 THROW_MISSING_NODE_IO_ERROR( wxT( "PT" ), location );
1177
1178 for( ; cNode; cNode = cNode->GetNext() )
1179 {
1180 wxString cNodeName = cNode->GetName();
1181
1182 if( cNodeName == wxT( "ORIENT" ) )
1183 OrientAngle = GetXmlAttributeIDLong( cNode, 0 );
1184 else if( cNodeName == wxT( "FIRSTPAD" ) )
1185 FirstPad = true;
1186 else if( cNodeName == wxT( "EXITS" ) )
1187 Exits.Parse( cNode, aContext );
1188 else if( cNodeName == wxT( "PADIDENTIFIER" ) )
1189 Identifier = GetXmlAttributeIDString( cNode, 0 );
1190 else if( cNodeName == wxT( "PCBONLYPAD" ) )
1191 PCBonlyPad = true;
1192 else if( cNodeName == wxT( "PT" ) )
1193 Position.Parse( cNode, aContext );
1194 else
1195 THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, location );
1196 }
1197}
#define THROW_MISSING_NODE_IO_ERROR(nodename, location)
#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
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
bool PCBonlyPad
From CADSTAR Help: "The PCB Only Pad property can be used to stop ECO Update, Back Annotation,...
POINT Position
Pad position within the component's coordinate frame.
wxString Identifier
This is an identifier that is displayed to the user.
bool FirstPad
From CADSTAR Help: "Only one pad can have this property; if an existing pad in the design already has...
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override

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

Member Data Documentation

◆ Exits

PAD_EXITS CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::Exits

◆ FirstPad

bool CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::FirstPad = false

From CADSTAR Help: "Only one pad can have this property; if an existing pad in the design already has this property it will be removed from the existing pad when this new pad is added.

The property is used by the 'First Pad' highlight when in a PCB design."

Definition at line 542 of file cadstar_pcb_archive_parser.h.

◆ ID

PAD_ID CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::ID

◆ Identifier

wxString CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::Identifier

This is an identifier that is displayed to the user.

Internally, the pad is identified by sequential Pad ID (see ID). From CADSTAR Help: "This is how the pin is identified, and is used when creating a part and for reload and replace. It replaces the CADSTAR 13.0 pad sequence number but is much less restrictive i.e. It need not be 1, 2, 3 etc. and can contain alpha and / or numeric characters."

Definition at line 534 of file cadstar_pcb_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad(), and CADSTAR_PCB_ARCHIVE_LOADER::loadLibraryCoppers().

◆ OrientAngle

long CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::OrientAngle = 0

◆ PadCodeID

◆ PCBonlyPad

bool CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::PCBonlyPad = false

From CADSTAR Help: "The PCB Only Pad property can be used to stop ECO Update, Back Annotation, and Design Comparison incorrectly acting on mechanical pads / components that only appear in the PCB design.

"

Definition at line 547 of file cadstar_pcb_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad(), and CADSTAR_PCB_ARCHIVE_LOADER::loadLibraryCoppers().

◆ Position

POINT CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::Position

Pad position within the component's coordinate frame.

Definition at line 528 of file cadstar_pcb_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::getKiCadPad(), and CADSTAR_PCB_ARCHIVE_LOADER::loadLibraryCoppers().

◆ Side

PAD_SIDE CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT_PAD::Side

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