KiCad PCB EDA Suite
CADSTAR_PCB_ARCHIVE_PARSER::RULESET Struct Reference

#include <cadstar_pcb_archive_parser.h>

Inheritance diagram for CADSTAR_PCB_ARCHIVE_PARSER::RULESET:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

RULESET_ID ID
 
wxString Name
 
ROUTECODE_ID AreaRouteCodeID
 For assigning a net route code to a rule set. More...
 
VIACODE_ID AreaViaCodeID
 For assigning a via code to a rule set. More...
 
std::map< SPACINGCODE_ID, SPACINGCODESpacingCodes
 Overrides these spacing rules in the specific area. More...
 

Detailed Description

Definition at line 365 of file cadstar_pcb_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_PCB_ARCHIVE_PARSER::RULESET::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 215 of file cadstar_pcb_archive_parser.cpp.

216 {
217  wxASSERT( aNode->GetName() == wxT( "RULESET" ) );
218 
219  ID = GetXmlAttributeIDString( aNode, 0 );
220  Name = GetXmlAttributeIDString( aNode, 1 );
221 
222  XNODE* cNode = aNode->GetChildren();
223 
224  for( ; cNode; cNode = cNode->GetNext() )
225  {
226  wxString nodeName = cNode->GetName();
227 
228  if( nodeName == wxT( "ROUCODEREF" ) )
229  {
231  }
232  else if( nodeName == wxT( "VIACODEREF" ) )
233  {
235  }
236  else if( nodeName == wxT( "SPACINGCODE" ) )
237  {
238  SPACINGCODE spacingcode;
239  spacingcode.Parse( cNode, aContext );
240  SpacingCodes.insert( std::make_pair( spacingcode.ID, spacingcode ) );
241  }
242  else
243  {
244  THROW_UNKNOWN_NODE_IO_ERROR( nodeName, aNode->GetName() );
245  }
246  }
247 }
VIACODE_ID AreaViaCodeID
For assigning a via code to a rule set.
XNODE * GetChildren() const
Definition: xnode.h:62
Hold an XML or S-expression element.
Definition: xnode.h:43
XNODE * GetNext() const
Definition: xnode.h:67
std::map< SPACINGCODE_ID, SPACINGCODE > SpacingCodes
Overrides these spacing rules in the specific area.
ROUTECODE_ID AreaRouteCodeID
For assigning a net route code to a rule set.
#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::GetXmlAttributeIDString(), CADSTAR_PCB_ARCHIVE_PARSER::SPACINGCODE::ID, CADSTAR_PCB_ARCHIVE_PARSER::SPACINGCODE::Parse(), and THROW_UNKNOWN_NODE_IO_ERROR.

Referenced by CADSTAR_PCB_ARCHIVE_PARSER::CODEDEFS_PCB::Parse().

Member Data Documentation

◆ AreaRouteCodeID

ROUTECODE_ID CADSTAR_PCB_ARCHIVE_PARSER::RULESET::AreaRouteCodeID

For assigning a net route code to a rule set.

The optimal and necked route widths from the net route code will be used when routing through an area that has been assigned this rule set. ("ROUCODEREF")

Definition at line 369 of file cadstar_pcb_archive_parser.h.

◆ AreaViaCodeID

VIACODE_ID CADSTAR_PCB_ARCHIVE_PARSER::RULESET::AreaViaCodeID

For assigning a via code to a rule set.

This via code will be used when inserting new vias within an area that has been assigned this rule set. ("VIACODEREF")

Definition at line 373 of file cadstar_pcb_archive_parser.h.

◆ ID

RULESET_ID CADSTAR_PCB_ARCHIVE_PARSER::RULESET::ID

◆ Name

wxString CADSTAR_PCB_ARCHIVE_PARSER::RULESET::Name

Definition at line 368 of file cadstar_pcb_archive_parser.h.

◆ SpacingCodes

std::map<SPACINGCODE_ID, SPACINGCODE> CADSTAR_PCB_ARCHIVE_PARSER::RULESET::SpacingCodes

Overrides these spacing rules in the specific area.

Definition at line 378 of file cadstar_pcb_archive_parser.h.


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