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 881 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 1564 of file cadstar_archive_parser.cpp.

1565{
1566 wxASSERT( aNode->GetName() == wxT( "GROUP" ) );
1567
1568 ID = GetXmlAttributeIDString( aNode, 0 );
1569 Name = GetXmlAttributeIDString( aNode, 1 );
1570
1571 XNODE* cNode = aNode->GetChildren();
1572
1573 for( ; cNode; cNode = cNode->GetNext() )
1574 {
1575 wxString cNodeName = cNode->GetName();
1576
1577 if( cNodeName == wxT( "FIX" ) )
1578 Fixed = true;
1579 else if( cNodeName == wxT( "TRANSFER" ) )
1580 Transfer = true;
1581 else if( cNodeName == wxT( "GROUPREF" ) )
1582 GroupID = GetXmlAttributeIDString( cNode, 0 );
1583 else if( cNodeName == wxT( "REUSEBLOCKREF" ) )
1584 ReuseBlockRef.Parse( cNode, aContext );
1585 else
1586 THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, wxT( "GROUP" ) );
1587 }
1588}
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static wxString GetXmlAttributeIDString(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
GROUP_ID GroupID
If not empty, this GROUP is part of another GROUP.
bool Transfer
If true, the group is transferred to PCB.
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override

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 885 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 887 of file cadstar_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::loadGroups().

◆ ID

GROUP_ID CADSTAR_ARCHIVE_PARSER::GROUP::ID

Definition at line 883 of file cadstar_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::loadGroups().

◆ Name

wxString CADSTAR_ARCHIVE_PARSER::GROUP::Name

Definition at line 884 of file cadstar_archive_parser.h.

Referenced by CADSTAR_PCB_ARCHIVE_LOADER::loadGroups().

◆ ReuseBlockRef

REUSEBLOCKREF CADSTAR_ARCHIVE_PARSER::GROUP::ReuseBlockRef

Definition at line 889 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 886 of file cadstar_archive_parser.h.


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