KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::REUSEBLOCK Struct Reference

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::REUSEBLOCK:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

REUSEBLOCK_ID ID
 
wxString Name
 
wxString FileName
 Filename of the reuse block (usually a .pcb). Used for reloading. More...
 
bool Mirror = false
 
long OrientAngle = 0
 

Detailed Description

Definition at line 853 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_ARCHIVE_PARSER::REUSEBLOCK::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 1523 of file cadstar_archive_parser.cpp.

1524{
1525 wxASSERT( aNode->GetName() == wxT( "REUSEBLOCK" ) );
1526
1527 ID = GetXmlAttributeIDString( aNode, 0 );
1528 Name = GetXmlAttributeIDString( aNode, 1 );
1529 FileName = GetXmlAttributeIDString( aNode, 2 );
1530
1531 XNODE* cNode = aNode->GetChildren();
1532
1533 for( ; cNode; cNode = cNode->GetNext() )
1534 {
1535 wxString cNodeName = cNode->GetName();
1536
1537 if( cNodeName == wxT( "MIRROR" ) )
1538 Mirror = true;
1539 else if( cNodeName == wxT( "ORIENT" ) )
1540 OrientAngle = GetXmlAttributeIDLong( cNode, 0 );
1541 else
1542 THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, wxT( "REUSEBLOCK" ) );
1543 }
1544}
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)
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
wxString FileName
Filename of the reuse block (usually a .pcb). Used for reloading.

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

Referenced by CADSTAR_SCH_ARCHIVE_PARSER::CADSTAR_SCHEMATIC::Parse(), and CADSTAR_PCB_ARCHIVE_PARSER::LAYOUT::Parse().

Member Data Documentation

◆ FileName

wxString CADSTAR_ARCHIVE_PARSER::REUSEBLOCK::FileName

Filename of the reuse block (usually a .pcb). Used for reloading.

Definition at line 857 of file cadstar_archive_parser.h.

◆ ID

REUSEBLOCK_ID CADSTAR_ARCHIVE_PARSER::REUSEBLOCK::ID

◆ Mirror

bool CADSTAR_ARCHIVE_PARSER::REUSEBLOCK::Mirror = false

Definition at line 858 of file cadstar_archive_parser.h.

◆ Name

wxString CADSTAR_ARCHIVE_PARSER::REUSEBLOCK::Name

Definition at line 856 of file cadstar_archive_parser.h.

◆ OrientAngle

long CADSTAR_ARCHIVE_PARSER::REUSEBLOCK::OrientAngle = 0

Definition at line 859 of file cadstar_archive_parser.h.


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