KiCad PCB EDA Suite
CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::JUNCTION_PCB Struct Reference

< "JPT" nodename More...

#include <cadstar_pcb_archive_parser.h>

Inheritance diagram for CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::JUNCTION_PCB:
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

TRUNK_ID TrunkID
 TRUNKREF Statements. More...
 
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 951 of file cadstar_pcb_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::JUNCTION_PCB::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Reimplemented from CADSTAR_ARCHIVE_PARSER::NET::JUNCTION.

Definition at line 1963 of file cadstar_pcb_archive_parser.cpp.

1965 {
1966  ParseIdentifiers( aNode, aContext );
1967  XNODE* cNode = aNode->GetChildren();
1968 
1969  for( ; cNode; cNode = cNode->GetNext() )
1970  {
1971  if( ParseSubNode( cNode, aContext ) )
1972  continue;
1973  else if( cNode->GetName() == wxT( "TRUNKREF" ) )
1974  TrunkID = GetXmlAttributeIDString( cNode, 0 );
1975  else
1976  THROW_UNKNOWN_NODE_IO_ERROR( cNode->GetName(), aNode->GetName() );
1977  }
1978 }
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_PCB_ARCHIVE_PARSER::NET_PCB::Parse().

◆ ParseIdentifiers()

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

Definition at line 1973 of file cadstar_archive_parser.cpp.

1975 {
1976  wxASSERT( aNode->GetName() == wxT( "JPT" ) );
1977 
1978  ID = GetXmlAttributeIDString( aNode, 0 );
1979  LayerID = GetXmlAttributeIDString( aNode, 1 );
1980 }
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 1983 of file cadstar_archive_parser.cpp.

1985 {
1986  wxString cNodeName = aChildNode->GetName();
1987 
1988  if( cNodeName == wxT( "PT" ) )
1989  Location.Parse( aChildNode, aContext );
1990  else if( cNodeName == wxT( "FIX" ) )
1991  Fixed = true;
1992  else if( cNodeName == wxT( "GROUPREF" ) )
1993  GroupID = GetXmlAttributeIDString( aChildNode, 0 );
1994  else if( cNodeName == wxT( "REUSEBLOCKREF" ) )
1995  ReuseBlockRef.Parse( aChildNode, aContext );
1996  else
1997  return false;
1998 
1999  return true;
2000 }
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 1150 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 1147 of file cadstar_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 1145 of file cadstar_archive_parser.h.

◆ Location

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

Definition at line 1146 of file cadstar_archive_parser.h.

◆ ReuseBlockRef

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

Definition at line 1149 of file cadstar_archive_parser.h.

◆ TrunkID

TRUNK_ID CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::JUNCTION_PCB::TrunkID

TRUNKREF Statements.

Definition at line 953 of file cadstar_pcb_archive_parser.h.


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