KiCad PCB EDA Suite
CADSTAR_ARCHIVE_PARSER::ATTRCOL Struct Reference

#include <cadstar_archive_parser.h>

Inheritance diagram for CADSTAR_ARCHIVE_PARSER::ATTRCOL:
CADSTAR_ARCHIVE_PARSER::PARSER

Public Member Functions

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

Public Attributes

ATTRIBUTE_ID AttributeID
 
COLOR_ID Color
 
bool IsVisible = true
 
bool IsPickable = true
 

Detailed Description

Definition at line 1228 of file cadstar_archive_parser.h.

Member Function Documentation

◆ Parse()

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

Implements CADSTAR_ARCHIVE_PARSER::PARSER.

Definition at line 2195 of file cadstar_archive_parser.cpp.

2196 {
2197  wxASSERT( aNode->GetName() == wxT( "ATTRCOL" ) );
2198 
2199  AttributeID = GetXmlAttributeIDString( aNode, 0 );
2200  Color = GetXmlAttributeIDString( aNode, 1 );
2201 
2202  XNODE* cNode = aNode->GetChildren();
2203 
2204  for( ; cNode; cNode = cNode->GetNext() )
2205  {
2206  wxString cNodeName = cNode->GetName();
2207 
2208  if( cNodeName == wxT( "INVISIBLE" ) )
2209  {
2210  IsVisible = false;
2211  }
2212  else if( cNodeName == wxT( "NOTPICKABLE" ) )
2213  {
2214  IsPickable = false;
2215  }
2216  else
2217  {
2218  THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
2219  }
2220  }
2221 }
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.

Referenced by CADSTAR_ARCHIVE_PARSER::ATTRCOLORS::Parse().

Member Data Documentation

◆ AttributeID

ATTRIBUTE_ID CADSTAR_ARCHIVE_PARSER::ATTRCOL::AttributeID

◆ Color

COLOR_ID CADSTAR_ARCHIVE_PARSER::ATTRCOL::Color

Definition at line 1231 of file cadstar_archive_parser.h.

◆ IsPickable

bool CADSTAR_ARCHIVE_PARSER::ATTRCOL::IsPickable = true

Definition at line 1233 of file cadstar_archive_parser.h.

◆ IsVisible

bool CADSTAR_ARCHIVE_PARSER::ATTRCOL::IsVisible = true

Definition at line 1232 of file cadstar_archive_parser.h.


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