KiCad PCB EDA Suite
CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::PIN_NUM Struct Reference

#include <cadstar_sch_archive_parser.h>

Inheritance diagram for CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::PIN_NUM:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

TERMINAL_ID TerminalID
 
long PinNum
 
bool HasLocation = false
 
ATTRIBUTE_LOCATION AttrLoc
 

Detailed Description

Definition at line 248 of file cadstar_sch_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::PIN_NUM::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 594 of file cadstar_sch_archive_parser.cpp.

595{
596 wxCHECK( aNode->GetName() == wxT( "PINNUM" ), );
597
598 TerminalID = GetXmlAttributeIDLong( aNode, 0 );
599 PinNum = GetXmlAttributeIDLong( aNode, 1 );
600
601 XNODE* cNode = aNode->GetChildren();
602
603 for( ; cNode; cNode = cNode->GetNext() )
604 {
605 if( cNode->GetName() == wxT( "ATTRLOC" ) )
606 {
607 AttrLoc.Parse( cNode, aContext );
608 HasLocation = true;
609 }
610 else
611 {
612 THROW_UNKNOWN_NODE_IO_ERROR( cNode->GetName(), aNode->GetName() );
613 }
614 }
615}
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static long GetXmlAttributeIDLong(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
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
virtual void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override

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

Referenced by CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::Parse().

Member Data Documentation

◆ AttrLoc

ATTRIBUTE_LOCATION CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::PIN_NUM::AttrLoc

Definition at line 253 of file cadstar_sch_archive_parser.h.

◆ HasLocation

bool CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::PIN_NUM::HasLocation = false

Definition at line 252 of file cadstar_sch_archive_parser.h.

◆ PinNum

long CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::PIN_NUM::PinNum

Definition at line 251 of file cadstar_sch_archive_parser.h.

◆ TerminalID

TERMINAL_ID CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::PIN_NUM::TerminalID

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