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

< "TERM" nodename (represents a pin in a SCH symbol) More...

#include <cadstar_sch_archive_parser.h>

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

Public Member Functions

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

Public Attributes

NETELEMENT_ID ID
 First character is "P". More...
 
SYMBOL_ID SymbolID
 
TERMINAL_ID TerminalID
 
bool HasNetLabel = false
 
SIGLOC NetLabel
 

Detailed Description

< "TERM" nodename (represents a pin in a SCH symbol)

Definition at line 358 of file cadstar_sch_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 910 of file cadstar_sch_archive_parser.cpp.

911 {
912  wxASSERT( aNode->GetName() == wxT( "TERM" ) );
913 
914  ID = GetXmlAttributeIDString( aNode, 0 );
915  SymbolID = GetXmlAttributeIDString( aNode, 1 );
916  TerminalID = GetXmlAttributeIDLong( aNode, 2 );
917 
918 
919  XNODE* cNode = aNode->GetChildren();
920 
921  for( ; cNode; cNode = cNode->GetNext() )
922  {
923  wxString cNodeName = cNode->GetName();
924 
925  if( cNodeName == wxT( "SIGLOC" ) )
926  {
927  NetLabel.Parse( cNode, aContext );
928  HasNetLabel = true;
929  }
930  else
931  {
932  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
933  }
934  }
935 }
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
XNODE * GetChildren() const
Definition: xnode.h:62
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.

Member Data Documentation

◆ HasNetLabel

bool CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::SYM_TERM::HasNetLabel = false

Definition at line 363 of file cadstar_sch_archive_parser.h.

◆ ID

NETELEMENT_ID CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::SYM_TERM::ID

First character is "P".

Definition at line 360 of file cadstar_sch_archive_parser.h.

◆ NetLabel

SIGLOC CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::SYM_TERM::NetLabel

Definition at line 364 of file cadstar_sch_archive_parser.h.

◆ SymbolID

SYMBOL_ID CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::SYM_TERM::SymbolID

Definition at line 361 of file cadstar_sch_archive_parser.h.

◆ TerminalID

TERMINAL_ID CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::SYM_TERM::TerminalID

Definition at line 362 of file cadstar_sch_archive_parser.h.


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