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 949 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 1935 of file cadstar_pcb_archive_parser.cpp.

1936 {
1937  ParseIdentifiers( aNode, aContext );
1938  XNODE* cNode = aNode->GetChildren();
1939 
1940  for( ; cNode; cNode = cNode->GetNext() )
1941  {
1942  if( ParseSubNode( cNode, aContext ) )
1943  continue;
1944  else if( cNode->GetName() == wxT( "TRUNKREF" ) )
1945  TrunkID = GetXmlAttributeIDString( cNode, 0 );
1946  else
1947  THROW_UNKNOWN_NODE_IO_ERROR( cNode->GetName(), aNode->GetName() );
1948  }
1949 }
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 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.

◆ 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.

◆ ReuseBlockRef

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

Definition at line 1139 of file cadstar_archive_parser.h.

◆ TrunkID

TRUNK_ID CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::JUNCTION_PCB::TrunkID

TRUNKREF Statements.

Definition at line 951 of file cadstar_pcb_archive_parser.h.


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