KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::ROUTEREASSIGN Struct Reference

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::ROUTEREASSIGN:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

LAYER_ID LayerID
 
long OptimalWidth
 
long MinWidth
 
long MaxWidth
 
long NeckedWidth
 

Detailed Description

Definition at line 343 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 307 of file cadstar_archive_parser.cpp.

308 {
309  wxASSERT( aNode->GetName() == wxT( "ROUTEREASSIGN" ) );
310 
311  LayerID = GetXmlAttributeIDString( aNode, 0 );
312  OptimalWidth = GetXmlAttributeIDLong( aNode, 1, false );
313 
314  XNODE* cNode = aNode->GetChildren();
315 
316  for( ; cNode; cNode = cNode->GetNext() )
317  {
318  wxString cNodeName = cNode->GetName();
319 
320  if( cNodeName == wxT( "NECKWIDTH" ) )
321  NeckedWidth = GetXmlAttributeIDLong( cNode, 0 );
322  else if( cNodeName == wxT( "SROUTEWIDTH" ) )
323  OptimalWidth = GetXmlAttributeIDLong( cNode, 0 );
324  else if( cNodeName == wxT( "MINWIDTH" ) )
325  MinWidth = GetXmlAttributeIDLong( cNode, 0 );
326  else if( cNodeName == wxT( "MAXWIDTH" ) )
327  MaxWidth = GetXmlAttributeIDLong( cNode, 0 );
328  else
329  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
330  }
331 }
XNODE * GetChildren() const
Definition: xnode.h:62
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(), and THROW_UNKNOWN_NODE_IO_ERROR.

Referenced by CADSTAR_ARCHIVE_PARSER::ROUTECODE::Parse().

Member Data Documentation

◆ LayerID

LAYER_ID CADSTAR_ARCHIVE_PARSER::ROUTEREASSIGN::LayerID

Definition at line 345 of file cadstar_archive_parser.h.

◆ MaxWidth

long CADSTAR_ARCHIVE_PARSER::ROUTEREASSIGN::MaxWidth

Definition at line 348 of file cadstar_archive_parser.h.

◆ MinWidth

long CADSTAR_ARCHIVE_PARSER::ROUTEREASSIGN::MinWidth

Definition at line 347 of file cadstar_archive_parser.h.

◆ NeckedWidth

long CADSTAR_ARCHIVE_PARSER::ROUTEREASSIGN::NeckedWidth

Definition at line 349 of file cadstar_archive_parser.h.

◆ OptimalWidth

long CADSTAR_ARCHIVE_PARSER::ROUTEREASSIGN::OptimalWidth

Definition at line 346 of file cadstar_archive_parser.h.


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