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 1120 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 1936 of file cadstar_archive_parser.cpp.

1937 {
1938  wxASSERT( aNode->GetName() == wxT( "PARTS" ) );
1939 
1940  XNODE* cNode = aNode->GetChildren();
1941 
1942  for( ; cNode; cNode = cNode->GetNext() )
1943  {
1944  wxString cNodeName = cNode->GetName();
1945 
1946  if( cNodeName == wxT( "PART" ) )
1947  {
1948  PART part;
1949  part.Parse( cNode, aContext );
1950  PartDefinitions.insert( std::make_pair( part.ID, part ) );
1951  }
1952  else
1953  {
1954  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
1955  }
1956  }
1957 }
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 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: