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 1130 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_PCB_ARCHIVE_PARSER::NET_PCB::JUNCTION_PCB, and CADSTAR_SCH_ARCHIVE_PARSER::NET_SCH::JUNCTION_SCH.

Definition at line 1988 of file cadstar_archive_parser.cpp.

1989 {
1990  ParseIdentifiers( aNode, aContext );
1991  XNODE* cNode = aNode->GetChildren();
1992 
1993  for( ; cNode; cNode = cNode->GetNext() )
1994  {
1995  if( ParseSubNode( cNode, aContext ) )
1996  continue;
1997  else
1998  THROW_UNKNOWN_NODE_IO_ERROR( cNode->GetName(), aNode->GetName() );
1999  }
2000 }
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)

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

1961 {
1962  wxASSERT( aNode->GetName() == wxT( "JPT" ) );
1963 
1964  ID = GetXmlAttributeIDString( aNode, 0 );
1965  LayerID = GetXmlAttributeIDString( aNode, 1 );
1966 }
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 
)

Definition at line 1969 of file cadstar_archive_parser.cpp.

1970 {
1971  wxString cNodeName = aChildNode->GetName();
1972 
1973  if( cNodeName == wxT( "PT" ) )
1974  Location.Parse( aChildNode, aContext );
1975  else if( cNodeName == wxT( "FIX" ) )
1976  Fixed = true;
1977  else if( cNodeName == wxT( "GROUPREF" ) )
1978  GroupID = GetXmlAttributeIDString( aChildNode, 0 );
1979  else if( cNodeName == wxT( "REUSEBLOCKREF" ) )
1980  ReuseBlockRef.Parse( aChildNode, aContext );
1981  else
1982  return false;
1983 
1984  return true;
1985 }
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

Definition at line 1138 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 1135 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 1133 of file cadstar_archive_parser.h.

◆ Location

POINT CADSTAR_ARCHIVE_PARSER::NET::JUNCTION::Location

Definition at line 1134 of file cadstar_archive_parser.h.

◆ ReuseBlockRef

REUSEBLOCKREF CADSTAR_ARCHIVE_PARSER::NET::JUNCTION::ReuseBlockRef

Definition at line 1137 of file cadstar_archive_parser.h.


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