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 272 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 161 of file cadstar_archive_parser.cpp.

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