KiCad PCB EDA Suite
CADSTAR_PCB_ARCHIVE_PARSER::PIN_ATTRIBUTE Struct Reference

#include <cadstar_pcb_archive_parser.h>

Inheritance diagram for CADSTAR_PCB_ARCHIVE_PARSER::PIN_ATTRIBUTE:

Public Member Functions

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

Public Attributes

PART_DEFINITION_PIN_ID Pin
 
std::map< ATTRIBUTE_ID, ATTRIBUTE_VALUEAttributeValues
 
TESTLAND_SIDE TestlandSide = TESTLAND_SIDE::NONE
 

Detailed Description

Definition at line 870 of file cadstar_pcb_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_PCB_ARCHIVE_PARSER::PIN_ATTRIBUTE::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
override

Definition at line 1759 of file cadstar_pcb_archive_parser.cpp.

1760 {
1761  wxASSERT( aNode->GetName() == wxT( "PINATTR" ) );
1762 
1763  Pin = GetXmlAttributeIDLong( aNode, 0 );
1764 
1765  XNODE* cNode = aNode->GetChildren();
1766 
1767  for( ; cNode; cNode = cNode->GetNext() )
1768  {
1769  wxString cNodeName = cNode->GetName();
1770 
1771  if( cNodeName == wxT( "ATTR" ) )
1772  {
1773  ATTRIBUTE_VALUE attrVal;
1774  attrVal.Parse( cNode, aContext );
1775  AttributeValues.insert( std::make_pair( attrVal.AttributeID, attrVal ) );
1776  }
1777  else if( cNodeName == wxT( "TESTLAND" ) )
1778  {
1779  TestlandSide = ParseTestlandSide( cNode );
1780  }
1781  else
1782  {
1783  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
1784  }
1785  }
1786 }
std::map< ATTRIBUTE_ID, ATTRIBUTE_VALUE > AttributeValues
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
static TESTLAND_SIDE ParseTestlandSide(XNODE *aNode)
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)

References CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_VALUE::AttributeID, XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDLong(), CADSTAR_ARCHIVE_PARSER::ATTRIBUTE_VALUE::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::ParseTestlandSide(), and THROW_UNKNOWN_NODE_IO_ERROR.

Referenced by CADSTAR_PCB_ARCHIVE_PARSER::COMPONENT::Parse().

Member Data Documentation

◆ AttributeValues

std::map<ATTRIBUTE_ID, ATTRIBUTE_VALUE> CADSTAR_PCB_ARCHIVE_PARSER::PIN_ATTRIBUTE::AttributeValues

Definition at line 873 of file cadstar_pcb_archive_parser.h.

◆ Pin

PART_DEFINITION_PIN_ID CADSTAR_PCB_ARCHIVE_PARSER::PIN_ATTRIBUTE::Pin

◆ TestlandSide

TESTLAND_SIDE CADSTAR_PCB_ARCHIVE_PARSER::PIN_ATTRIBUTE::TestlandSide = TESTLAND_SIDE::NONE

Definition at line 874 of file cadstar_pcb_archive_parser.h.


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