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

< "ROUTE" nodename More...

#include <cadstar_pcb_archive_parser.h>

Inheritance diagram for CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

LAYER_ID LayerID = wxEmptyString
 
POINT StartPoint
 
std::vector< ROUTE_VERTEXRouteVertices
 

Detailed Description

< "ROUTE" nodename

Definition at line 997 of file cadstar_pcb_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 2069 of file cadstar_pcb_archive_parser.cpp.

2070{
2071 wxASSERT( aNode->GetName() == wxT( "ROUTE" ) );
2072
2073 LayerID = GetXmlAttributeIDString( aNode, 0 );
2074
2075 //Parse child nodes
2076 XNODE* cNode = aNode->GetChildren();
2077 bool startPointParsed = false;
2078
2079 for( ; cNode; cNode = cNode->GetNext() )
2080 {
2081 wxString cNodeName = cNode->GetName();
2082
2083 if( !startPointParsed && cNodeName == wxT( "PT" ) )
2084 {
2085 startPointParsed = true;
2086 StartPoint.Parse( cNode, aContext );
2087 }
2088 else if( cNodeName == wxT( "ROUTEWIDTH" ) )
2089 {
2090 ROUTE_VERTEX rtVert;
2091 cNode = rtVert.Parse( cNode, aContext );
2092 RouteVertices.push_back( rtVert );
2093
2094 assert( cNode != nullptr );
2095 }
2096 else
2097 {
2098 THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, wxT( "ROUTE" ) );
2099 }
2100 }
2101}
#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
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override

References XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString(), CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE_VERTEX::Parse(), and THROW_UNKNOWN_NODE_IO_ERROR.

Member Data Documentation

◆ LayerID

LAYER_ID CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE::LayerID = wxEmptyString

Definition at line 999 of file cadstar_pcb_archive_parser.h.

◆ RouteVertices

std::vector<ROUTE_VERTEX> CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE::RouteVertices

Definition at line 1001 of file cadstar_pcb_archive_parser.h.

◆ StartPoint

POINT CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE::StartPoint

Definition at line 1000 of file cadstar_pcb_archive_parser.h.


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