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:
CADSTAR_ARCHIVE_PARSER::PARSER

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 1122 of file cadstar_pcb_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 2358 of file cadstar_pcb_archive_parser.cpp.

2359{
2360 wxASSERT( aNode->GetName() == wxT( "NETREF" ) );
2361
2362 NetID = GetXmlAttributeIDString( aNode, 0 );
2363
2364 XNODE* cNode = aNode->GetChildren();
2365
2366 for( ; cNode; cNode = cNode->GetNext() )
2367 {
2368 wxString cNodeName = cNode->GetName();
2369
2370 if( cNodeName == wxT( "TERM" ) )
2371 {
2372 COPPER_TERM term;
2373 term.Parse( cNode, aContext );
2374 CopperTerminals.insert( std::make_pair( term.ID, term ) );
2375 }
2376 else if( cNodeName == wxT( "FIX" ) )
2377 {
2378 Fixed = true;
2379 }
2380 else
2381 {
2382 THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, wxT( "NETREF" ) );
2383 }
2384 }
2385}
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
Hold an XML or S-expression element.
Definition: xnode.h:44
XNODE * GetChildren() const
Definition: xnode.h:62
XNODE * GetNext() const
Definition: xnode.h:67
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 1134 of file cadstar_pcb_archive_parser.h.

◆ Fixed

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

Definition at line 1135 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: