KiCad PCB EDA Suite
CADSTAR_PCB_ARCHIVE_PARSER::COPPERCODE Struct Reference

#include <cadstar_pcb_archive_parser.h>

Inheritance diagram for CADSTAR_PCB_ARCHIVE_PARSER::COPPERCODE:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

COPPERCODE_ID ID
 
wxString Name
 
long CopperWidth
 
std::vector< COPREASSIGNReassigns
 

Detailed Description

Definition at line 192 of file cadstar_pcb_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 591 of file cadstar_pcb_archive_parser.cpp.

592{
593 wxASSERT( aNode->GetName() == wxT( "COPPERCODE" ) );
594
595 ID = GetXmlAttributeIDString( aNode, 0 );
596 Name = GetXmlAttributeIDString( aNode, 1 );
597
599
600 XNODE* cNode = aNode->GetChildren();
601
602 for( ; cNode; cNode = cNode->GetNext() )
603 {
604 if( cNode->GetName() == wxT( "COPREASSIGN" ) )
605 {
607 reassign.Parse( cNode, aContext );
608 Reassigns.push_back( reassign );
609 }
610 else
611 {
612 THROW_UNKNOWN_NODE_IO_ERROR( cNode->GetName(), aNode->GetName() );
613 }
614 }
615}
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
static long GetXmlAttributeIDLong(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
Hold an XML or S-expression element.
Definition: xnode.h:44
XNODE * GetChildren() const
Definition: xnode.h:62
XNODE * GetNext() const
Definition: xnode.h:67
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override

References XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDLong(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString(), CADSTAR_PCB_ARCHIVE_PARSER::COPREASSIGN::Parse(), and THROW_UNKNOWN_NODE_IO_ERROR.

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

Member Data Documentation

◆ CopperWidth

long CADSTAR_PCB_ARCHIVE_PARSER::COPPERCODE::CopperWidth

◆ ID

COPPERCODE_ID CADSTAR_PCB_ARCHIVE_PARSER::COPPERCODE::ID

◆ Name

wxString CADSTAR_PCB_ARCHIVE_PARSER::COPPERCODE::Name

Definition at line 195 of file cadstar_pcb_archive_parser.h.

◆ Reassigns

std::vector<COPREASSIGN> CADSTAR_PCB_ARCHIVE_PARSER::COPPERCODE::Reassigns

Definition at line 197 of file cadstar_pcb_archive_parser.h.


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