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 355 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 334 of file cadstar_archive_parser.cpp.

335 {
336  wxASSERT( aNode->GetName() == wxT( "ROUTECODE" ) );
337 
338  ID = GetXmlAttributeIDString( aNode, 0 );
339  Name = GetXmlAttributeIDString( aNode, 1 );
340  OptimalWidth = GetXmlAttributeIDLong( aNode, 2, false );
341 
342  XNODE* cNode = aNode->GetChildren();
343 
344  for( ; cNode; cNode = cNode->GetNext() )
345  {
346  wxString cNodeName = cNode->GetName();
347 
348  if( cNodeName == wxT( "NECKWIDTH" ) )
349  {
350  NeckedWidth = GetXmlAttributeIDLong( cNode, 0 );
351  }
352  else if( cNodeName == wxT( "SROUTEWIDTH" ) )
353  {
354  OptimalWidth = GetXmlAttributeIDLong( cNode, 0 );
355  }
356  else if( cNodeName == wxT( "MINWIDTH" ) )
357  {
358  MinWidth = GetXmlAttributeIDLong( cNode, 0 );
359  }
360  else if( cNodeName == wxT( "MAXWIDTH" ) )
361  {
362  MaxWidth = GetXmlAttributeIDLong( cNode, 0 );
363  }
364  else if( cNodeName == wxT( "ROUTEREASSIGN" ) )
365  {
366  ROUTEREASSIGN routereassign;
367  routereassign.Parse( cNode, aContext );
368  RouteReassigns.push_back( routereassign );
369  }
370  else
371  {
372  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
373  }
374  }
375 }
XNODE * GetChildren() const
Definition: xnode.h:62
std::vector< ROUTEREASSIGN > RouteReassigns
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
#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::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 361 of file cadstar_archive_parser.h.

◆ MinWidth

long CADSTAR_ARCHIVE_PARSER::ROUTECODE::MinWidth

Definition at line 360 of file cadstar_archive_parser.h.

◆ Name

wxString CADSTAR_ARCHIVE_PARSER::ROUTECODE::Name

Definition at line 358 of file cadstar_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::getKiCadNet().

◆ NeckedWidth

long CADSTAR_ARCHIVE_PARSER::ROUTECODE::NeckedWidth

Definition at line 362 of file cadstar_archive_parser.h.

◆ OptimalWidth

long CADSTAR_ARCHIVE_PARSER::ROUTECODE::OptimalWidth

Definition at line 359 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 364 of file cadstar_archive_parser.h.


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