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 809 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 1410 of file cadstar_archive_parser.cpp.

1411 {
1412  wxASSERT( aNode->GetName() == wxT( "REUSEBLOCK" ) );
1413 
1414  ID = GetXmlAttributeIDString( aNode, 0 );
1415  Name = GetXmlAttributeIDString( aNode, 1 );
1416  FileName = GetXmlAttributeIDString( aNode, 2 );
1417 
1418  XNODE* cNode = aNode->GetChildren();
1419 
1420  for( ; cNode; cNode = cNode->GetNext() )
1421  {
1422  wxString cNodeName = cNode->GetName();
1423 
1424  if( cNodeName == wxT( "MIRROR" ) )
1425  Mirror = true;
1426  else if( cNodeName == wxT( "ORIENT" ) )
1427  OrientAngle = GetXmlAttributeIDLong( cNode, 0 );
1428  else
1429  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, wxT( "REUSEBLOCK" ) );
1430  }
1431 }
wxString FileName
Filename of the reuse block (usually a .pcb). Used for reloading.
XNODE * GetChildren() const
Definition: xnode.h:62
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
#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(), 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 813 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 814 of file cadstar_archive_parser.h.

◆ Name

wxString CADSTAR_ARCHIVE_PARSER::REUSEBLOCK::Name

Definition at line 812 of file cadstar_archive_parser.h.

◆ OrientAngle

long CADSTAR_ARCHIVE_PARSER::REUSEBLOCK::OrientAngle = 0

Definition at line 815 of file cadstar_archive_parser.h.


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