KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::ATTRCOLORS Struct Reference

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::ATTRCOLORS:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

DFLTSETTINGS DefaultSettings
 
std::map< ATTRIBUTE_ID, ATTRCOLAttributeColors
 
bool IsVisible = true
 

Detailed Description

Definition at line 1283 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 2346 of file cadstar_archive_parser.cpp.

2347{
2348 wxASSERT( aNode->GetName() == wxT( "ATTRCOLORS" ) );
2349
2350 XNODE* cNode = aNode->GetChildren();
2351
2352 for( ; cNode; cNode = cNode->GetNext() )
2353 {
2354 wxString cNodeName = cNode->GetName();
2355
2356 if( cNodeName == wxT( "DFLTSETTINGS" ) )
2357 {
2358 DefaultSettings.Parse( cNode, aContext );
2359 }
2360 else if( cNodeName == wxT( "ATTRCOL" ) )
2361 {
2362 ATTRCOL attrcol;
2363 attrcol.Parse( cNode, aContext );
2364 AttributeColors.insert( { attrcol.AttributeID, attrcol } );
2365 }
2366 else if( cNodeName == wxT( "INVISIBLE" ) )
2367 {
2368 IsVisible = false;
2369 }
2370 else
2371 {
2372 THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
2373 }
2374 }
2375}
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)
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
std::map< ATTRIBUTE_ID, ATTRCOL > AttributeColors
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override

References CADSTAR_ARCHIVE_PARSER::ATTRCOL::AttributeID, XNODE::GetChildren(), XNODE::GetNext(), CADSTAR_ARCHIVE_PARSER::ATTRCOL::Parse(), and THROW_UNKNOWN_NODE_IO_ERROR.

Referenced by CADSTAR_SCH_ARCHIVE_PARSER::Parse().

Member Data Documentation

◆ AttributeColors

std::map<ATTRIBUTE_ID, ATTRCOL> CADSTAR_ARCHIVE_PARSER::ATTRCOLORS::AttributeColors

◆ DefaultSettings

DFLTSETTINGS CADSTAR_ARCHIVE_PARSER::ATTRCOLORS::DefaultSettings

Definition at line 1285 of file cadstar_archive_parser.h.

◆ IsVisible

bool CADSTAR_ARCHIVE_PARSER::ATTRCOLORS::IsVisible = true

Definition at line 1288 of file cadstar_archive_parser.h.


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