KiCad PCB EDA Suite
CADSTAR_PCB_ARCHIVE_PARSER::VIACODE Struct Reference

#include <cadstar_pcb_archive_parser.h>

Inheritance diagram for CADSTAR_PCB_ARCHIVE_PARSER::VIACODE:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

VIACODE_ID ID
 
wxString Name
 
CADSTAR_PAD_SHAPE Shape
 
long ReliefClearance = UNDEFINED_VALUE
 if undefined inherits from design More...
 
long ReliefWidth = UNDEFINED_VALUE
 if undefined inherits from design More...
 
long DrillDiameter = UNDEFINED_VALUE
 
long DrillOversize = UNDEFINED_VALUE
 
std::map< LAYER_ID, CADSTAR_PAD_SHAPEReassigns
 

Detailed Description

Definition at line 326 of file cadstar_pcb_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 849 of file cadstar_pcb_archive_parser.cpp.

850 {
851  wxASSERT( aNode->GetName() == wxT( "VIACODE" ) );
852 
853  ID = GetXmlAttributeIDString( aNode, 0 );
854  Name = GetXmlAttributeIDString( aNode, 1 );
855 
856  XNODE* cNode = aNode->GetChildren();
857  wxString location = wxString::Format( wxT( "VIACODE -> %s" ), Name );
858 
859  for( ; cNode; cNode = cNode->GetNext() )
860  {
861  wxString cNodeName = cNode->GetName();
862 
863  if( CADSTAR_PAD_SHAPE::IsPadShape( cNode ) )
864  {
865  Shape.Parse( cNode, aContext );
866  }
867  else if( cNodeName == wxT( "CLEARANCE" ) )
868  {
870  }
871  else if( cNodeName == wxT( "RELIEFWIDTH" ) )
872  {
873  ReliefWidth = GetXmlAttributeIDLong( cNode, 0 );
874  }
875  else if( cNodeName == wxT( "DRILL" ) )
876  {
877  DrillDiameter = GetXmlAttributeIDLong( cNode, 0 );
878  XNODE* subNode = cNode->GetChildren();
879 
880  for( ; subNode; subNode = subNode->GetNext() )
881  {
882  wxString subNodeName = subNode->GetName();
883 
884  if( subNodeName == wxT( "OVERSIZE" ) )
885  DrillOversize = GetXmlAttributeIDLong( subNode, 0 );
886  else
887  THROW_UNKNOWN_NODE_IO_ERROR( subNode->GetName(), location );
888  }
889  }
890  else if( cNodeName == wxT( "VIAREASSIGN" ) )
891  {
892  VIAREASSIGN reassign;
893  reassign.Parse( cNode, aContext );
894  Reassigns.insert( std::make_pair( reassign.LayerID, reassign.Shape ) );
895  }
896  else
897  {
898  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, location );
899  }
900  }
901 }
long ReliefWidth
if undefined inherits from design
XNODE * GetChildren() const
Definition: xnode.h:62
static long GetXmlAttributeIDLong(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
Hold an XML or S-expression element.
Definition: xnode.h:43
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
XNODE * GetNext() const
Definition: xnode.h:67
std::map< LAYER_ID, CADSTAR_PAD_SHAPE > Reassigns
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
long ReliefClearance
if undefined inherits from design
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)

References Format(), XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDLong(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString(), CADSTAR_PCB_ARCHIVE_PARSER::CADSTAR_PAD_SHAPE::IsPadShape(), CADSTAR_PCB_ARCHIVE_PARSER::VIAREASSIGN::LayerID, CADSTAR_PCB_ARCHIVE_PARSER::VIAREASSIGN::Parse(), CADSTAR_PCB_ARCHIVE_PARSER::VIAREASSIGN::Shape, and THROW_UNKNOWN_NODE_IO_ERROR.

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

Member Data Documentation

◆ DrillDiameter

long CADSTAR_PCB_ARCHIVE_PARSER::VIACODE::DrillDiameter = UNDEFINED_VALUE

◆ DrillOversize

long CADSTAR_PCB_ARCHIVE_PARSER::VIACODE::DrillOversize = UNDEFINED_VALUE

Definition at line 334 of file cadstar_pcb_archive_parser.h.

◆ ID

VIACODE_ID CADSTAR_PCB_ARCHIVE_PARSER::VIACODE::ID

◆ Name

wxString CADSTAR_PCB_ARCHIVE_PARSER::VIACODE::Name

◆ Reassigns

std::map<LAYER_ID, CADSTAR_PAD_SHAPE> CADSTAR_PCB_ARCHIVE_PARSER::VIACODE::Reassigns

Definition at line 336 of file cadstar_pcb_archive_parser.h.

◆ ReliefClearance

long CADSTAR_PCB_ARCHIVE_PARSER::VIACODE::ReliefClearance = UNDEFINED_VALUE

if undefined inherits from design

Definition at line 331 of file cadstar_pcb_archive_parser.h.

◆ ReliefWidth

long CADSTAR_PCB_ARCHIVE_PARSER::VIACODE::ReliefWidth = UNDEFINED_VALUE

if undefined inherits from design

Definition at line 332 of file cadstar_pcb_archive_parser.h.

◆ Shape

CADSTAR_PAD_SHAPE CADSTAR_PCB_ARCHIVE_PARSER::VIACODE::Shape

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