KiCad PCB EDA Suite
CADSTAR_PCB_ARCHIVE_PARSER::LIBRARY Struct Reference

#include <cadstar_pcb_archive_parser.h>

Inheritance diagram for CADSTAR_PCB_ARCHIVE_PARSER::LIBRARY:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

std::map< SYMDEF_ID, SYMDEF_PCBComponentDefinitions
 

Detailed Description

Definition at line 788 of file cadstar_pcb_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 1604 of file cadstar_pcb_archive_parser.cpp.

1605{
1606 wxASSERT( aNode->GetName() == wxT( "LIBRARY" ) );
1607
1608 XNODE* cNode = aNode->GetChildren();
1609
1610 for( ; cNode; cNode = cNode->GetNext() )
1611 {
1612 wxString cNodeName = cNode->GetName();
1613
1614 if( cNodeName == wxT( "SYMDEF" ) )
1615 {
1616 SYMDEF_PCB symdef;
1617 symdef.Parse( cNode, aContext );
1618 ComponentDefinitions.insert( std::make_pair( symdef.ID, symdef ) );
1619 }
1620 else
1621 {
1622 THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
1623 }
1624
1625 aContext->CheckPointCallback();
1626 }
1627}
#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< SYMDEF_ID, SYMDEF_PCB > ComponentDefinitions

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

Referenced by CADSTAR_PCB_ARCHIVE_PARSER::Parse().

Member Data Documentation

◆ ComponentDefinitions


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