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:

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 1120 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 
)
override

Definition at line 2303 of file cadstar_pcb_archive_parser.cpp.

2305 {
2306  wxASSERT( aNode->GetName() == wxT( "TERM" ) );
2307 
2308  ID = GetXmlAttributeIDLong( aNode, 0 );
2309 
2310  XNODE* cNode = aNode->GetChildren();
2311  bool locationParsed = false;
2312 
2313  for( ; cNode; cNode = cNode->GetNext() )
2314  {
2315  wxString cNodeName = cNode->GetName();
2316 
2317  if( !locationParsed && cNodeName == wxT( "PT" ) )
2318  {
2319  Location.Parse( cNode, aContext );
2320  locationParsed = true;
2321  }
2322  else if( cNodeName == wxT( "FIX" ) )
2323  {
2324  Fixed = true;
2325  }
2326  else
2327  {
2328  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
2329  }
2330  }
2331 }
XNODE * GetChildren() const
Definition: xnode.h:62
static long GetXmlAttributeIDLong(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
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)

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


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