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}
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
Hold an XML or S-expression element.
Definition: xnode.h:44
XNODE * GetChildren() const
Definition: xnode.h:62
XNODE * GetNext() const
Definition: xnode.h:67
bool ParseSubNode(XNODE *aChildNode, PARSER_CONTEXT *aContext)
void ParseIdentifiers(XNODE *aNode, PARSER_CONTEXT *aContext)

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 2069 of file cadstar_archive_parser.cpp.

2071{
2072 wxASSERT( aNode->GetName() == wxT( "JPT" ) );
2073
2074 ID = GetXmlAttributeIDString( aNode, 0 );
2075 LayerID = GetXmlAttributeIDString( aNode, 1 );
2076}
NETELEMENT_ID ID
First character is "J".

References CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString().

◆ ParseSubNode()

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

Definition at line 2079 of file cadstar_archive_parser.cpp.

2081{
2082 wxString cNodeName = aChildNode->GetName();
2083
2084 if( cNodeName == wxT( "PT" ) )
2085 Location.Parse( aChildNode, aContext );
2086 else if( cNodeName == wxT( "FIX" ) )
2087 Fixed = true;
2088 else if( cNodeName == wxT( "GROUPREF" ) )
2089 GroupID = GetXmlAttributeIDString( aChildNode, 0 );
2090 else if( cNodeName == wxT( "REUSEBLOCKREF" ) )
2091 ReuseBlockRef.Parse( aChildNode, aContext );
2092 else
2093 return false;
2094
2095 return true;
2096}
GROUP_ID GroupID
If not empty, this JUCTION is part of a group.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override

References CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString().

Member Data Documentation

◆ Fixed

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

Definition at line 1175 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 1172 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 1170 of file cadstar_archive_parser.h.

◆ Location

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

Definition at line 1171 of file cadstar_archive_parser.h.

◆ ReuseBlockRef

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

Definition at line 1174 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: