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

#include <cadstar_pcb_archive_parser.h>

Inheritance diagram for CADSTAR_PCB_ARCHIVE_PARSER::COPPER::NETREF::COPPER_TERM:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

COPPER_TERM_ID ID
 
POINT Location
 
bool Fixed = false
 

Detailed Description

Definition at line 1124 of file cadstar_pcb_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 2327 of file cadstar_pcb_archive_parser.cpp.

2329{
2330 wxASSERT( aNode->GetName() == wxT( "TERM" ) );
2331
2332 ID = GetXmlAttributeIDLong( aNode, 0 );
2333
2334 XNODE* cNode = aNode->GetChildren();
2335 bool locationParsed = false;
2336
2337 for( ; cNode; cNode = cNode->GetNext() )
2338 {
2339 wxString cNodeName = cNode->GetName();
2340
2341 if( !locationParsed && cNodeName == wxT( "PT" ) )
2342 {
2343 Location.Parse( cNode, aContext );
2344 locationParsed = true;
2345 }
2346 else if( cNodeName == wxT( "FIX" ) )
2347 {
2348 Fixed = true;
2349 }
2350 else
2351 {
2352 THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
2353 }
2354 }
2355}
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static long GetXmlAttributeIDLong(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
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override

References XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDLong(), and THROW_UNKNOWN_NODE_IO_ERROR.

Referenced by CADSTAR_PCB_ARCHIVE_PARSER::COPPER::NETREF::Parse().

Member Data Documentation

◆ Fixed

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

Definition at line 1128 of file cadstar_pcb_archive_parser.h.

◆ ID

COPPER_TERM_ID CADSTAR_PCB_ARCHIVE_PARSER::COPPER::NETREF::COPPER_TERM::ID

◆ Location

POINT CADSTAR_PCB_ARCHIVE_PARSER::COPPER::NETREF::COPPER_TERM::Location

Definition at line 1127 of file cadstar_pcb_archive_parser.h.


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