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:
CADSTAR_ARCHIVE_PARSER::PARSER

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 1165 of file cadstar_pcb_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 2444 of file cadstar_pcb_archive_parser.cpp.

2445{
2446 wxASSERT( aNode->GetName() == wxT( "DRILLTABLE" ) );
2447
2448 ID = GetXmlAttributeIDString( aNode, 0 );
2449 LayerID = GetXmlAttributeIDString( aNode, 1 );
2450
2451 XNODE* cNode = aNode->GetChildren();
2452 bool positionParsed = false;
2453
2454 for( ; cNode; cNode = cNode->GetNext() )
2455 {
2456 wxString cNodeName = cNode->GetName();
2457
2458 if( !positionParsed && cNodeName == wxT( "PT" ) )
2459 {
2460 Position.Parse( cNode, aContext );
2461 positionParsed = true;
2462 }
2463 else if( cNodeName == wxT( "ORIENT" ) )
2464 {
2465 OrientAngle = GetXmlAttributeIDLong( cNode, 0 );
2466 }
2467 else if( cNodeName == wxT( "MIRROR" ) )
2468 {
2469 Mirror = true;
2470 }
2471 else if( cNodeName == wxT( "FIX" ) )
2472 {
2473 Fixed = true;
2474 }
2475 else if( cNodeName == wxT( "READABILITY" ) )
2476 {
2477 Readability = ParseReadability( cNode );
2478 }
2479 else if( cNodeName == wxT( "GROUPREF" ) )
2480 {
2481 GroupID = GetXmlAttributeIDString( cNode, 0 );
2482 }
2483 else if( cNodeName == wxT( "REUSEBLOCKREF" ) )
2484 {
2485 ReuseBlockRef.Parse( cNode, aContext );
2486 }
2487 else
2488 {
2489 THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
2490 }
2491 }
2492}
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
static READABILITY ParseReadability(XNODE *aNode)
static long GetXmlAttributeIDLong(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
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
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
GROUP_ID GroupID
If not empty, this DRILL_TABLE is part of a group.

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 1172 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 1174 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 1168 of file cadstar_pcb_archive_parser.h.

◆ Mirror

bool CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE::Mirror = false

Definition at line 1171 of file cadstar_pcb_archive_parser.h.

◆ OrientAngle

long CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE::OrientAngle = 0

Definition at line 1170 of file cadstar_pcb_archive_parser.h.

◆ Position

POINT CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE::Position

Definition at line 1169 of file cadstar_pcb_archive_parser.h.

◆ Readability

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

Definition at line 1173 of file cadstar_pcb_archive_parser.h.

◆ ReuseBlockRef

REUSEBLOCKREF CADSTAR_PCB_ARCHIVE_PARSER::DRILL_TABLE::ReuseBlockRef

Definition at line 1176 of file cadstar_pcb_archive_parser.h.


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