KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::NET::JUNCTION Struct Reference

< "JPT" nodename. More...

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::NET::JUNCTION:
CADSTAR_ARCHIVE_PARSER::PARSER CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::JUNCTION_PCB CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::JUNCTION_SCH

Public Member Functions

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

Public Attributes

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 1167 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_ARCHIVE_PARSER::NET::JUNCTION::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Reimplemented in CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::JUNCTION_SCH, and CADSTAR_PCB_ARCHIVE_PARSER::NET_PCB::JUNCTION_PCB.

Definition at line 2099 of file cadstar_archive_parser.cpp.

2100{
2101 ParseIdentifiers( aNode, aContext );
2102 XNODE* cNode = aNode->GetChildren();
2103
2104 for( ; cNode; cNode = cNode->GetNext() )
2105 {
2106 if( ParseSubNode( cNode, aContext ) )
2107 continue;
2108 else
2109 THROW_UNKNOWN_NODE_IO_ERROR( cNode->GetName(), aNode->GetName() );
2110 }
2111}
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
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(), and THROW_UNKNOWN_NODE_IO_ERROR.

Referenced by CADSTAR_ARCHIVE_PARSER::NET::ParseSubNode().

◆ ParseIdentifiers()

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

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}
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
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 
)

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

Definition at line 1175 of file cadstar_archive_parser.h.

◆ GroupID

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

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

◆ LayerID

LAYER_ID CADSTAR_ARCHIVE_PARSER::NET::JUNCTION::LayerID

Definition at line 1170 of file cadstar_archive_parser.h.

◆ Location

POINT CADSTAR_ARCHIVE_PARSER::NET::JUNCTION::Location

Definition at line 1171 of file cadstar_archive_parser.h.

◆ ReuseBlockRef

REUSEBLOCKREF CADSTAR_ARCHIVE_PARSER::NET::JUNCTION::ReuseBlockRef

Definition at line 1174 of file cadstar_archive_parser.h.


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