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
 

Detailed Description

Definition at line 1239 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 2224 of file cadstar_archive_parser.cpp.

2225 {
2226  wxASSERT( aNode->GetName() == wxT( "ATTRCOLORS" ) );
2227 
2228  XNODE* cNode = aNode->GetChildren();
2229 
2230  for( ; cNode; cNode = cNode->GetNext() )
2231  {
2232  wxString cNodeName = cNode->GetName();
2233 
2234  if( cNodeName == wxT( "DFLTSETTINGS" ) )
2235  {
2236  DefaultSettings.Parse( cNode, aContext );
2237  }
2238  else if( cNodeName == wxT( "ATTRCOL" ) )
2239  {
2240  ATTRCOL attrcol;
2241  attrcol.Parse( cNode, aContext );
2242  AttributeColors.insert( { attrcol.AttributeID, attrcol } );
2243  }
2244  else
2245  {
2246  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
2247  }
2248  }
2249 }
XNODE * GetChildren() const
Definition: xnode.h:62
std::map< ATTRIBUTE_ID, ATTRCOL > AttributeColors
void Parse(XNODE *aNode, PARSER_CONTEXT *aContext) override
Hold an XML or S-expression element.
Definition: xnode.h:43
#define THROW_UNKNOWN_NODE_IO_ERROR(nodename, location)

References CADSTAR_ARCHIVE_PARSER::ATTRCOL::AttributeID, XNODE::GetChildren(), 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 1241 of file cadstar_archive_parser.h.


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