KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::PARTS Struct Reference

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::PARTS:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

std::map< PART_ID, PARTPartDefinitions
 

Detailed Description

Definition at line 1157 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_ARCHIVE_PARSER::PARTS::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 2043 of file cadstar_archive_parser.cpp.

2044{
2045 wxASSERT( aNode->GetName() == wxT( "PARTS" ) );
2046
2047 XNODE* cNode = aNode->GetChildren();
2048
2049 for( ; cNode; cNode = cNode->GetNext() )
2050 {
2051 wxString cNodeName = cNode->GetName();
2052
2053 if( cNodeName == wxT( "PART" ) )
2054 {
2055 PART part;
2056 part.Parse( cNode, aContext );
2057 PartDefinitions.insert( std::make_pair( part.ID, part ) );
2058 }
2059 else
2060 {
2061 THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
2062 }
2063
2064 aContext->CheckPointCallback();
2065 }
2066}
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
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
std::map< PART_ID, PART > PartDefinitions

References CADSTAR_ARCHIVE_PARSER::PARSER_CONTEXT::CheckPointCallback, XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_ARCHIVE_PARSER::PART::ID, CADSTAR_ARCHIVE_PARSER::PART::Parse(), and THROW_UNKNOWN_NODE_IO_ERROR.

Referenced by CADSTAR_SCH_ARCHIVE_PARSER::Parse(), and CADSTAR_PCB_ARCHIVE_PARSER::Parse().

Member Data Documentation

◆ PartDefinitions


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