KiCad PCB EDA Suite
CADSTAR_SCH_ARCHIVE_PARSER::SYMPINNAME_LABEL Struct Reference

#include <cadstar_sch_archive_parser.h>

Inheritance diagram for CADSTAR_SCH_ARCHIVE_PARSER::SYMPINNAME_LABEL:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

TERMINAL_ID TerminalID
 
wxString NameOrLabel
 
bool HasLocation = false
 
ATTRIBUTE_LOCATION AttrLoc
 

Detailed Description

Definition at line 209 of file cadstar_sch_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 549 of file cadstar_sch_archive_parser.cpp.

550 {
551  wxCHECK( aNode->GetName() == wxT( "SYMPINNAME" ) || aNode->GetName() == wxT( "SYMPINLABEL" ), );
552 
553  TerminalID = GetXmlAttributeIDLong( aNode, 0 );
554  NameOrLabel = GetXmlAttributeIDString( aNode, 1 );
555 
556  XNODE* cNode = aNode->GetChildren();
557 
558  for( ; cNode; cNode = cNode->GetNext() )
559  {
560  if( cNode->GetName() == wxT( "ATTRLOC" ) )
561  {
562  AttrLoc.Parse( cNode, aContext );
563  HasLocation = true;
564  }
565  else
566  {
567  THROW_UNKNOWN_NODE_IO_ERROR( cNode->GetName(), aNode->GetName() );
568  }
569  }
570 }
XNODE * GetChildren() const
Definition: xnode.h:62
virtual void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
static long GetXmlAttributeIDLong(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
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::GetXmlAttributeIDLong(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString(), and THROW_UNKNOWN_NODE_IO_ERROR.

Referenced by CADSTAR_SCH_ARCHIVE_PARSER::SYMBOL::Parse().

Member Data Documentation

◆ AttrLoc

ATTRIBUTE_LOCATION CADSTAR_SCH_ARCHIVE_PARSER::SYMPINNAME_LABEL::AttrLoc

Definition at line 214 of file cadstar_sch_archive_parser.h.

◆ HasLocation

bool CADSTAR_SCH_ARCHIVE_PARSER::SYMPINNAME_LABEL::HasLocation = false

Definition at line 213 of file cadstar_sch_archive_parser.h.

◆ NameOrLabel

wxString CADSTAR_SCH_ARCHIVE_PARSER::SYMPINNAME_LABEL::NameOrLabel

Definition at line 212 of file cadstar_sch_archive_parser.h.

◆ TerminalID

TERMINAL_ID CADSTAR_SCH_ARCHIVE_PARSER::SYMPINNAME_LABEL::TerminalID

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