KiCad PCB EDA Suite
CADSTAR_SCH_ARCHIVE_PARSER::PARTREF Struct Reference

#include <cadstar_sch_archive_parser.h>

Inheritance diagram for CADSTAR_SCH_ARCHIVE_PARSER::PARTREF:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

PART_ID RefID = wxEmptyString
 
bool ReadOnly = false
 
bool HasLocation = false
 
ATTRIBUTE_LOCATION AttrLoc
 

Detailed Description

Definition at line 189 of file cadstar_sch_archive_parser.h.

Member Function Documentation

◆ Parse()

void CADSTAR_SCH_ARCHIVE_PARSER::PARTREF::Parse ( XNODE aNode,
PARSER_CONTEXT aContext 
)
overridevirtual

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 498 of file cadstar_sch_archive_parser.cpp.

499 {
500  wxCHECK( aNode->GetName() == wxT( "PARTREF" ), );
501 
502  RefID = GetXmlAttributeIDString( aNode, 0 );
503 
504  XNODE* cNode = aNode->GetChildren();
505 
506  for( ; cNode; cNode = cNode->GetNext() )
507  {
508  if( cNode->GetName() == wxT( "READONLY" ) )
509  {
510  ReadOnly = true;
511  }
512  else if( cNode->GetName() == wxT( "ATTRLOC" ) )
513  {
514  AttrLoc.Parse( cNode, aContext );
515  HasLocation = true;
516  }
517  else
518  {
519  THROW_UNKNOWN_NODE_IO_ERROR( cNode->GetName(), aNode->GetName() );
520  }
521  }
522 }
XNODE * GetChildren() const
Definition: xnode.h:62
virtual void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
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

◆ AttrLoc

ATTRIBUTE_LOCATION CADSTAR_SCH_ARCHIVE_PARSER::PARTREF::AttrLoc

◆ HasLocation

bool CADSTAR_SCH_ARCHIVE_PARSER::PARTREF::HasLocation = false

Definition at line 193 of file cadstar_sch_archive_parser.h.

◆ ReadOnly

bool CADSTAR_SCH_ARCHIVE_PARSER::PARTREF::ReadOnly = false

Definition at line 192 of file cadstar_sch_archive_parser.h.

◆ RefID

PART_ID CADSTAR_SCH_ARCHIVE_PARSER::PARTREF::RefID = wxEmptyString

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