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:

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

Definition at line 2047 of file cadstar_pcb_archive_parser.cpp.

2048 {
2049  wxASSERT( aNode->GetName() == wxT( "ROUTE" ) );
2050 
2051  LayerID = GetXmlAttributeIDString( aNode, 0 );
2052 
2053  //Parse child nodes
2054  XNODE* cNode = aNode->GetChildren();
2055  bool startPointParsed = false;
2056 
2057  for( ; cNode; cNode = cNode->GetNext() )
2058  {
2059  wxString cNodeName = cNode->GetName();
2060 
2061  if( !startPointParsed && cNodeName == wxT( "PT" ) )
2062  {
2063  startPointParsed = true;
2064  StartPoint.Parse( cNode, aContext );
2065  }
2066  else if( cNodeName == wxT( "ROUTEWIDTH" ) )
2067  {
2068  ROUTE_VERTEX rtVert;
2069  cNode = rtVert.Parse( cNode, aContext );
2070  RouteVertices.push_back( rtVert );
2071  }
2072  else
2073  {
2074  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, wxT( "ROUTE" ) );
2075  }
2076  }
2077 }
XNODE * GetChildren() const
Definition: xnode.h:62
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)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)

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

◆ RouteVertices

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

Definition at line 997 of file cadstar_pcb_archive_parser.h.

◆ StartPoint

POINT CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE::StartPoint

Definition at line 996 of file cadstar_pcb_archive_parser.h.


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