KiCad PCB EDA Suite
CADSTAR_SCH_ARCHIVE_PARSER::SYMBOLVARIANT Struct Reference

#include <cadstar_sch_archive_parser.h>

Inheritance diagram for CADSTAR_SCH_ARCHIVE_PARSER::SYMBOLVARIANT:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Types

enum  TYPE { TYPE::GLOBALSIGNAL, TYPE::SIGNALREF, TYPE::TESTPOINT }
 

Public Member Functions

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

Public Attributes

TYPE Type
 
wxString Reference = wxEmptyString
 

Detailed Description

Definition at line 220 of file cadstar_sch_archive_parser.h.

Member Enumeration Documentation

◆ TYPE

Enumerator
GLOBALSIGNAL 
SIGNALREF 
TESTPOINT 

Definition at line 222 of file cadstar_sch_archive_parser.h.

223  {
224  GLOBALSIGNAL,
225  SIGNALREF,
226  TESTPOINT
227  //TODO: there might be others
228  };
a test point pad

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 597 of file cadstar_sch_archive_parser.cpp.

598 {
599  wxCHECK( aNode->GetName() == wxT( "SYMBOLVARIANT" ), );
600 
601  XNODE* cNode = aNode->GetChildren();
602 
603  for( ; cNode; cNode = cNode->GetNext() )
604  {
605  wxString cNodeName = cNode->GetName();
606 
607  if( cNodeName == wxT( "SIGNALREF" ) )
608  {
610  CheckNoNextNodes( cNode );
611  }
612  else if( cNodeName == wxT( "GLOBALSIGNAL" ) )
613  {
615  Reference = GetXmlAttributeIDString( cNode, 0 );
616  }
617  else if( cNodeName == wxT( "TESTPOINT" ) )
618  {
620  CheckNoNextNodes( cNode );
621  }
622  else
623  {
624  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
625  }
626  }
627 }
XNODE * GetChildren() const
Definition: xnode.h:62
Hold an XML or S-expression element.
Definition: xnode.h:43
static void CheckNoNextNodes(XNODE *aNode)
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
static wxString GetXmlAttributeIDString(XNODE *aNode, unsigned int aID, bool aIsRequired=true)

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

Member Data Documentation

◆ Reference

wxString CADSTAR_SCH_ARCHIVE_PARSER::SYMBOLVARIANT::Reference = wxEmptyString

◆ Type

TYPE CADSTAR_SCH_ARCHIVE_PARSER::SYMBOLVARIANT::Type

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