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 1132 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 1947 of file cadstar_archive_parser.cpp.

1948 {
1949  wxASSERT( aNode->GetName() == wxT( "PARTS" ) );
1950 
1951  XNODE* cNode = aNode->GetChildren();
1952 
1953  for( ; cNode; cNode = cNode->GetNext() )
1954  {
1955  wxString cNodeName = cNode->GetName();
1956 
1957  if( cNodeName == wxT( "PART" ) )
1958  {
1959  PART part;
1960  part.Parse( cNode, aContext );
1961  PartDefinitions.insert( std::make_pair( part.ID, part ) );
1962  }
1963  else
1964  {
1965  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
1966  }
1967 
1968  aContext->CheckPointCallback();
1969  }
1970 }
XNODE * GetChildren() const
Definition: xnode.h:62
std::map< PART_ID, PART > PartDefinitions
Hold an XML or S-expression element.
Definition: xnode.h:43
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)

References CADSTAR_ARCHIVE_PARSER::PARSER_CONTEXT::CheckPointCallback, XNODE::GetChildren(), 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: