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 367 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 340 of file cadstar_archive_parser.cpp.

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

◆ MinWidth

long CADSTAR_ARCHIVE_PARSER::ROUTECODE::MinWidth

Definition at line 372 of file cadstar_archive_parser.h.

◆ Name

wxString CADSTAR_ARCHIVE_PARSER::ROUTECODE::Name

Definition at line 370 of file cadstar_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::getKiCadNet().

◆ NeckedWidth

long CADSTAR_ARCHIVE_PARSER::ROUTECODE::NeckedWidth

Definition at line 374 of file cadstar_archive_parser.h.

◆ OptimalWidth

long CADSTAR_ARCHIVE_PARSER::ROUTECODE::OptimalWidth

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


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