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 1219 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 2171 of file cadstar_archive_parser.cpp.

2172 {
2173  wxASSERT( aNode->GetName() == wxT( "DFLTSETTINGS" ) );
2174 
2175  Color = GetXmlAttributeIDString( aNode, 0 );
2176 
2177  XNODE* cNode = aNode->GetChildren();
2178 
2179  for( ; cNode; cNode = cNode->GetNext() )
2180  {
2181  wxString cNodeName = cNode->GetName();
2182 
2183  if( cNodeName == wxT( "INVISIBLE" ) )
2184  {
2185  IsVisible = false;
2186  }
2187  else
2188  {
2189  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
2190  }
2191  }
2192 }
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.

Member Data Documentation

◆ Color

COLOR_ID CADSTAR_ARCHIVE_PARSER::DFLTSETTINGS::Color

Definition at line 1221 of file cadstar_archive_parser.h.

◆ IsVisible

bool CADSTAR_ARCHIVE_PARSER::DFLTSETTINGS::IsVisible = true

Definition at line 1222 of file cadstar_archive_parser.h.


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