KiCad PCB EDA Suite
CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE Struct Reference

#include <cadstar_pcb_archive_parser.h>

Inheritance diagram for CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE:

Public Member Functions

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

Public Attributes

DRILL_TABLE_ID ID
 
LAYER_ID LayerID
 
POINT Position
 
long OrientAngle = 0
 
bool Mirror = false
 
bool Fixed = false
 
READABILITY Readability = READABILITY::BOTTOM_TO_TOP
 
GROUP_ID GroupID = wxEmptyString
 If not empty, this DRILL_TABLE is part of a group. More...
 
REUSEBLOCKREF ReuseBlockRef
 

Detailed Description

Definition at line 1161 of file cadstar_pcb_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
override

Definition at line 2420 of file cadstar_pcb_archive_parser.cpp.

2421 {
2422  wxASSERT( aNode->GetName() == wxT( "DRILLTABLE" ) );
2423 
2424  ID = GetXmlAttributeIDString( aNode, 0 );
2425  LayerID = GetXmlAttributeIDString( aNode, 1 );
2426 
2427  XNODE* cNode = aNode->GetChildren();
2428  bool positionParsed = false;
2429 
2430  for( ; cNode; cNode = cNode->GetNext() )
2431  {
2432  wxString cNodeName = cNode->GetName();
2433 
2434  if( !positionParsed && cNodeName == wxT( "PT" ) )
2435  {
2436  Position.Parse( cNode, aContext );
2437  positionParsed = true;
2438  }
2439  else if( cNodeName == wxT( "ORIENT" ) )
2440  {
2441  OrientAngle = GetXmlAttributeIDLong( cNode, 0 );
2442  }
2443  else if( cNodeName == wxT( "MIRROR" ) )
2444  {
2445  Mirror = true;
2446  }
2447  else if( cNodeName == wxT( "FIX" ) )
2448  {
2449  Fixed = true;
2450  }
2451  else if( cNodeName == wxT( "READABILITY" ) )
2452  {
2453  Readability = ParseReadability( cNode );
2454  }
2455  else if( cNodeName == wxT( "GROUPREF" ) )
2456  {
2457  GroupID = GetXmlAttributeIDString( cNode, 0 );
2458  }
2459  else if( cNodeName == wxT( "REUSEBLOCKREF" ) )
2460  {
2461  ReuseBlockRef.Parse( cNode, aContext );
2462  }
2463  else
2464  {
2465  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
2466  }
2467  }
2468 }
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
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
static READABILITY ParseReadability(XNODE *aNode)
GROUP_ID GroupID
If not empty, this DRILL_TABLE is part of a group.
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)

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

Referenced by CADSTAR_PCB_ARCHIVE_PARSER::LAYOUT::Parse().

Member Data Documentation

◆ Fixed

bool CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE::Fixed = false

Definition at line 1168 of file cadstar_pcb_archive_parser.h.

◆ GroupID

GROUP_ID CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE::GroupID = wxEmptyString

If not empty, this DRILL_TABLE is part of a group.

Definition at line 1170 of file cadstar_pcb_archive_parser.h.

◆ ID

DRILL_TABLE_ID CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE::ID

◆ LayerID

LAYER_ID CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE::LayerID

Definition at line 1164 of file cadstar_pcb_archive_parser.h.

◆ Mirror

bool CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE::Mirror = false

Definition at line 1167 of file cadstar_pcb_archive_parser.h.

◆ OrientAngle

long CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE::OrientAngle = 0

Definition at line 1166 of file cadstar_pcb_archive_parser.h.

◆ Position

POINT CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE::Position

Definition at line 1165 of file cadstar_pcb_archive_parser.h.

◆ Readability

READABILITY CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE::Readability = READABILITY::BOTTOM_TO_TOP

Definition at line 1169 of file cadstar_pcb_archive_parser.h.

◆ ReuseBlockRef

REUSEBLOCKREF CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE::ReuseBlockRef

Definition at line 1172 of file cadstar_pcb_archive_parser.h.


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