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 260 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 155 of file cadstar_archive_parser.cpp.

156 {
157  wxASSERT( aNode->GetName() == wxT( "VHIERARCHY" ) );
158 
159  XNODE* cNode = aNode->GetChildren();
160 
161  for( ; cNode; cNode = cNode->GetNext() )
162  {
163  if( cNode->GetName() == wxT( "VMASTER" ) || cNode->GetName() == wxT( "VARIANT" ) )
164  {
165  VARIANT variant;
166  variant.Parse( cNode, aContext );
167  Variants.insert( std::make_pair( variant.ID, variant ) );
168  }
169  else
170  {
171  THROW_UNKNOWN_NODE_IO_ERROR( cNode->GetName(), cNode->GetName() );
172  }
173  }
174 }
XNODE * GetChildren() const
Definition: xnode.h:62
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::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: