KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::VARIANT_HIERARCHY Struct Reference

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::VARIANT_HIERARCHY:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

std::map< VARIANT_ID, VARIANTVariants
 

Detailed Description

Definition at line 276 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 162 of file cadstar_archive_parser.cpp.

163{
164 wxASSERT( aNode->GetName() == wxT( "VHIERARCHY" ) );
165
166 XNODE* cNode = aNode->GetChildren();
167
168 for( ; cNode; cNode = cNode->GetNext() )
169 {
170 if( cNode->GetName() == wxT( "VMASTER" ) || cNode->GetName() == wxT( "VARIANT" ) )
171 {
172 VARIANT variant;
173 variant.Parse( cNode, aContext );
174 Variants.insert( std::make_pair( variant.ID, variant ) );
175 }
176 else
177 {
178 THROW_UNKNOWN_NODE_IO_ERROR( cNode->GetName(), cNode->GetName() );
179 }
180 }
181}
#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

References XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_ARCHIVE_PARSER::VARIANT::ID, CADSTAR_ARCHIVE_PARSER::VARIANT::Parse(), and THROW_UNKNOWN_NODE_IO_ERROR.

Member Data Documentation

◆ Variants


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