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

1261 {
1262  wxASSERT( aNode->GetName() == wxT( "EXTLINE" ) );
1263 
1264  LineCodeID = GetXmlAttributeIDString( aNode, 0 );
1265  Overshoot = GetXmlAttributeIDLong( aNode, 3 );
1266  Offset = GetXmlAttributeIDLong( aNode, 4 );
1267 
1268  XNODE* cNode = aNode->GetChildren();
1269  int noOfPoints = 0;
1270 
1271  for( ; cNode; cNode = cNode->GetNext() )
1272  {
1273  wxString cNodeName = cNode->GetName();
1274 
1275  if( noOfPoints < 2 && cNodeName == wxT( "PT" ) )
1276  {
1277  ++noOfPoints;
1278 
1279  if( noOfPoints == 1 )
1280  Start.Parse( cNode, aContext );
1281  else
1282  End.Parse( cNode, aContext );
1283  }
1284  else if( cNodeName == wxT( "SUPPRESSFIRST" ) )
1285  {
1286  SuppressFirst = true;
1287  }
1288  else
1289  {
1290  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, wxT( "EXTLINE" ) );
1291  }
1292  }
1293 
1294  if( noOfPoints != 2 )
1295  THROW_MISSING_PARAMETER_IO_ERROR( wxT( "PT" ), wxT( "EXTLINE" ) );
1296 }
#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: