KiCad PCB EDA Suite
CADSTAR_SCH_ARCHIVE_PARSER::TERMATTR Struct Reference

#include <cadstar_sch_archive_parser.h>

Inheritance diagram for CADSTAR_SCH_ARCHIVE_PARSER::TERMATTR:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

TERMINAL_ID TerminalID
 
ATTRIBUTE_VALUE Value
 

Detailed Description

Definition at line 200 of file cadstar_sch_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 546 of file cadstar_sch_archive_parser.cpp.

547{
548 wxCHECK( aNode->GetName() == wxT( "TERMATTR" ), /* void */ );
549
550 TerminalID = GetXmlAttributeIDLong( aNode, 0 );
551
552 XNODE* cNode = aNode->GetChildren();
553 bool attrParsed = false;
554
555 for( ; cNode; cNode = cNode->GetNext() )
556 {
557 if( !attrParsed && cNode->GetName() == wxT( "ATTR" ) )
558 {
559 Value.Parse( cNode, aContext );
560 attrParsed = true;
561 }
562 else
563 {
564 THROW_UNKNOWN_NODE_IO_ERROR( cNode->GetName(), aNode->GetName() );
565 }
566 }
567}
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static long GetXmlAttributeIDLong(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
Hold an XML or S-expression element.
Definition: xnode.h:44
XNODE * GetChildren() const
Definition: xnode.h:62
XNODE * GetNext() const
Definition: xnode.h:67
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override

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

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

Member Data Documentation

◆ TerminalID

TERMINAL_ID CADSTAR_SCH_ARCHIVE_PARSER::TERMATTR::TerminalID

◆ Value

ATTRIBUTE_VALUE CADSTAR_SCH_ARCHIVE_PARSER::TERMATTR::Value

Definition at line 203 of file cadstar_sch_archive_parser.h.


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