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 197 of file cadstar_pcb_archive_parser.cpp.

198 {
199  wxASSERT( aNode->GetName() == wxT( "RULESET" ) );
200 
201  ID = GetXmlAttributeIDString( aNode, 0 );
202  Name = GetXmlAttributeIDString( aNode, 1 );
203 
204  XNODE* cNode = aNode->GetChildren();
205 
206  for( ; cNode; cNode = cNode->GetNext() )
207  {
208  wxString nodeName = cNode->GetName();
209 
210  if( nodeName == wxT( "ROUCODEREF" ) )
211  {
213  }
214  else if( nodeName == wxT( "VIACODEREF" ) )
215  {
217  }
218  else if( nodeName == wxT( "SPACINGCODE" ) )
219  {
220  SPACINGCODE spacingcode;
221  spacingcode.Parse( cNode, aContext );
222  SpacingCodes.insert( std::make_pair( spacingcode.ID, spacingcode ) );
223  }
224  else
225  {
226  THROW_UNKNOWN_NODE_IO_ERROR( nodeName, aNode->GetName() );
227  }
228  }
229 }
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: