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

< "JPT" nodename. More...

#include <cadstar_sch_archive_parser.h>

Inheritance diagram for CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::JUNCTION_SCH:
CADSTAR_ARCHIVE_PARSER::NET::JUNCTION CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

void Parse (XNODE *aNode, PARSER_CONTEXT *aContext) override
 
void ParseIdentifiers (XNODE *aNode, PARSER_CONTEXT *aContext)
 
bool ParseSubNode (XNODE *aChildNode, PARSER_CONTEXT *aContext)
 

Public Attributes

TERMINALCODE_ID TerminalCodeID
 Usually a circle, but size can be varied. More...
 
bool HasNetLabel = false
 
SIGLOC NetLabel
 
NETELEMENT_ID ID
 First character is "J". More...
 
LAYER_ID LayerID
 
POINT Location
 
GROUP_ID GroupID = wxEmptyString
 If not empty, this JUCTION is part of a group. More...
 
REUSEBLOCKREF ReuseBlockRef
 
bool Fixed = false
 

Detailed Description

< "JPT" nodename.

Definition at line 349 of file cadstar_sch_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Reimplemented from CADSTAR_ARCHIVE_PARSER::NET::JUNCTION.

Definition at line 1188 of file cadstar_sch_archive_parser.cpp.

1189 {
1190  ParseIdentifiers( aNode, aContext );
1191 
1193  LayerID = GetXmlAttributeIDString( aNode, 2 );
1194 
1195  XNODE* cNode = aNode->GetChildren();
1196 
1197  for( ; cNode; cNode = cNode->GetNext() )
1198  {
1199  if( ParseSubNode( cNode, aContext ) )
1200  {
1201  continue;
1202  }
1203  else if( cNode->GetName() == wxT( "SIGLOC" ) )
1204  {
1205  NetLabel.Parse( cNode, aContext );
1206  HasNetLabel = true;
1207  }
1208  else
1209  {
1210  THROW_UNKNOWN_NODE_IO_ERROR( cNode->GetName(), aNode->GetName() );
1211  }
1212  }
1213 
1214 }
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
TERMINALCODE_ID TerminalCodeID
Usually a circle, but size can be varied.
XNODE * GetChildren() const
Definition: xnode.h:62
bool ParseSubNode(XNODE *aChildNode, PARSER_CONTEXT *aContext)
void ParseIdentifiers(XNODE *aNode, PARSER_CONTEXT *aContext)
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().

◆ ParseIdentifiers()

void CADSTAR_ARCHIVE_PARSER::NET::JUNCTION::ParseIdentifiers ( XNODE aNode,
PARSER_CONTEXT aContext 
)
inherited

Definition at line 1964 of file cadstar_archive_parser.cpp.

1965 {
1966  wxASSERT( aNode->GetName() == wxT( "JPT" ) );
1967 
1968  ID = GetXmlAttributeIDString( aNode, 0 );
1969  LayerID = GetXmlAttributeIDString( aNode, 1 );
1970 }
NETELEMENT_ID ID
First character is "J".
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)

References CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString().

◆ ParseSubNode()

bool CADSTAR_ARCHIVE_PARSER::NET::JUNCTION::ParseSubNode ( XNODE aChildNode,
PARSER_CONTEXT aContext 
)
inherited

Definition at line 1973 of file cadstar_archive_parser.cpp.

1974 {
1975  wxString cNodeName = aChildNode->GetName();
1976 
1977  if( cNodeName == wxT( "PT" ) )
1978  Location.Parse( aChildNode, aContext );
1979  else if( cNodeName == wxT( "FIX" ) )
1980  Fixed = true;
1981  else if( cNodeName == wxT( "GROUPREF" ) )
1982  GroupID = GetXmlAttributeIDString( aChildNode, 0 );
1983  else if( cNodeName == wxT( "REUSEBLOCKREF" ) )
1984  ReuseBlockRef.Parse( aChildNode, aContext );
1985  else
1986  return false;
1987 
1988  return true;
1989 }
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
GROUP_ID GroupID
If not empty, this JUCTION is part of a group.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)

References CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString().

Member Data Documentation

◆ Fixed

bool CADSTAR_ARCHIVE_PARSER::NET::JUNCTION::Fixed = false
inherited

Definition at line 1140 of file cadstar_archive_parser.h.

◆ GroupID

GROUP_ID CADSTAR_ARCHIVE_PARSER::NET::JUNCTION::GroupID = wxEmptyString
inherited

If not empty, this JUCTION is part of a group.

Definition at line 1137 of file cadstar_archive_parser.h.

◆ HasNetLabel

bool CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::JUNCTION_SCH::HasNetLabel = false

Definition at line 352 of file cadstar_sch_archive_parser.h.

◆ ID

NETELEMENT_ID CADSTAR_ARCHIVE_PARSER::NET::JUNCTION::ID
inherited

◆ LayerID

LAYER_ID CADSTAR_ARCHIVE_PARSER::NET::JUNCTION::LayerID
inherited

Definition at line 1135 of file cadstar_archive_parser.h.

◆ Location

POINT CADSTAR_ARCHIVE_PARSER::NET::JUNCTION::Location
inherited

Definition at line 1136 of file cadstar_archive_parser.h.

◆ NetLabel

SIGLOC CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::JUNCTION_SCH::NetLabel

Definition at line 353 of file cadstar_sch_archive_parser.h.

◆ ReuseBlockRef

REUSEBLOCKREF CADSTAR_ARCHIVE_PARSER::NET::JUNCTION::ReuseBlockRef
inherited

Definition at line 1139 of file cadstar_archive_parser.h.

◆ TerminalCodeID

TERMINALCODE_ID CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::JUNCTION_SCH::TerminalCodeID

Usually a circle, but size can be varied.

Definition at line 351 of file cadstar_sch_archive_parser.h.


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