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 1294 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 2378 of file cadstar_archive_parser.cpp.

2379{
2380 wxASSERT( aNode->GetName() == wxT( "PARTNAMECOL" ) );
2381
2382 Color = GetXmlAttributeIDString( aNode, 0 );
2383
2384 XNODE* cNode = aNode->GetChildren();
2385
2386 for( ; cNode; cNode = cNode->GetNext() )
2387 {
2388 wxString cNodeName = cNode->GetName();
2389
2390 if( cNodeName == wxT( "INVISIBLE" ) )
2391 {
2392 IsVisible = false;
2393 }
2394 else if( cNodeName == wxT( "NOTPICKABLE" ) )
2395 {
2396 IsPickable = false;
2397 }
2398 else
2399 {
2400 THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
2401 }
2402 }
2403}
#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

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

◆ IsPickable

bool CADSTAR_ARCHIVE_PARSER::PARTNAMECOL::IsPickable = true

Definition at line 1298 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: