KiCad PCB EDA Suite
CADSTAR_SCH_ARCHIVE_PARSER::LIBRARY_SCM Struct Reference

#include <cadstar_sch_archive_parser.h>

Inheritance diagram for CADSTAR_SCH_ARCHIVE_PARSER::LIBRARY_SCM:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

std::map< SYMDEF_ID, SYMDEF_SCMSymbolDefinitions
 

Detailed Description

Definition at line 160 of file cadstar_sch_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_SCH_ARCHIVE_PARSER::LIBRARY_SCM::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 443 of file cadstar_sch_archive_parser.cpp.

444{
445 wxCHECK( aNode->GetName() == wxT( "LIBRARY" ), );
446
447 XNODE* cNode = aNode->GetChildren();
448
449 for( ; cNode; cNode = cNode->GetNext() )
450 {
451 wxString cNodeName = cNode->GetName();
452
453 if( cNodeName == wxT( "SYMDEF" ) )
454 {
455 SYMDEF_SCM symdef;
456 symdef.Parse( cNode, aContext );
457 SymbolDefinitions.insert( std::make_pair( symdef.ID, symdef ) );
458 }
459 else
460 {
461 THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
462 }
463
464 aContext->CheckPointCallback();
465 }
466}
#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_SCM > SymbolDefinitions

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

Referenced by CADSTAR_SCH_ARCHIVE_PARSER::Parse().

Member Data Documentation

◆ SymbolDefinitions


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