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 TeardropAtStart = false
 
bool TeardropAtEnd = false
 
long TeardropAtStartAngle = 0
 
long TeardropAtEndAngle = 0
 
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* prevNode = aNode;
2031 XNODE* nextNode = aNode->GetNext();
2032
2033 for( ; nextNode; nextNode = nextNode->GetNext() )
2034 {
2035 if( nextNode->GetName() == wxT( "FIX" ) )
2036 {
2037 Fixed = true;
2038 }
2039 else if( nextNode->GetName() == wxT( "TDROPATSTART" ) )
2040 {
2041 TeardropAtStart = true;
2043 }
2044 else if( nextNode->GetName() == wxT( "TDROPATEND" ) )
2045 {
2046 TeardropAtEnd = true;
2048 }
2049 else if( VERTEX::IsVertex( nextNode ) )
2050 {
2051 Vertex.Parse( nextNode, aContext );
2052 }
2053 else if( nextNode->GetName() == wxT( "ROUTEWIDTH" ) )
2054 {
2055 return prevNode;
2056 }
2057 else
2058 {
2059 THROW_UNKNOWN_NODE_IO_ERROR( nextNode->GetName(), wxT( "ROUTE" ) );
2060 }
2061
2062 prevNode = nextNode;
2063 }
2064
2065 return prevNode;
2066}
#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 * GetNext() const
Definition: xnode.h:67
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
VERTEX Vertex
Returns a pointer to the last node.

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 990 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.

◆ TeardropAtEnd

bool CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE_VERTEX::TeardropAtEnd = false

Definition at line 987 of file cadstar_pcb_archive_parser.h.

◆ TeardropAtEndAngle

long CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE_VERTEX::TeardropAtEndAngle = 0

Definition at line 989 of file cadstar_pcb_archive_parser.h.

◆ TeardropAtStart

bool CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE_VERTEX::TeardropAtStart = false

Definition at line 986 of file cadstar_pcb_archive_parser.h.

◆ TeardropAtStartAngle

long CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::ROUTE_VERTEX::TeardropAtStartAngle = 0

Definition at line 988 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 991 of file cadstar_pcb_archive_parser.h.


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