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 1272 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 2317 of file cadstar_archive_parser.cpp.

2318{
2319 wxASSERT( aNode->GetName() == wxT( "ATTRCOL" ) );
2320
2322 Color = GetXmlAttributeIDString( aNode, 1 );
2323
2324 XNODE* cNode = aNode->GetChildren();
2325
2326 for( ; cNode; cNode = cNode->GetNext() )
2327 {
2328 wxString cNodeName = cNode->GetName();
2329
2330 if( cNodeName == wxT( "INVISIBLE" ) )
2331 {
2332 IsVisible = false;
2333 }
2334 else if( cNodeName == wxT( "NOTPICKABLE" ) )
2335 {
2336 IsPickable = false;
2337 }
2338 else
2339 {
2340 THROW_UNKNOWN_NODE_IO_ERROR( cNodeName, aNode->GetName() );
2341 }
2342 }
2343}
#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.

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 1275 of file cadstar_archive_parser.h.

◆ IsPickable

bool CADSTAR_ARCHIVE_PARSER::ATTRCOL::IsPickable = true

Definition at line 1277 of file cadstar_archive_parser.h.

◆ IsVisible

bool CADSTAR_ARCHIVE_PARSER::ATTRCOL::IsVisible = true

Definition at line 1276 of file cadstar_archive_parser.h.


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