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 362 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 314 of file cadstar_archive_parser.cpp.

315{
316 wxASSERT( aNode->GetName() == wxT( "ROUTEREASSIGN" ) );
317
318 LayerID = GetXmlAttributeIDString( aNode, 0 );
319 OptimalWidth = GetXmlAttributeIDLong( aNode, 1, false );
320
321 XNODE* cNode = aNode->GetChildren();
322
323 for( ; cNode; cNode = cNode->GetNext() )
324 {
325 wxString cNodeName = cNode->GetName();
326
327 if( cNodeName == wxT( "NECKWIDTH" ) )
329 else if( cNodeName == wxT( "SROUTEWIDTH" ) )
331 else if( cNodeName == wxT( "MINWIDTH" ) )
332 MinWidth = GetXmlAttributeIDLong( cNode, 0 );
333 else if( cNodeName == wxT( "MAXWIDTH" ) )
334 MaxWidth = GetXmlAttributeIDLong( cNode, 0 );
335 else
336 THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
337 }
338}
#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

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 364 of file cadstar_archive_parser.h.

◆ MaxWidth

long CADSTAR_ARCHIVE_PARSER::ROUTEREASSIGN::MaxWidth

Definition at line 367 of file cadstar_archive_parser.h.

◆ MinWidth

long CADSTAR_ARCHIVE_PARSER::ROUTEREASSIGN::MinWidth

Definition at line 366 of file cadstar_archive_parser.h.

◆ NeckedWidth

long CADSTAR_ARCHIVE_PARSER::ROUTEREASSIGN::NeckedWidth

Definition at line 368 of file cadstar_archive_parser.h.

◆ OptimalWidth

long CADSTAR_ARCHIVE_PARSER::ROUTEREASSIGN::OptimalWidth

Definition at line 365 of file cadstar_archive_parser.h.


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