KiCad PCB EDA Suite
CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::EXTENSION_LINE Struct Reference

< Token "EXTLINE" More...

#include <cadstar_pcb_archive_parser.h>

Inheritance diagram for CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::EXTENSION_LINE:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

void Parse (XNODE *aNode, PARSER_CONTEXT *aContext) override
 

Public Attributes

LINECODE_ID LineCodeID
 
POINT Start
 
POINT End
 
long Overshoot
 Overshoot of the extension line past the arrow line. More...
 
long Offset
 Offset from the measurement point. More...
 
bool SuppressFirst = false
 If true, excludes the first extension line (only shows extension line at end) More...
 

Detailed Description

< Token "EXTLINE"

Definition at line 641 of file cadstar_pcb_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::EXTENSION_LINE::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 1285 of file cadstar_pcb_archive_parser.cpp.

1287 {
1288  wxASSERT( aNode->GetName() == wxT( "EXTLINE" ) );
1289 
1290  LineCodeID = GetXmlAttributeIDString( aNode, 0 );
1291  Overshoot = GetXmlAttributeIDLong( aNode, 3 );
1292  Offset = GetXmlAttributeIDLong( aNode, 4 );
1293 
1294  XNODE* cNode = aNode->GetChildren();
1295  int noOfPoints = 0;
1296 
1297  for( ; cNode; cNode = cNode->GetNext() )
1298  {
1299  wxString cNodeName = cNode->GetName();
1300 
1301  if( noOfPoints < 2 && cNodeName == wxT( "PT" ) )
1302  {
1303  ++noOfPoints;
1304 
1305  if( noOfPoints == 1 )
1306  Start.Parse( cNode, aContext );
1307  else
1308  End.Parse( cNode, aContext );
1309  }
1310  else if( cNodeName == wxT( "SUPPRESSFIRST" ) )
1311  {
1312  SuppressFirst = true;
1313  }
1314  else
1315  {
1316  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, wxT( "EXTLINE" ) );
1317  }
1318  }
1319 
1320  if( noOfPoints != 2 )
1321  THROW_MISSING_PARAMETER_IO_ERROR( wxT( "PT" ), wxT( "EXTLINE" ) );
1322 }
#define THROW_MISSING_PARAMETER_IO_ERROR(param, location)
XNODE * GetChildren() const
Definition: xnode.h:62
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
static long GetXmlAttributeIDLong(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
Hold an XML or S-expression element.
Definition: xnode.h:43
XNODE * GetNext() const
Definition: xnode.h:67
long Overshoot
Overshoot of the extension line past the arrow line.
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
bool SuppressFirst
If true, excludes the first extension line (only shows extension line at end)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)

References XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDLong(), CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString(), THROW_MISSING_PARAMETER_IO_ERROR, and THROW_UNKNOWN_NODE_IO_ERROR.

Member Data Documentation

◆ End

POINT CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::EXTENSION_LINE::End

◆ LineCodeID

LINECODE_ID CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::EXTENSION_LINE::LineCodeID

Definition at line 643 of file cadstar_pcb_archive_parser.h.

◆ Offset

long CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::EXTENSION_LINE::Offset

Offset from the measurement point.

Definition at line 648 of file cadstar_pcb_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::applyDimensionSettings().

◆ Overshoot

long CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::EXTENSION_LINE::Overshoot

Overshoot of the extension line past the arrow line.

Definition at line 647 of file cadstar_pcb_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::loadDimensions().

◆ Start

POINT CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::EXTENSION_LINE::Start

◆ SuppressFirst

bool CADSTAR_PCB_ARCHIVE_PARSER::DIMENSION::EXTENSION_LINE::SuppressFirst = false

If true, excludes the first extension line (only shows extension line at end)

Definition at line 649 of file cadstar_pcb_archive_parser.h.


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