KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::ROUTECODE Struct Reference

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::ROUTECODE:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

ROUTECODE_ID ID
 
wxString Name
 
long OptimalWidth
 
long MinWidth
 
long MaxWidth
 
long NeckedWidth
 
std::vector< ROUTEREASSIGNRouteReassigns
 

Detailed Description

Definition at line 374 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_ARCHIVE_PARSER::ROUTECODE::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 341 of file cadstar_archive_parser.cpp.

342{
343 wxASSERT( aNode->GetName() == wxT( "ROUTECODE" ) );
344
345 ID = GetXmlAttributeIDString( aNode, 0 );
346 Name = GetXmlAttributeIDString( aNode, 1 );
347 OptimalWidth = GetXmlAttributeIDLong( aNode, 2, false );
348
349 XNODE* cNode = aNode->GetChildren();
350
351 for( ; cNode; cNode = cNode->GetNext() )
352 {
353 wxString cNodeName = cNode->GetName();
354
355 if( cNodeName == wxT( "NECKWIDTH" ) )
356 {
358 }
359 else if( cNodeName == wxT( "SROUTEWIDTH" ) )
360 {
362 }
363 else if( cNodeName == wxT( "MINWIDTH" ) )
364 {
365 MinWidth = GetXmlAttributeIDLong( cNode, 0 );
366 }
367 else if( cNodeName == wxT( "MAXWIDTH" ) )
368 {
369 MaxWidth = GetXmlAttributeIDLong( cNode, 0 );
370 }
371 else if( cNodeName == wxT( "ROUTEREASSIGN" ) )
372 {
373 ROUTEREASSIGN routereassign;
374 routereassign.Parse( cNode, aContext );
375 RouteReassigns.push_back( routereassign );
376 }
377 else
378 {
379 THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
380 }
381 }
382}
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
static long GetXmlAttributeIDLong(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
std::vector< ROUTEREASSIGN > RouteReassigns

References XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDLong(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString(), CADSTAR_ARCHIVE_PARSER::ROUTEREASSIGN::Parse(), and THROW_UNKNOWN_NODE_IO_ERROR.

Referenced by CADSTAR_ARCHIVE_PARSER::CODEDEFS::ParseSubNode().

Member Data Documentation

◆ ID

ROUTECODE_ID CADSTAR_ARCHIVE_PARSER::ROUTECODE::ID

◆ MaxWidth

long CADSTAR_ARCHIVE_PARSER::ROUTECODE::MaxWidth

Definition at line 380 of file cadstar_archive_parser.h.

◆ MinWidth

long CADSTAR_ARCHIVE_PARSER::ROUTECODE::MinWidth

Definition at line 379 of file cadstar_archive_parser.h.

◆ Name

wxString CADSTAR_ARCHIVE_PARSER::ROUTECODE::Name

Definition at line 377 of file cadstar_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::getKiCadNet().

◆ NeckedWidth

long CADSTAR_ARCHIVE_PARSER::ROUTECODE::NeckedWidth

Definition at line 381 of file cadstar_archive_parser.h.

◆ OptimalWidth

long CADSTAR_ARCHIVE_PARSER::ROUTECODE::OptimalWidth

Definition at line 378 of file cadstar_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::getKiCadNet().

◆ RouteReassigns

std::vector<ROUTEREASSIGN> CADSTAR_ARCHIVE_PARSER::ROUTECODE::RouteReassigns

Definition at line 383 of file cadstar_archive_parser.h.


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