KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::DFLTSETTINGS Struct Reference

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::DFLTSETTINGS:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

COLOR_ID Color
 
bool IsVisible = true
 

Detailed Description

Definition at line 1263 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 2293 of file cadstar_archive_parser.cpp.

2294{
2295 wxASSERT( aNode->GetName() == wxT( "DFLTSETTINGS" ) );
2296
2297 Color = GetXmlAttributeIDString( aNode, 0 );
2298
2299 XNODE* cNode = aNode->GetChildren();
2300
2301 for( ; cNode; cNode = cNode->GetNext() )
2302 {
2303 wxString cNodeName = cNode->GetName();
2304
2305 if( cNodeName == wxT( "INVISIBLE" ) )
2306 {
2307 IsVisible = false;
2308 }
2309 else
2310 {
2311 THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
2312 }
2313 }
2314}
#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.

Member Data Documentation

◆ Color

COLOR_ID CADSTAR_ARCHIVE_PARSER::DFLTSETTINGS::Color

Definition at line 1265 of file cadstar_archive_parser.h.

◆ IsVisible

bool CADSTAR_ARCHIVE_PARSER::DFLTSETTINGS::IsVisible = true

Definition at line 1266 of file cadstar_archive_parser.h.


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