KiCad PCB EDA Suite
CADSTAR_PCB_ARCHIVE_PARSER::COPPER::NETREF Struct Reference

#include <cadstar_pcb_archive_parser.h>

Inheritance diagram for CADSTAR_PCB_ARCHIVE_PARSER::COPPER::NETREF:

Classes

struct  COPPER_TERM
 

Public Member Functions

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

Public Attributes

NET_ID NetID = wxEmptyString
 
std::map< COPPER_TERM_ID, COPPER_TERMCopperTerminals
 
bool Fixed = false
 

Detailed Description

Definition at line 1118 of file cadstar_pcb_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Definition at line 2334 of file cadstar_pcb_archive_parser.cpp.

2335 {
2336  wxASSERT( aNode->GetName() == wxT( "NETREF" ) );
2337 
2338  NetID = GetXmlAttributeIDString( aNode, 0 );
2339 
2340  XNODE* cNode = aNode->GetChildren();
2341 
2342  for( ; cNode; cNode = cNode->GetNext() )
2343  {
2344  wxString cNodeName = cNode->GetName();
2345 
2346  if( cNodeName == wxT( "TERM" ) )
2347  {
2348  COPPER_TERM term;
2349  term.Parse( cNode, aContext );
2350  CopperTerminals.insert( std::make_pair( term.ID, term ) );
2351  }
2352  else if( cNodeName == wxT( "FIX" ) )
2353  {
2354  Fixed = true;
2355  }
2356  else
2357  {
2358  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, wxT( "NETREF" ) );
2359  }
2360  }
2361 }
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)
std::map< COPPER_TERM_ID, COPPER_TERM > CopperTerminals

References XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString(), CADSTAR_PCB_ARCHIVE_PARSER::COPPER::NETREF::COPPER_TERM::ID, CADSTAR_PCB_ARCHIVE_PARSER::COPPER::NETREF::COPPER_TERM::Parse(), and THROW_UNKNOWN_NODE_IO_ERROR.

Member Data Documentation

◆ CopperTerminals

std::map<COPPER_TERM_ID, COPPER_TERM> CADSTAR_PCB_ARCHIVE_PARSER::COPPER::NETREF::CopperTerminals

Definition at line 1130 of file cadstar_pcb_archive_parser.h.

◆ Fixed

bool CADSTAR_PCB_ARCHIVE_PARSER::COPPER::NETREF::Fixed = false

Definition at line 1131 of file cadstar_pcb_archive_parser.h.

◆ NetID

NET_ID CADSTAR_PCB_ARCHIVE_PARSER::COPPER::NETREF::NetID = wxEmptyString

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