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

827 {
828  wxASSERT( aNode->GetName() == wxT( "VIACODE" ) );
829 
830  ID = GetXmlAttributeIDString( aNode, 0 );
831  Name = GetXmlAttributeIDString( aNode, 1 );
832 
833  XNODE* cNode = aNode->GetChildren();
834  wxString location = wxString::Format( "VIACODE -> %s", Name );
835 
836  for( ; cNode; cNode = cNode->GetNext() )
837  {
838  wxString cNodeName = cNode->GetName();
839 
840  if( CADSTAR_PAD_SHAPE::IsPadShape( cNode ) )
841  {
842  Shape.Parse( cNode, aContext );
843  }
844  else if( cNodeName == wxT( "CLEARANCE" ) )
845  {
847  }
848  else if( cNodeName == wxT( "RELIEFWIDTH" ) )
849  {
850  ReliefWidth = GetXmlAttributeIDLong( cNode, 0 );
851  }
852  else if( cNodeName == wxT( "DRILL" ) )
853  {
854  DrillDiameter = GetXmlAttributeIDLong( cNode, 0 );
855  XNODE* subNode = cNode->GetChildren();
856 
857  for( ; subNode; subNode = subNode->GetNext() )
858  {
859  wxString subNodeName = subNode->GetName();
860 
861  if( subNodeName == wxT( "OVERSIZE" ) )
862  DrillOversize = GetXmlAttributeIDLong( subNode, 0 );
863  else
864  THROW_UNKNOWN_NODE_IO_ERROR( subNode->GetName(), location );
865  }
866  }
867  else if( cNodeName == wxT( "VIAREASSIGN" ) )
868  {
869  VIAREASSIGN reassign;
870  reassign.Parse( cNode, aContext );
871  Reassigns.insert( std::make_pair( reassign.LayerID, reassign.Shape ) );
872  }
873  else
874  {
875  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, location );
876  }
877  }
878 }
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: