KiCad PCB EDA Suite
CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE_VERTEX Struct Reference

< Two sibbling nodes: first node being "ROUTEWIDTH" and next node being a VERTEX (e.g. More...

#include <cadstar_pcb_archive_parser.h>

Public Member Functions

XNODEParse (XNODE *aNode, PARSER_CONTEXT *aContext)
 

Public Attributes

long RouteWidth
 
bool Fixed = false
 
VERTEX Vertex
 Returns a pointer to the last node. More...
 

Detailed Description

< Two sibbling nodes: first node being "ROUTEWIDTH" and next node being a VERTEX (e.g.

PT, CWARC, etc.)

Definition at line 982 of file cadstar_pcb_archive_parser.h.

Member Function Documentation

◆ Parse()

XNODE * CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE_VERTEX::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)

Definition at line 2024 of file cadstar_pcb_archive_parser.cpp.

2026 {
2027  wxASSERT( aNode->GetName() == wxT( "ROUTEWIDTH" ) );
2028 
2029  RouteWidth = GetXmlAttributeIDLong( aNode, 0 );
2030  XNODE* nextNode = aNode->GetNext();
2031 
2032  if( nextNode->GetName() == wxT( "FIX" ) )
2033  {
2034  Fixed = true;
2035  nextNode = nextNode->GetNext();
2036  }
2037 
2038  if( !VERTEX::IsVertex( nextNode ) )
2039  THROW_UNKNOWN_NODE_IO_ERROR( nextNode->GetName(), wxT( "ROUTE_VERTEX" ) );
2040 
2041  Vertex.Parse( nextNode, aContext );
2042 
2043  return nextNode;
2044 }
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
VERTEX Vertex
Returns a pointer to the last node.
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)

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

Referenced by CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE::Parse().

Member Data Documentation

◆ Fixed

bool CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE_VERTEX::Fixed = false

Definition at line 986 of file cadstar_pcb_archive_parser.h.

◆ RouteWidth

long CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE_VERTEX::RouteWidth

Definition at line 985 of file cadstar_pcb_archive_parser.h.

◆ Vertex

VERTEX CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE_VERTEX::Vertex

Returns a pointer to the last node.

Definition at line 987 of file cadstar_pcb_archive_parser.h.


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