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

< "DANGLER" nodename (represents a dangling wire) More...

#include <cadstar_sch_archive_parser.h>

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

Public Member Functions

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

Public Attributes

NETELEMENT_ID ID
 First character "D". More...
 
TERMINALCODE_ID TerminalCodeID
 
LAYER_ID LayerID
 
POINT Position
 
bool HasNetLabel = false
 
SIGLOC NetLabel
 

Detailed Description

< "DANGLER" nodename (represents a dangling wire)

Definition at line 393 of file cadstar_sch_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 1217 of file cadstar_sch_archive_parser.cpp.

1218 {
1219  wxASSERT( aNode->GetName() == wxT( "DANGLER" ) );
1220 
1221  ID = GetXmlAttributeIDString( aNode, 0 );
1223  LayerID = GetXmlAttributeIDString( aNode, 2 );
1224 
1225  XNODE* cNode = aNode->GetChildren();
1226  bool positionParsed = false;
1227 
1228  for( ; cNode; cNode = cNode->GetNext() )
1229  {
1230  wxString cNodeName = cNode->GetName();
1231 
1232  if( cNodeName == wxT( "SIGLOC" ) )
1233  {
1234  NetLabel.Parse( cNode, aContext );
1235  HasNetLabel = true;
1236  }
1237  else if( !positionParsed && cNodeName == wxT( "PT" ) )
1238  {
1239  Position.Parse( cNode, aContext );
1240  positionParsed = true;
1241  }
1242  else
1243  {
1244  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
1245  }
1246  }
1247 }
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
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.

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

Member Data Documentation

◆ HasNetLabel

bool CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::DANGLER::HasNetLabel = false

Definition at line 399 of file cadstar_sch_archive_parser.h.

◆ ID

NETELEMENT_ID CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::DANGLER::ID

First character "D".

Definition at line 395 of file cadstar_sch_archive_parser.h.

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

◆ LayerID

LAYER_ID CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::DANGLER::LayerID

Definition at line 397 of file cadstar_sch_archive_parser.h.

◆ NetLabel

SIGLOC CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::DANGLER::NetLabel

Definition at line 400 of file cadstar_sch_archive_parser.h.

◆ Position

POINT CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::DANGLER::Position

Definition at line 398 of file cadstar_sch_archive_parser.h.

◆ TerminalCodeID

TERMINALCODE_ID CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::DANGLER::TerminalCodeID

Definition at line 396 of file cadstar_sch_archive_parser.h.


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