KiCad PCB EDA Suite
CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::BLOCK_TERM Struct Reference

< "BLOCKTERM" nodename (represents a connection to a block) More...

#include <cadstar_sch_archive_parser.h>

Inheritance diagram for CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::BLOCK_TERM:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

NETELEMENT_ID ID
 First four characters "BLKT". More...
 
BLOCK_ID BlockID
 
TERMINAL_ID TerminalID
 
bool HasNetLabel = false
 
SIGLOC NetLabel
 

Detailed Description

< "BLOCKTERM" nodename (represents a connection to a block)

Definition at line 381 of file cadstar_sch_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 1008 of file cadstar_sch_archive_parser.cpp.

1009{
1010 wxASSERT( aNode->GetName() == wxT( "BLOCKTERM" ) );
1011
1012 ID = GetXmlAttributeIDString( aNode, 0 );
1013 BlockID = GetXmlAttributeIDString( aNode, 1 );
1014 TerminalID = GetXmlAttributeIDLong( aNode, 2 );
1015
1016 XNODE* cNode = aNode->GetChildren();
1017
1018 for( ; cNode; cNode = cNode->GetNext() )
1019 {
1020 wxString cNodeName = cNode->GetName();
1021
1022 if( cNodeName == wxT( "SIGLOC" ) )
1023 {
1024 NetLabel.Parse( cNode, aContext );
1025 HasNetLabel = true;
1026 }
1027 else
1028 {
1029 THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
1030 }
1031 }
1032}
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
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
NETELEMENT_ID ID
First four characters "BLKT".
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override

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::NET_SCH::Parse().

Member Data Documentation

◆ BlockID

BLOCK_ID CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::BLOCK_TERM::BlockID

Definition at line 384 of file cadstar_sch_archive_parser.h.

◆ HasNetLabel

bool CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::BLOCK_TERM::HasNetLabel = false

Definition at line 386 of file cadstar_sch_archive_parser.h.

◆ ID

NETELEMENT_ID CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::BLOCK_TERM::ID

First four characters "BLKT".

Definition at line 383 of file cadstar_sch_archive_parser.h.

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

◆ NetLabel

SIGLOC CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::BLOCK_TERM::NetLabel

Definition at line 387 of file cadstar_sch_archive_parser.h.

◆ TerminalID

TERMINAL_ID CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::BLOCK_TERM::TerminalID

Definition at line 385 of file cadstar_sch_archive_parser.h.


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