KiCad PCB EDA Suite
CADSTAR_SCH_ARCHIVE_PARSER::COMP Struct Reference

#include <cadstar_sch_archive_parser.h>

Inheritance diagram for CADSTAR_SCH_ARCHIVE_PARSER::COMP:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

wxString Designator = wxEmptyString
 
bool ReadOnly = false
 
bool HasLocation = false
 
ATTRIBUTE_LOCATION AttrLoc
 

Detailed Description

Definition at line 178 of file cadstar_sch_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 471 of file cadstar_sch_archive_parser.cpp.

472 {
473  wxCHECK( aNode->GetName() == wxT( "COMP" ), );
474 
475  Designator = GetXmlAttributeIDString( aNode, 0 );
476 
477  XNODE* cNode = aNode->GetChildren();
478 
479  for( ; cNode; cNode = cNode->GetNext() )
480  {
481  if( cNode->GetName() == wxT( "READONLY" ) )
482  {
483  ReadOnly = true;
484  }
485  else if( cNode->GetName() == wxT( "ATTRLOC" ) )
486  {
487  AttrLoc.Parse( cNode, aContext );
488  HasLocation = true;
489  }
490  else
491  {
492  THROW_UNKNOWN_NODE_IO_ERROR( cNode->GetName(), aNode->GetName() );
493  }
494  }
495 }
XNODE * GetChildren() const
Definition: xnode.h:62
Hold an XML or S-expression element.
Definition: xnode.h:43
XNODE * GetNext() const
Definition: xnode.h:67
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)

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

Member Data Documentation

◆ AttrLoc

ATTRIBUTE_LOCATION CADSTAR_SCH_ARCHIVE_PARSER::COMP::AttrLoc

◆ Designator

wxString CADSTAR_SCH_ARCHIVE_PARSER::COMP::Designator = wxEmptyString

◆ HasLocation

bool CADSTAR_SCH_ARCHIVE_PARSER::COMP::HasLocation = false

Definition at line 182 of file cadstar_sch_archive_parser.h.

◆ ReadOnly

bool CADSTAR_SCH_ARCHIVE_PARSER::COMP::ReadOnly = false

Definition at line 181 of file cadstar_sch_archive_parser.h.


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