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

#include <cadstar_archive_parser.h>

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

Public Member Functions

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

Public Attributes

wxString GateName
 Optional. More...
 
bool External = false
 Determines if this swap group is external (and internal) or internal only. More...
 
std::vector< SWAP_GATESwapGates
 Each of the elements in this vector can be swapped with each other - i.e. More...
 

Detailed Description

Definition at line 1035 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 1803 of file cadstar_archive_parser.cpp.

1804 {
1805  wxASSERT( aNode->GetName() == wxT( "SWAPGROUP" ) );
1806 
1807  GateName = GetXmlAttributeIDString( aNode, 0 );
1808 
1809  XNODE* cNode = aNode->GetChildren();
1810 
1811  for( ; cNode; cNode = cNode->GetNext() )
1812  {
1813  wxString cNodeName = cNode->GetName();
1814 
1815  if( cNodeName == wxT( "EXTERNAL" ) )
1816  {
1817  External = true;
1818  }
1819  else if( cNodeName == wxT( "SWAPGATE" ) )
1820  {
1821  SWAP_GATE swapGate;
1822  swapGate.Parse( cNode, aContext );
1823  SwapGates.push_back( swapGate );
1824  }
1825  else
1826  {
1827  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
1828  }
1829  }
1830 }
bool External
Determines if this swap group is external (and internal) or internal only.
std::vector< SWAP_GATE > SwapGates
Each of the elements in this vector can be swapped with each other - i.e.
XNODE * GetChildren() const
Definition: xnode.h:62
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::GetXmlAttributeIDString(), CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::SWAP_GATE::Parse(), and THROW_UNKNOWN_NODE_IO_ERROR.

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

Member Data Documentation

◆ External

bool CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::SWAP_GROUP::External = false

Determines if this swap group is external (and internal) or internal only.

External Gate swapping allows Gates on different components with the same Part Definition to swap with one another.

The external swapping groups must be at the root level (i.e. they cannot be contained by other swapping groups)

Definition at line 1042 of file cadstar_archive_parser.h.

◆ GateName

wxString CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::SWAP_GROUP::GateName
Initial value:
=
wxEmptyString

Optional.

If not empty, should match the Name attribute of one of the gates defined in the part definition

Definition at line 1037 of file cadstar_archive_parser.h.

◆ SwapGates

std::vector<SWAP_GATE> CADSTAR_ARCHIVE_PARSER::PART::DEFINITION::SWAP_GROUP::SwapGates

Each of the elements in this vector can be swapped with each other - i.e.

all of the pins in each swap gate can be swapped with all in another swap gate defined in this vector

Definition at line 1050 of file cadstar_archive_parser.h.


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