KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN_EQUIVALENCE Struct Reference

< "PINEQUIVALENCE" Node name More...

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN_EQUIVALENCE:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

std::vector< PART_DEFINITION_PIN_IDPinIDs
 All the pins in this vector are equivalent and can be swapped with each other. More...
 

Detailed Description

< "PINEQUIVALENCE" Node name

Definition at line 1016 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 1757 of file cadstar_archive_parser.cpp.

1758 {
1759  wxASSERT( aNode->GetName() == wxT( "PINEQUIVALENCE" ) );
1760 
1761  wxXmlAttribute* xmlAttribute = aNode->GetAttributes();
1762 
1763  for( ; xmlAttribute; xmlAttribute = xmlAttribute->GetNext() )
1764  {
1765  if( !IsValidAttribute( xmlAttribute ) )
1766  continue;
1767 
1768  long pinId;
1769 
1770  if( !xmlAttribute->GetValue().ToLong( &pinId ) )
1771  THROW_UNKNOWN_PARAMETER_IO_ERROR( xmlAttribute->GetValue(), aNode->GetName() );
1772 
1773  PinIDs.push_back( (PART_DEFINITION_PIN_ID) pinId );
1774  }
1775 
1776  CheckNoChildNodes( aNode );
1777 }
long PART_DEFINITION_PIN_ID
Pin identifier in the part definition.
static bool IsValidAttribute(wxXmlAttribute *aAttribute)
static void CheckNoChildNodes(XNODE *aNode)
std::vector< PART_DEFINITION_PIN_ID > PinIDs
All the pins in this vector are equivalent and can be swapped with each other.
#define THROW_UNKNOWN_PARAMETER_IO_ERROR(param, location)

References CADSTAR_ARCHIVE_PARSER::CheckNoChildNodes(), CADSTAR_ARCHIVE_PARSER::IsValidAttribute(), and THROW_UNKNOWN_PARAMETER_IO_ERROR.

Referenced by CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::Parse().

Member Data Documentation

◆ PinIDs

std::vector<PART_DEFINITION_PIN_ID> CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::PIN_EQUIVALENCE::PinIDs

All the pins in this vector are equivalent and can be swapped with each other.

Definition at line 1018 of file cadstar_archive_parser.h.


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