KiCad PCB EDA Suite
ARULE6 Struct Reference

#include <altium_parser_pcb.h>

Public Member Functions

 ARULE6 (ALTIUM_PARSER &aReader)
 

Public Attributes

wxString name
 
int priority
 
ALTIUM_RULE_KIND kind
 
wxString scope1expr
 
wxString scope2expr
 
int clearanceGap
 
int planeclearanceClearance
 
int32_t polygonconnectAirgapwidth
 
int32_t polygonconnectReliefconductorwidth
 
int polygonconnectReliefentries
 
ALTIUM_CONNECT_STYLE polygonconnectStyle
 

Detailed Description

Definition at line 463 of file altium_parser_pcb.h.

Constructor & Destructor Documentation

◆ ARULE6()

ARULE6::ARULE6 ( ALTIUM_PARSER aReader)
explicit

Definition at line 404 of file altium_parser_pcb.cpp.

405 {
406  // Initialize all variables and make Coverity happy
407  clearanceGap = 0;
413 
414  aReader.Skip( 2 );
415 
416  std::map<wxString, wxString> props = aReader.ReadProperties();
417 
418  if( props.empty() )
419  THROW_IO_ERROR( "Rules6 stream has no props" );
420 
421  name = ALTIUM_PARSER::ReadString( props, "NAME", "" );
422  priority = ALTIUM_PARSER::ReadInt( props, "PRIORITY", 1 );
423 
424  scope1expr = ALTIUM_PARSER::ReadString( props, "SCOPE1EXPRESSION", "" );
425  scope2expr = ALTIUM_PARSER::ReadString( props, "SCOPE2EXPRESSION", "" );
426 
427  wxString rulekind = ALTIUM_PARSER::ReadString( props, "RULEKIND", "" );
428  if( rulekind == "Clearance" )
429  {
431  clearanceGap = ALTIUM_PARSER::ReadKicadUnit( props, "GAP", "10mil" );
432  }
433  else if( rulekind == "DiffPairsRouting" )
434  {
436  }
437  else if( rulekind == "Height" )
438  {
440  }
441  else if( rulekind == "HoleSize" )
442  {
444  }
445  else if( rulekind == "HoleToHoleClearance" )
446  {
448  }
449  else if( rulekind == "Width" )
450  {
452  }
453  else if( rulekind == "PasteMaskExpansion" )
454  {
456  }
457  else if( rulekind == "PlaneClearance" )
458  {
460  planeclearanceClearance = ALTIUM_PARSER::ReadKicadUnit( props, "CLEARANCE", "10mil" );
461  }
462  else if( rulekind == "PolygonConnect" )
463  {
465  polygonconnectAirgapwidth = ALTIUM_PARSER::ReadKicadUnit( props, "AIRGAPWIDTH", "10mil" );
466  polygonconnectReliefconductorwidth = ALTIUM_PARSER::ReadKicadUnit( props, "RELIEFCONDUCTORWIDTH", "10mil" );
467  polygonconnectReliefentries = ALTIUM_PARSER::ReadInt( props, "RELIEFENTRIES", 4 );
468 
469  wxString style = ALTIUM_PARSER::ReadString( props, "CONNECTSTYLE", "" );
470 
471  if( style == "Direct" ) polygonconnectStyle = ALTIUM_CONNECT_STYLE::DIRECT;
472  else if( style == "Relief" ) polygonconnectStyle = ALTIUM_CONNECT_STYLE::RELIEF;
473  else if( style == "NoConnect" ) polygonconnectStyle = ALTIUM_CONNECT_STYLE::NONE;
475  }
476  else
477  {
479  }
480 
481  if( aReader.HasParsingError() )
482  THROW_IO_ERROR( "Rules6 stream was not parsed correctly" );
483 }
ALTIUM_RULE_KIND kind
int planeclearanceClearance
wxString name
int32_t polygonconnectAirgapwidth
wxString scope2expr
void Skip(size_t aLength)
ALTIUM_CONNECT_STYLE polygonconnectStyle
static int ReadInt(const std::map< wxString, wxString > &aProps, const wxString &aKey, int aDefault)
std::map< wxString, wxString > ReadProperties()
int32_t ReadKicadUnit()
static wxString ReadString(const std::map< wxString, wxString > &aProps, const wxString &aKey, const wxString &aDefault)
#define THROW_IO_ERROR(msg)
Definition: ki_exception.h:38
bool HasParsingError()
wxString scope1expr
int32_t polygonconnectReliefconductorwidth
int polygonconnectReliefentries

References CLEARANCE, clearanceGap, DIFF_PAIR_ROUTINGS, DIRECT, ALTIUM_PARSER::HasParsingError(), HEIGHT, HOLE_SIZE, HOLE_TO_HOLE_CLEARANCE, kind, name, NONE, PASTE_MASK_EXPANSION, PLANE_CLEARANCE, planeclearanceClearance, POLYGON_CONNECT, polygonconnectAirgapwidth, polygonconnectReliefconductorwidth, polygonconnectReliefentries, polygonconnectStyle, priority, ALTIUM_PARSER::ReadInt(), ALTIUM_PARSER::ReadKicadUnit(), ALTIUM_PARSER::ReadProperties(), ALTIUM_PARSER::ReadString(), RELIEF, scope1expr, scope2expr, ALTIUM_PARSER::Skip(), THROW_IO_ERROR, UNKNOWN, and WIDTH.

Member Data Documentation

◆ clearanceGap

int ARULE6::clearanceGap

Definition at line 474 of file altium_parser_pcb.h.

Referenced by ARULE6().

◆ kind

ALTIUM_RULE_KIND ARULE6::kind

Definition at line 468 of file altium_parser_pcb.h.

Referenced by ARULE6(), and ALTIUM_PCB::ParseRules6Data().

◆ name

wxString ARULE6::name

Definition at line 465 of file altium_parser_pcb.h.

Referenced by ARULE6(), and ALTIUM_PCB::GetRule().

◆ planeclearanceClearance

int ARULE6::planeclearanceClearance

Definition at line 477 of file altium_parser_pcb.h.

Referenced by ARULE6(), and ALTIUM_PCB::ParsePolygons6Data().

◆ polygonconnectAirgapwidth

int32_t ARULE6::polygonconnectAirgapwidth

Definition at line 480 of file altium_parser_pcb.h.

Referenced by ARULE6(), and ALTIUM_PCB::ParsePolygons6Data().

◆ polygonconnectReliefconductorwidth

int32_t ARULE6::polygonconnectReliefconductorwidth

Definition at line 481 of file altium_parser_pcb.h.

Referenced by ARULE6(), and ALTIUM_PCB::ParsePolygons6Data().

◆ polygonconnectReliefentries

int ARULE6::polygonconnectReliefentries

Definition at line 482 of file altium_parser_pcb.h.

Referenced by ARULE6().

◆ polygonconnectStyle

ALTIUM_CONNECT_STYLE ARULE6::polygonconnectStyle

Definition at line 483 of file altium_parser_pcb.h.

Referenced by ARULE6(), and ALTIUM_PCB::ParsePolygons6Data().

◆ priority

int ARULE6::priority

Definition at line 466 of file altium_parser_pcb.h.

Referenced by ARULE6().

◆ scope1expr

wxString ARULE6::scope1expr

Definition at line 470 of file altium_parser_pcb.h.

Referenced by ARULE6(), and ALTIUM_PCB::GetRuleDefault().

◆ scope2expr

wxString ARULE6::scope2expr

Definition at line 471 of file altium_parser_pcb.h.

Referenced by ARULE6(), and ALTIUM_PCB::GetRuleDefault().


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