KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::PARTNAMECOL Struct Reference

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::PARTNAMECOL:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

COLOR_ID Color
 
bool IsVisible = true
 
bool IsPickable = true
 

Detailed Description

Definition at line 1248 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 2252 of file cadstar_archive_parser.cpp.

2253 {
2254  wxASSERT( aNode->GetName() == wxT( "PARTNAMECOL" ) );
2255 
2256  Color = GetXmlAttributeIDString( aNode, 0 );
2257 
2258  XNODE* cNode = aNode->GetChildren();
2259 
2260  for( ; cNode; cNode = cNode->GetNext() )
2261  {
2262  wxString cNodeName = cNode->GetName();
2263 
2264  if( cNodeName == wxT( "INVISIBLE" ) )
2265  {
2266  IsVisible = false;
2267  }
2268  else if( cNodeName == wxT( "NOTPICKABLE" ) )
2269  {
2270  IsPickable = false;
2271  }
2272  else
2273  {
2274  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
2275  }
2276  }
2277 }
XNODE * GetChildren() const
Definition: xnode.h:62
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.

Referenced by CADSTAR_SCH_ARCHIVE_PARSER::Parse().

Member Data Documentation

◆ Color

COLOR_ID CADSTAR_ARCHIVE_PARSER::PARTNAMECOL::Color

Definition at line 1250 of file cadstar_archive_parser.h.

◆ IsPickable

bool CADSTAR_ARCHIVE_PARSER::PARTNAMECOL::IsPickable = true

Definition at line 1252 of file cadstar_archive_parser.h.

◆ IsVisible

bool CADSTAR_ARCHIVE_PARSER::PARTNAMECOL::IsVisible = true

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