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

< "SWAPGATE" Node name (represents an "Element") More...

#include <cadstar_archive_parser.h>

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

Public Member Functions

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

Public Attributes

std::vector< PART_DEFINITION_PIN_IDPinIDs
 The pins in this vector describe a "gate". More...
 

Detailed Description

< "SWAPGATE" Node name (represents an "Element")

Definition at line 1026 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 1780 of file cadstar_archive_parser.cpp.

1781 {
1782  wxASSERT( aNode->GetName() == wxT( "SWAPGATE" ) );
1783 
1784  wxXmlAttribute* xmlAttribute = aNode->GetAttributes();
1785 
1786  for( ; xmlAttribute; xmlAttribute = xmlAttribute->GetNext() )
1787  {
1788  if( !IsValidAttribute( xmlAttribute ) )
1789  continue;
1790 
1791  long pinId;
1792 
1793  if( !xmlAttribute->GetValue().ToLong( &pinId ) )
1794  THROW_UNKNOWN_PARAMETER_IO_ERROR( xmlAttribute->GetValue(), aNode->GetName() );
1795 
1796  PinIDs.push_back( (PART_DEFINITION_PIN_ID) pinId );
1797  }
1798 
1799  CheckNoChildNodes( aNode );
1800 }
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
The pins in this vector describe a "gate".
#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::SWAP_GROUP::Parse().

Member Data Documentation

◆ PinIDs

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

The pins in this vector describe a "gate".

Definition at line 1028 of file cadstar_archive_parser.h.


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