KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::GROUP Struct Reference

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::GROUP:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

GROUP_ID ID
 
wxString Name
 
bool Fixed = false
 
bool Transfer = false
 If true, the group is transferred to PCB. More...
 
GROUP_ID GroupID = wxEmptyString
 If not empty, this GROUP is part of another GROUP. More...
 
REUSEBLOCKREF ReuseBlockRef
 

Detailed Description

Definition at line 837 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 1451 of file cadstar_archive_parser.cpp.

1452 {
1453  wxASSERT( aNode->GetName() == wxT( "GROUP" ) );
1454 
1455  ID = GetXmlAttributeIDString( aNode, 0 );
1456  Name = GetXmlAttributeIDString( aNode, 1 );
1457 
1458  XNODE* cNode = aNode->GetChildren();
1459 
1460  for( ; cNode; cNode = cNode->GetNext() )
1461  {
1462  wxString cNodeName = cNode->GetName();
1463 
1464  if( cNodeName == wxT( "FIX" ) )
1465  Fixed = true;
1466  else if( cNodeName == wxT( "TRANSFER" ) )
1467  Transfer = true;
1468  else if( cNodeName == wxT( "GROUPREF" ) )
1469  GroupID = GetXmlAttributeIDString( cNode, 0 );
1470  else if( cNodeName == wxT( "REUSEBLOCKREF" ) )
1471  ReuseBlockRef.Parse( cNode, aContext );
1472  else
1473  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, wxT( "GROUP" ) );
1474  }
1475 }
bool Transfer
If true, the group is transferred to PCB.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
XNODE * GetChildren() const
Definition: xnode.h:62
GROUP_ID GroupID
If not empty, this GROUP is part of another GROUP.
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::GetXmlAttributeIDString(), and THROW_UNKNOWN_NODE_IO_ERROR.

Member Data Documentation

◆ Fixed

bool CADSTAR_ARCHIVE_PARSER::GROUP::Fixed = false

Definition at line 841 of file cadstar_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::loadGroups().

◆ GroupID

GROUP_ID CADSTAR_ARCHIVE_PARSER::GROUP::GroupID = wxEmptyString

If not empty, this GROUP is part of another GROUP.

Definition at line 843 of file cadstar_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::loadGroups().

◆ ID

GROUP_ID CADSTAR_ARCHIVE_PARSER::GROUP::ID

Definition at line 839 of file cadstar_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::loadGroups().

◆ Name

wxString CADSTAR_ARCHIVE_PARSER::GROUP::Name

Definition at line 840 of file cadstar_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::loadGroups().

◆ ReuseBlockRef

REUSEBLOCKREF CADSTAR_ARCHIVE_PARSER::GROUP::ReuseBlockRef

Definition at line 845 of file cadstar_archive_parser.h.

◆ Transfer

bool CADSTAR_ARCHIVE_PARSER::GROUP::Transfer = false

If true, the group is transferred to PCB.

Definition at line 842 of file cadstar_archive_parser.h.


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