KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::PART::PART_PIN Struct Reference

< "PARTPIN" node name More...

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::PART::PART_PIN:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

PART_PIN_ID ID
 
wxString Name = wxEmptyString
 
PIN_TYPE Type = PIN_TYPE::UNCOMMITTED
 
wxString Identifier = wxEmptyString
 

Detailed Description

< "PARTPIN" node name

Definition at line 1087 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_ARCHIVE_PARSER::PART::PART_PIN::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 1733 of file cadstar_archive_parser.cpp.

1734 {
1735  wxASSERT( aNode->GetName() == wxT( "PARTPIN" ) );
1736 
1737  ID = GetXmlAttributeIDLong( aNode, 0 );
1738 
1739  XNODE* cNode = aNode->GetChildren();
1740 
1741  for( ; cNode; cNode = cNode->GetNext() )
1742  {
1743  wxString cNodeName = cNode->GetName();
1744 
1745  if( cNodeName == wxT( "PINNAME" ) )
1746  Name = GetXmlAttributeIDString( cNode, 0 );
1747  else if( cNodeName == wxT( "PINTYPE" ) )
1748  Type = GetPinType( cNode );
1749  else if( cNodeName == wxT( "PINIDENTIFIER" ) )
1750  Identifier = GetXmlAttributeIDString( cNode, 0 );
1751  else
1752  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
1753  }
1754 }
static PIN_TYPE GetPinType(XNODE *aNode)
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)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)

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

Member Data Documentation

◆ ID

PART_PIN_ID CADSTAR_ARCHIVE_PARSER::PART::PART_PIN::ID

Definition at line 1089 of file cadstar_archive_parser.h.

◆ Identifier

wxString CADSTAR_ARCHIVE_PARSER::PART::PART_PIN::Identifier = wxEmptyString

Definition at line 1092 of file cadstar_archive_parser.h.

◆ Name

wxString CADSTAR_ARCHIVE_PARSER::PART::PART_PIN::Name = wxEmptyString

Definition at line 1090 of file cadstar_archive_parser.h.

◆ Type

PIN_TYPE CADSTAR_ARCHIVE_PARSER::PART::PART_PIN::Type = PIN_TYPE::UNCOMMITTED

Definition at line 1091 of file cadstar_archive_parser.h.


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