KiCad PCB EDA Suite
CADSTAR_SCH_ARCHIVE_PARSER::SHEETS Struct Reference

#include <cadstar_sch_archive_parser.h>

Inheritance diagram for CADSTAR_SCH_ARCHIVE_PARSER::SHEETS:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

std::map< LAYER_ID, SHEET_NAMESheetNames
 
std::vector< LAYER_IDSheetOrder
 A vector to also store the order in which sheets are to be displayed. More...
 

Detailed Description

Definition at line 168 of file cadstar_sch_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 448 of file cadstar_sch_archive_parser.cpp.

449 {
450  wxCHECK( aNode->GetName() == wxT( "SHEETS" ), );
451 
452  XNODE* cNode = aNode->GetChildren();
453 
454  for( ; cNode; cNode = cNode->GetNext() )
455  {
456  if( cNode->GetName() == wxT( "SHEET" ) )
457  {
458  LAYER_ID id = GetXmlAttributeIDString( cNode, 0 );
460  SheetNames.insert( std::make_pair( id, name ) );
461  SheetOrder.push_back( id );
462  }
463  else
464  {
465  THROW_UNKNOWN_NODE_IO_ERROR( cNode->GetName(), aNode->GetName() );
466  }
467  }
468 }
std::vector< LAYER_ID > SheetOrder
A vector to also store the order in which sheets are to be displayed.
XNODE * GetChildren() const
Definition: xnode.h:62
Hold an XML or S-expression element.
Definition: xnode.h:43
const char * name
Definition: DXF_plotter.cpp:59
std::map< LAYER_ID, SHEET_NAME > SheetNames
wxString LAYER_ID
ID of a Sheet (if schematic) or board Layer (if PCB)
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)

References XNODE::GetChildren(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString(), name, and THROW_UNKNOWN_NODE_IO_ERROR.

Referenced by CADSTAR_SCH_ARCHIVE_PARSER::Parse().

Member Data Documentation

◆ SheetNames

◆ SheetOrder

std::vector<LAYER_ID> CADSTAR_SCH_ARCHIVE_PARSER::SHEETS::SheetOrder

A vector to also store the order in which sheets are to be displayed.

Definition at line 171 of file cadstar_sch_archive_parser.h.

Referenced by CADSTAR_SCH_ARCHIVE_LOADER::findOrphanSheets(), and CADSTAR_SCH_ARCHIVE_LOADER::getSheetNumber().


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